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

L #-: lint some files (#1251)

This commit is contained in:
Alejandro Huertas Herrero 2021-05-27 10:20:27 +02:00 committed by GitHub
parent 218ef63c06
commit 3b0c72d7ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 7 deletions

View File

@ -1616,7 +1616,9 @@ CommandParser::CmdParser.new(ARGV) do
system("ssh #{opts} #{login}@#{ip} -p #{port} #{cmd}")
end
# rubocop:disable Style/SpecialGlobalVars
$?.exitstatus
# rubocop:enable Style/SpecialGlobalVars
end
port_desc = <<-EOT.unindent

View File

@ -76,12 +76,10 @@ class VultrProvider
rc = @client.attach_nic(@deploy_id, opts[:vultr_id])
if VultrError.error?(rc)
if rc.message == 'IP is already attached to a server'
return 0
else
OpenNebula.log_error("Error assiging #{rc.message}")
return 1
end
return 0 if rc.message == 'IP is already attached to a server'
OpenNebula.log_error("Error assiging #{rc.message}")
return 1
end
0

View File

@ -100,7 +100,8 @@ class NodePortDriver < VNMMAD::VNMDriver
"#{nic[:bridge]} | true"
cmds.add :iptables, '-t nat -D PREROUTING -p tcp --dport ' \
"#{nic[:external_port_range]} -j DNAT --to " \
"#{nic[:ip]}:#{nic[:internal_port_range]} | true"
"#{nic[:ip]}:#{nic[:internal_port_range]} " \
'| true'
cmds.add :iptables, '-t nat -D POSTROUTING -j MASQUERADE ' \
"-s #{nic[:ip]} | true"
end