Closed donwlewis closed 3 years ago
Looking at this more closely, it might just be a flaw in the vCenter API since all you are doing is passing the cluster as a resource pool. Thats lame...
The API only allows filtering on connected state, which we already do here. It looks like Maintenance Mode is only settable from the GUI, and is not readable from the API. The only other readable setting is power_state
, which for me is always "POWERED_ON". We could filter after the fact for that, but it's still not solving the real problem - hosts in maintenance mode.
Closing this based on @clintoncwolfe 's findings above. @donwlewis please re-open if you find that the API can support this.
Just seen this notification now. The premise isn't entirely correct, @clintoncwolfe just looked at the wrong place :)
We have to use two APIs for this driver, as the newer REST API (which was checked) does not completely replace the old SOAP API yet. There were advanced made with vSphere 7.0 but it's not yet "there". I would love to get rid of SOAP, but... well.
The Host maintenance status can be checked on the SOAP API via the RbVMomi interface, see https://www.vmware.com/support/developer/converter-sdk/conv60_apireference/vim.host.RuntimeInfo.html and the inMaintenanceMode
field there.
Describe the Enhancement:
Exclude disabled hosts in cluster when host is not specified.
Describe the Need:
When using ESXi clusters, it would be nice to not have to put in the host incase it is disabled, or in maintenance mode.
Current Alternative
This functionality partly works except that it doesn't exclude hosts in maintenance mode or disabled. The following error will occur randomly:
Can We Help You Implement This?:
I would be happy to try and implement this. I might need some guidance on where to look, and how to test. Thanks.