VMware Cloud Community
qc4vmware
Virtuoso
Virtuoso

Programmatically retrieve the vRA version.

I'm curious if there is an easy way to snag the vRA version and build information.  I'm not really seeing it in the plugin or the vCACCAFE host anywhere.

0 Kudos
6 Replies
iiliev
VMware Employee
VMware Employee

You can fetch this information using REST API - just make a GET request on https://[vra-host]/catalog-service/api/about or https://[vra-host]/identity/api/about .

From scripting code - vCACCAFEHost has a method createRestClient(String endpoint) which returns an object of type vCACCAFERestClient, which in turn has a method get(String resouceUrl) which does a GET request. So you should be able to use it with the above REST API endpoints to fetch version/build information.

These endpoints/APIs exist in vRA 7 but should be also available also in vRA 6.x

(BTW, looking at the plug-in's descriptor file, there is a scripting object vCACCAFEAboutInfo but it doesn't seem to be used/returned by other scripting objects/methods/properties.)

qc4vmware
Virtuoso
Virtuoso

Yeah I noticed the vCACCAFEAboutInfo but couldn't figure out how to get any information from it.  I'll go the api route.  I really hope the plugin just gets api parity soon!  My head starts to spin when I have to go that route.

0 Kudos
qc4vmware
Virtuoso
Virtuoso

So I see in the cafe plugin 7.3.1 that vcaccafeaboutinfo still exists without any way to leverage it... any chance this will actually get implemented or maybe is in 7.4?

0 Kudos
iiliev
VMware Employee
VMware Employee

I don't see any changes related to this in 7.4 plug-in.

0 Kudos
qc4vmware
Virtuoso
Virtuoso

I'd think that would fail automated testing... I'm curious how that works since it seems unused.  Kinda frustrating to have that stub there but not being able to use it.

0 Kudos
iiliev
VMware Employee
VMware Employee

I guess that scripting data objects like vCACCAFEAboutInfo are automatically generated out of some data model (annotated java classes/packages, or XSD, or something else) where it is difficult to automatically detect that some class is defacto unused.