Sample Exchange

 View Only

Sort Array of VC Datastore objects 

Mar 09, 2017 03:02 PM

This script is intended to be used as a vRealize Orchestrator Action. It will return an array of sorted VC:Datastore objects, sorted as defined by the sortType input (freeSpace, freeSpaceDesc, capacity, capacityDesc, uncommitted, uncommittedDesc, nameDesc) where "Desc" means Descending. If no Sort Type is defined, then the default sort is by Name. This code also serves as an example on how to sort arrays of Objects in vRealize Orchestrator.

Inputs: datastores (Array/VC:Datastore), sortType (string), logResults (boolean)

Output: Array/VC:Datastore


#MIT
#vRO
#Action
#Sort
#JavaScript
#vRealizeOrchestratorPlug-inSDK

Statistics
0 Favorited
0 Views
1 Files
0 Shares
0 Downloads
Attachment(s)
js file
sortDatastores.js   3 KB   1 version
Uploaded - Apr 09, 2024

Tags and Keywords

Related Entries and Links

No Related Resource entered.