Class: Fog::Compute::AzureRM::AvailabilitySets

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/azurerm/models/compute/availability_sets.rb

Overview

This class is giving implementation of all/list, get and check name availability for storage account.

Instance Method Summary collapse

Instance Method Details

#allObject



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/fog/azurerm/models/compute/availability_sets.rb', line 9

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 ||
      parse_response = Fog::Compute::AzureRM::AvailabilitySet.parse()
      accounts << parse_response
    end
  end
  load(accounts)
end

#check_availability_set_exists(resource_group, name) ⇒ Object



29
30
31
# File 'lib/fog/azurerm/models/compute/availability_sets.rb', line 29

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

#get(resource_group, identity) ⇒ Object



23
24
25
26
27
# File 'lib/fog/azurerm/models/compute/availability_sets.rb', line 23

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