Sha256: 5136eeecaf64dbfb5b12378ff6f044ad26b900f8926222fd174e2c48b79abe41

Contents?: true

Size: 937 Bytes

Versions: 6

Compression:

Stored size: 937 Bytes

Contents

module Fog
  module Resources
    class AzureRM
      # Provider model class
      class Provider < Fog::Model
        attribute :id
        attribute :namespace
        attribute :registration_state
        attribute :resource_types

        def self.parse(provider)
          hash = {}
          hash['id'] = provider.id
          hash['namespace'] = provider.namespace
          hash['registration_state'] = provider.registration_state if provider.respond_to?('registration_state')

          hash['resource_types'] = []
          provider.resource_types.each do |provider_resource_type|
            provider_resource_type_obj = Fog::Resources::AzureRM::ProviderResourceType.new
            hash['resource_types'] << provider_resource_type_obj.merge_attributes(Fog::Resources::AzureRM::ProviderResourceType.parse(provider_resource_type))
          end
          hash
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fog-azure-rm-0.1.1 lib/fog/azurerm/models/resources/provider.rb
fog-azure-rm-0.1.0 lib/fog/azurerm/models/resources/provider.rb
fog-azure-rm-0.0.9 lib/fog/azurerm/models/resources/provider.rb
fog-azure-rm-0.0.8 lib/fog/azurerm/models/resources/provider.rb
fog-azure-rm-0.0.6 lib/fog/azurerm/models/resources/provider.rb
fog-azure-rm-0.0.5 lib/fog/azurerm/models/resources/provider.rb