You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
folder, err := vmFolder.CreateFolder("some name")
if err != nil {
var dup *types.DuplicateName
if _, ok faults.As(err, &dup); ok {
folder = dup.Object
}
}
folder.CreateVM(...)
And then I was having some weird issues when I was verifying that vmFolder didn't have the VM from above.
I resorted to fmt.Printf of folder and I noticed the first CreateVM was the right folder and all the rest after was vmFolder.
I looked at the simulator code and noticed:
that didn't seem right.
I look at resource pool and it has:
if e := Map.FindByName(name, p.ResourcePool.ResourcePool); e != nil {
return nil, Fault("", &types.DuplicateName{
Name: e.Entity().Name,
Object: e.Reference(),
})
which seems right.
To Reproduce
Steps to reproduce the behavior:
Non-pseudo-code of above description.
Should be able to just call CreateFolder a couple times and the fault will point to the caller object rather than the duplicate object.
Describe the bug
I was automating a flow of (pseudo-code)
And then I was having some weird issues when I was verifying that vmFolder didn't have the VM from above.
I resorted to fmt.Printf of folder and I noticed the first CreateVM was the right folder and all the rest after was vmFolder.
I looked at the simulator code and noticed:
that didn't seem right.
I look at resource pool and it has:
which seems right.
To Reproduce
Steps to reproduce the behavior:
Non-pseudo-code of above description.
Should be able to just call CreateFolder a couple times and the fault will point to the caller object rather than the duplicate object.
Expected behavior
(probably should do the same for the storagePod)
Affected version
82b4ad6
The text was updated successfully, but these errors were encountered: