Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get vRA Network Profiles
// 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:
// vcacHost - vCAC: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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.