Sha256: b010c6db48dfb7fddf29dbc535f8e793f884d66a846372c238690c71e6854ab5

Contents?: true

Size: 1023 Bytes

Versions: 61

Compression:

Stored size: 1023 Bytes

Contents

module Fog
  module Resources
    class AzureRM
      # This class is giving implementation of all/list, get and
      # check name availability for resource groups.
      class ResourceGroups < Fog::Collection
        model Fog::Resources::AzureRM::ResourceGroup

        def all
          resource_groups = []
          service.list_resource_groups.each do |resource_group|
            resource_groups.push(Fog::Resources::AzureRM::ResourceGroup.parse(resource_group))
          end
          load(resource_groups)
        end

        def get(resource_group_name)
          resource_group = service.get_resource_group(resource_group_name)
          resource_group_fog = Fog::Resources::AzureRM::ResourceGroup.new(service: service)
          resource_group_fog.merge_attributes(Fog::Resources::AzureRM::ResourceGroup.parse(resource_group))
        end

        def check_resource_group_exists(resource_group_name)
          service.check_resource_group_exists(resource_group_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/resource_groups.rb
gitlab-fog-azure-rm-1.7.0 lib/fog/azurerm/models/resources/resource_groups.rb
gitlab-fog-azure-rm-1.6.0 lib/fog/azurerm/models/resources/resource_groups.rb
gitlab-fog-azure-rm-1.5.0 lib/fog/azurerm/models/resources/resource_groups.rb
gitlab-fog-azure-rm-1.4.0 lib/fog/azurerm/models/resources/resource_groups.rb
gitlab-fog-azure-rm-1.3.0 lib/fog/azurerm/models/resources/resource_groups.rb
fog-azure-rm-0.6.0 lib/fog/azurerm/models/resources/resource_groups.rb
gitlab-fog-azure-rm-1.2.0 lib/fog/azurerm/models/resources/resource_groups.rb
gitlab-fog-azure-rm-1.1.1 lib/fog/azurerm/models/resources/resource_groups.rb
gitlab-fog-azure-rm-1.0.1 lib/fog/azurerm/models/resources/resource_groups.rb
gitlab-fog-azure-rm-1.0.0 lib/fog/azurerm/models/resources/resource_groups.rb
gitlab-fog-azure-rm-0.9.0 lib/fog/azurerm/models/resources/resource_groups.rb
gitlab-fog-azure-rm-0.8.1 lib/fog/azurerm/models/resources/resource_groups.rb
gitlab-fog-azure-rm-0.8.0 lib/fog/azurerm/models/resources/resource_groups.rb
gitlab-fog-azure-rm-0.7.0 lib/fog/azurerm/models/resources/resource_groups.rb
gitlab-fog-azure-rm-0.6.0 lib/fog/azurerm/models/resources/resource_groups.rb
fog-azure-rm-0.5.3 lib/fog/azurerm/models/resources/resource_groups.rb
fog-azure-rm-0.5.2 lib/fog/azurerm/models/resources/resource_groups.rb
far-gem-0.5.6 lib/fog/azurerm/models/resources/resource_groups.rb
fog-azure-rm-0.5.1 lib/fog/azurerm/models/resources/resource_groups.rb