VMware Cloud Community
kev01228
Enthusiast
Enthusiast

get machine customProperties in "Deployment action requested" event topic

I have a subscription created for the event topic "Deployment action requested" but when it run, it does not pass the customProperties of the machine. For example, in the compute.provision.pre event, these would be in the inputProperties>customProperties section.

Anyway to get the customProperties in this event topic short of making a rest call back to vra to get them?

Reply
0 Kudos
2 Replies
emacintosh
Hot Shot
Hot Shot

I think a rest call back to vRA is the only way.  A deployment can consist of multiple machines/resources, so there isn't technically one set of custom properties.  So, even with the rest call, you'd probably need to find deployment, then find the resource in the deployment, then get its custom properties.

I am not sure if "Deployment resource action requested" would contain a more specific payload, but I think it should at least.  Obviously not helpful if you're kicking off a deployment action.

All that said, it would be nice if a deployment payload included all of the resources and their properties - i think enough of us need to go get that info anyway....just include it.

BrettK1
Enthusiast
Enthusiast

I'll second this question, relatively the same.

I would like to get VMs and their Custom Properties given a DeploymentID in a "Deployment action completed" event.

This is for an embedded vRO (vRA 8.8), and I'm not using (nor have ever used) the REST API for anything, and hope that isn't necessary (that's half the purpose of an embedded/integrated appliance, no?)  Maybe I'm missing a 'big picture' thing with the REST API, but from the outside it seems like just 1 more unnecessary layer in an already giant onion (though obviously powerful for other purposes).

Is it programmatically possible without REST to reference this info?
The seemingly simple task I'm attempting is to set 'VRM Owner' for a VM in vSphere on a 'Change Owner' Day 2 action for a Deployment (currently all deployments are just 1 VM).  'VRM Owner' being what vRA 7.6 used to set as a Custom Attribute in vSphere, and we use for other scripts, so we set VRM Owner at Deployment Completed (but when it's changed, obviously need that updated).

Thanks for any steering in the right direction!

Reply
0 Kudos