Thomas Vachuska | 3ce80f7 | 2016-07-21 14:52:15 -0700 | [diff] [blame] | 1 | #!/bin/bash |
Thomas Vachuska | eb851cd | 2016-07-21 15:41:05 -0700 | [diff] [blame] | 2 | # Test topology |
Thomas Vachuska | 3ce80f7 | 2016-07-21 14:52:15 -0700 | [diff] [blame] | 3 | |
| 4 | host=${1:-127.0.0.1} |
| 5 | |
| 6 | onos ${host} null-simulation stop custom |
| 7 | onos ${host} wipe-out please |
| 8 | onos ${host} null-simulation start custom |
| 9 | |
Simon Hunt | f4fd2a2 | 2016-08-10 15:41:09 -0700 | [diff] [blame] | 10 | # null-create-device <type> <name> <#ports> <latitude> <longitude> |
| 11 | # null-create-link <type> <src> <dst> |
| 12 | |
Thomas Vachuska | 3ce80f7 | 2016-07-21 14:52:15 -0700 | [diff] [blame] | 13 | onos ${host} <<-EOF |
| 14 | |
Simon Hunt | f4fd2a2 | 2016-08-10 15:41:09 -0700 | [diff] [blame] | 15 | null-create-device switch s1-Bristol 10 51.4500 -2.5833 |
| 16 | null-create-device switch s2-London 10 51.5072 -0.1275 |
| 17 | null-create-device switch s3-Dover 10 51.1295 1.3089 |
| 18 | null-create-device switch s4-Brighton 10 50.8429 -0.1313 |
Thomas Vachuska | 3ce80f7 | 2016-07-21 14:52:15 -0700 | [diff] [blame] | 19 | null-create-device switch s5 10 0 0 |
| 20 | null-create-device switch s6 10 0 0 |
| 21 | null-create-device switch s7 10 0 0 |
| 22 | null-create-device switch s8 10 0 0 |
| 23 | null-create-device switch s9 10 0 0 |
| 24 | # null-create-device switch s10 10 0 0 |
| 25 | |
Simon Hunt | f4fd2a2 | 2016-08-10 15:41:09 -0700 | [diff] [blame] | 26 | null-create-link direct s1-Bristol s2-London |
| 27 | null-create-link direct s2-London s3-Dover |
| 28 | null-create-link direct s2-London s4-Brighton |
| 29 | null-create-link direct s3-Dover s4-Brighton |
| 30 | null-create-link direct s3-Dover s5 |
Thomas Vachuska | 3ce80f7 | 2016-07-21 14:52:15 -0700 | [diff] [blame] | 31 | null-create-link direct s6 s5 |
| 32 | null-create-link direct s6 s8 |
| 33 | null-create-link direct s7 s9 |
| 34 | null-create-link direct s8 s9 |
| 35 | null-create-link direct s5 s7 |
| 36 | null-create-link direct s8 s7 |
| 37 | |
| 38 | EOF |
| 39 | |
Thomas Vachuska | 3ce80f7 | 2016-07-21 14:52:15 -0700 | [diff] [blame] | 40 | onos ${host} <<-EOF |
| 41 | |
| 42 | region-add r1 Region1 METRO ${host} |
| 43 | region-add r2 Region2 METRO ${host} |
| 44 | region-add r3 Region3 CAMPUS ${host} |
| 45 | |
| 46 | region-add-devices r1 \ |
Simon Hunt | b1ce260 | 2016-07-23 14:04:31 -0700 | [diff] [blame] | 47 | null:0000000000000002 \ |
| 48 | null:0000000000000003 \ |
| 49 | null:0000000000000004 |
Thomas Vachuska | 3ce80f7 | 2016-07-21 14:52:15 -0700 | [diff] [blame] | 50 | |
| 51 | region-add-devices r2 \ |
Simon Hunt | b1ce260 | 2016-07-23 14:04:31 -0700 | [diff] [blame] | 52 | null:0000000000000005 \ |
| 53 | null:0000000000000006 |
Thomas Vachuska | 3ce80f7 | 2016-07-21 14:52:15 -0700 | [diff] [blame] | 54 | |
| 55 | region-add-devices r3 \ |
Simon Hunt | b1ce260 | 2016-07-23 14:04:31 -0700 | [diff] [blame] | 56 | null:0000000000000007 \ |
| 57 | null:0000000000000008 \ |
| 58 | null:0000000000000009 |
Thomas Vachuska | 3ce80f7 | 2016-07-21 14:52:15 -0700 | [diff] [blame] | 59 | |
| 60 | regions |
Thomas Vachuska | eb851cd | 2016-07-21 15:41:05 -0700 | [diff] [blame] | 61 | |
| 62 | layout-add l1 r1 |
| 63 | layout-add l2 r2 |
| 64 | layout-add l3 r3 l2 |
| 65 | |
| 66 | layouts |
Thomas Vachuska | 3ce80f7 | 2016-07-21 14:52:15 -0700 | [diff] [blame] | 67 | EOF |