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