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/get_vapp.rb
Nick Osborn 353b50acfc [vcloud_director] Do ensure_list in request methods.
Mitigation for Fog::ToHashDocument. This is (still) a short-term fix
until we get to real response parsers.
2013-10-15 14:14:05 +01:00

27 lines
781 B
Ruby

module Fog
module Compute
class VcloudDirector
class Real
# Retrieve a vApp or VM.
#
# @param [String] id Object identifier of the vApp or VM.
# @return [Excon::Response]
# * body<~Hash>:
#
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-VApp.html
# @since vCloud API version 0.9
def get_vapp(id)
response = request(
:expects => 200,
:idempotent => true,
:method => 'GET',
:parser => Fog::ToHashDocument.new,
:path => "vApp/#{id}"
)
ensure_list! response.body, :Children, :Vm
response
end
end
end
end
end