1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/vcloud_director/requests/compute/undeploy.rb

23 lines
657 B
Ruby
Raw Normal View History

module Fog
module Compute
class VcloudDirector
class Real
def undeploy(vapp_id)
body = <<EOF
<UndeployVAppParams xmlns="http://www.vmware.com/vcloud/v1.5">
<UndeployPowerAction>shutdown</UndeployPowerAction>
</UndeployVAppParams>
EOF
request(
:body => body,
:expects => 202,
:method => 'POST',
:headers => {'Content-Type' => 'application/vnd.vmware.vcloud.undeployVAppParams+xml' },
:path => "vApp/#{vapp_id}/action/undeploy"
)
end
end
end
end
end