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/vcloud/terremark/ecloud/models/ips.rb

33 lines
602 B
Ruby
Raw Normal View History

2010-06-10 07:20:14 +08:00
module Fog
module Vcloud
module Terremark
module Ecloud
class Ips < Fog::Vcloud::Collection
model Fog::Vcloud::Terremark::Ecloud::Ip
undef_method :create
attribute :href
2010-06-10 07:20:14 +08:00
def all
if data = connection.get_network_ips(href).body[:IpAddress]
load(data)
end
2010-06-10 07:20:14 +08:00
end
def get(uri)
if data = connection.get_network_ip(uri).body
new(data)
end
rescue Fog::Errors::NotFound
nil
2010-06-10 07:20:14 +08:00
end
end
end
end
end
end