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

F #5767: Allow empty VM_PREFIX

(cherry picked from commit 861532c8c8e0e3ec61d73c0bc076217523cf906d)
This commit is contained in:
Tino Vazquez 2022-03-11 14:21:36 +01:00
parent 48564099f3
commit 5331da8321
No known key found for this signature in database
GPG Key ID: 14201E424D02047E
2 changed files with 2 additions and 2 deletions

View File

@ -261,7 +261,7 @@ module VCenterDriver
# Let's try to find the VM object only by its name
# Let's build the VM name
vm_prefix = host['TEMPLATE/VM_PREFIX']
vm_prefix = VM_PREFIX_DEFAULT if vm_prefix.nil? || vm_prefix.empty?
vm_prefix = VM_PREFIX_DEFAULT if vm_prefix.nil?
vm_prefix.gsub!('$i', one_vm['ID'])
vm_name = vm_prefix + one_vm['NAME']

View File

@ -471,7 +471,7 @@ end
# @return String vcenter name
def vc_name
vm_prefix = host['TEMPLATE/VM_PREFIX']
vm_prefix = VM_PREFIX_DEFAULT if vm_prefix.nil? || vm_prefix.empty?
vm_prefix = VM_PREFIX_DEFAULT if vm_prefix.nil?
if !one_item['USER_TEMPLATE/VM_PREFIX'].nil?
vm_prefix = one_item['USER_TEMPLATE/VM_PREFIX']