Created
December 11, 2016 23:01
Revisions
-
vmwsrpbot created this gist
Dec 11, 2016 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ // Copyright 2016, VMware, Inc. All Rights Reserved // // VMware vRealize Orchestrator action sample // // Given a Managed Object Reference Id of a DistributedVirtualPortgroup // (ex: dvportgroup-714) return the VC:DistributedVirtualPortgroup object. // //Action Inputs: // id - string // //Return type: VC:DistributedVirtualPortgroup var moRef = new VcManagedObjectReference(); moRef.type = "DistributedVirtualPortgroup"; moRef.value = id; var connections = VcPlugin.allSdkConnections; var dvpg = null; for (var i in connections) { try { System.log("connection: "+connections[i]); dvpg = VcPlugin.convertToVimManagedObject(connections[i], moRef); System.log("dvpg: "+dvpg); if(dvpg != null) { //found it break; } } catch (e) { System.error(e); } } return dvpg;