Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get a vRA reservation object given its name
// VMware vRealize Orchestrator action sample
//
// Get a vRA reservation object given its name
//
// For vRO/VRA 7.0+
//
// Action Inputs:
// cafeHost - vCACCAFE:VCACHost - vRA host
// name - string - Name of a Reservation
//
// Return type: vCACCAFE:Reservation - vRA reservation
var client = cafeHost.createReservationClient();
var rsvService = client.getReservationReservationService();
var reservations = rsvService.getAllReservations().getContent(); //Array, vCACCAFE:vCACCAFEReservation
for each (var reservation in reservations) {
if (reservation.getName() === name) return reservation;
}
return null;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment