Sha256: e4165cf899b659123db259cbce8620cc83188ee234066e60cc3195f4a18efcc7
Contents?: true
Size: 1.23 KB
Versions: 4
Compression:
Stored size: 1.23 KB
Contents
require 'fog/core/collection' require 'fog/azurerm/models/compute/availability_set' 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_obj = Fog::Compute::AzureRM::AvailabilitySet.new(service: service) availability_set_obj.merge_attributes(Fog::Compute::AzureRM::AvailabilitySet.parse(availability_set)) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems