2013-07-03 07:10:31 -04:00
|
|
|
module Fog
|
|
|
|
module Compute
|
2013-08-27 05:19:54 -04:00
|
|
|
class VcloudDirector
|
2013-07-03 07:10:31 -04:00
|
|
|
class Real
|
2013-09-27 11:32:49 -04:00
|
|
|
# Retrieve metadata associated with the vApp or VM.
|
|
|
|
#
|
|
|
|
# @param [String] vm_id The ID 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-VAppMetadata.html
|
|
|
|
# vCloud API Documentation
|
2013-09-29 13:57:18 -04:00
|
|
|
# @since vCloud API version 1.5
|
2013-08-26 10:57:58 -04:00
|
|
|
def get_metadata(vm_id)
|
2013-08-27 05:19:54 -04:00
|
|
|
require 'fog/vcloud_director/parsers/compute/metadata'
|
2013-09-16 13:13:09 -04:00
|
|
|
|
2013-07-03 07:10:31 -04:00
|
|
|
request(
|
2013-09-29 13:57:18 -04:00
|
|
|
:expects => 200,
|
|
|
|
:idempotent => true,
|
|
|
|
:method => 'GET',
|
|
|
|
:parser => Fog::Parsers::Compute::VcloudDirector::Metadata.new,
|
|
|
|
:path => "vApp/#{vm_id}/metadata/"
|
2013-07-03 07:10:31 -04:00
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|