To use this function add it to the class library file named PluginVCClusterComputeResourceService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: PluginVCClusterComputeResourceService.ts
Description: Orchestrator Function to Get a DRS Rule from a vCenter Cluster Compute Resource.
Private Function: VcClusterRuleGet
private VcClusterRuleGet(objVcClusterComputeResource: VcClusterComputeResource, blnUserCreated: boolean = true, blnEnabled: boolean = true): VcClusterRuleInfo[] {
let objVcClusterConfigInfoEx: VcClusterConfigInfoEx = objVcClusterComputeResource.configurationEx as VcClusterConfigInfoEx;
let arrVcClusterRuleInfo: VcClusterRuleInfo[] = objVcClusterConfigInfoEx.rule;
arrVcClusterRuleInfo = arrVcClusterRuleInfo.filter((objVcClusterRuleInfo: VcClusterRuleInfo): boolean => {
return objVcClusterRuleInfo.userCreated === blnUserCreated && objVcClusterRuleInfo.enabled === blnEnabled;
});
return arrVcClusterRuleInfo;
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
