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

L #-: fix minor linting issues (#3812)

This commit is contained in:
Alejandro Huertas Herrero 2019-10-04 10:41:03 +02:00 committed by Tino Vázquez
parent acc565039b
commit f90144f5ef
4 changed files with 14 additions and 5 deletions

View File

@ -237,7 +237,8 @@ def show_service(client, args, options)
puts Kernel.format(str, 'STRATEGY', template['deployment'])
puts Kernel.format(str,
'SERVICE STATE', Service.state_str(template['state']))
'SERVICE STATE',
Service.state_str(template['state']))
if template['shutdown_action']
puts Kernel.format(str, 'SHUTDOWN', template['shutdown_action'])
end
@ -261,9 +262,13 @@ def show_service(client, args, options)
template['roles'].each do |role|
CLIHelper.print_header("ROLE #{role['name']}", false)
puts Kernel.format(str, 'ROLE STATE', Role.state_str(role['state']))
puts Kernel.format(str,
'ROLE STATE',
Role.state_str(role['state']))
if role['parents']
puts Kernel.format(str, 'PARENTS', role['parents'].join(', '))
puts Kernel.format(str,
'PARENTS',
role['parents'].join(', '))
end
puts Kernel.format(str, 'VM TEMPLATE', role['vm_template'])
puts Kernel.format(str, 'CARDINALITY', role['cardinality'])

View File

@ -434,9 +434,9 @@ CommandParser::CmdParser.new(ARGV) do
Shows orphans vnets (i.e vnets not referenced in any template).
EOT
command :orphans, show_desc do
command :orphans, show_desc do
puts helper.check_orphans
return 0
return 0
end
end

View File

@ -1,4 +1,5 @@
# Quotas module
# rubocop:disable Style/FormatStringToken
module OneDBFsck
# Check and fix quotas
@ -521,5 +522,6 @@ module OneDBFsck
new_elem.add_child(leases_el).content = leases_used.to_s
end
end
# rubocop:enable Style/FormatStringToken
end

View File

@ -38,6 +38,7 @@ module VirtualMachineMonitor
# monitor function used when VMM poll action is called
# rubocop:disable Naming/VariableName
# rubocop:disable Style/FormatStringToken
def monitor_poll_vm
reset_monitor
@ -363,6 +364,7 @@ module VirtualMachineMonitor
(write_kbpersec * 1024 * refresh_rate).to_i
end
# rubocop:enable Naming/VariableName
# rubocop:enable Style/FormatStringToken
# Generates a OpenNebula IM Driver valid string with the monitor info
def info