Skip to content

Instantly share code, notes, and snippets.

@standit
standit / getMACAddressToPortGroupNameMapping.js
Created November 15, 2018 21:48
Get MAC Address to Portgroup Name Mapping of vCenter VM
// VMware vRealize Orchestrator action sample. Valid for vRA/vRO 7.0+
//
// Get MAC Address to Portgroup Name Mapping of vCenter VM
//
// Action Inputs:
// cluster VC:ClusterComputeResource
// vm VC:VirtualMachine
//
// Action Output:
// return type: Properties
@standit
standit / getVRACatalogResourceOfvCenterVM.js
Last active November 15, 2018 22:04
Get vRA Catalog Resource of vCenter VM
// VMware vRealize Orchestrator action sample. Valid for vRA/vRO 7.0+
//
// Get vRA Catalog Resource from vCenter VM Object
//
// Action Inputs:
// vCVM VC:VirtualMachine vCenter Virtual Machine object
//
// Action Output:
// return type: vCACCAFE:CatalogResource
@standit
standit / getOrCreateAttributeValue.js
Last active February 22, 2021 19:10
Get Attribute Value in vRO Configuration Element, new Attribute created it if it does not exist
// VMware vRealize Orchestrator action sample. Valid for vRA/vRO 7.0+
//
// Get or Create a Configuration Element
//
// Action Inputs:
// configElement ConfigurationElement Configuration Element where attribute resides
// attributeName string Name of Attribute
// defaultAttributeValue Any Object used for default value of attribute
// lockId string Lock ID. Required if values are being set dynamically using setAttributeKey
//
@standit
standit / getOrCreateConfigurationElement.js
Last active June 16, 2021 12:42
Get or Create vRO Configuration Element
// VMware vRealize Orchestrator action sample. Valid for vRA/vRO 7.0+
//
// Get or Create a Configuration Element
//
// Action Inputs:
// categoryPath string Configuration Category Path (full path)
// configName string Name of Configuration Element
//
// Action Output:
// return type: ConfigurationElement
@standit
standit / addNewDiskToVM.js
Last active November 28, 2020 11:40
Add New Disk To vCenter VM
// VMware vRealize Orchestrator action sample. Valid for vRO/vRA 7.0+
//
// Add new Disk to VM
//
// Action Inputs:
// vm VC:VirtualMachine Virtual Machine Object
// datastore VC:Datastore Datastore Object on which virtual disk is to be created
// diskSizeInGB number Required Disk size (in GB)
// diskMode string Disk persistence mode. If not provided, persistent is used as default
// thinProvisioned boolean Use thin provisioning?