vcsim: remove simulator.Map package variable#3701
Merged
dougm merged 1 commit intovmware:mainfrom Mar 4, 2025
Merged
Conversation
dougm
added a commit
to dougm/vm-operator
that referenced
this pull request
Mar 3, 2025
Member
Author
|
vm-operator update against this branch: vmware-tanzu/vm-operator@main...dougm:vcsim-refactor |
This package var has prevented multiple instances of vcsim running in parallel the same process.
Each simulator Model/Service instance now has its own Registry (Map) instance and Context.
The simulator.{Test,Run} functions are now passed the simulator.Context instance as the
context.Context callback param. 'simulator.Map' is now a helper function / shortcut to
reference the Map field of the Context instance.
BREAKING: simulator.Map package variable has been removed
BREAKING: simulator.SpoofContext function has been renamed to NewContext
Signed-off-by: Doug MacEachern <dougm@broadcom.com>
11 tasks
dougm
added a commit
to dougm/vm-operator
that referenced
this pull request
Mar 4, 2025
dougm
added a commit
to dougm/vm-operator
that referenced
this pull request
Mar 4, 2025
dougm
added a commit
to dougm/vsphere-csi-driver
that referenced
this pull request
Mar 6, 2025
The simulator.Map package variable has been removed from govmomi. See: vmware/govmomi#3701 The simulator.Map usage had been read-only, so changed to use vim25.Client instead. These tests don't have access to simulator instance Context, so we can't use the in-memory 'model.Map()' as pkg/common/cns-lib/vsphere/virtualmachine_test.go does.
dougm
added a commit
to dougm/vsphere-csi-driver
that referenced
this pull request
Mar 11, 2025
The simulator.Map package variable has been removed from govmomi. See: vmware/govmomi#3701 The simulator.Map usage had been read-only, so changed to use vim25.Client instead. These tests don't have access to simulator instance Context, so we can't use the in-memory 'model.Map()' as pkg/common/cns-lib/vsphere/virtualmachine_test.go does.
dougm
added a commit
to dougm/cloud-provider-vsphere
that referenced
this pull request
Mar 11, 2025
The simulator.Map package variable has been removed from govmomi. See: vmware/govmomi#3701
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This package var has prevented multiple instances of vcsim running in parallel the same process.
Each simulator Model/Service instance now has its own Registry (Map) instance and Context.
The simulator.{Test,Run} functions are now passed the simulator.Context instance as the
context.Context callback param. 'simulator.Map' is now a helper function / shortcut to
reference the Map field of the Context instance.
BREAKING: simulator.Map package variable has been removed
BREAKING: simulator.SpoofContext function has been renamed to NewContext