vmware / govmomi

Go library for the VMware vSphere API
Apache License 2.0
2.32k stars 913 forks source link

api: Update folder.PlaceVMsXCluster to support several placement types #3562

Closed derekbeard closed 1 month ago

derekbeard commented 1 month ago

Description

The PlaceVmsXCluster API is being updated to provide placement recommendations for several new "op-types", relocate and reconfigure, in addition to the original "createAndPowerOn" behavior. To support the new capability, the PlaceVmsXCluster API is updated to add a new placement type field, add 2 new supported placement types (relocate and reconfigure) and to extend the spec and faults to carry addition info referencing existing VMs and an optional relocate spec.

This change does the following:

NOTE: This still a draft that needs more testing.

Type of change

Please mark options that are relevant:

How Has This Been Tested?

go test -v -count=20 ./simulator -run TestPlaceVmsXClusterReconfigure go test -v -count=20 ./simulator -run TestPlaceVmsXClusterRelocate go test -v -count=20 ./simulator -run TestPlaceVmsXClusterCreateAndPowerOn make check make test (failing with other unrelated tests, which I'll look into). TBD: Additional integration testing

Checklist:

dougm commented 1 month ago

Realizing we don't mention this in the doc, but we have scripts/license.sh - only touches files you'd see with git diff --name-status main

derekbeard commented 1 month ago

I'm root causing that unit test issue, not obvious from the test output.

dougm commented 1 month ago

I'm root causing that unit test issue, not obvious from the test output.

Looks like an infra flake, we get test flakes too. You can re-run from here: https://github.com/vmware/govmomi/actions/runs/11020367271 w/ Re-run failed jobs