Is anyone using workflow subscriptions to add or update virtual machine properties during event topic Machine Provisioning?
I have a simple subscription defined that’s called for all conditions where Lifecycle State Name = VMPSMasterWorkflow32.Requested to experiment with something like custom host naming in vRO. My WF is setup with an input variable named “payload” of type Properties and I have no problem reading the properties passed from vRA to vRO but I’m not sure how to modify something like Hostname.
In the documentation I see the following schema for the event data payload:
{
machine : {
id : STRING, /* IaaS machine ID */
name : STRING, /* machine name */
externalReference : STRING, /* machine ID on the hypervisor */
owner : STRING, /* machine owner */
type : INTEGER, /* machine type: 0 - virtual machine; 1 - physical machine; 2 - cloud machine */
properties : Properties /* machine properties, see notes below how to expose virtual machine properties */
},
blueprintName : STRING, /* blueprint name */
componentId : STRING, /* component id */
componentTypeId : STRING, /* component type id */
endpointId : STRING, /* endpoint id */
requestId : STRING, /* request id */
lifecycleState : { /* see Life Cycle State Definitions*/
state : STRING,
phase : STRING,
event : STRING
},
virtualMachineEvent : STRING, /* fire an event on that machine - only processed by Manager Service as consumer */
workflowNextState : STRING, /* force the workflow to a specific state - only processed by Manager Service as consumer */
virtualMachineAddOrUpdateProperties : Properties, /* properties on the machine to add/update - only processed by Manager Service as consumer */
virtualMachineDeleteProperties : Properties /* properties to remove from the machine - only processed by Manager Service as consumer */
}
My question is how can I leverage “virtualMachineAddOrUpdateProperties” to force a hostname change when the payload I’m working with is an input parameter to the workflow?