To use this function add it to the class library file named vRealizeAutomation.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: vRealizeAutomation.ts
Function getReservations
Description: The following code finds VCACEntity objects for HostReservations.
public getReservations (): VCACEntity[]
{
let strFilter: string = ``;
let strExpand: string = null;
let strOrderBy: string = null;
let strSelect: string = null;
let intTop: number = null;
let intSkip: number = 0;
let objPropertiesHeaders: Properties = new Properties();
let arrVCACEntity: VCACEntity[] = vCACEntityManager.readModelEntitiesBySystemExpandQuery(this.objVCACHost.id, "ManagementModelEntities.svc", "HostReservations", strFilter, strExpand, strOrderBy, strSelect, intTop, intSkip, objPropertiesHeaders);
arrVCACEntity = arrVCACEntity.filter((objVCACEntity: VCACEntity): boolean => { return objVCACEntity.getProperty("HostReservationName").length === 53 && objVCACEntity.getProperty("HostReservationName").substring(0, 5) === this.strTenantID; });
return arrVCACEntity;
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
