blob: befed3b7c5d7b998e0a280e10f83124172578fe7 [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
Thomas Vachuska3ce80f72016-07-21 14:52:15 -070010onos ${host} <<-EOF
11
12null-create-device switch s1 10 0 0
13null-create-device switch s2 10 0 0
14null-create-device switch s3 10 0 0
15null-create-device switch s4 10 0 0
16null-create-device switch s5 10 0 0
17null-create-device switch s6 10 0 0
18null-create-device switch s7 10 0 0
19null-create-device switch s8 10 0 0
20null-create-device switch s9 10 0 0
21# null-create-device switch s10 10 0 0
22
23null-create-link direct s1 s2
24null-create-link direct s2 s3
25null-create-link direct s2 s4
26null-create-link direct s3 s4
27null-create-link direct s3 s5
28null-create-link direct s6 s5
29null-create-link direct s6 s8
30null-create-link direct s7 s9
31null-create-link direct s8 s9
32null-create-link direct s5 s7
33null-create-link direct s8 s7
34
35EOF
36
Thomas Vachuska3ce80f72016-07-21 14:52:15 -070037onos ${host} <<-EOF
38
39region-add r1 Region1 METRO ${host}
40region-add r2 Region2 METRO ${host}
41region-add r3 Region3 CAMPUS ${host}
42
43region-add-devices r1 \
Simon Huntb1ce2602016-07-23 14:04:31 -070044 null:0000000000000002 \
45 null:0000000000000003 \
46 null:0000000000000004
Thomas Vachuska3ce80f72016-07-21 14:52:15 -070047
48region-add-devices r2 \
Simon Huntb1ce2602016-07-23 14:04:31 -070049 null:0000000000000005 \
50 null:0000000000000006
Thomas Vachuska3ce80f72016-07-21 14:52:15 -070051
52region-add-devices r3 \
Simon Huntb1ce2602016-07-23 14:04:31 -070053 null:0000000000000007 \
54 null:0000000000000008 \
55 null:0000000000000009
Thomas Vachuska3ce80f72016-07-21 14:52:15 -070056
57regions
Thomas Vachuskaeb851cd2016-07-21 15:41:05 -070058
59layout-add l1 r1
60layout-add l2 r2
61layout-add l3 r3 l2
62
63layouts
Thomas Vachuska3ce80f72016-07-21 14:52:15 -070064EOF