Quantcast
Channel: VMware Communities : Blog List - All Communities
Viewing all articles
Browse latest Browse all 3135

How to get the actual IaaS VM from a provisioned vCAC Catalog Resource VM?

$
0
0

vCAC's catalog enables multiple providers to contribute with different types of resources. And the most common case is probably the default VM resource type, which instances appear in the catalog as resources and they are provisioned by the IaaS component of vCAC.

 

At API level, the resources that appear in the vCAC catalog (under the Items tab) are represented by the type CatalogResource. This type has an attribute of type ProviderBinding which represents an intrinsic one to one relation between the catalog resource and the provider representation of the same entity. The attributes of this type are:

  • bindingId - The bindingId represents the entity's unique identifier known by the provider. This identifier can not be directly considered as unique in the catalog (multiple providers can use the same identifier for different things) but it should be unique for a specific provider.
  • providerRef - The providerRef identifies the catalog provider that provisioned or registered the entity in the catalog. And each catalog provider corresponds directly to a service registered in the vCAC's component registry.

 

How to get the IaaS VM from a vCAC Catalog Resource with the vCAC plug-in

 

Prerequisites:

  • You must have the vCAC host with the desired catalog resource configured in the vCAC plug-in.
  • You must have the IaaS host for the previous vCAC host configured in the plug-in.
  • You must know the provisioned catalog resource id.

 

Scripting objects provided by the vCAC plug-in:

  • vCACCAFEHost - The vCAC host.
  • vCACVcacHost - The IaaS host.
  • vCACCAFECatalogResource - The vCAC catalog resource representation (of the provisioned VM in this case).
  • vCACCAFEProviderBinding - The binding between the resource in the catalog and the actual entity in the provider.
  • vCACVirtualMachine - The IaaS VM representation.

 

Then, with the previous information, you can easily create a scripting element that takes both hosts as input parameters, and prints or returns the corresponding IaaS VM (or the equivalent IaaS Entity if needed) from a provided vCAC Catalog Resource id.

 

2014-07-01_1400.png

 

In this example the scripting code cares only about catalog resources of type "Virtual Machine" that are provisioned through the "iaas-service" provider, but it's easy to see that this can apply also for other types of resources and for other providers.

 

Conclusion

 

Whenever you have a catalog resource provisioned by IaaS or any other provider, you can use the provider binding property of the catalog resource to know who is the provider of that resource and what is the id of the resource inside that provider. After that it depends on whether you have access or not through vCO to the provider API to retrieve the actual entity, but in case of IaaS the vCAC plug-in itself provides access to all those entities.


Viewing all articles
Browse latest Browse all 3135

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>