Permalink
Browse files

Merge pull request #1454 from rackspace/rebuild_params

[rackspace|compute] updated rebuild to support passing additional option...
  • Loading branch information...
2 parents 200645c + 999b42f commit f408d76754d3846659b0b0a00a9ce1322a7089c3 @brianhartsock brianhartsock committed Jan 10, 2013
@@ -151,9 +151,9 @@ def resize(flavor_id)
true
end
- def rebuild(image_id)
+ def rebuild(image_id, options={})
requires :identity
- service.rebuild_server(identity, image_id)
+ service.rebuild_server(identity, image_id, options)
self.state = REBUILD
true
end
@@ -2,12 +2,11 @@ module Fog
module Compute
class RackspaceV2
class Real
- def rebuild_server(server_id, image_id)
+ def rebuild_server(server_id, image_id, options={})
data = {
- 'rebuild' => {
- 'imageRef' => image_id
- }
+ 'rebuild' => options || {}
}
+ data['rebuild']['imageRef'] = image_id
request(
:body => Fog::JSON.encode(data),

0 comments on commit f408d76

Please sign in to comment.