VMware Cloud Community
sanjayamin
VMware Employee
VMware Employee

VRA7 - Retrieve VM attributes from the CatalogItemRequest

From VRO I executed VRA Blue print using the workflow provided in Library "Request a catalog item on behalf of a user". This workflow returns the CatalogItemRequest. How do I find vm attributes which got created as a result of this execution. On VRA portal, under the items tab I have successfully created the vm and I can see all the attributes like, hostname, ipaddress and so on. I would like to see all those in the same workflow which returned me the CatalogItemRequest object

4 Replies
qc4vmware
Virtuoso
Virtuoso

I don't know vRA 7 as well as I should but this is what I am doing in vRA 6 and I assume it will work in 7.  I have posted questions asking why this isn't more accessible it would be nice to have an attribute or function that would take you directly to the deployed item.  I put together an action that takes the requestId and returns the item.

var items = Server.findAllForType("vCACCAFE:CatalogResource");

for each (var item in items) {

  if (item.requestId === requestId) return item;

}

0 Kudos
sanjayamin
VMware Employee
VMware Employee

Thanks for the response. How do I find out the vm object from this. The CatalogResource does not have any reference to vm. My goal is to find out the vm related information like ip address and hostname

Thanks again

Sanjay

0 Kudos
Craig_G2
Hot Shot
Hot Shot

qc4vmware
Virtuoso
Virtuoso

Start with the other example that was referenced in this thread.  Its the best way to get to the catalog resource.  Once you have the catalog resource you should be able to use the vCenter plugin to just look the vm up by name.  You can also use the binding id to find the vCAC VM and then look the vCenter vm up by its unique id.  Either way would work but the unique ID is the way to go if you are dealing with more than one vCenter.

0 Kudos