2013-10-08 13:46:06 -04:00
|
|
|
module Fog
|
|
|
|
module Compute
|
|
|
|
class VcloudDirector
|
|
|
|
class Real
|
|
|
|
# Redirects to the URL of an entity with the given VCD ID.
|
|
|
|
#
|
|
|
|
# @param [String] id
|
|
|
|
# @return [Excon:Response]
|
|
|
|
# * body<~Hash>:
|
|
|
|
# * :href<~String> - The URI of the entity.
|
|
|
|
# * :type<~String> - The MIME type of the entity.
|
|
|
|
# * :id<~String> - The entity identifier, expressed in URN format.
|
|
|
|
# The value of this attribute uniquely identifies the entity,
|
|
|
|
# persists for the life of the entity, and is never reused.
|
|
|
|
# * :name<~String> - The name of the entity.
|
|
|
|
# * :Link<~Array<Hash>]:
|
|
|
|
# * :href<~String> - Contains the URI to the linked entity.
|
|
|
|
# * :type<~String> - Contains the type of the linked entity.
|
|
|
|
# * :rel<~String> - Defines the relationship of the link to the
|
|
|
|
# object that contains it.
|
2013-10-13 15:23:24 -04:00
|
|
|
#
|
2013-10-08 13:46:06 -04:00
|
|
|
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-Entity.html
|
|
|
|
# @since vCloud API version 1.5
|
|
|
|
def get_entity(id)
|
|
|
|
response = request({
|
|
|
|
:expects => 200,
|
|
|
|
:idempotent => true,
|
|
|
|
:method => 'GET',
|
|
|
|
:parser => Fog::ToHashDocument.new,
|
|
|
|
:path => "entity/#{id}"
|
|
|
|
})
|
2013-10-15 07:41:15 -04:00
|
|
|
ensure_list! response.body, :Link
|
2013-10-08 13:46:06 -04:00
|
|
|
response
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|