mirror of
https://github.com/OpenNebula/one.git
synced 2026-12-03 21:52:31 +09:00
L #-: Several linting fixes
This commit is contained in:
4 files changed
+7
-7
No files matched your search
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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}\"" \
|
||||
|
||||
Reference in new issue
Block a user