Created
March 18, 2019 19:14
-
-
Save trisharia/dcdf494ba97f5ab68f7d719658c19061 to your computer and use it in GitHub Desktop.
Get vRA Network Profiles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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