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 | |
Thomas Vachuska | 3ce80f7 | 2016-07-21 14:52:15 -0700 | [diff] [blame] | 10 | onos ${host} <<-EOF |
| 11 | |
| 12 | null-create-device switch s1 10 0 0 |
| 13 | null-create-device switch s2 10 0 0 |
| 14 | null-create-device switch s3 10 0 0 |
| 15 | null-create-device switch s4 10 0 0 |
| 16 | null-create-device switch s5 10 0 0 |
| 17 | null-create-device switch s6 10 0 0 |
| 18 | null-create-device switch s7 10 0 0 |
| 19 | null-create-device switch s8 10 0 0 |
| 20 | null-create-device switch s9 10 0 0 |
| 21 | # null-create-device switch s10 10 0 0 |
| 22 | |
| 23 | null-create-link direct s1 s2 |
| 24 | null-create-link direct s2 s3 |
| 25 | null-create-link direct s2 s4 |
| 26 | null-create-link direct s3 s4 |
| 27 | null-create-link direct s3 s5 |
| 28 | null-create-link direct s6 s5 |
| 29 | null-create-link direct s6 s8 |
| 30 | null-create-link direct s7 s9 |
| 31 | null-create-link direct s8 s9 |
| 32 | null-create-link direct s5 s7 |
| 33 | null-create-link direct s8 s7 |
| 34 | |
| 35 | EOF |
| 36 | |
Thomas Vachuska | 3ce80f7 | 2016-07-21 14:52:15 -0700 | [diff] [blame] | 37 | onos ${host} <<-EOF |
| 38 | |
| 39 | region-add r1 Region1 METRO ${host} |
| 40 | region-add r2 Region2 METRO ${host} |
| 41 | region-add r3 Region3 CAMPUS ${host} |
| 42 | |
| 43 | region-add-devices r1 \ |
Simon Hunt | b1ce260 | 2016-07-23 14:04:31 -0700 | [diff] [blame] | 44 | null:0000000000000002 \ |
| 45 | null:0000000000000003 \ |
| 46 | null:0000000000000004 |
Thomas Vachuska | 3ce80f7 | 2016-07-21 14:52:15 -0700 | [diff] [blame] | 47 | |
| 48 | region-add-devices r2 \ |
Simon Hunt | b1ce260 | 2016-07-23 14:04:31 -0700 | [diff] [blame] | 49 | null:0000000000000005 \ |
| 50 | null:0000000000000006 |
Thomas Vachuska | 3ce80f7 | 2016-07-21 14:52:15 -0700 | [diff] [blame] | 51 | |
| 52 | region-add-devices r3 \ |
Simon Hunt | b1ce260 | 2016-07-23 14:04:31 -0700 | [diff] [blame] | 53 | null:0000000000000007 \ |
| 54 | null:0000000000000008 \ |
| 55 | null:0000000000000009 |
Thomas Vachuska | 3ce80f7 | 2016-07-21 14:52:15 -0700 | [diff] [blame] | 56 | |
| 57 | regions |
Thomas Vachuska | eb851cd | 2016-07-21 15:41:05 -0700 | [diff] [blame] | 58 | |
| 59 | layout-add l1 r1 |
| 60 | layout-add l2 r2 |
| 61 | layout-add l3 r3 l2 |
| 62 | |
| 63 | layouts |
Thomas Vachuska | 3ce80f7 | 2016-07-21 14:52:15 -0700 | [diff] [blame] | 64 | EOF |