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.
publicgetReservationPolicies (objVCACHost:vCACHost):VCACEntity[]
{
letstrFilter:string=``;
letstrExpand:string=null;
letstrOrderBy:string=null;
letstrSelect:string=null;
letintTop:number=null;
letintSkip:number=0;
letobjPropertiesHeaders:Properties=newProperties();
letarrVCACEntity:VCACEntity[]=vCACEntityManager.readModelEntitiesBySystemExpandQuery(objVCACHost.id,"ManagementModelEntities.svc","HostReservationPolicies",strFilter,strExpand,strOrderBy,strSelect,intTop,intSkip,objPropertiesHeaders);
arrVCACEntity=arrVCACEntity.filter((objVCACEntity:VCACEntity):boolean=>{
returnobjVCACEntity.getProperty("name").substring(0,5)===this.strTenantID;
});
returnarrVCACEntity;
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
