VMware {code} Community
wzhou
Contributor
Contributor

how to detect conflict status of affinity/antiaffinity rules

Hi, I'm writing a program to create affinity/antiaffinity rules dynamically. I'd like to be able to detect any conflicts among the rules after the rules beingn deployed. E.g. Some of the rules I created were flagged as red as shown in VirtualCenter Client - little red triangles on several VMs.

For some reason, I cannot get the red-flag status through SDK.

I thought ClusterComputeResource.configuration.getRule().getStatus() would help. However, ClusterComputeResource.configuration.getRule().getStatus() always == null. I also tried to search for "configIssue", "configStatus", "declaredAlarmState" for each VM within a rule. configStatus returned gray, however, declaredAlarmState.alarm.info returned null.

Any suggestions are welcome.

Thanks!

0 Kudos
0 Replies