Prevent vic-machine from deleting non cVMs#6816
Conversation
df029c1 to
bb50104
Compare
| } | ||
|
|
||
| func (d *Dispatcher) isContainerVM(vm *vm.VirtualMachine) (bool, error) { | ||
| if vm == nil { |
There was a problem hiding this comment.
Is it possible that anybody pass a nil value here? Asking, because of excessive check is actually bad for readability and maintainability.
mhagen-vmware
left a comment
There was a problem hiding this comment.
You have ha-datacenter riddled throughout here, I think in most cases govc will auto-find without that?
| Should Contain ${output} Completed successfully | ||
|
|
||
| # Verify VM exists | ||
| ${rc} ${output}= Run And Return Rc And Output govc ls /ha-datacenter/vm/${dummyvm} |
There was a problem hiding this comment.
that is going to break on vc... I think. I think you don't need ha-datacenter for the ls call, just let it assume path and do govc ls vm/${...}
There was a problem hiding this comment.
otherwise, we should use some combination of %{TEST_DATACENTER} instead
| Should Be Equal As Integers ${rc} 0 | ||
|
|
||
| # Verify VM exists | ||
| ${rc} ${output}= Run And Return Rc And Output govc ls /ha-datacenter/vm/${dummyvm} |
|
Group6-VIC-Machine/6-03-Delete.robot passed locally on ESX and nimbus VC |
Fixes #6603
Replacement PR for #6679 to get the build to build things