mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[vcloud|compute] undeploy request
This commit is contained in:
parent
80f41b766b
commit
fe8ee15310
2 changed files with 24 additions and 0 deletions
23
lib/fog/compute/requests/vcloud/undeploy.rb
Normal file
23
lib/fog/compute/requests/vcloud/undeploy.rb
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
module Fog
|
||||||
|
module Vcloud
|
||||||
|
class Compute
|
||||||
|
class Real
|
||||||
|
def undeploy(vapp_uri, save_state = false)
|
||||||
|
# builder = Builder::XmlMarkup.new
|
||||||
|
# builder.UndeployVAppParams(:xmlns => 'http://www.vmware.com/vcloud/v1',
|
||||||
|
# :saveState => save_state) {}
|
||||||
|
builder = "<UndeployVAppParams saveState=\"#{save_state.to_s}\" xmlns=\"http://www.vmware.com/vcloud/v1\"/>"
|
||||||
|
|
||||||
|
request(
|
||||||
|
:body => builder,
|
||||||
|
:expects => 202,
|
||||||
|
:headers => {'Content-Type' => 'application/vnd.vmware.vcloud.undeployVAppParams+xml' },
|
||||||
|
:method => 'POST',
|
||||||
|
:uri => vapp_uri + '/action/undeploy',
|
||||||
|
:parse => true
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -109,6 +109,7 @@ module Fog
|
||||||
request :power_on
|
request :power_on
|
||||||
request :power_reset
|
request :power_reset
|
||||||
request :power_shutdown
|
request :power_shutdown
|
||||||
|
request :undeploy
|
||||||
|
|
||||||
class Mock
|
class Mock
|
||||||
def request(options)
|
def request(options)
|
||||||
|
|
Loading…
Reference in a new issue