
/**
*VMware vRealize Orchestrator action sample
* Returns the names of all network profiles defined in a vRA instance
* For vRA 7.0+/vRO 7.0+
* Action Inputs:
* @param {vCAC:VCACHost} vcacHost – vRA IaaS Host.
* Return type: Array/string – the names of the network profiles
*/
if (vcacHost == null) return null;
var modelName = “ManagementModelEntities.svc”;
var entitySetName = “StaticIPv4NetworkProfiles”;var entities = vCACEntityManager.readModelEntitiesByCustomFilter(vcacHost.id, modelName, entitySetName, null, null);
System.log(“Network Profiles found: “+entities.length);
var prop = new Properties();
for each (var entity in entities) {
prop.put(entity.getProperty(“StaticIPv4NetworkProfileName”));
}
return prop.keys.sort();