Reduce object lookups for get_vm

This commit reduces object lookups used for get_vm. Without this change get_vm looks up the VM folder, which is already used and known to find the vm with find_vm.
This commit is contained in:
kirby@puppetlabs.com 2018-06-27 17:03:37 -07:00
parent 8be578493a
commit 8840ef4a5c
2 changed files with 18 additions and 22 deletions

View file

@ -190,7 +190,7 @@ EOT
expect(result['name']).to eq(vmname)
end
['hostname','template','poolname','boottime','powerstate'].each do |testcase|
['hostname','boottime','powerstate'].each do |testcase|
it "should return nil for #{testcase}" do
result = subject.get_vm(poolname,vmname)