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
ab3e7be2
Commit
ab3e7be2
authored
5 years ago
by
IMBERT Matthieu
Browse files
Options
Downloads
Patches
Plain Diff
[gen] ipv6: fix network_adapter select + add code to fail on unhandled cases
parent
96d0404b
No related branches found
No related tags found
No related merge requests found
Pipeline
#133186
passed
5 years ago
Stage: validate
Stage: generate
Stage: deploy
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/refrepo/input_loader.rb
+6
-1
6 additions, 1 deletion
lib/refrepo/input_loader.rb
with
6 additions
and
1 deletion
lib/refrepo/input_loader.rb
+
6
−
1
View file @
ab3e7be2
...
@@ -114,8 +114,10 @@ def add_ipv6(h)
...
@@ -114,8 +114,10 @@ def add_ipv6(h)
hc
[
'nodes'
].
each_pair
do
|
node_uid
,
hn
|
hc
[
'nodes'
].
each_pair
do
|
node_uid
,
hn
|
# get IPv4
# get IPv4
ip4
=
nil
ip4
=
nil
num_main_interfaces
=
0
hn
[
'network_adapters'
].
each_pair
do
|
iface
,
nh
|
hn
[
'network_adapters'
].
each_pair
do
|
iface
,
nh
|
if
nh
[
'mountable'
]
==
true
and
nh
[
'interface'
]
==
'Ethernet'
if
nh
[
'mounted'
]
==
true
&&
nh
[
'interface'
]
==
'Ethernet'
&&
nh
[
'management'
]
==
false
num_main_interfaces
+=
1
# for mounted && ethernet interfaces only
# for mounted && ethernet interfaces only
ip4
=
nh
[
'ip'
]
ip4
=
nh
[
'ip'
]
if
not
ip4
.
nil?
if
not
ip4
.
nil?
...
@@ -132,6 +134,9 @@ def add_ipv6(h)
...
@@ -132,6 +134,9 @@ def add_ipv6(h)
# for all other cases, force no IPv6
# for all other cases, force no IPv6
nh
.
delete
(
'ip6'
)
nh
.
delete
(
'ip6'
)
end
end
if
num_main_interfaces
>
1
raise
"
#{
node_uid
}
.
#{
site_uid
}
: more than one interface with mounted == true && interface == 'Ethernet' && management == false"
end
end
end
end
end
end
end
...
...
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