WIP:: Initial stab at regions demo for Europe
- Added UK network
- Added France network
Also:
- Augmented "null-simulation start custom" to reset ID seeds.
Change-Id: I643ed7864da76a1077ca089c1c990e9d322bb527
diff --git a/tools/test/topos/regions-europe.sh b/tools/test/topos/regions-europe.sh
index 37f500a..d0f6d04 100755
--- a/tools/test/topos/regions-europe.sh
+++ b/tools/test/topos/regions-europe.sh
@@ -1,6 +1,6 @@
#!/bin/bash
# -----------------------------------------------------------------------------
-# Creates a replica of the GEANT topology using ONOS null provider
+# Creates a Europe-based topology (with regions) using ONOS null provider
# -----------------------------------------------------------------------------
# config
@@ -24,10 +24,11 @@
sleep ${sleepfor}
+###------------------------------------------------------
### Start by adding Country regions
# Note that Long/Lat places region icon nicely in the country center
-# region-add <region-id> <region-name> <region-type> <long/Y> <lat/X> <region-master>
+# region-add <region-id> <region-name> <region-type> <lat/Y> <long/X> <region-master>
onos ${host} <<-EOF
@@ -41,23 +42,6 @@
###------------------------------------------------------
-###----- TEMPORARY DATA ---------------------------------
-
-#region-add rLON "London" COUNTRY 51.507321 -0.1276473 ${host}
-#region-add rMIL "Milan" COUNTRY 45.466797 9.1904984 ${host}
-#region-add rPAR "Paris" COUNTRY 48.856610 2.3514992 ${host}
-#region-add rFRA "Frankfurt" COUNTRY 50.110652 8.6820934 ${host}
-#region-add rMAD "Madrid" COUNTRY 40.416704 -3.7035824 ${host}
-
-# null-create-device switch LON ${nports} 51.507321 -0.1276473
-# null-create-device switch PAR ${nports} 48.856610 2.3514992
-# null-create-device switch MIL ${nports} 45.466797 9.1904984
-# null-create-device switch FRA ${nports} 50.110652 8.6820934
-# null-create-device switch MAD ${nports} 40.416704 -3.7035824
-
-###------------------------------------------------------
-
-
### Add layouts, associating backing regions, and optional parent.
# layout-add <layout-id> <bg-ref> \
# [ <region-id> <parent-layout-id> <scale> <offset-x> <offset-y> ]
@@ -69,20 +53,110 @@
layout-add root @europe . . 6.664 -2992.552 -2473.084
# -- layouts for top level regions
-layout-add lUK @europe rUK root 13.99 -6233.775 -5111.723
-layout-add lIT @europe rIT root 14.72 -7793.210 -6623.814
-layout-add lFR @europe rFR root 16.91 -8225.716 -7198.134
-layout-add lDE @europe rDE root 17.63 -9119.646 -7044.949
-layout-add lES @europe rES root 21.41 -9994.596 -10135.655
+layout-add lUK @europe rUK root 31.43 -14979.6 -12644.8
+layout-add lIT @europe rIT root 14.72 -7793.2 -6623.8
+layout-add lFR @europe rFR root 16.91 -8225.7 -7198.1
+layout-add lDE @europe rDE root 17.63 -9119.6 -7044.9
+layout-add lES @europe rES root 21.41 -9994.5 -10135.6
# -- layouts for country sub-regions
# TODO
# -- summary of installed layouts
layouts
-
EOF
+###------------------------------------------------------
+### Add devices, hosts and links for each of the regions
+
+onos ${host} <<-EOF
+
+# -- UK devices
+
+null-create-device switch London ${nports} 51.5073 -0.1276
+null-create-device switch Reading ${nports} 51.4543 -0.9781
+null-create-device switch Portsmouth ${nports} 50.8198 -1.0880
+null-create-device switch Bristol ${nports} 51.4545 -2.5879
+null-create-device switch Warrington ${nports} 53.3900 -2.5970
+null-create-device switch Leeds ${nports} 53.8008 -1.5491
+
+# -- Assign UK devices to UK region
+
+region-add-devices rUK \
+ null:0000000000000001 \
+ null:0000000000000002 \
+ null:0000000000000003 \
+ null:0000000000000004 \
+ null:0000000000000005 \
+ null:0000000000000006 \
+
+# -- UK hosts
+
+null-create-host London 192.168.1.1 51.8697 -0.0287
+null-create-host London 192.168.1.2 51.7225 0.7624
+null-create-host London 192.168.1.3 51.1437 0.4694
+
+null-create-host Bristol 192.168.1.4 51.7500 -2.6000
+
+# -- UK connectivity
+
+null-create-link direct London Reading
+null-create-link direct London Portsmouth
+null-create-link direct Reading Bristol
+null-create-link direct Portsmouth Bristol
+null-create-link direct Reading Warrington
+null-create-link direct London Leeds
+null-create-link direct Leeds Warrington
+
+# -- UK Peers
+
+# rUK_rES 50.4060 -3.3860
+# rUK_rFR 50.4060 -1.8482
+# rUK_rIT 50.4060 -0.1361
+# rUK_rDE 50.4060 1.2491
+
+
+# -- France Devices
+
+null-create-device switch Paris ${nports} 48.8566 2.3522
+null-create-device switch Lyon ${nports} 45.7640 4.8357
+null-create-device switch Bordeaux ${nports} 44.8378 -0.5792
+null-create-device switch Marseille ${nports} 43.2965 5.3698
+null-create-device switch Nice ${nports} 43.7102 7.2620
+
+# -- Assign France devices to France region
+
+region-add-devices rFR \
+ null:0000000000000007 \
+ null:0000000000000008 \
+ null:0000000000000009 \
+ null:000000000000000a \
+ null:000000000000000b \
+
+
+# -- France hosts
+
+null-create-host Paris 192.168.2.1 49.5134 2.8882
+null-create-host Lyon 192.168.2.2 46.4590 5.2380
+
+# -- France connectivity
+
+null-create-link direct Paris Lyon
+null-create-link direct Paris Bordeaux
+null-create-link direct Lyon Bordeaux
+null-create-link direct Marseille Bordeaux
+null-create-link direct Marseille Lyon
+null-create-link direct Marseille Nice
+null-create-link direct Lyon Nice
+
+# -- France Peers
+
+# rFR_rES 42.6806 -2.1273
+# rFR_rUK 50.6164 -2.1013
+# rFR_rIT 45.1105 9.7450
+# rFR_rDE 49.6307 7.9326
+
+EOF
### Set up debug log messages for classes we care about
onos ${host} <<-EOF