mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
L #-: Linting for firecracker code
This commit is contained in:
parent
96e0e27d81
commit
0fb2c36224
@ -32,7 +32,7 @@ died = false
|
||||
begin
|
||||
socket = "/srv/jailer/firecracker/one-#{vm_id}/root/api.socket"
|
||||
client = FirecrackerClient.new(socket)
|
||||
rescue
|
||||
rescue StandardError
|
||||
died = true
|
||||
end
|
||||
|
||||
@ -48,5 +48,4 @@ end
|
||||
|
||||
microvm.clean
|
||||
|
||||
exit (0)
|
||||
|
||||
exit 0
|
||||
|
@ -146,7 +146,7 @@ class MicroVM
|
||||
next while !File.read(path).empty? && (Time.now - t_start < timeout)
|
||||
|
||||
File.read(path).empty?
|
||||
rescue Errno::ENOENT
|
||||
rescue Errno::ENOENT # rubocop:disable Lint/SuppressedException
|
||||
end
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
@ -192,11 +192,12 @@ class MicroVM
|
||||
def create
|
||||
cmd = ''
|
||||
|
||||
#TODO: make screen oprions configurable to support different versions
|
||||
#TODO: make screen configurable to enable use of tmux etc..
|
||||
# TODO: make screen oprions configurable to support different versions
|
||||
# TODO: make screen configurable to enable use of tmux etc..
|
||||
# TODO: make log file from screen configurable (not working on CentOS 7)
|
||||
if @one.vnc?
|
||||
cmd << "screen -L"
|
||||
cmd << " -Logfile /tmp/fc-log-#{@one.vm_id}" if false
|
||||
cmd << 'screen -L'
|
||||
# cmd << " -Logfile /tmp/fc-log-#{@one.vm_id}" if false
|
||||
cmd << " -dmS #{@one.vm_name}"
|
||||
end
|
||||
|
||||
|
@ -39,7 +39,7 @@ def command(cmd)
|
||||
cmd_str
|
||||
end
|
||||
|
||||
XPATH_NICS = "//TEMPLATE/NIC"
|
||||
XPATH_NICS = '//TEMPLATE/NIC'
|
||||
XPATH_HV = '//HISTORY/VM_MAD'
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@ -63,7 +63,6 @@ error = false
|
||||
|
||||
template.elements.each(XPATH_NICS) do |nic_element|
|
||||
nic_id = Integer(nic_element.elements['//NIC_ID'].text)
|
||||
bridge = nic_element.elements['//BRIDGE'].text
|
||||
if_name = "#{deploy_id}-#{nic_id}"
|
||||
|
||||
# check if interface is already defined
|
||||
|
@ -35,7 +35,7 @@ def command(cmd)
|
||||
cmd_str
|
||||
end
|
||||
|
||||
XPATH_NICS = "//TEMPLATE/NIC"
|
||||
XPATH_NICS = '//TEMPLATE/NIC'
|
||||
XPATH_HV = '//HISTORY/VM_MAD'
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user