VMware Cloud Community
jhturver
Contributor
Contributor

Unable to manipulate vRA 7 Deployment properties (e.g. name or description) using API, REST or other?

Hi All,

In vRA 6 we used the following code to return the Parent of a component virtual machine in a Multi-machine deployment, and then manipulate the Parent object as required:

var virtualMachineEntity = vCACVm.getEntity();

var isComponent = virtualMachineEntity.getProperty("IsComponent");

System.log("Component? " + isComponent);

if (isComponent == 1){

    // If it is a component, then get parent

    var parentMultiMachineEntity = virtualMachineEntity.getLink(host, "ParentVirtualMachine")[0];

    var parentMultiMachineName = parentMultiMachineEntity.getProperty("VirtualMachineName").toString();

    //... Now set relevant Properties for updating the Parent (Multi-machine) object and call "updateVCACEntity" from here ....

}

With vRA 7 and converged blueprints, the "ParentVirtualMachine" link property of a vCACVM is Null, so the normal code to get hold of the parent (Deployment) does not work.

It's easy to GET the properties of the Deployment object through a REST call, but there does not appear to be a method to update the Deployment properties using REST?

Does anyone have some code that demonstrates how to update the properties of a vRA 7 "Deployment" item?

Many thanks

Justin

0 Kudos
3 Replies
GrantOrchardVMw
Commander
Commander

Hey Justin, just to confirm - do you want to do this during the provisioning process? It's what I'm expecting but just want to clarify.

Grant

Grant http://grantorchard.com
0 Kudos
jhturver
Contributor
Contributor

Hi Grant,

Correct - scenario one is to update the Deployment name during provisioning.

Second, less important scenario is as a Day 2 operation.

Many thanks

Justin

0 Kudos
GrantOrchardVMw
Commander
Commander

Take a look at this: http://dailyhypervisor.com/vrealize-automation-custom-hostnaming-extension/

Tom has done the hard work, but you can also use this to see how he is updating it and (hopefully) apply that elsewhere.

This is the updated workflow for v7.

Grant

Grant http://grantorchard.com
0 Kudos