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
2c3aa7e4
Commit
2c3aa7e4
authored
May 07, 2020
by
IMBERT Matthieu
Committed by
LOUP David
Nov 12, 2020
Browse files
[ipv6] add ipv6 data to sites in reference repository
parent
8a6248fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
input/grid5000/ipv6.yaml
View file @
2c3aa7e4
...
...
@@ -10,3 +10,12 @@ ipv6:
nantes
:
6
rennes
:
7
sophia
:
8
site_global_kavlans
:
grenoble
:
11
lille
:
12
luxembourg
:
20
lyon
:
13
nancy
:
14
nantes
:
21
rennes
:
16
sophia
:
18
lib/refrepo/input_loader.rb
View file @
2c3aa7e4
...
...
@@ -54,7 +54,10 @@ def load_yaml_file_hierarchy(directory = File.expand_path("../../input/grid5000/
# populate each node with its IPv4 addresses
add_ipv4
(
global_hash
)
# populate each node with its kavlan IPv4 IPs
# add some ipv6 informations in sites
add_site_ipv6_infos
(
global_hash
)
# populate each node with its kavlan IPs
add_kavlan_ips
(
global_hash
)
add_kavlan_ipv6s
(
global_hash
)
...
...
@@ -315,3 +318,13 @@ def add_theorical_flops(h)
end
end
end
def
add_site_ipv6_infos
(
h
)
h
[
'sites'
].
each_pair
do
|
site_uid
,
hs
|
h
[
'sites'
][
site_uid
][
'ipv6'
]
=
{}
h
[
'sites'
][
site_uid
][
'ipv6'
][
'prefix'
]
=
h
[
'ipv6'
][
'prefix'
]
+
":%02x"
%
(
h
[
'ipv6'
][
'site_indexes'
][
site_uid
])
h
[
'sites'
][
site_uid
][
'ipv6'
][
'site_index'
]
=
h
[
'ipv6'
][
'site_indexes'
][
site_uid
]
h
[
'sites'
][
site_uid
][
'ipv6'
][
'site_global_kavlan'
]
=
h
[
'ipv6'
][
'site_global_kavlans'
][
site_uid
]
end
end
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