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 getReservationPolicies
Description: The following code finds VCACEntity objects for HostReservationPolicies.
public getReservationPolicies (objVCACHost:vCACHost): 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(objVCACHost.id, "ManagementModelEntities.svc", "HostReservationPolicies", strFilter, strExpand, strOrderBy, strSelect, intTop, intSkip, objPropertiesHeaders);
arrVCACEntity = arrVCACEntity.filter((objVCACEntity: VCACEntity): boolean => {
return objVCACEntity.getProperty("name").substring(0, 5) === this.strTenantID;
});
return arrVCACEntity;
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
