jnagle17
Contributor
Contributor

vRA REST not returning current names of catalog Resources

I'm working with vRealize Automation Suite 6.2 and we have created a workflows that renames a VM and runs a Sync so that the vcac object gets updated with the new value from vCenter.  The issue I'm running into is after looking at the vCAC:VirtualMachine and seeing the name updated I then looked up the vCACCAFE:Resource and it also shows the name as updated.  BUT... when I try to pull back all resources using rest (ex: /catalog-service/api/consumer/resources) it does not report back the updated name.  If I use rest and specify the id (ex: /catalog-service/api/consumer/resources/{id}) it does print back the correct name.  I've tested a few of the field returned by the resources query like organization.subtenantLabel and lastUpdated and they seem to stay current but the name field does not.  I know I can just get all the resources and then just get the id and run another rest on that but the performance is terrible.  I'm guessing this is some type of bug, but was wondering if there was any way to manually update that value that the resources table is getting, I'm a little stumped where that value is even obtained from since when I look at the vcacCafe:catalogResource it also has the updated name.  Any help or suggestions would be appreciated.

Tags (1)
0 Kudos
2 Replies
kericmiles
Enthusiast
Enthusiast

This is the Orchestrator forum so probably the wrong place for this question. Have you tried doing a data collection after changing the name?

0 Kudos
sanchezs
VMware Employee
VMware Employee

Have you checked what happens from the vRA Catalog's Items UI? Are the names properly updated there? The REST call that the UI is doing to show the items available should look like very similar to the one that you are doing, if not the same. You could check it with some simple developer browser tool like FireBug for Firefox.

Something that you can try, if you are able to get the query done from the UI (and the UI shows the proper results), is for example sort the UI table by name and do the same REST query (with the sorting parameters) from your call inside the plug-in...

Also you can try to have some other type of resource, like for example some ASD resource, and to see what happens when you change its name. If it only happens for VM/IaaS resources then you can try with forcing a Data Collection as suggested previously.

I hope that helps.

Sergio

0 Kudos