1
0
Fork 0
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:
Lincoln Stoll 2011-05-30 15:19:49 +10:00
parent 80f41b766b
commit fe8ee15310
2 changed files with 24 additions and 0 deletions

View 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

View file

@ -109,6 +109,7 @@ module Fog
request :power_on
request :power_reset
request :power_shutdown
request :undeploy
class Mock
def request(options)