mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[clodo] Updates reference to service
This commit is contained in:
parent
a7bb561fe7
commit
0653f7b5b4
3 changed files with 10 additions and 10 deletions
|
@ -10,12 +10,12 @@ module Fog
|
|||
model Fog::Compute::Clodo::Image
|
||||
|
||||
def all
|
||||
data = connection.list_images_detail.body['images']
|
||||
data = service.list_images_detail.body['images']
|
||||
load(data)
|
||||
end
|
||||
|
||||
def get(image_id)
|
||||
image = connection.get_image_details(image_id).body['image']
|
||||
image = service.get_image_details(image_id).body['image']
|
||||
new(image) if image
|
||||
rescue Fog::Compute::Clodo::NotFound
|
||||
nil
|
||||
|
|
|
@ -47,7 +47,7 @@ module Fog
|
|||
|
||||
def destroy
|
||||
requires :id
|
||||
connection.delete_server(id)
|
||||
service.delete_server(id)
|
||||
true
|
||||
end
|
||||
|
||||
|
@ -66,15 +66,15 @@ module Fog
|
|||
end
|
||||
|
||||
def add_ip_address
|
||||
connection.add_ip_address(id)
|
||||
service.add_ip_address(id)
|
||||
end
|
||||
|
||||
def move_ip_address(ip_address)
|
||||
connection.move_ip_address(id, ip_address)
|
||||
service.move_ip_address(id, ip_address)
|
||||
end
|
||||
|
||||
def delete_ip_address(ip_address)
|
||||
connection.delete_ip_address(id, ip_address)
|
||||
service.delete_ip_address(id, ip_address)
|
||||
end
|
||||
|
||||
def ready?
|
||||
|
@ -83,14 +83,14 @@ module Fog
|
|||
|
||||
def reboot(type = 'SOFT')
|
||||
requires :id
|
||||
connection.reboot_server(id, type)
|
||||
service.reboot_server(id, type)
|
||||
true
|
||||
end
|
||||
|
||||
def save
|
||||
raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if persisted?
|
||||
requires :image_id
|
||||
data = connection.create_server(image_id, attributes)
|
||||
data = service.create_server(image_id, attributes)
|
||||
merge_attributes(data.body['server'])
|
||||
true
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ module Fog
|
|||
model Fog::Compute::Clodo::Server
|
||||
|
||||
def all
|
||||
data = connection.list_servers_detail.body['servers']
|
||||
data = service.list_servers_detail.body['servers']
|
||||
load(data)
|
||||
end
|
||||
|
||||
|
@ -22,7 +22,7 @@ module Fog
|
|||
end
|
||||
|
||||
def get(server_id)
|
||||
if server = connection.get_server_details(server_id).body['server']
|
||||
if server = service.get_server_details(server_id).body['server']
|
||||
new(server)
|
||||
end
|
||||
rescue Fog::Compute::Clodo::NotFound
|
||||
|
|
Loading…
Reference in a new issue