VMware Cloud Community
aenagy
Hot Shot
Hot Shot
Jump to solution

How to get 'this' instance of vRealize Automation from Orchestrator (vRA+vRO 7.3)

For environments that use multiple instances of vRA+vRO for development|test|production|etc it would be handy for workflows/actions to be aware of the instance where they are running. This would be handy for creating logic that adapts to the capabilities or limitations of the particular instance without hard-coding logic or data (configuration element/resource element/etc).

I don't want to resort to kludgy solutions like: if ( found prod instance of vCenter found) then ....

The only working solution I have seen so far is creating a configuration element with attributes of type vCACCAFE:VCACHost (for VIP users browse to) and vCAC:VCACHost (for IaaS). This doesn't provide the kind of self discovery I am seeking. I have looked at "vCACCafeHost" but this assumes you already know the instance of vRA, or "vCACCAFEHostManager" which has "getDefaultHostForTenant()" but this requires a tenantID and "defaultHostExists()" only returns a boolean. I was digging around with "Server.getAllPluginInfo()" in the hopes of leveraging the vCAC/vRA plugin directly but I'm beginning to think this is a dead-end.

My question: is there a way to figure out the instance of vRA from vRO? If so, how?

Thanks in advance.

Reply
0 Kudos
1 Solution

Accepted Solutions
aenagy
Hot Shot
Hot Shot
Jump to solution

The solution for this turned out to be way easier than I thought:

var vcacCafeHosts = Server.findAllForType("vCACCAFE:VCACHost");

... and for bonus points ....

var vcacHosts = Server.findAllForType("vCAC:VCACHost");

Both of these return arrays even if only for a single instance.

View solution in original post

Reply
0 Kudos
3 Replies
aenagy
Hot Shot
Hot Shot
Jump to solution

The solution for this turned out to be way easier than I thought:

var vcacCafeHosts = Server.findAllForType("vCACCAFE:VCACHost");

... and for bonus points ....

var vcacHosts = Server.findAllForType("vCAC:VCACHost");

Both of these return arrays even if only for a single instance.

Reply
0 Kudos
iiliev
VMware Employee
VMware Employee
Jump to solution

Not sure I'm fully getting it.

If any of these calls return multiple hosts, how exactly do you determine which one is 'this' instance?

Reply
0 Kudos
aenagy
Hot Shot
Hot Shot
Jump to solution

Ilian Iliev​:

In this environment the vRA plugin is connected to only one instance of vRA which is why this works. Actually, I don't ever recall seeing a vRA plugin configured for more than one instance. This would imply sharing an instance of vRO across different instances of vRA.

Otherwise it would be necessary to use another function that requires vCACCAFEHost and something else as input such as 'vCACCAFEHostManager.getDefaultHostForTenant()' or 'vCACCAFEHost.getHostForCurrentUser()', neither of which I tried due to time constraints.

Reply
0 Kudos