Sort Array of VC Datastore objects

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


Sign in to be able to add comments.

Comments 0