Commit 7feed9c1 authored by Gaetan SIMO's avatar Gaetan SIMO

[network-api] Nancy - Updating configuration.

parent c57a4e7f
......@@ -200,11 +200,11 @@ namespace :netlinks do
desc "Generates network API JSON files based on net-links yaml files.\nUse 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
......
......@@ -132,7 +132,7 @@
"uid": "graphene-39"
}
],
"rate": 1000
"rate": 10000000000
},
{
"kind": "router",
......@@ -145,10 +145,10 @@
},
{
"uid": "gw"
"uid": "sgravillon1"
}
],
"rate": 10000
"rate": 100000000
}
],
"model": "3com 4500g",
......
......@@ -117,7 +117,7 @@
"uid": "graphene-74"
}
],
"rate": 1000
"rate": 10000000000
},
{
"kind": "router",
......@@ -130,10 +130,10 @@
},
{
"uid": "gw"
"uid": "sgravillon1"
}
],
"rate": 10000
"rate": 100000000
}
],
"model": "3com 4500g",
......
......@@ -102,7 +102,7 @@
"uid": "graphene-103"
}
],
"rate": 1000
"rate": 10000000000
},
{
"kind": "router",
......@@ -115,10 +115,10 @@
},
{
"uid": "gw"
"uid": "sgravillon1"
}
],
"rate": 10000
"rate": 100000000
}
],
"model": "3com 4500g",
......
......@@ -132,7 +132,7 @@
"uid": "graphene-144"
}
],
"rate": 1000
"rate": 10000000000
},
{
"kind": "router",
......@@ -142,10 +142,10 @@
},
{
"uid": "gw"
"uid": "sgravillon1"
}
],
"rate": 10000
"rate": 100000000
}
],
"model": "3com 4500g",
......
......@@ -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": 1000000000
},
{
"kind": "switch",
......@@ -49,7 +141,7 @@
"uid": "sgraphene4"
}
],
"rate": 10000
"rate": 1000000000
},
{
"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%"
}
......
......@@ -141,7 +141,7 @@
"uid": "griffon-29"
}
],
"rate": 1000
"rate": 10000000000
},
{
"kind": "router",
......@@ -154,10 +154,10 @@
},
{
"uid": "gw"
"uid": "sgravillon1"
}
],
"rate": 10000
"rate": 100000000
}
],
"model": "3com 4500g",
......
......@@ -141,7 +141,7 @@
"uid": "griffon-57"
}
],
"rate": 1000
"rate": 10000000000
},
{
"kind": "router",
......@@ -151,10 +151,10 @@
},
{
"uid": "gw"
"uid": "sgravillon1"
}
],
"rate": 10000
"rate": 100000000
}
],
"model": "3com 4500g",
......
......@@ -144,7 +144,7 @@
"uid": "griffon-92"
}
],
"rate": 1000
"rate": 10000000000
},
{
"kind": "router",
......@@ -154,10 +154,10 @@
},
{
"uid": "gw"
"uid": "sgravillon1"
}
],
"rate": 10000
"rate": 10000000000
}
],
"model": "3com 4500g",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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",
......
{
"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
......@@ -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"]
......
......@@ -12,7 +12,7 @@ sgraphene1:
0:
naming_pattern: "%PORT%"
kind: node
rate: 10000000
rate: 10000000000
ports:
2: graphene-1
1: graphene-2
......
......@@ -12,7 +12,7 @@ sgraphene2:
0:
naming_pattern: "%PORT%"
kind: node
rate: 10000000
rate: 10000000000
ports:
2: graphene-41
1: graphene-40
......
......@@ -12,7 +12,7 @@ sgraphene3:
0:
naming_pattern: "%PORT%"
kind: node
rate: 10000000
rate: 10000000000
ports:
2: graphene-75
1: graphene-76
......
......@@ -12,7 +12,7 @@ sgraphene4:
0:
naming_pattern: "%PORT%"
kind: node
rate: 10000000
rate: 10000000000
ports:
2: graphene-106
1: graphene-105
......
......@@ -12,7 +12,7 @@ sgravillon1:
1:
naming_pattern: "%LINECARD:A%%PORT%"
kind: other
rate: 100000000
rate: 1000000000
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: 1000000000
ports:
3: sgriffon3
4: sgriffon1
3: sgraphene3
4: sgriffon2
3:
naming_pattern: "%LINECARD:A%%PORT%"
kind: switch
rate: 100000000
rate: 1000000000
ports:
1: sgraphene1
2: sgraphene2
......@@ -82,7 +83,7 @@ sgravillon1:
4:
naming_pattern: "%LINECARD:A%%PORT%"
kind: switch
rate: 100000000
rate: 1000000000
ports:
1:
kind: other
......@@ -97,7 +98,7 @@ sgravillon1:
5:
naming_pattern: "%LINECARD:A%%PORT%"
kind: virtual
rate: 100000000
rate: 10000000000
ports:
4: renater-nancy
channels:
......