2013-06-17 07:46:17 -04:00
|
|
|
module Fog
|
2013-06-18 10:57:32 -04:00
|
|
|
module Compute
|
2013-08-27 05:19:54 -04:00
|
|
|
class VcloudDirector
|
2013-06-17 07:46:17 -04:00
|
|
|
class Real
|
2013-09-27 11:32:49 -04:00
|
|
|
# Retrieve a vApp or VM.
|
|
|
|
#
|
2013-10-01 03:43:28 -04:00
|
|
|
# @param [String] id Object identifier of the vApp or VM.
|
2013-09-27 11:32:49 -04:00
|
|
|
# @return [Excon::Response]
|
|
|
|
# * body<~Hash>:
|
2013-10-13 15:23:24 -04:00
|
|
|
#
|
2013-09-27 11:32:49 -04:00
|
|
|
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-VApp.html
|
2013-09-29 13:57:18 -04:00
|
|
|
# @since vCloud API version 0.9
|
2013-10-01 03:43:28 -04:00
|
|
|
def get_vapp(id)
|
2013-10-15 07:41:15 -04:00
|
|
|
response = request(
|
2013-09-29 13:57:18 -04:00
|
|
|
:expects => 200,
|
|
|
|
:idempotent => true,
|
|
|
|
:method => 'GET',
|
|
|
|
:parser => Fog::ToHashDocument.new,
|
2013-10-01 03:43:28 -04:00
|
|
|
:path => "vApp/#{id}"
|
2013-06-17 07:46:17 -04:00
|
|
|
)
|
2013-10-15 07:41:15 -04:00
|
|
|
ensure_list! response.body, :Children, :Vm
|
|
|
|
response
|
2013-06-17 07:46:17 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|