2012-08-05 08:10:55 -04:00
|
|
|
require 'fog/core/collection'
|
|
|
|
require 'fog/terremark/models/shared/nodeservice'
|
|
|
|
|
|
|
|
module Fog
|
|
|
|
module Terremark
|
|
|
|
module Shared
|
|
|
|
|
|
|
|
module Mock
|
|
|
|
def nodeservices(options = {})
|
2012-12-22 18:23:10 -05:00
|
|
|
Fog::Terremark::Shared::Servers.new(options.merge(:service => self))
|
2012-08-05 08:10:55 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
module Real
|
|
|
|
def nodeservices(options = {})
|
2012-12-22 18:23:10 -05:00
|
|
|
Fog::Terremark::Shared::NodeServices.new(options.merge(:service => self))
|
2012-08-05 08:10:55 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class NodeServices < Fog::Collection
|
|
|
|
|
|
|
|
model Fog::Terremark::Shared::NodeService
|
2012-12-22 18:23:10 -05:00
|
|
|
|
2012-08-05 08:10:55 -04:00
|
|
|
def all(internet_service_id)
|
2012-12-22 18:23:10 -05:00
|
|
|
data = service.get_node_services(internet_service_id).body["NodeServices"]
|
2012-08-05 08:10:55 -04:00
|
|
|
load(data)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|