1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

F #~: fix root template (#1047)

Signed-off-by: Carlos Herrera <cherrera@opennebula.io>
This commit is contained in:
Carlos J. Herrera 2021-03-30 11:28:08 -04:00 committed by GitHub
parent 54d40162ce
commit 0de1ef3780
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1659,10 +1659,12 @@ module VCenterDriver
folders = []
until item.instance_of? RbVmomi::VIM::Datacenter
item = item.parent
first_condition = item.instance_of? RbVmomi::VIM::Datacenter
second_condition = item.name != 'vm'
first_condition =
!(item.instance_of? RbVmomi::VIM::Datacenter)
second_condition =
item.name != 'vm'
unless first_condition && second_condition
if first_condition && second_condition
folders << item.name
end
if item.nil?
@ -1693,8 +1695,8 @@ module VCenterDriver
one_tmp[:dc_name] = dc_name
one_tmp[:template_name] = template_name
one_tmp[:sunstone_template_name]=
"#{template_name} [ Cluster: #{template_ccr_name} \
- Template location: #{location} ]"
"#{template_name} [ Cluster: #{template_ccr_name}" \
"- Template location: #{location} ]"
one_tmp[:template_location] = location
one_tmp[:vcenter_ccr_ref] = template_ccr_ref
one_tmp[:vcenter_ref] = template_ref