1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Merge pull request #2157 from rsalm/vcloud_director_delete_vapp

[vcloud_director] Added support for deleting vApps.
This commit is contained in:
Wesley Beary 2013-09-20 07:39:33 -07:00
commit bf4c376256
3 changed files with 26 additions and 0 deletions

View file

@ -105,6 +105,7 @@ module Fog
request :get_vm
request :post_task_cancel
request :post_vapp_undeploy
request :delete_vapp
class Model < Fog::Model
def initialize(attrs={})

View file

@ -45,6 +45,11 @@ module Fog
service.process_task(response.body)
end
def destroy
response = service.delete_vapp(id)
service.process_task(response.body)
end
end
end
end

View file

@ -0,0 +1,20 @@
module Fog
module Compute
class VcloudDirector
class Real
def delete_vapp(vapp_id)
request(
:expects => 202,
:method => 'DELETE',
:parser => Fog::ToHashDocument.new,
:path => "vApp/#{vapp_id}"
)
end
end
end
end
end