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

L #-: Several small linting fixes

(cherry picked from commit 21dc3c8e8c9cf9853f312024dff16fec6a4b12a2)
This commit is contained in:
Tino Vázquez 2022-10-07 13:54:04 +02:00
parent 72704708ce
commit 015c66e1a9
No known key found for this signature in database
GPG Key ID: 14201E424D02047E
3 changed files with 3 additions and 7 deletions

View File

@ -110,8 +110,7 @@ end
def find_image_type(target_file)
target_file_type=nil
Open3.popen3("qemu-img info #{target_file}") do
|_stdin, stdout, stderr, wait_thr|
Open3.popen3("qemu-img info #{target_file}") do |_stdin, stdout, stderr, wait_thr|
unless wait_thr.value.success?
raise StandardError,
"'qemu-img info' failed, stderr: #{stderr.read}"

View File

@ -549,8 +549,7 @@ module OpenNebula
end
if role['elasticity_policies']
role['elasticity_policies'].each_with_index do |policy,
index|
role['elasticity_policies'].each_with_index do |policy, index|
exp = policy['expression']
if exp.empty?

View File

@ -63,9 +63,7 @@ module OpenNebula::TemplateExt
#---------------------------------------------------------------
logger.info 'Processing VM disks' if logger
retrieve_xmlelements('TEMPLATE/DISK').each_with_index do
|disk, idx|
retrieve_xmlelements('TEMPLATE/DISK').each_with_index do |disk, idx|
image = image_lookup(disk)
next unless image