[gogrid] cleanup
This commit is contained in:
parent
5d5c87d1ed
commit
b968cf88a8
|
@ -6,8 +6,8 @@ Gem::Specification.new do |s|
|
||||||
## Leave these as is they will be modified for you by the rake gemspec task.
|
## Leave these as is they will be modified for you by the rake gemspec task.
|
||||||
## If your rubyforge_project name is different, then edit it and comment out
|
## If your rubyforge_project name is different, then edit it and comment out
|
||||||
## the sub! line in the Rakefile
|
## the sub! line in the Rakefile
|
||||||
s.name = 'phpfog-fog'
|
s.name = 'fog'
|
||||||
s.version = '0.4.1.3'
|
s.version = '0.4.1'
|
||||||
s.date = '2011-01-21'
|
s.date = '2011-01-21'
|
||||||
s.rubyforge_project = 'fog'
|
s.rubyforge_project = 'fog'
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ module Fog
|
||||||
identity :id
|
identity :id
|
||||||
|
|
||||||
attribute :name
|
attribute :name
|
||||||
attribute :image_id # id or name
|
attribute :image_id # id or name
|
||||||
attribute :ip
|
attribute :ip
|
||||||
attribute :memory # server.ram
|
attribute :memory # server.ram
|
||||||
attribute :state
|
attribute :state
|
||||||
|
@ -55,11 +55,10 @@ module Fog
|
||||||
requires :name, :image_id, :ip, :memory
|
requires :name, :image_id, :ip, :memory
|
||||||
options = {
|
options = {
|
||||||
'isSandbox' => sandbox,
|
'isSandbox' => sandbox,
|
||||||
'server.ram' => memory,
|
|
||||||
'image' => image_id
|
'image' => image_id
|
||||||
}
|
}
|
||||||
options = options.reject {|key, value| value.nil?}
|
options = options.reject {|key, value| value.nil?}
|
||||||
data = connection.grid_server_add(name, image, ip, options)
|
data = connection.grid_server_add(image, ip, name, memory, options)
|
||||||
merge_attributes(data.body)
|
merge_attributes(data.body)
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,13 +18,14 @@ module Fog
|
||||||
# * response<~Excon::Response>:
|
# * response<~Excon::Response>:
|
||||||
# * body<~Array>:
|
# * body<~Array>:
|
||||||
# TODO: docs
|
# TODO: docs
|
||||||
def grid_server_add(name, image, ip, options={})
|
def grid_server_add(image, ip, name, server_ram, options={})
|
||||||
request(
|
request(
|
||||||
:path => 'grid/server/add',
|
:path => 'grid/server/add',
|
||||||
:query => {
|
:query => {
|
||||||
'image' => image,
|
'image' => image,
|
||||||
'ip' => ip,
|
'ip' => ip,
|
||||||
'name' => name,
|
'name' => name,
|
||||||
|
'server.ram' => server_ram
|
||||||
}.merge!(options)
|
}.merge!(options)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue