Skip to content

Instantly share code, notes, and snippets.

@ej-github
ej-github / isWorkflowRunning.js
Last active November 15, 2018 19:42
Check if a vRO workflow has running/waiting executions
// Check if a vRO workflow has running/waiting executions
//
// For vRO 7.0+
//
// Action Inputs:
// targetWorkflow - Workflow - Workflow to check running status
//
// Return type: boolean
var lockName = "RunningWorkfowCheck";
@ej-github
ej-github / getVapiEndpointForVcenterVm.js
Created November 15, 2018 19:10
Get vAPI Endpoint for vCenter VM
// Return the vAPI Endpoint for a vCenter VM
//
// For vRO/VAPI 7.0+
//
// Action Inputs:
// vm - VC:VirtualMachine - Vcenter VM
//
// Return type: VAPI:VAPIEndpoint
if (vm == null) { return null; }
@ej-github
ej-github / inflateThinDisksOnVcenterVm.js
Last active November 15, 2018 18:44
Inflate all Thin disks on vCenter VM to Thick Eager Zero
// VMware vRealize Orchestrator action sample
//
// Inflate all Thin provisioned disks on a vCenter VM to Thick Eager Zero
//
// For vRO 7.0+
//
// Action Inputs:
// vmObject - VC:VirtualMachine - vCenter Virtual Machine
//
// Return type: void
@ej-github
ej-github / getConfigurationElementByNameAndPath.js
Created November 15, 2018 18:07
Get Configuration Element by Name and Path
// VMware vRealize Orchestrator action sample
//
// Search for Configuration Element by name and category path
//
// For vRO 7.0+
//
// Action Inputs:
// categoryPath - string - Path to the configuration element category (folder)
// configName - string - Name of configuration element
//
@ej-github
ej-github / updateVcenterVmNotes.js
Last active November 15, 2018 14:30
Update Notes for vCenter VM
// VMware vRealize Orchestrator action sample
//
// Update the notes for a vCenter VM
//
// For vRO 7.0+
//
// Action Inputs:
// vm - VC:VirtualMachine - vCenter VM Object
// notes - string - New vCenter VM Notes
//
@ej-github
ej-github / getVcenterVmNotes.js
Created November 15, 2018 14:15
Get Notes for vCenter VM
// VMware vRealize Orchestrator action sample
//
// Return the notes for a vCenter VM
//
// For vRO 7.0+
//
// Action Inputs:
// vm - VC:VirtualMachine - vCenter VM Object
//
// Return type: string - Notes for VM
@ej-github
ej-github / getVmFolderByPath.js
Last active November 15, 2018 13:55
Get VM Folder By Path in vCenter
// VMware vRealize Orchestrator action sample
//
// Search for, and return, vCenter VM Folder using the folder path to look it up
//
// For vRO 7.0+
//
// Action Inputs:
// vCenter - VC:SdkConnection - vCenter SDK Connection
// datacenterName - string - Name of Datacenter in vCenter
// folderPath - string - Folder Path (xpath)