To use this function add it to the class library file named OrchestratorService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: OrchestratorService.ts
Description: Orchestrator Function to Get vSphere Update Manager Compliance
Private Function: isNotCompliant
private isNotCompliant(objVumVIInventory: VumVIInventory, arrVumBaseline: VumBaseline[]): boolean {
let arrVumVIInventory: VumVIInventory[] = [];
arrVumVIInventory.push(objVumVIInventory);
let arrVumCompliance: VumCompliance[] = VumObjectManager.getCompliance(arrVumVIInventory, null, arrVumBaseline);
let blnNotCompliant: boolean = arrVumCompliance.some((objVumCompliance: VumCompliance): boolean => {
return objVumCompliance.status === "NotCompliant";
});
this.objLogger.info(`is host not in compliance with baselines ${blnNotCompliant}`)
return blnNotCompliant;
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
