mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
L #-: Lint for rubocop 1.58.0
(cherry picked from commit 7516ed7f0a03606ce7271baf0686d9a86d5ce865) (cherry picked from commit 2fb9b889da8955520c5ba6308c8d9142ef9166f3)
This commit is contained in:
parent
1b524f24bc
commit
c032990b70
@ -943,6 +943,12 @@ Lint/AmbiguousOperatorPrecedence:
|
||||
Lint/NonAtomicFileOperation:
|
||||
Enabled: false
|
||||
|
||||
Lint/IncompatibleIoSelectWithFiberScheduler:
|
||||
Enabled: false
|
||||
|
||||
Lint/SymbolConversion:
|
||||
Enabled: false
|
||||
|
||||
#########
|
||||
# METRICS
|
||||
########
|
||||
|
@ -75,7 +75,7 @@ CommandParser::CmdParser.new(ARGV) do
|
||||
exit(0)
|
||||
end
|
||||
|
||||
filter_flag = (options[:userfilter] || VirtualMachinePool::INFO_ALL)
|
||||
filter_flag = options[:userfilter] || VirtualMachinePool::INFO_ALL
|
||||
if options[:start_time]
|
||||
start_time = options[:start_time].to_i
|
||||
else
|
||||
|
@ -77,7 +77,7 @@ CommandParser::CmdParser.new(ARGV) do
|
||||
exit(0)
|
||||
end
|
||||
|
||||
filter_flag = (options[:userfilter] || VirtualMachinePool::INFO_ALL)
|
||||
filter_flag = options[:userfilter] || VirtualMachinePool::INFO_ALL
|
||||
|
||||
start_month = -1
|
||||
start_year = -1
|
||||
|
@ -634,8 +634,8 @@ module OpenNebula
|
||||
return OpenNebula::Error.new("Role #{name} is in DONE state")
|
||||
end
|
||||
|
||||
do_offset = (!period.nil? && period.to_i > 0 &&
|
||||
!vms_per_period.nil? && vms_per_period.to_i > 0)
|
||||
do_offset = !period.nil? && period.to_i > 0 &&
|
||||
!vms_per_period.nil? && vms_per_period.to_i > 0
|
||||
|
||||
nodes.each_with_index do |node, index|
|
||||
vm_id = node['deploy_id']
|
||||
|
@ -193,7 +193,7 @@ module HEMHook
|
||||
|
||||
def as_stdin?
|
||||
astdin = self['TEMPLATE/ARGUMENTS_STDIN']
|
||||
astdin &&= (astdin.casecmp('yes') || astdin.casecmp('true'))
|
||||
astdin &&= astdin.casecmp('yes') || astdin.casecmp('true')
|
||||
|
||||
return false if astdin.nil?
|
||||
|
||||
|
@ -394,10 +394,10 @@ module OneDBFsck
|
||||
vm_elem.xpath("#{cpu}_USED").each do |e|
|
||||
cpu_used = (cpu_used / 100.0)
|
||||
|
||||
different = (e.text.to_f != cpu_used ||
|
||||
![format('%.2f', cpu_used),
|
||||
format('%.1f', cpu_used),
|
||||
format('%.0f', cpu_used)].include?(e.text))
|
||||
different = e.text.to_f != cpu_used ||
|
||||
![format('%.2f', cpu_used),
|
||||
format('%.1f', cpu_used),
|
||||
format('%.0f', cpu_used)].include?(e.text)
|
||||
|
||||
cpu_used_str = format('%.2f', cpu_used)
|
||||
|
||||
|
@ -2720,7 +2720,7 @@ end
|
||||
img_name = VCenterDriver::FileHelper.unescape_path(img_name_escaped)
|
||||
|
||||
vc_disks.each do |d|
|
||||
key_matches = (unmanaged_key && d[:key] == unmanaged_key.to_i)
|
||||
key_matches = unmanaged_key && d[:key] == unmanaged_key.to_i
|
||||
path_matches = (d[:path_wo_ds] == img_name)
|
||||
|
||||
if key_matches || path_matches
|
||||
|
Loading…
x
Reference in New Issue
Block a user