Class: Fog::Compute::HPV2::AvailabilityZones

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/hp/models/compute_v2/availability_zones.rb

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
13
# File 'lib/fog/hp/models/compute_v2/availability_zones.rb', line 10

def all
  data = service.list_availability_zones.body['availabilityZoneInfo']
  load(data)
end

#get(zone_name) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/fog/hp/models/compute_v2/availability_zones.rb', line 15

def get(zone_name)
  if zone_name
    self.all.select {|z| z.name == zone_name}.first
  end
rescue Fog::Compute::HPV2::NotFound
  nil
end