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
``` | |
#!/bin/bash | |
## Variables ## | |
VROname=${VROserver} | |
VROuser=${VROuser} | |
VROpass=${VROpass} |
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
def handler(context, inputs): | |
outputs = { | |
"vcoUrl": context['vcoUrl'], | |
"token": context['getToken']() | |
} | |
return outputs |
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
#!/bin/env python | |
""" | |
Python wrapper for calling vCO workflows. | |
Author: AV | |
Date: 2018-06-14 | |
Version: 0.6 | |
History: |
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
/* | |
Author: Burke Azbill | |
Purpose: Display various properties of a vCloud:Gateway object in vRealize Orchestrator (vRO) | |
Usage: | |
1) Create a new workflow with a single scriptable task in it | |
2) Add an input named "gateway" of type "vCloud:Gateway" and be sure the input is bound to the scriptable task | |
3) Paste this code into the scriptable task | |
4) Save and Close | |
5) Run the workflow, providing a valid vCloud:Gateway object as input | |
6) Review the Logs tab of your vRealize Orchestrator client |
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
/** | |
* | |
* Associates a Network Pool with NSXT Provider Vdc | |
* | |
* @version 1.0.0 | |
* | |
* @param {string} networkPoolName | |
* @param {vCloud:ProviderVdc} pvdc | |
* @param {vCloud:NsxTManager} nsxtManager | |
* @param {vCloud:Host} host |
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
if (! System.getModule("actions.mayank.goyal").aValidInput(pVDCName)) { | |
throw "'pVDCName' input parameter either null or undefined !"; | |
} | |
// Get Local VCD URL | |
var vcdHostUrl = System.getModule("actions.mayank.goyal").getTransientRestHostFor("VCD").url; | |
// Get Auth Token for VCD | |
var authToken = System.getModule("actions.mayank.goyal").getAPIToken(); |
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
//action Inputs: | |
// vmName - string | |
// | |
//Return Type: VC:VirtualMachine | |
var found = VcPlugin.getAllVirtualMachines(null, "xpath:name[matches(.,'"+vmName+"')]"); | |
if (found.length > 1) { | |
throw(vmName+" matched more than one Virtual Machine"); | |
} | |
if (found.length == 1) { |
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
/** | |
* | |
* @module com.mayank.goyal | |
* @version 4.0.0 | |
* | |
* @param {string} gatewayIP 192.10.21.0 | |
* @param {string} subnetmaskIP 255.255.255.192 | |
* | |
* @outputType string 192.10.21.0/26 | |
* |
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
System.log("TokenName: "+workflow.currentWorkflow.name); -> Workflow Name | |
System.log("TokenName: "+workflow.name); -> Token Name | |
System.log("WorkflowName: "+workflow.rootWorkflow.name); -> Workflow Name | |
var wfInstance = Server.getWorkflowWithId(workflow.currentWorkflow.id); | |
System.log(wfInstance.workflowCategory.path +"/"+wfInstance.name); -> Workflow Path/Workflow Name | |
System.log(System.currentWorkflowItem.itemName); undefined | |
System.log("WorkflowObject: "+wfInstance); -> Workflow type object | |
System.log("WorkflowFirstItem: "+wfInstance.firstitem); undefined | |
System.log("*** List of items in Workflow"); | |
for (var i = 0; i < wfInstance.items.length; i++) |
NewerOlder