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

35 lines
653 B
Ruby
Raw Normal View History

require 'lib/fog/vcloud/terremark/ecloud/models/ip'
2010-06-10 07:20:14 +08:00
module Fog
class Vcloud
2010-06-10 07:20:14 +08:00
module Terremark
class Ecloud
2010-06-10 07:20:14 +08:00
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