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

L #-: Several linting fixes

(cherry picked from commit af5ea8a70621d815f2adffde171b0f4d7915a255)
This commit is contained in:
Tino Vazquez 2022-02-11 13:00:02 +01:00
parent 186694626a
commit ef0178e164
No known key found for this signature in database
GPG Key ID: 14201E424D02047E
4 changed files with 7 additions and 7 deletions

View File

@ -712,7 +712,7 @@ module VCenterDriver
# Only take care of VMs, not templates
if !hashed_properties['config.template']
vms[r.obj._ref + "_" + vc_uuid] = hashed_properties
vms[r.obj._ref + '_' + vc_uuid] = hashed_properties
vm_objects << r.obj
end
end

View File

@ -117,15 +117,15 @@ module VCenterDriver
return_if_error(rc, item, exit_if_fail)
end
# Since https://github.com/OpenNebula/one/issues/5689
# there two deploy_ids allowed:
# * moref, eg: vm-567
# * moref +"_" + vcenter uuid, eg:
# 2499952a-6c85-480e-b7df-4cbd2137eb69_vm-456
# * moref +"_" + vcenter uuid, eg:
# 2499952a-6c85-480e-b7df-4cbd2137eb69_vm-456
# This function will always return the moref
def self.get_deploy_id(deploy_id)
return deploy_id.split("_")[0]
deploy_id.split('_')[0]
end
def self.find_by_name(the_class, name, pool = nil, raise_if_fail = true)

View File

@ -47,7 +47,7 @@ module VCenterDriver
vm = selected[:one_item] || build
template = selected[:template] || import_tmplt
template = "DEPLOY_ID = #{vm_ref}\n" + template
host_id = selected[:host] || @list.keys[0]
host_id = selected[:host] || @list.keys[0]
vc_uuid = @vi_client.vim.serviceContent.about.instanceUuid
vc_name = @vi_client.vim.host

View File

@ -133,7 +133,7 @@ begin
vm.poweron(set_running)
end
puts vm['_ref'] + "_" + vc_uuid
puts vm['_ref'] + '_' + vc_uuid
rescue StandardError => e
message = "Deploy of VM #{vm_id} on vCenter cluster #{cluster_name} " \
"with #{dfile} failed due to \"#{e.message}\"" \