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
7feed9c1
Commit
7feed9c1
authored
May 27, 2012
by
Gaetan SIMO
Browse files
[network-api] Nancy - Updating configuration.
parent
c57a4e7f
Changes
26
Hide whitespace changes
Inline
Side-by-side
Rakefile
View file @
7feed9c1
...
...
@@ -200,11 +200,11 @@ namespace :netlinks do
desc
"Generates network API JSON files based on net-links yaml files.
\n
Use DRY=yes to simulate the execution. "
task
:generate
=>
[
:environment
,
:hosts
]
do
host
,
site
=
@host
.
scan
(
/(\S+)\.(\S+)/
).
flatten
root_dir_input
=
"
#{
ROOT_DIR
}
/
generators
/
input
/sites
"
root_dir_input
=
File
.
join
(
ROOT_DIR
,
"
generators
"
,
"
input"
)
command
=
File
.
join
(
ROOT_DIR
,
"generators"
,
"grid5000"
)
command
+=
" "
+
File
.
join
(
root_dir_input
,
"net-links.rb"
)
command
+=
" "
+
File
.
join
(
root_dir_input
,
site
,
"
#{
site
}
.rb"
)
command
+=
" "
+
File
.
join
(
root_dir_input
,
site
,
"net-links"
,
"
#{
host
}
.yaml"
)
command
+=
" "
+
File
.
join
(
root_dir_input
,
"sites"
,
site
,
"
#{
site
}
.rb"
)
command
+=
" "
+
File
.
join
(
root_dir_input
,
"sites"
,
site
,
"net-links"
,
"
#{
host
}
.yaml"
)
command
<<
" -s"
if
ENV
[
'DRY'
]
==
"yes"
# puts command
...
...
data/grid5000/sites/nancy/network_equipments/sgraphene1.json
View file @
7feed9c1
...
...
@@ -132,7 +132,7 @@
"uid"
:
"graphene-39"
}
],
"rate"
:
1000
"rate"
:
1000
0000000
},
{
"kind"
:
"router"
,
...
...
@@ -145,10 +145,10 @@
},
{
"uid"
:
"
gw
"
"uid"
:
"
sgravillon1
"
}
],
"rate"
:
10000
"rate"
:
10000
0000
}
],
"model"
:
"3com 4500g"
,
...
...
data/grid5000/sites/nancy/network_equipments/sgraphene2.json
View file @
7feed9c1
...
...
@@ -117,7 +117,7 @@
"uid"
:
"graphene-74"
}
],
"rate"
:
1000
"rate"
:
1000
0000000
},
{
"kind"
:
"router"
,
...
...
@@ -130,10 +130,10 @@
},
{
"uid"
:
"
gw
"
"uid"
:
"
sgravillon1
"
}
],
"rate"
:
10000
"rate"
:
10000
0000
}
],
"model"
:
"3com 4500g"
,
...
...
data/grid5000/sites/nancy/network_equipments/sgraphene3.json
View file @
7feed9c1
...
...
@@ -102,7 +102,7 @@
"uid"
:
"graphene-103"
}
],
"rate"
:
1000
"rate"
:
1000
0000000
},
{
"kind"
:
"router"
,
...
...
@@ -115,10 +115,10 @@
},
{
"uid"
:
"
gw
"
"uid"
:
"
sgravillon1
"
}
],
"rate"
:
10000
"rate"
:
10000
0000
}
],
"model"
:
"3com 4500g"
,
...
...
data/grid5000/sites/nancy/network_equipments/sgraphene4.json
View file @
7feed9c1
...
...
@@ -132,7 +132,7 @@
"uid"
:
"graphene-144"
}
],
"rate"
:
1000
"rate"
:
1000
0000000
},
{
"kind"
:
"router"
,
...
...
@@ -142,10 +142,10 @@
},
{
"uid"
:
"
gw
"
"uid"
:
"
sgravillon1
"
}
],
"rate"
:
10000
"rate"
:
10000
0000
}
],
"model"
:
"3com 4500g"
,
...
...
data/grid5000/sites/nancy/network_equipments/
gw
.json
→
data/grid5000/sites/nancy/network_equipments/
sgravillon1
.json
View file @
7feed9c1
...
...
@@ -6,6 +6,98 @@
"linecards"
:
[
{
},
{
"kind"
:
"other"
,
"naming_pattern"
:
"%LINECARD:A%%PORT%"
,
"ports"
:
[
{
},
{
"kind"
:
"other"
,
"uid"
:
"sgrapheneib"
},
{
"port"
:
"bmc"
,
"uid"
:
"fgriffon2"
},
{
"uid"
:
"TALC-adm"
},
{
"kind"
:
"switch"
,
"uid"
:
"stalc1"
},
{
},
{
"uid"
:
"sgriffonib"
},
{
"uid"
:
"grimoire"
},
{
"port"
:
"eth0"
,
"uid"
:
"grog"
},
{
"port"
:
"eth1"
,
"uid"
:
"grog"
},
{
"port"
:
"bmc"
,
"uid"
:
"fgriffon1"
},
{
"port"
:
"eth0"
,
"uid"
:
"fgriffon1"
},
{
},
{
"uid"
:
"sgraphene1-ipmi"
},
{
"uid"
:
"sgraphene2-ipmi"
},
{
"uid"
:
"sgraphene3-ipmi"
},
{
"uid"
:
"sgraphene4-ipmi"
},
{
},
{
"uid"
:
"loria"
},
{
"uid"
:
"sgriffon2-ipmi"
},
{
"uid"
:
"sgriffon1-ipmi"
},
{
"uid"
:
"sgriffon3-ipmi"
},
{
"port"
:
"eth0"
,
"uid"
:
"fgrelon1"
},
{
"port"
:
"eth1"
,
"uid"
:
"fgriffon1"
},
{
"port"
:
"eth1"
,
"uid"
:
"fgrelon1"
}
],
"rate"
:
1000000000
},
{
"kind"
:
"switch"
,
...
...
@@ -27,7 +119,7 @@
"uid"
:
"sgriffon2"
}
],
"rate"
:
10000
"rate"
:
10000
00000
},
{
"kind"
:
"switch"
,
...
...
@@ -49,7 +141,7 @@
"uid"
:
"sgraphene4"
}
],
"rate"
:
10000
"rate"
:
10000
00000
},
{
"kind"
:
"switch"
,
...
...
@@ -59,10 +151,12 @@
},
{
"kind"
:
"other"
,
"uid"
:
"fgriffon1"
},
{
"kind"
:
"other"
,
"uid"
:
"fgriffon2"
},
{
"uid"
:
"sgriffon3"
...
...
@@ -71,7 +165,29 @@
"uid"
:
"sgriffon1"
}
],
"rate"
:
10000
"rate"
:
1000000000
},
{
"kind"
:
"virtual"
,
"naming_pattern"
:
"%LINECARD:A%%PORT%"
,
"ports"
:
[
{
},
{
},
{
},
{
},
{
"uid"
:
"renater-nancy"
}
],
"rate"
:
10000000000
}
],
"model"
:
"HP Procurve 5406zl"
,
...
...
@@ -81,7 +197,7 @@
"site"
:
"nancy"
,
"snmp_community"
:
"public"
,
"type"
:
"network_equipment"
,
"uid"
:
"
gw
"
,
"uid"
:
"
sgravillon1
"
,
"vlans"
:
{
"naming_pattern"
:
"Vlan%VLANID%"
}
...
...
data/grid5000/sites/nancy/network_equipments/sgriffon1.json
View file @
7feed9c1
...
...
@@ -141,7 +141,7 @@
"uid"
:
"griffon-29"
}
],
"rate"
:
1000
"rate"
:
1000
0000000
},
{
"kind"
:
"router"
,
...
...
@@ -154,10 +154,10 @@
},
{
"uid"
:
"
gw
"
"uid"
:
"
sgravillon1
"
}
],
"rate"
:
10000
"rate"
:
10000
0000
}
],
"model"
:
"3com 4500g"
,
...
...
data/grid5000/sites/nancy/network_equipments/sgriffon2.json
View file @
7feed9c1
...
...
@@ -141,7 +141,7 @@
"uid"
:
"griffon-57"
}
],
"rate"
:
1000
"rate"
:
1000
0000000
},
{
"kind"
:
"router"
,
...
...
@@ -151,10 +151,10 @@
},
{
"uid"
:
"
gw
"
"uid"
:
"
sgravillon1
"
}
],
"rate"
:
10000
"rate"
:
10000
0000
}
],
"model"
:
"3com 4500g"
,
...
...
data/grid5000/sites/nancy/network_equipments/sgriffon3.json
View file @
7feed9c1
...
...
@@ -144,7 +144,7 @@
"uid"
:
"griffon-92"
}
],
"rate"
:
1000
"rate"
:
1000
0000000
},
{
"kind"
:
"router"
,
...
...
@@ -154,10 +154,10 @@
},
{
"uid"
:
"
gw
"
"uid"
:
"
sgravillon1
"
}
],
"rate"
:
10000
"rate"
:
10000
000000
}
],
"model"
:
"3com 4500g"
,
...
...
data/grid5000/sites/nancy/network_equipments/stalc1.json
View file @
7feed9c1
...
...
@@ -6,7 +6,7 @@
"linecards"
:
[
{
"kind"
:
"node"
,
"naming_pattern"
:
"%PORT%"
,
"naming_pattern"
:
"
T%LINECARD%/
%PORT%"
,
"ports"
:
[
{
...
...
@@ -141,7 +141,41 @@
"uid"
:
"talc-37"
}
],
"rate"
:
1000
"rate"
:
1000000000
},
{
"kind"
:
"switch"
,
"naming_pattern"
:
"T%LINECARD%/%PORT%"
,
"ports"
:
[
{
},
{
},
{
"uid"
:
"stalc3"
}
],
"rate"
:
10000000000
},
{
"kind"
:
"switch"
,
"naming_pattern"
:
"T%LINECARD%/%PORT%"
,
"ports"
:
[
{
},
{
"uid"
:
"sgravillon1"
},
{
"kind"
:
"other"
,
"rate"
:
10000000000
,
"uid"
:
"talc-srv"
}
],
"rate"
:
10000000000
}
],
"model"
:
"hp procurve"
,
...
...
data/grid5000/sites/nancy/network_equipments/stalc2.json
View file @
7feed9c1
...
...
@@ -6,7 +6,7 @@
"linecards"
:
[
{
"kind"
:
"node"
,
"naming_pattern"
:
"%PORT%"
,
"naming_pattern"
:
"
G%LINECARD%/
%PORT%"
,
"ports"
:
[
{
...
...
@@ -138,7 +138,39 @@
"uid"
:
"talc-67"
}
],
"rate"
:
1000
"rate"
:
10000000000
},
{
"kind"
:
"switch"
,
"naming_pattern"
:
"T%LINECARD%/%PORT%"
,
"ports"
:
[
{
},
{
},
{
"uid"
:
"stalc4"
}
],
"rate"
:
10000000000
},
{
"kind"
:
"other"
,
"naming_pattern"
:
"T%LINECARD%/%PORT%"
,
"ports"
:
[
{
},
{
"uid"
:
"talc1"
},
{
"uid"
:
"talc2"
}
],
"rate"
:
10000000000
}
],
"model"
:
"hp procurve"
,
...
...
data/grid5000/sites/nancy/network_equipments/stalc3.json
View file @
7feed9c1
...
...
@@ -6,7 +6,7 @@
"linecards"
:
[
{
"kind"
:
"node"
,
"naming_pattern"
:
"%PORT%"
,
"naming_pattern"
:
"
G%LINECARD%/
%PORT%"
,
"ports"
:
[
{
...
...
@@ -138,7 +138,23 @@
"uid"
:
"talc-133"
}
],
"rate"
:
1000
"rate"
:
10000000000
},
{
"kind"
:
"switch"
,
"naming_pattern"
:
"T%LINECARD%/%PORT%"
,
"ports"
:
[
{
},
{
"uid"
:
"stalc1"
},
{
"uid"
:
"stalc4"
}
],
"rate"
:
10000000000
}
],
"model"
:
"hp procurve"
,
...
...
data/grid5000/sites/nancy/network_equipments/stalc4.json
0 → 100644
View file @
7feed9c1
{
"channels"
:
{
"naming_pattern"
:
"Po%CHANNELID%"
},
"kind"
:
"switch"
,
"linecards"
:
[
{
},
{
"kind"
:
"switch"
,
"naming_pattern"
:
"T%LINECARD%/%PORT%"
,
"ports"
:
[
{
},
{
"uid"
:
"stalc3"
},
{
"uid"
:
"stalc2"
}
],
"rate"
:
10000000000
}
],
"model"
:
"hp procurve"
,
"routes"
:
{
},
"site"
:
"nancy"
,
"snmp_community"
:
"public"
,
"type"
:
"network_equipment"
,
"uid"
:
"stalc4"
,
"vlans"
:
{
"naming_pattern"
:
"Vlan%VLANID%"
}
}
\ No newline at end of file
generators/input/net-links.rb
View file @
7feed9c1
...
...
@@ -9,7 +9,7 @@
# Most properties are directly written as they are from the net-links YAML file to the the JSON file
model
properties
[
"model"
]
kind
properties
[
"kind"
]
#
@context.recursive_merge!(:site => site)
@context
.
recursive_merge!
(
:site
=>
site
)
snmp_community
properties
[
"snmp_community"
]
vlans
properties
[
"vlans"
]
routes
properties
[
"routes"
]
...
...
generators/input/sites/nancy/net-links/sgraphene1.yaml
View file @
7feed9c1
...
...
@@ -12,7 +12,7 @@ sgraphene1:
0
:
naming_pattern
:
"
%PORT%"
kind
:
node
rate
:
10000000
rate
:
10000000
000
ports
:
2
:
graphene-1
1
:
graphene-2
...
...
generators/input/sites/nancy/net-links/sgraphene2.yaml
View file @
7feed9c1
...
...
@@ -12,7 +12,7 @@ sgraphene2:
0
:
naming_pattern
:
"
%PORT%"
kind
:
node
rate
:
10000000
rate
:
10000000
000
ports
:
2
:
graphene-41
1
:
graphene-40
...
...
generators/input/sites/nancy/net-links/sgraphene3.yaml
View file @
7feed9c1
...
...
@@ -12,7 +12,7 @@ sgraphene3:
0
:
naming_pattern
:
"
%PORT%"
kind
:
node
rate
:
10000000
rate
:
10000000
000
ports
:
2
:
graphene-75
1
:
graphene-76
...
...
generators/input/sites/nancy/net-links/sgraphene4.yaml
View file @
7feed9c1
...
...
@@ -12,7 +12,7 @@ sgraphene4:
0
:
naming_pattern
:
"
%PORT%"
kind
:
node
rate
:
10000000
rate
:
10000000
000
ports
:
2
:
graphene-106
1
:
graphene-105
...
...
generators/input/sites/nancy/net-links/sgravillon1.yaml
View file @
7feed9c1
...
...
@@ -12,7 +12,7 @@ sgravillon1:
1
:
naming_pattern
:
"
%LINECARD:A%%PORT%"
kind
:
other
rate
:
100000000
rate
:
100000000
0
ports
:
1
:
kind
:
other
...
...
@@ -23,7 +23,8 @@ sgravillon1:
3
:
uid
:
TALC-adm
4
:
uid
:
TALC-prod
kind
:
switch
uid
:
stalc1
6
:
uid
:
sgriffonib
7
:
grimoire
...
...
@@ -67,14 +68,14 @@ sgravillon1:
2
:
naming_pattern
:
"
%LINECARD:A%%PORT%"
kind
:
switch
rate
:
100000000
rate
:
100000000
0
ports
:
3
:
sgr
iffon
3
4
:
sgriffon
1
3
:
sgr
aphene
3
4
:
sgriffon
2
3
:
naming_pattern
:
"
%LINECARD:A%%PORT%"
kind
:
switch
rate
:
100000000
rate
:
100000000
0