1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/google/models/compute/zones.rb
2013-09-26 21:28:26 +02:00

27 lines
495 B
Ruby

require 'fog/core/collection'
require 'fog/google/models/compute/zone'
module Fog
module Compute
class Google
class Zones < Fog::Collection
model Fog::Compute::Google::Zone
def all
data = service.list_zones.body["items"] || []
load(data)
end
def get(identity)
data = connection.get_zone(identity).body
new(data)
rescue Excon::Errors::NotFound
nil
end
end
end
end
end