From cc6788bdb19ccb77c2dda910deb08b32412950c2 Mon Sep 17 00:00:00 2001
From: Matthieu Imbert <matthieu.imbert@inria.fr>
Date: Tue, 14 Apr 2020 09:57:09 +0200
Subject: [PATCH] [kavlan] prefix unused variables with _ (rubocop)

---
 lib/refrepo/input_loader.rb | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/refrepo/input_loader.rb b/lib/refrepo/input_loader.rb
index b404225ed8..d1723348e8 100644
--- a/lib/refrepo/input_loader.rb
+++ b/lib/refrepo/input_loader.rb
@@ -143,8 +143,7 @@ def add_kavlan_ipv6s(h)
   h['sites'].each_pair do |site_uid, hs|
     hs['clusters'].each_pair do |cluster_uid, hc|
       hc['nodes'].each_pair do |node_uid, hn|
-        node_id = node_uid.split('-')[1].to_i
-        kvl_adapters = hn['network_adapters'].select { |k,v| v['mountable'] and (v['kavlan'] or not v.has_key?('kavlan')) and v['interface'] == 'Ethernet' }
+        kvl_adapters = hn['network_adapters'].select { |_k,v| v['mountable'] and (v['kavlan'] or not v.has_key?('kavlan')) and v['interface'] == 'Ethernet' }
         if kvl_adapters.length > 0
           if kvl_adapters.length != hn['kavlan'].length
             raise "#{node_uid}: inconsistency: num kvl_adapters = #{kvl_adapters.length}, num kavlan entries = #{hn['kavlan'].length}"
@@ -154,7 +153,7 @@ def add_kavlan_ipv6s(h)
           end
           ip4 = kvl_adapters.values[0]['ip']
           hn['kavlan6'] = {}
-          kvl_adapters.each_with_index do |(iface, nah), idx|
+          kvl_adapters.each_with_index do |(iface, _nah), idx|
             hn['kavlan6'][iface] = {}
             hn['kavlan'][iface].each_key do |kvl|
               kvl_id = kvl.split('-')[1].to_i
-- 
GitLab