VMware Cloud Community
darrenoid
Enthusiast
Enthusiast

How can I Update vRA 7.0.1 Machine Component Properties using vRO?

Hello vRA Community,

I am looking for advice on how to approach automating updating our blueprints when we have a new VM template available using vRO. Currently we already have a vRO workflow that builds a VM template from scratch. I would like to add a final step to the workflow that updates our current blueprints with the new template ID. Currently we have to use the blueprint designer UI to edit the blueprint, select the virtual machine component, and then update the build profile by browsing to the new template. That is very tedious when we have a lot of blueprints to edit.

In vRA 6 I believe this could be done by using the "create / update property from blueprint" built in vro workflow for vra and updating the "__clonefrom" and "__clonefromid" properties. In vRA 7 now the blueprint is a composite blueprint and the machine component is nested inside of it. Using the "create / update property from blueprint" workflow in vRA 7 seems to only be able to edit the properties for the parent component. The properties as seen here from the vra inventory in vro:

compositeproperties.jpg

In the example above, I wish to edit the 2008R2S-DE-VM components properties. Does anyone have any suggestions on how to do that?

This is probably too much information, but in relation to my current workflow in vro, we would need to:

1. Get a list of blueprints where the machine component clonefrom property matches the current OS template that was deployed in the workflow

2. Run a data collection

3. Get the template ID of the OS template that was just deployed

4. Edit all matching blueprint machine components with the new template ID

Regards,

Darrenoid

0 Kudos
3 Replies
admin
Immortal
Immortal

Have you tried the API?


The API URI to update composite blueprints is /composition-service/api/blueprintdocuments/{id}


The portion you should be look at is source_machine_name & source_name.

0 Kudos
darrenoid
Enthusiast
Enthusiast

Hey oliverleach,

Thanks for the API tip. I will certainly look into it when I have time to research and test the API capabilities in vRA. This question is asking how to do it in vRO, but I suppose I could use vRO to make the API call using the REST plugin. I was hoping there would be a built in workflow or action in vRO to work with blueprint machine components. I can get the machine component object in vro it looks something like {2008R2S-DE-VM=com.vmware.vcac.composition.rest.stubs.ComponentDeclaration@77c7f692}, but I have no idea how to parse it to get the nested properties inside the object. Does anyone know how to work with these types of objects in vRO?

Regards,

Darrenoid

0 Kudos
kumudu
VMware Employee
VMware Employee

you could do this by update BP YAML file's source_machine info with new template name and id. The BP management package from cdecanini_ is a great asset.

vRA blueprint management package - Samples - VMware {code}

0 Kudos