blob: 297bc657c2fe69c167a229b2fdce2e158f1b04b4 [file] [log] [blame]
Thomas Vachuska3ce80f72016-07-21 14:52:15 -07001#!/bin/bash
Thomas Vachuskaeb851cd2016-07-21 15:41:05 -07002# Test topology
Thomas Vachuska3ce80f72016-07-21 14:52:15 -07003
4host=${1:-127.0.0.1}
5
6onos ${host} null-simulation stop custom
7onos ${host} wipe-out please
8onos ${host} null-simulation start custom
9
Simon Huntf4fd2a22016-08-10 15:41:09 -070010# null-create-device <type> <name> <#ports> <latitude> <longitude>
11# null-create-link <type> <src> <dst>
12
Thomas Vachuska3ce80f72016-07-21 14:52:15 -070013onos ${host} <<-EOF
14
Simon Huntf4fd2a22016-08-10 15:41:09 -070015null-create-device switch s1-Bristol 10 51.4500 -2.5833
16null-create-device switch s2-London 10 51.5072 -0.1275
17null-create-device switch s3-Dover 10 51.1295 1.3089
18null-create-device switch s4-Brighton 10 50.8429 -0.1313
Thomas Vachuska3ce80f72016-07-21 14:52:15 -070019null-create-device switch s5 10 0 0
20null-create-device switch s6 10 0 0
21null-create-device switch s7 10 0 0
22null-create-device switch s8 10 0 0
23null-create-device switch s9 10 0 0
24# null-create-device switch s10 10 0 0
25
Simon Huntf4fd2a22016-08-10 15:41:09 -070026null-create-link direct s1-Bristol s2-London
27null-create-link direct s2-London s3-Dover
28null-create-link direct s2-London s4-Brighton
29null-create-link direct s3-Dover s4-Brighton
30null-create-link direct s3-Dover s5
Thomas Vachuska3ce80f72016-07-21 14:52:15 -070031null-create-link direct s6 s5
32null-create-link direct s6 s8
33null-create-link direct s7 s9
34null-create-link direct s8 s9
35null-create-link direct s5 s7
36null-create-link direct s8 s7
37
38EOF
39
Thomas Vachuska3ce80f72016-07-21 14:52:15 -070040onos ${host} <<-EOF
41
42region-add r1 Region1 METRO ${host}
43region-add r2 Region2 METRO ${host}
44region-add r3 Region3 CAMPUS ${host}
45
46region-add-devices r1 \
Simon Huntb1ce2602016-07-23 14:04:31 -070047 null:0000000000000002 \
48 null:0000000000000003 \
49 null:0000000000000004
Thomas Vachuska3ce80f72016-07-21 14:52:15 -070050
51region-add-devices r2 \
Simon Huntb1ce2602016-07-23 14:04:31 -070052 null:0000000000000005 \
53 null:0000000000000006
Thomas Vachuska3ce80f72016-07-21 14:52:15 -070054
55region-add-devices r3 \
Simon Huntb1ce2602016-07-23 14:04:31 -070056 null:0000000000000007 \
57 null:0000000000000008 \
58 null:0000000000000009
Thomas Vachuska3ce80f72016-07-21 14:52:15 -070059
60regions
Thomas Vachuskaeb851cd2016-07-21 15:41:05 -070061
62layout-add l1 r1
63layout-add l2 r2
64layout-add l3 r3 l2
65
66layouts
Thomas Vachuska3ce80f72016-07-21 14:52:15 -070067EOF