VMware Cloud Community
twhiffen
VMware Employee
VMware Employee

vRA Property Groups

Using a script component in vRO and the vRA plugin I can get a list of custom properties for a composite blueprint using vCACCAFE:CompositeBlueprint.properties.  And I can get the list of property groups for a blueprint using vCACCAFE:CompositeBlueprint.propertyGroups.  But I can't figure out how to get a list of properties from a property group.

I can't find any scripting classes or methods for a vRA property group.  How can I get the list of properties included in a property group?

0 Kudos
1 Reply
twhiffen
VMware Employee
VMware Employee

Not sure if there's any 'built-in' support but I've found that you can use the vCACCAFERestClient class to call the properties service API directly to get the properties in a property group.

Script looks something like this...

// input params

var host;          // vCACCAFE:VCACHost

var groupName;     // name of property group

var client = host.createRestClient("com.vmware.csp.core.properties.service.api");

var response = client.get("propertygroups/" + groupName);

for each (var prop in response.getBodyAsJson()['properties']) {

     // iterate over group properties

}

0 Kudos