Skip to content

Commit

Permalink
api: Update folder.PlaceVMsXCluster to support several placement types
Browse files Browse the repository at this point in the history
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:
- extends the API definitions to reflect the changes.
- extends the simulator to support these new placement types.
- adds simulator tests to validate the new placement types.
- updates licenses
  • Loading branch information
derekbeard committed Sep 24, 2024
1 parent 44d4fb3 commit f22b502
Show file tree
Hide file tree
Showing 4 changed files with 580 additions and 122 deletions.
6 changes: 3 additions & 3 deletions simulator/cluster_compute_resource_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
Copyright (c) 2017 VMware, Inc. All Rights Reserved.
Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down Expand Up @@ -259,7 +259,7 @@ func TestPlaceVmRelocate(t *testing.T) {
"InvalidArgument",
},
{
"relocate with a diskId in spec.dick that does not exist in the vm",
"relocate with a diskId in spec.disk that does not exist in the vm",
&types.VirtualMachineRelocateSpec{
Host: &hostMoRef,
Disk: []types.VirtualMachineRelocateSpecDiskLocator{
Expand Down
Loading

0 comments on commit f22b502

Please sign in to comment.