Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reference-repository
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
grid5000
reference-repository
Commits
cc6788bd
Commit
cc6788bd
authored
5 years ago
by
IMBERT Matthieu
Browse files
Options
Downloads
Patches
Plain Diff
[kavlan] prefix unused variables with _ (rubocop)
parent
fa43859f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/refrepo/input_loader.rb
+2
-3
2 additions, 3 deletions
lib/refrepo/input_loader.rb
with
2 additions
and
3 deletions
lib/refrepo/input_loader.rb
+
2
−
3
View file @
cc6788bd
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment