Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1454 from rackspace/rebuild_params

[rackspace|compute] updated rebuild to support passing additional option...
  • Loading branch information...
commit f408d76754d3846659b0b0a00a9ce1322a7089c3 2 parents 200645c + 999b42f
@brianhartsock brianhartsock authored
View
4 lib/fog/rackspace/models/compute_v2/server.rb
@@ -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
View
7 lib/fog/rackspace/requests/compute_v2/rebuild_server.rb
@@ -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),
Please sign in to comment.
Something went wrong with that request. Please try again.