Bug #5285: Skip vCenter VApps when importing templates as they are not supported

(cherry picked from commit 7c136b1a30)
This commit is contained in:
Jaime Melis committed 2017-09-08 18:45:53 +02:00
1 parent 1fb12b5552
commit b381dfc48c
1 file changed
+5 -2
@@ -75,8 +75,11 @@ class Template
item = @item
while !item.instance_of? RbVmomi::VIM::Datacenter
item = item.parent
if item.nil?
if item.parent
item = item.parent
elsif item.resourcePool.instance_of? RbVmomi::VIM::VirtualApp
item = item.resourcePool.parent
else
raise "Could not find the parent Datacenter"
end
end