Sha256: c27cfa35a22a7cbb7cffafd25b2ca536d883e55406fabcf3be8db4c27f52474d

Contents?: true

Size: 1.26 KB

Versions: 46

Compression:

Stored size: 1.26 KB

Contents

module Fog
  module Compute
    class AzureRM
      # This class is giving implementation of all/list, get and
      # check name availability for storage account.
      class AvailabilitySets < Fog::Collection
        model Fog::Compute::AzureRM::AvailabilitySet
        attribute :resource_group
        def all
          accounts = []
          requires :resource_group
          list_of_availability_sets =
            service.list_availability_sets(resource_group)
          unless list_of_availability_sets.nil?
            list_of_availability_sets.each do |account|
              parse_response = Fog::Compute::AzureRM::AvailabilitySet.parse(account)
              accounts << parse_response
            end
          end
          load(accounts)
        end

        def get(resource_group, identity)
          availability_set = service.get_availability_set(resource_group, identity)
          availability_set_fog = Fog::Compute::AzureRM::AvailabilitySet.new(service: service)
          availability_set_fog.merge_attributes(Fog::Compute::AzureRM::AvailabilitySet.parse(availability_set))
        end

        def check_availability_set_exists(resource_group, name)
          service.check_availability_set_exists(resource_group, name)
        end
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 4 rubygems

Version Path
fog-azure-rm-0.4.1 lib/fog/azurerm/models/compute/availability_sets.rb
fog-azure-rm-0.4.0 lib/fog/azurerm/models/compute/availability_sets.rb
fog-azure-rm-0.3.9 lib/fog/azurerm/models/compute/availability_sets.rb
fog-azure-rm-0.3.8 lib/fog/azurerm/models/compute/availability_sets.rb
fog-azure-rm-0.3.7 lib/fog/azurerm/models/compute/availability_sets.rb
fog-azure-rm-0.3.6 lib/fog/azurerm/models/compute/availability_sets.rb
fog-azure-rm-0.3.5 lib/fog/azurerm/models/compute/availability_sets.rb
fog-azure-rm-0.3.4 lib/fog/azurerm/models/compute/availability_sets.rb
fog-azure-rm-temp-0.0.4 lib/fog/azurerm/models/compute/availability_sets.rb
fog-azure-rm-temp-0.0.3 lib/fog/azurerm/models/compute/availability_sets.rb
fog-azure-rm-0.3.3 lib/fog/azurerm/models/compute/availability_sets.rb
fog-azure-rm-temp-0.0.2 lib/fog/azurerm/models/compute/availability_sets.rb
fog-azure-rm-temp-0.0.1 lib/fog/azurerm/models/compute/availability_sets.rb
fog-azure-rm-0.3.2 lib/fog/azurerm/models/compute/availability_sets.rb
fog-azure-rm-downgraded-0.3.1 lib/fog/azurerm/models/compute/availability_sets.rb
fog-azure-rm-0.3.1 lib/fog/azurerm/models/compute/availability_sets.rb
fog-azure-rm-downgraded-0.3.0 lib/fog/azurerm/models/compute/availability_sets.rb
fog-azure-rm-0.3.0 lib/fog/azurerm/models/compute/availability_sets.rb
fog-azure-rm-0.2.7 lib/fog/azurerm/models/compute/availability_sets.rb
fog-azure-rm-0.2.6 lib/fog/azurerm/models/compute/availability_sets.rb