Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vmware_guest_disk: Avoid using in maintenance DS
The get_recommended_datastore from the vmware_guest_disk filters out datastores using the one with the greater amount of free space. However, it doesn't check the datastore status (eg. inMaintenance). When running the task on an SDRS cluster, which have a datastore in maintenance, and that datastore is the one with the greater amount of free space, the module fails with a pyvmomi error like: "This operation is not allowed in the current state of the datastore". This commit ensure to skip the selection of in-maintenance datastores by not even checking their size, and exclude them immediately.