1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[serverlove|compute] Updates reference to service

This commit is contained in:
Paul Thornthwaite 2012-12-22 23:23:47 +00:00
parent bc26c4e433
commit 80f27b434c
4 changed files with 25 additions and 25 deletions

View file

@ -20,11 +20,11 @@ module Fog
attributes = {}
if(identity)
attributes = connection.update_image(identity, allowed_attributes).body
attributes = service.update_image(identity, allowed_attributes).body
else
requires :name
requires :size
attributes = connection.create_image(allowed_attributes).body
attributes = service.create_image(allowed_attributes).body
end
merge_attributes(attributes)
@ -33,7 +33,7 @@ module Fog
def load_standard_image(standard_image_uuid)
requires :identity
connection.load_standard_image(identity, standard_image_uuid)
service.load_standard_image(identity, standard_image_uuid)
end
def ready?
@ -42,7 +42,7 @@ module Fog
def destroy
requires :identity
connection.destroy_image(identity)
service.destroy_image(identity)
self
end

View file

@ -10,12 +10,12 @@ module Fog
model Fog::Compute::Serverlove::Image
def all
data = connection.get_images.body
data = service.get_images.body
load(data)
end
def get(image_id)
data = connection.get_image(image_id).body
data = service.get_image(image_id).body
new(data)
end

View file

@ -31,11 +31,11 @@ module Fog
attributes = {}
if(identity)
attributes = connection.update_server(identity, allowed_attributes).body
attributes = service.update_server(identity, allowed_attributes).body
else
requires :name
requires :cpu
attributes = connection.create_server(self.defaults.merge(allowed_attributes)).body
attributes = service.create_server(self.defaults.merge(allowed_attributes)).body
end
merge_attributes(attributes)
@ -44,7 +44,7 @@ module Fog
def destroy
requires :identity
connection.destroy_server(identity)
service.destroy_server(identity)
self
end

View file

@ -10,12 +10,12 @@ module Fog
model Fog::Compute::Serverlove::Server
def all
data = connection.get_servers.body
data = service.get_servers.body
load(data)
end
def get(server_id)
data = connection.get_server(server_id).body
data = service.get_server(server_id).body
new(data)
end