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/disks.rb

36 lines
680 B
Ruby
Raw Normal View History

require 'fog/core/collection'
require 'fog/google/models/compute/image'
module Fog
module Compute
class Google
class Disks < Fog::Collection
model Fog::Compute::Google::Disk
def all(zone)
data = service.list_disks(zone).body["items"]
load(data)
end
def get(identity, zone)
data = service.get_disk(identity, zone).body
new(data)
rescue Excon::Errors::NotFound
nil
end
#def create(name, size, zone=@default_zone, image=nil)
# data = service.insert_disk(name, size, zone, image).body
# new(data)
#end
end
end
end
end