mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #2232 from nosborn/vcloud_director_requests
[vcloud_director] Implement get*_metadata_item requests.
This commit is contained in:
commit
cd63b39856
13 changed files with 285 additions and 4 deletions
|
@ -82,12 +82,15 @@ module Fog
|
||||||
request :get_catalog
|
request :get_catalog
|
||||||
request :get_catalog_item
|
request :get_catalog_item
|
||||||
request :get_catalog_item_metadata
|
request :get_catalog_item_metadata
|
||||||
|
request :get_catalog_item_metadata_item_metadata
|
||||||
request :get_catalog_metadata
|
request :get_catalog_metadata
|
||||||
|
request :get_catalog_metadata_item_metadata
|
||||||
request :get_catalogs_from_query
|
request :get_catalogs_from_query
|
||||||
request :get_cpu_rasd_item
|
request :get_cpu_rasd_item
|
||||||
request :get_current_session
|
request :get_current_session
|
||||||
request :get_disk
|
request :get_disk
|
||||||
request :get_disk_metadata
|
request :get_disk_metadata
|
||||||
|
request :get_disk_metadata_item_metadata
|
||||||
request :get_disk_owner
|
request :get_disk_owner
|
||||||
request :get_disks_from_query
|
request :get_disks_from_query
|
||||||
request :get_disks_rasd_items_list
|
request :get_disks_rasd_items_list
|
||||||
|
@ -97,6 +100,7 @@ module Fog
|
||||||
request :get_lease_settings_section_vapp
|
request :get_lease_settings_section_vapp
|
||||||
request :get_media
|
request :get_media
|
||||||
request :get_media_metadata
|
request :get_media_metadata
|
||||||
|
request :get_media_metadata_item_metadata
|
||||||
request :get_media_owner
|
request :get_media_owner
|
||||||
request :get_medias_from_query
|
request :get_medias_from_query
|
||||||
request :get_memory_rasd_item
|
request :get_memory_rasd_item
|
||||||
|
@ -105,10 +109,12 @@ module Fog
|
||||||
request :get_network_config_section_vapp
|
request :get_network_config_section_vapp
|
||||||
request :get_network_connection_system_section_vapp
|
request :get_network_connection_system_section_vapp
|
||||||
request :get_network_metadata
|
request :get_network_metadata
|
||||||
|
request :get_network_metadata_item_metadata
|
||||||
request :get_network_section_vapp
|
request :get_network_section_vapp
|
||||||
request :get_operating_system_section
|
request :get_operating_system_section
|
||||||
request :get_organization
|
request :get_organization
|
||||||
request :get_organization_metadata
|
request :get_organization_metadata
|
||||||
|
request :get_organization_metadata_item_metadata
|
||||||
request :get_organizations
|
request :get_organizations
|
||||||
request :get_product_sections_vapp
|
request :get_product_sections_vapp
|
||||||
request :get_request # this is used for manual testing
|
request :get_request # this is used for manual testing
|
||||||
|
@ -122,17 +128,21 @@ module Fog
|
||||||
request :get_task_list
|
request :get_task_list
|
||||||
request :get_vapp
|
request :get_vapp
|
||||||
request :get_vapp_metadata
|
request :get_vapp_metadata
|
||||||
|
request :get_vapp_metadata_item_metadata
|
||||||
request :get_vapp_ovf_descriptor
|
request :get_vapp_ovf_descriptor
|
||||||
request :get_vapp_owner
|
request :get_vapp_owner
|
||||||
request :get_vapp_template
|
request :get_vapp_template
|
||||||
request :get_vapp_template_metadata
|
request :get_vapp_template_metadata
|
||||||
|
request :get_vapp_template_metadata_item_metadata
|
||||||
request :get_vapp_template_ovf_descriptor
|
request :get_vapp_template_ovf_descriptor
|
||||||
request :get_vapp_templates_from_query
|
request :get_vapp_templates_from_query
|
||||||
request :get_vapps_in_lease_from_query
|
request :get_vapps_in_lease_from_query
|
||||||
request :get_vdc
|
request :get_vdc
|
||||||
request :get_vdc_metadata
|
request :get_vdc_metadata
|
||||||
request :get_vdc_storage_profile
|
request :get_vdc_metadata_item_metadata
|
||||||
request :get_vdc_storage_profile_metadata
|
request :get_vdc_storage_class
|
||||||
|
request :get_vdc_storage_class_metadata
|
||||||
|
request :get_vdc_storage_class_metadata_item_metadata
|
||||||
request :get_vm
|
request :get_vm
|
||||||
request :get_vm_compliance_results
|
request :get_vm_compliance_results
|
||||||
request :get_vm_customization
|
request :get_vm_customization
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
module Fog
|
||||||
|
module Compute
|
||||||
|
class VcloudDirector
|
||||||
|
class Real
|
||||||
|
# Retrieve the value of the specified key from catalog item metadata.
|
||||||
|
#
|
||||||
|
# @param [String] id Object identifier of the catalog item.
|
||||||
|
# @param [String] key Key of the metadata.
|
||||||
|
# @return [Excon::Response]
|
||||||
|
# * body<~Hash>:
|
||||||
|
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-CatalogItemMetadataItem-metadata.html
|
||||||
|
# vCloud API Documentation
|
||||||
|
# @since vCloud API version 1.5
|
||||||
|
def get_catalog_item_metadata_item_metadata(id, key)
|
||||||
|
request(
|
||||||
|
:expects => 200,
|
||||||
|
:idempotent => true,
|
||||||
|
:method => 'GET',
|
||||||
|
:parser => Fog::ToHashDocument.new,
|
||||||
|
:path => "catalogItem/#{id}/metadata/#{URI.escape(key)})"
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,26 @@
|
||||||
|
module Fog
|
||||||
|
module Compute
|
||||||
|
class VcloudDirector
|
||||||
|
class Real
|
||||||
|
# Retrieve the value of the specified key from catalog metadata.
|
||||||
|
#
|
||||||
|
# @param [String] id Object identifier of the catalog.
|
||||||
|
# @param [String] key Key of the metadata.
|
||||||
|
# @return [Excon::Response]
|
||||||
|
# * body<~Hash>:
|
||||||
|
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-CatalogMetadataItem-metadata.html
|
||||||
|
# vCloud API Documentation
|
||||||
|
# @since vCloud API version 1.5
|
||||||
|
def get_catalog_metadata_item_metadata(id, key)
|
||||||
|
request(
|
||||||
|
:expects => 200,
|
||||||
|
:idempotent => true,
|
||||||
|
:method => 'GET',
|
||||||
|
:parser => Fog::ToHashDocument.new,
|
||||||
|
:path => "catalog/#{id}/metadata/#{URI.escape(key)})"
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,26 @@
|
||||||
|
module Fog
|
||||||
|
module Compute
|
||||||
|
class VcloudDirector
|
||||||
|
class Real
|
||||||
|
# Retrieve the value of the specified key from disk metadata.
|
||||||
|
#
|
||||||
|
# @param [String] id Object identifier of the disk.
|
||||||
|
# @param [String] key Key of the metadata.
|
||||||
|
# @return [Excon::Response]
|
||||||
|
# * body<~Hash>:
|
||||||
|
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-DiskMetadataItem-metadata.html
|
||||||
|
# vCloud API Documentation
|
||||||
|
# @since vCloud API version 5.1
|
||||||
|
def get_disk_metadata_item_metadata(id, key)
|
||||||
|
request(
|
||||||
|
:expects => 200,
|
||||||
|
:idempotent => true,
|
||||||
|
:method => 'GET',
|
||||||
|
:parser => Fog::ToHashDocument.new,
|
||||||
|
:path => "disk/#{id}/metadata/#{URI.escape(key)})"
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,26 @@
|
||||||
|
module Fog
|
||||||
|
module Compute
|
||||||
|
class VcloudDirector
|
||||||
|
class Real
|
||||||
|
# Retrieve the value of the specified key from media object metadata.
|
||||||
|
#
|
||||||
|
# @param [String] id Object identifier of the media object.
|
||||||
|
# @param [String] key Key of the metadata.
|
||||||
|
# @return [Excon::Response]
|
||||||
|
# * body<~Hash>:
|
||||||
|
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-MediaMetadataItem-metadata.html
|
||||||
|
# vCloud API Documentation
|
||||||
|
# @since vCloud API version 1.5
|
||||||
|
def get_media_metadata_item_metadata(id, key)
|
||||||
|
request(
|
||||||
|
:expects => 200,
|
||||||
|
:idempotent => true,
|
||||||
|
:method => 'GET',
|
||||||
|
:parser => Fog::ToHashDocument.new,
|
||||||
|
:path => "media/#{id}/metadata/#{URI.escape(key)})"
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,26 @@
|
||||||
|
module Fog
|
||||||
|
module Compute
|
||||||
|
class VcloudDirector
|
||||||
|
class Real
|
||||||
|
# Retrieve the value of the specified key from network metadata.
|
||||||
|
#
|
||||||
|
# @param [String] id Object identifier of the network.
|
||||||
|
# @param [String] key Key of the metadata.
|
||||||
|
# @return [Excon::Response]
|
||||||
|
# * body<~Hash>:
|
||||||
|
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-NetworkMetadataItem-metadata.html
|
||||||
|
# vCloud API Documentation
|
||||||
|
# @since vCloud API version 1.5
|
||||||
|
def get_network_metadata_item_metadata(id, key)
|
||||||
|
request(
|
||||||
|
:expects => 200,
|
||||||
|
:idempotent => true,
|
||||||
|
:method => 'GET',
|
||||||
|
:parser => Fog::ToHashDocument.new,
|
||||||
|
:path => "admin/network/#{id}/metadata/#{URI.escape(key)})"
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,28 @@
|
||||||
|
module Fog
|
||||||
|
module Compute
|
||||||
|
class VcloudDirector
|
||||||
|
class Real
|
||||||
|
# Retrieve the value of the specified key in the specified domain from
|
||||||
|
# organization metadata.
|
||||||
|
#
|
||||||
|
# @param [String] id Object identifier of the network.
|
||||||
|
# @param [String] domain
|
||||||
|
# @param [String] key Key of the metadata.
|
||||||
|
# @return [Excon::Response]
|
||||||
|
# * body<~Hash>:
|
||||||
|
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-OrganizationMetadataItem-metadata.html
|
||||||
|
# vCloud API Documentation
|
||||||
|
# @since vCloud API version 5.1
|
||||||
|
def get_organization_metadata_item_metadata(id, domain, key)
|
||||||
|
request(
|
||||||
|
:expects => 200,
|
||||||
|
:idempotent => true,
|
||||||
|
:method => 'GET',
|
||||||
|
:parser => Fog::ToHashDocument.new,
|
||||||
|
:path => "admin/org/#{id}/metadata/#{URI.escape(domain)}/#{URI.escape(key)})"
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,26 @@
|
||||||
|
module Fog
|
||||||
|
module Compute
|
||||||
|
class VcloudDirector
|
||||||
|
class Real
|
||||||
|
# Retrieve the value of the specified key from vApp or VM metadata.
|
||||||
|
#
|
||||||
|
# @param [String] id Object identifier of the vApp or VM.
|
||||||
|
# @param [String] key Key of the metadata.
|
||||||
|
# @return [Excon::Response]
|
||||||
|
# * body<~Hash>:
|
||||||
|
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-VAppMetadataItem-metadata.html
|
||||||
|
# vCloud API Documentation
|
||||||
|
# @since vCloud API version 1.5
|
||||||
|
def get_vapp_metadata_item_metadata(id, key)
|
||||||
|
request(
|
||||||
|
:expects => 200,
|
||||||
|
:idempotent => true,
|
||||||
|
:method => 'GET',
|
||||||
|
:parser => Fog::ToHashDocument.new,
|
||||||
|
:path => "vApp/#{id}/metadata/#{URI.escape(key)})"
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,27 @@
|
||||||
|
module Fog
|
||||||
|
module Compute
|
||||||
|
class VcloudDirector
|
||||||
|
class Real
|
||||||
|
# Retrieve the value of the specified key from vApp template or VM
|
||||||
|
# metadata.
|
||||||
|
#
|
||||||
|
# @param [String] id Object identifier of the vApp template or VM.
|
||||||
|
# @param [String] key Key of the metadata.
|
||||||
|
# @return [Excon::Response]
|
||||||
|
# * body<~Hash>:
|
||||||
|
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-VAppTemplateMetadataItem-metadata.html
|
||||||
|
# vCloud API Documentation
|
||||||
|
# @since vCloud API version 1.5
|
||||||
|
def get_vapp_template_metadata_item_metadata(id, key)
|
||||||
|
request(
|
||||||
|
:expects => 200,
|
||||||
|
:idempotent => true,
|
||||||
|
:method => 'GET',
|
||||||
|
:parser => Fog::ToHashDocument.new,
|
||||||
|
:path => "vAppTemplate/#{id}/metadata/#{URI.escape(key)})"
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,28 @@
|
||||||
|
module Fog
|
||||||
|
module Compute
|
||||||
|
class VcloudDirector
|
||||||
|
class Real
|
||||||
|
# Retrieve the value of the specified key from virtual datacenter
|
||||||
|
# metadata.
|
||||||
|
#
|
||||||
|
# @param [String] id Object identifier of the network.
|
||||||
|
# @param [String] domain
|
||||||
|
# @param [String] key Key of the metadata.
|
||||||
|
# @return [Excon::Response]
|
||||||
|
# * body<~Hash>:
|
||||||
|
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-VdcMetadataItem-metadata.html
|
||||||
|
# vCloud API Documentation
|
||||||
|
# @since vCloud API version 1.5
|
||||||
|
def get_vdc_metadata_item_metadata(id, domain, key)
|
||||||
|
request(
|
||||||
|
:expects => 200,
|
||||||
|
:idempotent => true,
|
||||||
|
:method => 'GET',
|
||||||
|
:parser => Fog::ToHashDocument.new,
|
||||||
|
:path => "admin/vdc/#{id}/metadata/#{URI.escape(key)})"
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -2,6 +2,9 @@ module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class VcloudDirector
|
class VcloudDirector
|
||||||
class Real
|
class Real
|
||||||
|
extend Fog::Deprecation
|
||||||
|
deprecate :get_vdc_storage_profile, :get_vdc_storage_class
|
||||||
|
|
||||||
# Returns storage class referred by the Id. All properties of the
|
# Returns storage class referred by the Id. All properties of the
|
||||||
# storage classes are visible to vcloud user, except for VDC Storage
|
# storage classes are visible to vcloud user, except for VDC Storage
|
||||||
# Class reference.
|
# Class reference.
|
||||||
|
@ -11,7 +14,7 @@ module Fog
|
||||||
# * body<~Hash>:
|
# * body<~Hash>:
|
||||||
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-VdcStorageClass.html
|
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-VdcStorageClass.html
|
||||||
# vCloud API Documentation
|
# vCloud API Documentation
|
||||||
def get_vdc_storage_profile(id)
|
def get_vdc_storage_class(id)
|
||||||
request(
|
request(
|
||||||
:expects => 200,
|
:expects => 200,
|
||||||
:idempotent => true,
|
:idempotent => true,
|
|
@ -2,6 +2,9 @@ module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class VcloudDirector
|
class VcloudDirector
|
||||||
class Real
|
class Real
|
||||||
|
extend Fog::Deprecation
|
||||||
|
deprecate :get_vdc_storage_profile_metadata, :get_vdc_storage_class_metadata
|
||||||
|
|
||||||
# Retrieve metadata associated with the vDC storage profile.
|
# Retrieve metadata associated with the vDC storage profile.
|
||||||
#
|
#
|
||||||
# @param [String] id Object identifier of the vDC storage profile.
|
# @param [String] id Object identifier of the vDC storage profile.
|
||||||
|
@ -9,7 +12,7 @@ module Fog
|
||||||
# * body<~Hash>:
|
# * body<~Hash>:
|
||||||
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-VdcStorageClassMetadata.html
|
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-VdcStorageClassMetadata.html
|
||||||
# vCloud API Documentation
|
# vCloud API Documentation
|
||||||
def get_vdc_storage_profile_metadata(id)
|
def get_vdc_storage_class_metadata(id)
|
||||||
request(
|
request(
|
||||||
:expects => 200,
|
:expects => 200,
|
||||||
:idempotent => true,
|
:idempotent => true,
|
|
@ -0,0 +1,26 @@
|
||||||
|
module Fog
|
||||||
|
module Compute
|
||||||
|
class VcloudDirector
|
||||||
|
class Real
|
||||||
|
# Retrieve metadata associated with the vDC storage profile.
|
||||||
|
#
|
||||||
|
# @param [String] id Object identifier of the vDC storage profile.
|
||||||
|
# @param [String] domain
|
||||||
|
# @param [String] key Key of the metadata.
|
||||||
|
# @return [Excon::Response]
|
||||||
|
# * body<~Hash>:
|
||||||
|
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-VdcStorageClassMetadataItem-metadata.html
|
||||||
|
# vCloud API Documentation
|
||||||
|
def get_vdc_storage_class_metadata_item_metadata(id, key)
|
||||||
|
request(
|
||||||
|
:expects => 200,
|
||||||
|
:idempotent => true,
|
||||||
|
:method => 'GET',
|
||||||
|
:parser => Fog::ToHashDocument.new,
|
||||||
|
:path => "vdcStorageProfile/#{id}/metadata/#{URI.escape(key)})"
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue