mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
(POOLER-40) Do not return folders with get_pool_vms
This commit updates get_pool_vms to only return if the object is a VirtualMachine. Without this change a folder wtihin a VM target folder can be discovered and destroyed as though it were a VM.
This commit is contained in:
parent
8be578493a
commit
bd0ae2e192
2 changed files with 25 additions and 1 deletions
|
|
@ -52,7 +52,7 @@ module Vmpooler
|
|||
return vms if folder_object.nil?
|
||||
|
||||
folder_object.childEntity.each do |vm|
|
||||
vms << { 'name' => vm.name }
|
||||
vms << { 'name' => vm.name } if vm.is_a? RbVmomi::VIM::VirtualMachine
|
||||
end
|
||||
end
|
||||
vms
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue