Simon Hunt

GUI -- Added routerId to AnnotationKeys; added test scenario for multi-homed hosts (routers).

Change-Id: Ief5f23fa1678152d5375a2b54fe5735c9632d588
...@@ -80,6 +80,10 @@ public final class AnnotationKeys { ...@@ -80,6 +80,10 @@ public final class AnnotationKeys {
80 */ 80 */
81 public static final String PORT_NAME = "portName"; 81 public static final String PORT_NAME = "portName";
82 82
83 + /**
84 + * Annotation key for the router ID.
85 + */
86 + public static final String ROUTER_ID = "routerId";
83 87
84 /** 88 /**
85 * Returns the value annotated object for the specified annotation key. 89 * Returns the value annotated object for the specified annotation key.
......
1 +{
2 + "event": "addInstance",
3 + "payload": {
4 + "id": "myInstA",
5 + "ip": "192.168.56.101",
6 + "online": true,
7 + "uiAttached": true,
8 + "switches": 2,
9 + "labels": [
10 + "myInstA",
11 + "192.168.56.101"
12 + ]
13 + }
14 +}
1 +{
2 + "event": "addInstance",
3 + "payload": {
4 + "id": "myInstB",
5 + "ip": "192.168.56.102",
6 + "online": true,
7 + "uiAttached": false,
8 + "switches": 4,
9 + "labels": [
10 + "myInstB",
11 + "192.168.56.102"
12 + ]
13 + }
14 +}
1 +{
2 + "event": "addDevice",
3 + "payload": {
4 + "id": "of:0000ffffffff0008",
5 + "type": "switch",
6 + "online": true,
7 + "master": "myInstA",
8 + "labels": [
9 + "",
10 + "switch-8",
11 + "0000ffffffff0008"
12 + ],
13 + "metaUi": {
14 + "x": 520,
15 + "y": 350
16 + }
17 + }
18 +}
1 +{
2 + "event": "addDevice",
3 + "payload": {
4 + "id": "of:0000ffffffff0003",
5 + "type": "switch",
6 + "online": true,
7 + "master": "myInstB",
8 + "labels": [
9 + "",
10 + "switch-3",
11 + "0000ffffffff0003"
12 + ],
13 + "metaUi": {
14 + "x": 800,
15 + "y": 280
16 + }
17 + }
18 +}
1 +{
2 + "event": "addLink",
3 + "payload": {
4 + "id": "of:0000ffffffff0003/21-of:0000ffffffff0008/20",
5 + "type": "direct",
6 + "online": true,
7 + "linkWidth": 2,
8 + "src": "of:0000ffffffff0003",
9 + "srcPort": "21",
10 + "dst": "of:0000ffffffff0008",
11 + "dstPort": "20",
12 + "props" : {
13 + "BW": "70 Gb"
14 + }
15 + }
16 +}
1 +{
2 + "event": "addHost",
3 + "payload": {
4 + "id": "0E:2A:69:30:13:86/-1",
5 + "ingress": "0E:2A:69:30:13:86/-1/0-of:0000ffffffff0003/2",
6 + "egress": "of:0000ffffffff0003/2-0E:2A:69:30:13:86/-1/0",
7 + "cp": {
8 + "device": "of:0000ffffffff0003",
9 + "port": 2
10 + },
11 + "labels": [
12 + "192.168.1.201",
13 + "0E:2A:69:30:13:86"
14 + ],
15 + "props": {
16 + "routerId": "router-one"
17 + }
18 + }
19 +}
1 +{
2 + "event": "addHost",
3 + "payload": {
4 + "id": "A6:96:E5:03:52:5F/-1",
5 + "ingress": "A6:96:E5:03:52:5F/-1/0-of:0000ffffffff0008/1",
6 + "egress": "of:0000ffffffff0008/1-A6:96:E5:03:52:5F/-1/0",
7 + "cp": {
8 + "device": "of:0000ffffffff0008",
9 + "port": 1
10 + },
11 + "labels": [
12 + "192.168.1.202",
13 + "A6:96:E5:03:52:5F"
14 + ],
15 + "props": {
16 + "routerId": "router-one"
17 + }
18 + }
19 +}
1 +{
2 + "comments": [
3 + "Add two devices and one link (auto), and two 'hosts'.",
4 + "But the hosts are the same box with two NICs."
5 + ],
6 + "title": "Multi-Homed Scenario",
7 + "params": {
8 + "lastAuto": 0
9 + },
10 + "description": [
11 + "Simple sequence of events...",
12 + "",
13 + "1. add instance A",
14 + "2. add instance B",
15 + "3. add device [8]",
16 + "4. add device [3]",
17 + "5. add link [3] --> [8]",
18 + "6. add host (to [3])",
19 + "7. add host (to [8])"
20 + ]
21 +}