Andrea Campanella
Committed by Gerrit Code Review

Adding GEANT european topology

Change-Id: Ie30a6145f01e141e8af88116c8fa193a0308f8c3
<!--
~ Copyright 2016-present Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<scenario name="net-setup-geant" description="Network setup steps">
<!-- TODO: parametrize this via recipes -->
<group name="Net-Setup">
<step name="Push-Topos" exec="onos-push-topos ${OCN}"/>
<step name="Stop-Mininet-If-Needed" env="~" exec="onos-mininet stop"/>
<step name="Wipe-Out-Data-Before" exec="onos-wipe-out" requires="^"/>
<step name="Initial-Summary-Check" requires="~Wipe-Out-Data-Before"
exec="onos-check-summary ${OC1} [0-9]* 0 0 0"/>
<step name="Config-Topo" requires="~Initial-Summary-Check"
exec="onos-netcfg ${OC1} ${ONOS_ROOT}/tools/test/topos/geantmpls-cfg.json"/>
<step name="Start-Mininet"
requires="Install-Apps,Config-Topo,Push-Topos,Stop-Mininet-If-Needed"
exec="onos-mininet start topos/topo geantmpls.py ${ONOS_INSTANCES}"/>
<step name="Wait-For-Mininet" requires="Start-Mininet"
exec="onos-mininet wait 10"/>
<step name="ARP-Hosts" requires="~Wait-For-Mininet"
exec="onos-mininet sendAndExpect gratuitousArp --expect ."/>
<step name="Check-Summary" requires="ARP-Hosts"
exec="onos-check-summary ${OC1} [0-9]* 25 140 25"/>
<step name="Balance-Masters" requires="~Check-Summary" if="${OC2}"
exec="onos ${OC1} balance-masters"/>
<step name="Check-Flows" requires="~Balance-Masters,~Check-Summary" delay="5"
exec="onos-check-flows ${OC1}"/>
</group>
</scenario>
{
"devices": {
"of:0000000000000001": { "basic": { "name": "ATH", "latitude": 37.9841493, "longitude": 23.7279843 }},
"of:0000000000000002": { "basic": { "name": "LIS", "latitude": 38.7077926, "longitude": -9.1365069 }},
"of:0000000000000003": { "basic": { "name": "LON", "latitude": 51.5073219, "longitude": -0.1276473 }},
"of:0000000000000004": { "basic": { "name": "BRU", "latitude": 50.8465565, "longitude": 4.351697 }},
"of:0000000000000005": { "basic": { "name": "PAR", "latitude": 48.8566101, "longitude": 2.3514992 }},
"of:0000000000000006": { "basic": { "name": "DUB", "latitude": 53.3497645, "longitude": -8.2602731 }},
"of:0000000000000007": { "basic": { "name": "MAD", "latitude": 40.4167047, "longitude": -3.7035824 }},
"of:0000000000000008": { "basic": { "name": "GEN", "latitude": 46.2017559, "longitude": 6.1466014 }},
"of:0000000000000009": { "basic": { "name": "MIL", "latitude": 45.4667971, "longitude": 9.1904984 }},
"of:000000000000000a": { "basic": { "name": "SOF", "latitude": 42.6977211, "longitude": 23.3225964 }},
"of:000000000000000b": { "basic": { "name": "BUC", "latitude": 44.4361414, "longitude": 26.1027443 }},
"of:000000000000000c": { "basic": { "name": "VIE", "latitude": 48.2083537, "longitude": 15.3725042 }},
"of:000000000000000d": { "basic": { "name": "FRA", "latitude": 50.1106529, "longitude": 8.6820934 }},
"of:000000000000000e": { "basic": { "name": "COP", "latitude": 55.6867243, "longitude": 9.5700724 }},
"of:000000000000000f": { "basic": { "name": "TLN", "latitude": 59.4372155, "longitude": 24.7453688 }},
"of:0000000000000010": { "basic": { "name": "RIG", "latitude": 56.9493977, "longitude": 24.1051846 }},
"of:0000000000000011": { "basic": { "name": "KAU", "latitude": 54.8981061, "longitude": 23.9117515 }},
"of:0000000000000012": { "basic": { "name": "POZ", "latitude": 52.4082663, "longitude": 16.9335199 }},
"of:0000000000000013": { "basic": { "name": "PRA", "latitude": 50.0874654, "longitude": 14.4212503 }},
"of:0000000000000014": { "basic": { "name": "BRA", "latitude": 48.1359085, "longitude": 18.1597440625 }},
"of:0000000000000015": { "basic": { "name": "ZAG", "latitude": 45.8131545, "longitude": 15.9770298 }},
"of:0000000000000016": { "basic": { "name": "LJU", "latitude": 46.049865, "longitude": 14.5068921 }},
"of:0000000000000017": { "basic": { "name": "BUD", "latitude": 47.4983815, "longitude": 19.0404707 }},
"of:0000000000000018": { "basic": { "name": "MLT", "latitude": 35.8987546, "longitude": 14.5134889 }},
"of:0000000000000019": { "basic": { "name": "LUX", "latitude": 49.8158683, "longitude": 6.1296751 }},
"of:0000000000000020": { "basic": { "name": "MAR", "latitude": 43.2961743, "longitude": 5.3699525 }},
"of:0000000000000021": { "basic": { "name": "FIN", "latitude": 50.6996415, "longitude": 10.6301627 }},
"of:0000000000000022": { "basic": { "name": "BDE", "latitude": 50.8285252, "longitude": -4.546936 }},
"of:000000000000001a": { "basic": { "name": "MAR", "latitude": 43.2961743, "longitude": 5.3699525 }},
"of:000000000000001b": { "basic": { "name": "HAM", "latitude": 53.5503414, "longitude": 10.000654 }},
"of:000000000000001c": { "basic": { "name": "AMS", "latitude": 52.374436, "longitude": 4.8979956033677 }}
},
"hosts": {
"00:00:00:00:00:01/-1": { "basic": { "location": "of:0000000000000001/1", "ips": [ "10.0.0.1" ], "name": "ATH", "latitude": 34.9841493, "longitude": 24.7279843 }},
"00:00:00:00:00:02/-1": { "basic": { "location": "of:0000000000000002/1", "ips": [ "10.0.0.2" ], "name": "LIS", "latitude": 37.7077926, "longitude": -7.1365069 }},
"00:00:00:00:00:03/-1": { "basic": { "location": "of:0000000000000003/1", "ips": [ "10.0.0.3" ], "name": "LON", "latitude": 53.5073219, "longitude": -1.1276473 }},
"00:00:00:00:00:04/-1": { "basic": { "location": "of:0000000000000004/1", "ips": [ "10.0.0.4" ], "name": "BRU", "latitude": 49.0465565, "longitude": 4.351697 }},
"00:00:00:00:00:05/-1": { "basic": { "location": "of:0000000000000005/1", "ips": [ "10.0.0.5" ], "name": "PAR", "latitude": 46.8566101, "longitude": 2.3514992 }},
"00:00:00:00:00:06/-1": { "basic": { "location": "of:0000000000000006/1", "ips": [ "10.0.0.6" ], "name": "DUB", "latitude": 54.3497645, "longitude": -8.2602731 }},
"00:00:00:00:00:07/-1": { "basic": { "location": "of:0000000000000007/1", "ips": [ "10.0.0.7" ], "name": "MAD", "latitude": 37.4167047, "longitude": -3.7035824 }},
"00:00:00:00:00:08/-1": { "basic": { "location": "of:0000000000000008/1", "ips": [ "10.0.0.8" ], "name": "GEN", "latitude": 45.0017559, "longitude": 4.1466014 }},
"00:00:00:00:00:09/-1": { "basic": { "location": "of:0000000000000009/1", "ips": [ "10.0.0.9" ], "name": "MIL", "latitude": 45.4667971, "longitude": 6.6904984 }},
"00:00:00:00:00:0a/-1": { "basic": { "location": "of:000000000000000a/1", "ips": [ "10.0.0.10" ], "name": "SOF", "latitude": 42.6977211, "longitude": 27.9225964 }},
"00:00:00:00:00:0b/-1": { "basic": { "location": "of:000000000000000b/1", "ips": [ "10.0.0.11" ], "name": "BUC", "latitude": 47.4361414, "longitude": 26.1027443 }},
"00:00:00:00:00:0c/-1": { "basic": { "location": "of:000000000000000c/1", "ips": [ "10.0.0.12" ], "name": "VIE", "latitude": 48.2083537, "longitude": 13.3725042 }},
"00:00:00:00:00:0d/-1": { "basic": { "location": "of:000000000000000d/1", "ips": [ "10.0.0.13" ], "name": "FRA", "latitude": 48.1106529, "longitude": 9.2820934 }},
"00:00:00:00:00:0e/-1": { "basic": { "location": "of:000000000000000e/1", "ips": [ "10.0.0.14" ], "name": "COP", "latitude": 57.6867243, "longitude": 10.0700724 }},
"00:00:00:00:00:0f/-1": { "basic": { "location": "of:000000000000000f/1", "ips": [ "10.0.0.15" ], "name": "TLN", "latitude": 59.4372155, "longitude": 26.7453688 }},
"00:00:00:00:00:10/-1": { "basic": { "location": "of:0000000000000010/1", "ips": [ "10.0.0.16" ], "name": "RIG", "latitude": 56.9493977, "longitude": 26.1051846 }},
"00:00:00:00:00:11/-1": { "basic": { "location": "of:0000000000000011/1", "ips": [ "10.0.0.17" ], "name": "KAU", "latitude": 52.8981061, "longitude": 24.9117515 }},
"00:00:00:00:00:12/-1": { "basic": { "location": "of:0000000000000012/1", "ips": [ "10.0.0.18" ], "name": "POZ", "latitude": 50.4082663, "longitude": 19.3335199 }},
"00:00:00:00:00:13/-1": { "basic": { "location": "of:0000000000000013/1", "ips": [ "10.0.0.19" ], "name": "PRA", "latitude": 50.0874654, "longitude": 16.4212503 }},
"00:00:00:00:00:14/-1": { "basic": { "location": "of:0000000000000014/1", "ips": [ "10.0.0.20" ], "name": "BRA", "latitude": 48.8359085, "longitude": 19.1597440625 }},
"00:00:00:00:00:15/-1": { "basic": { "location": "of:0000000000000015/1", "ips": [ "10.0.0.21" ], "name": "ZAG", "latitude": 43.2131545, "longitude": 16.4770298 }},
"00:00:00:00:00:16/-1": { "basic": { "location": "of:0000000000000016/1", "ips": [ "10.0.0.22" ], "name": "LJU", "latitude": 46.049865, "longitude": 13.2068921 }},
"00:00:00:00:00:17/-1": { "basic": { "location": "of:0000000000000017/1", "ips": [ "10.0.0.23" ], "name": "BUD", "latitude": 47.8983815, "longitude": 20.2404707 }},
"00:00:00:00:00:18/-1": { "basic": { "location": "of:0000000000000018/1", "ips": [ "10.0.0.24" ], "name": "MLT", "latitude": 32.8987546, "longitude": 14.5134889 }},
"00:00:00:00:00:19/-1": { "basic": { "location": "of:0000000000000019/1", "ips": [ "10.0.0.25" ], "name": "LUX", "latitude": 48.8158683, "longitude": 6.5296751 }},
"00:00:00:00:00:20/-1": { "basic": { "location": "of:0000000000000020/1", "ips": [ "10.0.0.26" ], "name": "MAR", "latitude": 43.2961743, "longitude": 5.3699525 }},
"00:00:00:00:00:22/-1": { "basic": { "location": "of:0000000000000022/1", "ips": [ "10.0.0.27" ], "name": "BDE", "latitude": 50.8285252, "longitude": -4.546936 }},
"00:00:00:00:00:1a/-1": { "basic": { "location": "of:000000000000001a/1", "ips": [ "10.0.0.28" ], "name": "MAR", "latitude": 43.374436, "longitude": 3.3699525 }},
"00:00:00:00:00:1b/-1": { "basic": { "location": "of:000000000000001b/1", "ips": [ "10.0.0.27" ], "name": "HAM", "latitude": 52.6996415, "longitude": 11.6301627 }},
"00:00:00:00:00:1c/-1": { "basic": { "location": "of:000000000000001c/1", "ips": [ "10.0.0.29" ], "name": "AMS", "latitude": 51.374436, "longitude": 7.3979956033677 }}
}
}
#!/usr/bin/env python
"""
"""
from mininet.topo import Topo
from mininet.net import Mininet
from mininet.node import RemoteController
from mininet.node import Node
from mininet.node import CPULimitedHost
from mininet.link import TCLink
from mininet.cli import CLI
from mininet.log import setLogLevel
from mininet.util import dumpNodeConnections
class GeantMplsTopo( Topo ):
"Internet Topology Zoo Specimen."
def __init__( self ):
"Create a topology."
# Initialize Topology
Topo.__init__( self )
# add nodes, switches first...
ATH = self.addSwitch( 's1' )
LIS = self.addSwitch( 's2', protocols='OpenFlow13' )
LON = self.addSwitch( 's3' )
BRU = self.addSwitch( 's4' )
PAR = self.addSwitch( 's5' )
DUB = self.addSwitch( 's6' )
MAD = self.addSwitch( 's7' )
GEN = self.addSwitch( 's8' )
MIL = self.addSwitch( 's9', protocols='OpenFlow13' )
SOF = self.addSwitch( 's10' )
BUC = self.addSwitch( 's11' )
VIE = self.addSwitch( 's12' )
FRA = self.addSwitch( 's13' )
COP = self.addSwitch( 's14' )
TLN = self.addSwitch( 's15' )
RIG = self.addSwitch( 's16' )
KAU = self.addSwitch( 's17' )
POZ = self.addSwitch( 's18' )
PRA = self.addSwitch( 's19' )
BRA = self.addSwitch( 's20' )
ZAG = self.addSwitch( 's21' )
LJU = self.addSwitch( 's22', protocols='OpenFlow13' )
BUD = self.addSwitch( 's23' )
MLT = self.addSwitch( 's24' )
LUX = self.addSwitch( 's25' )
MAR = self.addSwitch( 's26' )
HAM = self.addSwitch( 's27' )
AMS = self.addSwitch( 's28' )
# ... and now hosts
ATH_host = self.addHost( 'h1' )
LIS_host = self.addHost( 'h2' )
LON_host = self.addHost( 'h3' )
BRU_host = self.addHost( 'h4' )
PAR_host = self.addHost( 'h5' )
DUB_host = self.addHost( 'h6' )
MAD_host = self.addHost( 'h7' )
GEN_host = self.addHost( 'h8' )
MIL_host = self.addHost( 'h9' )
SOF_host = self.addHost( 'h10' )
BUC_host = self.addHost( 'h11' )
VIE_host = self.addHost( 'h12' )
FRA_host = self.addHost( 'h13' )
COP_host = self.addHost( 'h14' )
TLN_host = self.addHost( 'h15' )
RIG_host = self.addHost( 'h16' )
KAU_host = self.addHost( 'h17' )
POZ_host = self.addHost( 'h18' )
PRA_host = self.addHost( 'h19' )
BRA_host = self.addHost( 'h20' )
ZAG_host = self.addHost( 'h21' )
LJU_host = self.addHost( 'h22' )
BUD_host = self.addHost( 'h23' )
MLT_host = self.addHost( 'h24' )
LUX_host = self.addHost( 'h25' )
MAR_host = self.addHost( 'h26' )
HAM_host = self.addHost( 'h27' )
AMS_host = self.addHost( 'h28' )
# add edges between switch and corresponding host
self.addLink( ATH , ATH_host )
self.addLink( LIS , LIS_host )
self.addLink( LON , LON_host )
self.addLink( BRU , BRU_host )
self.addLink( PAR , PAR_host )
self.addLink( DUB , DUB_host )
self.addLink( MAD , MAD_host )
self.addLink( GEN , GEN_host )
self.addLink( MIL , MIL_host )
self.addLink( SOF , SOF_host )
self.addLink( BUC , BUC_host )
self.addLink( VIE , VIE_host )
self.addLink( FRA , FRA_host )
self.addLink( COP , COP_host )
self.addLink( TLN , TLN_host )
self.addLink( RIG , RIG_host )
self.addLink( KAU , KAU_host )
self.addLink( POZ , POZ_host )
self.addLink( PRA , PRA_host )
self.addLink( BRA , BRA_host )
self.addLink( ZAG , ZAG_host )
self.addLink( LJU , LJU_host )
self.addLink( BUD , BUD_host )
self.addLink( MLT , MLT_host )
self.addLink( LUX , LUX_host )
self.addLink( MAR , MAR_host )
self.addLink( HAM , HAM_host )
self.addLink( AMS , AMS_host )
# add edges between switches
self.addLink( ATH , MIL, bw=10 )
self.addLink( MIL , VIE, bw=10 )
self.addLink( MIL , MAR, bw=10 )
self.addLink( MIL , GEN, bw=10 )
self.addLink( MIL , MLT, bw=10 )
self.addLink( GEN , FRA, bw=10 )
self.addLink( GEN , PAR, bw=10 )
self.addLink( GEN , MAR, bw=10 )
self.addLink( MAR , MAD, bw=10 )
self.addLink( MAD , PAR, bw=10 )
self.addLink( MAD , LIS, bw=10 )
self.addLink( LIS , LON, bw=10 )
self.addLink( LON , PAR, bw=10 )
self.addLink( LON , DUB, bw=10 )
self.addLink( LON , BRU, bw=10 )
self.addLink( BRU , AMS, bw=10 )
self.addLink( AMS , LUX, bw=10 )
self.addLink( LUX , FRA, bw=10 )
self.addLink( AMS , HAM, bw=10 )
self.addLink( HAM , FRA, bw=10 )
self.addLink( HAM , COP, bw=10 )
self.addLink( COP , AMS, bw=10 )
self.addLink( FRA , POZ, bw=10 )
self.addLink( FRA , PRA, bw=10 )
self.addLink( FRA , BUD, bw=10 )
self.addLink( FRA , VIE, bw=10 )
self.addLink( POZ , PRA, bw=10 )
self.addLink( POZ , KAU, bw=10 )
self.addLink( KAU , RIG, bw=10 )
self.addLink( ZAG , VIE, bw=10 )
self.addLink( ZAG , BUD, bw=10 )
self.addLink( BUD , PRA, bw=10 )
self.addLink( BUD , BRA, bw=10 )
self.addLink( BUD , BUC, bw=10 )
self.addLink( BUD , SOF, bw=10 )
self.addLink( BUD , LJU, bw=10 )
self.addLink( BUC , SOF, bw=10 )
self.addLink( BUC , VIE, bw=10 )
self.addLink( VIE , BRA, bw=10 )
self.addLink( RIG , TLN, bw=10 )
self.addLink( TLN , HAM, bw=10 )
topos = { 'att': ( lambda: GeantMplsTopo() ) }
if __name__ == '__main__':
from onosnet import run
run( GeantMplsTopo() )