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/public_ips.rb
Edward Muller 61155040e1 Internet Services and tweaks to Vcloud collection/model.
configure internet service

flesh out internet services a bit more

more tweaks to vcloud collection/model related stuff

remove debugging
2010-06-11 01:52:58 +08:00

32 lines
845 B
Ruby

module Fog
module Vcloud
module Terremark
module Ecloud
module Mock
def public_ips(options = {})
@public_ips ||= Fog::Vcloud::Terremark::Ecloud::PublicIps.new(options.merge(:connection => self))
end
end
module Real
def public_ips(options = {})
@public_ips ||= Fog::Vcloud::Terremark::Ecloud::PublicIps.new(options.merge(:connection => self))
end
end
class PublicIps < Fog::Vcloud::Collection
undef_method :create
model Fog::Vcloud::Terremark::Ecloud::PublicIp
get_request :get_public_ip
vcloud_type "application/vnd.tmrk.ecloud.publicIp+xml"
all_request lambda { |public_ips| public_ips.connection.get_public_ips(public_ips.href) }
end
end
end
end
end