1
0
Fork 0
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:
Paul Thornthwaite 2012-12-22 23:23:26 +00:00
parent 80f27b434c
commit 20a5da96bf
9 changed files with 21 additions and 21 deletions

View file

@ -5,9 +5,9 @@ module Fog
class StormOnDemand class StormOnDemand
class Balancer < Fog::Model class Balancer < Fog::Model
identity :uniq_id identity :uniq_id
attribute :vip attribute :vip
attribute :price attribute :price
attribute :name attribute :name
@ -20,17 +20,17 @@ module Fog
def initialize(attributes={}) def initialize(attributes={})
super super
end end
def add_node(options) def add_node(options)
requires :identity requires :identity
connection.add_balancer_node({:uniq_id => identity}.merge!(options)) service.add_balancer_node({:uniq_id => identity}.merge!(options))
end end
def remove_node(options) def remove_node(options)
requires :identity requires :identity
connection.remove_balancer_node({:uniq_id => identity}.merge!(options)) service.remove_balancer_node({:uniq_id => identity}.merge!(options))
end end
end end
end end

View file

@ -10,7 +10,7 @@ module Fog
model Fog::Compute::StormOnDemand::Balancer model Fog::Compute::StormOnDemand::Balancer
def all def all
data = connection.list_balancers.body['items'] data = service.list_balancers.body['items']
load(data) load(data)
end end

View file

@ -10,7 +10,7 @@ module Fog
model Fog::Compute::StormOnDemand::Config model Fog::Compute::StormOnDemand::Config
def all def all
data = connection.list_configs.body['items'] data = service.list_configs.body['items']
load(data) load(data)
end end

View file

@ -10,7 +10,7 @@ module Fog
model Fog::Compute::StormOnDemand::Image model Fog::Compute::StormOnDemand::Image
def all def all
data = connection.list_images.body['items'] data = service.list_images.body['items']
load(data) load(data)
end end

View file

@ -10,12 +10,12 @@ module Fog
model Fog::Compute::StormOnDemand::PrivateIp model Fog::Compute::StormOnDemand::PrivateIp
def all def all
data = connection.list_private_ips.body['networks'] data = service.list_private_ips.body['networks']
load(data) load(data)
end end
def get(server_id) 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) new(server)
elsif !server_id elsif !server_id
nil nil

View file

@ -33,13 +33,13 @@ module Fog
end end
def create(options) def create(options)
data = connection.create_server(options).body['servers'] data = service.create_server(options).body['servers']
load(data) load(data)
end end
def destroy def destroy
requires :identity requires :identity
connection.delete_server(:uniq_id => identity) service.delete_server(:uniq_id => identity)
true true
end end
@ -49,18 +49,18 @@ module Fog
def reboot def reboot
requires :identity requires :identity
connection.reboot_server(:uniq_id => identity) service.reboot_server(:uniq_id => identity)
true true
end end
def clone(options) def clone(options)
requires :identity requires :identity
connection.clone_server({:uniq_id => identity}.merge!(options)) service.clone_server({:uniq_id => identity}.merge!(options))
true true
end end
def resize(options) def resize(options)
requires :identity requires :identity
connection.resize_server({:uniq_id => identity}.merge!(options)) service.resize_server({:uniq_id => identity}.merge!(options))
true true
end end
end end

View file

@ -10,12 +10,12 @@ module Fog
model Fog::Compute::StormOnDemand::Server model Fog::Compute::StormOnDemand::Server
def all def all
data = connection.list_servers.body['items'] data = service.list_servers.body['items']
load(data) load(data)
end end
def get(uniq_id) def get(uniq_id)
server = connection.get_server(:uniq_id => uniq_id).body server = service.get_server(:uniq_id => uniq_id).body
new(server) new(server)
end end

View file

@ -9,7 +9,7 @@ module Fog
model Fog::Compute::StormOnDemand::Stat model Fog::Compute::StormOnDemand::Stat
def get(options) def get(options)
data = connection.get_stats(options).body data = service.get_stats(options).body
load(data) load(data)
rescue Excon::Errors::Forbidden rescue Excon::Errors::Forbidden
nil nil

View file

@ -10,7 +10,7 @@ module Fog
model Fog::Compute::StormOnDemand::Template model Fog::Compute::StormOnDemand::Template
def all def all
data = connection.list_templates.body['items'] data = service.list_templates.body['items']
load(data) load(data)
end end