Sha256: be498cff2f714a66f754f7af05e7866acfe601574a70bfbed2f895d85f49f327

Contents?: true

Size: 1 KB

Versions: 61

Compression:

Stored size: 1 KB

Contents

module Fog
  module Resources
    class AzureRM
      # Deployments collection class
      class Deployments < Fog::Collection
        attribute :resource_group
        model Fog::Resources::AzureRM::Deployment

        def all
          requires :resource_group
          deployments = []
          service.list_deployments(resource_group).each do |deployment|
            deployments << Fog::Resources::AzureRM::Deployment.parse(deployment)
          end
          load(deployments)
        end

        def get(resource_group_name, deployment_name)
          deployment = service.get_deployment(resource_group_name, deployment_name)
          deployment_fog = Fog::Resources::AzureRM::Deployment.new(service: service)
          deployment_fog.merge_attributes(Fog::Resources::AzureRM::Deployment.parse(deployment))
        end

        def check_deployment_exists(resource_group_name, deployment_name)
          service.check_deployment_exists(resource_group_name, deployment_name)
        end
      end
    end
  end
end

Version data entries

61 entries across 61 versions & 5 rubygems

Version Path
gitlab-fog-azure-rm-1.8.0 lib/fog/azurerm/models/resources/deployments.rb
gitlab-fog-azure-rm-1.7.0 lib/fog/azurerm/models/resources/deployments.rb
gitlab-fog-azure-rm-1.6.0 lib/fog/azurerm/models/resources/deployments.rb
gitlab-fog-azure-rm-1.5.0 lib/fog/azurerm/models/resources/deployments.rb
gitlab-fog-azure-rm-1.4.0 lib/fog/azurerm/models/resources/deployments.rb
gitlab-fog-azure-rm-1.3.0 lib/fog/azurerm/models/resources/deployments.rb
fog-azure-rm-0.6.0 lib/fog/azurerm/models/resources/deployments.rb
gitlab-fog-azure-rm-1.2.0 lib/fog/azurerm/models/resources/deployments.rb
gitlab-fog-azure-rm-1.1.1 lib/fog/azurerm/models/resources/deployments.rb
gitlab-fog-azure-rm-1.0.1 lib/fog/azurerm/models/resources/deployments.rb
gitlab-fog-azure-rm-1.0.0 lib/fog/azurerm/models/resources/deployments.rb
gitlab-fog-azure-rm-0.9.0 lib/fog/azurerm/models/resources/deployments.rb
gitlab-fog-azure-rm-0.8.1 lib/fog/azurerm/models/resources/deployments.rb
gitlab-fog-azure-rm-0.8.0 lib/fog/azurerm/models/resources/deployments.rb
gitlab-fog-azure-rm-0.7.0 lib/fog/azurerm/models/resources/deployments.rb
gitlab-fog-azure-rm-0.6.0 lib/fog/azurerm/models/resources/deployments.rb
fog-azure-rm-0.5.3 lib/fog/azurerm/models/resources/deployments.rb
fog-azure-rm-0.5.2 lib/fog/azurerm/models/resources/deployments.rb
far-gem-0.5.6 lib/fog/azurerm/models/resources/deployments.rb
fog-azure-rm-0.5.1 lib/fog/azurerm/models/resources/deployments.rb