Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
grid5000
reference-repository
Commits
e0a0607b
Commit
e0a0607b
authored
Mar 25, 2020
by
IMBERT Matthieu
Browse files
[gen] fix for failed valid:schema check
parent
4b211848
Pipeline
#131697
passed with stages
in 4 minutes and 10 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
data/grid5000/grid5000.json
View file @
e0a0607b
{
"ipv6"
:
{
"site-indexes"
:
{
"grenoble"
:
1
,
"lille"
:
2
,
"luxembourg"
:
3
,
"lyon"
:
4
,
"nancy"
:
5
,
"nantes"
:
6
,
"rennes"
:
7
,
"sophia"
:
8
}
},
"type"
:
"grid"
,
"uid"
:
"grid5000"
}
\ No newline at end of file
input/grid5000/ipv6.yaml
deleted
100644 → 0
View file @
4b211848
ipv6
:
site-indexes
:
grenoble
:
1
lille
:
2
luxembourg
:
3
lyon
:
4
nancy
:
5
nantes
:
6
rennes
:
7
sophia
:
8
lib/refrepo/input_loader.rb
View file @
e0a0607b
...
...
@@ -107,6 +107,17 @@ def add_kavlan_ips(h)
end
end
$ipv6_site_indexes
=
{
'grenoble'
=>
1
,
'lille'
=>
2
,
'luxembourg'
=>
3
,
'lyon'
=>
4
,
'nancy'
=>
5
,
'nantes'
=>
6
,
'rennes'
=>
7
,
'sophia'
=>
8
,
}
def
add_ipv6
(
h
)
# for each node
h
[
'sites'
].
each_pair
do
|
site_uid
,
hs
|
...
...
@@ -121,7 +132,7 @@ def add_ipv6(h)
if
not
ip4
.
nil?
# compute and assign IPv6 based on IPv4
ip6
=
'2001:660:4406:'
ip6
+=
'%x'
%
h
[
'
ipv6
'
][
'
site
-
indexes
'
]
[
site_uid
]
ip6
+=
'%x'
%
$
ipv6
_
site
_
indexes
[
site_uid
]
ip6
+=
'00:'
ip6
+=
'%x::'
%
((
ip4
.
split
(
'.'
)[
2
].
to_i
&
0b1111
)
+
1
)
ip6
+=
'%x'
%
(
ip4
.
split
(
'.'
)[
3
].
to_i
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment