mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[storm_on_demand] Updates reference to service
This commit is contained in:
parent
80f27b434c
commit
20a5da96bf
9 changed files with 21 additions and 21 deletions
|
@ -5,9 +5,9 @@ module Fog
|
|||
class StormOnDemand
|
||||
|
||||
class Balancer < Fog::Model
|
||||
|
||||
|
||||
identity :uniq_id
|
||||
|
||||
|
||||
attribute :vip
|
||||
attribute :price
|
||||
attribute :name
|
||||
|
@ -20,17 +20,17 @@ module Fog
|
|||
def initialize(attributes={})
|
||||
super
|
||||
end
|
||||
|
||||
|
||||
def add_node(options)
|
||||
requires :identity
|
||||
connection.add_balancer_node({:uniq_id => identity}.merge!(options))
|
||||
service.add_balancer_node({:uniq_id => identity}.merge!(options))
|
||||
end
|
||||
|
||||
|
||||
def remove_node(options)
|
||||
requires :identity
|
||||
connection.remove_balancer_node({:uniq_id => identity}.merge!(options))
|
||||
service.remove_balancer_node({:uniq_id => identity}.merge!(options))
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ module Fog
|
|||
model Fog::Compute::StormOnDemand::Balancer
|
||||
|
||||
def all
|
||||
data = connection.list_balancers.body['items']
|
||||
data = service.list_balancers.body['items']
|
||||
load(data)
|
||||
end
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ module Fog
|
|||
model Fog::Compute::StormOnDemand::Config
|
||||
|
||||
def all
|
||||
data = connection.list_configs.body['items']
|
||||
data = service.list_configs.body['items']
|
||||
load(data)
|
||||
end
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ module Fog
|
|||
model Fog::Compute::StormOnDemand::Image
|
||||
|
||||
def all
|
||||
data = connection.list_images.body['items']
|
||||
data = service.list_images.body['items']
|
||||
load(data)
|
||||
end
|
||||
|
||||
|
|
|
@ -10,12 +10,12 @@ module Fog
|
|||
model Fog::Compute::StormOnDemand::PrivateIp
|
||||
|
||||
def all
|
||||
data = connection.list_private_ips.body['networks']
|
||||
data = service.list_private_ips.body['networks']
|
||||
load(data)
|
||||
end
|
||||
|
||||
def get(server_id)
|
||||
if server_id && server = connection.get_private_ip(private_ip).body
|
||||
if server_id && server = service.get_private_ip(private_ip).body
|
||||
new(server)
|
||||
elsif !server_id
|
||||
nil
|
||||
|
|
|
@ -33,13 +33,13 @@ module Fog
|
|||
end
|
||||
|
||||
def create(options)
|
||||
data = connection.create_server(options).body['servers']
|
||||
data = service.create_server(options).body['servers']
|
||||
load(data)
|
||||
end
|
||||
|
||||
def destroy
|
||||
requires :identity
|
||||
connection.delete_server(:uniq_id => identity)
|
||||
service.delete_server(:uniq_id => identity)
|
||||
true
|
||||
end
|
||||
|
||||
|
@ -49,18 +49,18 @@ module Fog
|
|||
|
||||
def reboot
|
||||
requires :identity
|
||||
connection.reboot_server(:uniq_id => identity)
|
||||
service.reboot_server(:uniq_id => identity)
|
||||
true
|
||||
end
|
||||
|
||||
def clone(options)
|
||||
requires :identity
|
||||
connection.clone_server({:uniq_id => identity}.merge!(options))
|
||||
service.clone_server({:uniq_id => identity}.merge!(options))
|
||||
true
|
||||
end
|
||||
def resize(options)
|
||||
requires :identity
|
||||
connection.resize_server({:uniq_id => identity}.merge!(options))
|
||||
service.resize_server({:uniq_id => identity}.merge!(options))
|
||||
true
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,12 +10,12 @@ module Fog
|
|||
model Fog::Compute::StormOnDemand::Server
|
||||
|
||||
def all
|
||||
data = connection.list_servers.body['items']
|
||||
data = service.list_servers.body['items']
|
||||
load(data)
|
||||
end
|
||||
|
||||
def get(uniq_id)
|
||||
server = connection.get_server(:uniq_id => uniq_id).body
|
||||
server = service.get_server(:uniq_id => uniq_id).body
|
||||
new(server)
|
||||
end
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ module Fog
|
|||
model Fog::Compute::StormOnDemand::Stat
|
||||
|
||||
def get(options)
|
||||
data = connection.get_stats(options).body
|
||||
data = service.get_stats(options).body
|
||||
load(data)
|
||||
rescue Excon::Errors::Forbidden
|
||||
nil
|
||||
|
|
|
@ -10,7 +10,7 @@ module Fog
|
|||
model Fog::Compute::StormOnDemand::Template
|
||||
|
||||
def all
|
||||
data = connection.list_templates.body['items']
|
||||
data = service.list_templates.body['items']
|
||||
load(data)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue