mirror of
https://github.com/jbowdre/vRealize.git
synced 2024-10-31 19:02:17 +00:00
Create getSdkConnectionForVC.js
This commit is contained in:
parent
59d052193d
commit
c071bd5cce
1 changed files with 15 additions and 0 deletions
|
@ -0,0 +1,15 @@
|
|||
/* JavaScript: getSdkConnectionForVC
|
||||
Returns the VC:sdkConnection object for a given vCenter name (FQDN)
|
||||
Inputs: vCenterName (string)
|
||||
Return Type: VC:SdkConnection
|
||||
*/
|
||||
var vcSdkConnection = null;
|
||||
var sdkConnections = VcPlugin.allSdkConnections;
|
||||
for each (sdkConnection in sdkConnections) {
|
||||
if (sdkConnection.sdkId === vCenterName) {
|
||||
System.debug("Found matching vCenter SDK endpoint: " + sdkConnection.name);
|
||||
vcSdkConnection = sdkConnection;
|
||||
}
|
||||
if (vcSdkConnection != null) { break; };
|
||||
}
|
||||
return vcSdkConnection;
|
Loading…
Reference in a new issue