blob: d2a7c10c054ab4a9dca90c886b2956529476f7e5 [file] [log] [blame]
Naoki Shiota2322a2f2014-05-21 19:47:40 -07001"""
2This is sample config file for start_topo.py.
3Please rename to topo.`hostname`.py before use.
4"""
5def createTopo():
6 return {
7 "controllers": {
8 "onosdev1" : "192.168.56.11:6633",
9 "onosdev2" : "192.168.56.12:6633"
10 },
11 "switches": {
Naoki Shiota801875c2014-05-29 17:06:06 -070012 # Note that dpid is optional.
13 # If omitted, sequential number will be assigned.
Naoki Shiota2322a2f2014-05-21 19:47:40 -070014 "sw01": { "dpid": "0000000000000101", "controllers": [ "onosdev1" ] },
15 "sw02": { "dpid": "0000000000000102", "controllers": [ "onosdev1" ] },
16 "sw03": { "dpid": "0000000000000103", "controllers": [ "onosdev1" ] },
17 "sw04": { "dpid": "0000000000000104", "controllers": [ "onosdev2" ] },
18 "sw05": { "dpid": "0000000000000105", "controllers": [ "onosdev2", "onosdev1" ] }
19 },
20 "hosts": {
Naoki Shiota801875c2014-05-29 17:06:06 -070021 # Only default interface is configurable for now.
22 # mac and ip are optional and automatically assigned if omitted.
23 # To avoid collision of address, do not mix specified hosts and omitted hosts.
24 "h01": { "mac": "00:00:00:00:01:01", "ip": "10.0.0.1" },
25 "h02": { "mac": "00:00:00:00:02:02", "ip": "10.0.0.2" },
26 "h03": { "mac": "00:00:00:00:03:03", "ip": "10.0.0.3" },
27 "h04": { "mac": "00:00:00:00:04:04", "ip": "10.0.0.4" },
28 "h05": { "mac": "00:00:00:00:05:05", "ip": "10.0.0.5" }
29# "h01": {},
30# "h02": {},
31# "h03": {},
32# "h04": {},
33# "h05": {}
Naoki Shiota2322a2f2014-05-21 19:47:40 -070034 },
35 "links": [
Naoki Shiota801875c2014-05-29 17:06:06 -070036 # Note that multiple links between nodes are unsupported (if declared, single link will be created).
Naoki Shiota2322a2f2014-05-21 19:47:40 -070037 {
38 "node1": "sw01",
39 "node2": "sw02"
40 },{
41 "node1": "sw02",
42 "node2": "sw03"
43 },{
44 "node1": "sw03",
45 "node2": "sw04"
46 },{
47 "node1": "sw04",
48 "node2": "sw05"
49 },{
50 "node1": "sw05",
51 "node2": "sw01"
52 },{
53 "node1": "h01",
54 "node2": "sw01"
55 },{
56 "node1": "h02",
57 "node2": "sw02"
58 },{
59 "node1": "h03",
60 "node2": "sw03"
61 },{
62 "node1": "h04",
63 "node2": "sw04"
64 },{
65 "node1": "h05",
66 "node2": "sw05"
67 }
68 ]
69}