GUI -- Added updateDevice event handling.
- Display offline devices as grey.
- Tracing web socket messages (for now, in console; in future, to trace view).
- Captured sample events for use with test scenarios - both from and to the server.
- Added description to scenario file.
Change-Id: I7825b32d63496ebea2ab5789519fb0c6af6c5257
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/addDevice_ex1.json b/web/gui/src/main/webapp/json/ev/_capture/rx/addDevice_ex1.json
new file mode 100644
index 0000000..f00cf2c
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/addDevice_ex1.json
@@ -0,0 +1,15 @@
+{
+ "event": "addDevice",
+ "payload": {
+ "id": "of:0000000000000003",
+ "type": "switch",
+ "online": true,
+ "labels": [
+ "of:0000000000000003",
+ "3",
+ "",
+ null
+ ],
+ "props": {}
+ }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/addHost_ex1.json b/web/gui/src/main/webapp/json/ev/_capture/rx/addHost_ex1.json
new file mode 100644
index 0000000..a97d15a
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/addHost_ex1.json
@@ -0,0 +1,17 @@
+{
+ "event": "addHost",
+ "payload": {
+ "id": "6A:40:24:F7:9C:2C/-1",
+ "ingress": "6A:40:24:F7:9C:2C/-1/0-of:0000000000000003/2",
+ "egress": "of:0000000000000003/2-6A:40:24:F7:9C:2C/-1/0",
+ "cp": {
+ "device": "of:0000000000000003",
+ "port": 2
+ },
+ "labels": [
+ "unknown",
+ "6A:40:24:F7:9C:2C"
+ ],
+ "props": {}
+ }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/addLink_ex1.json b/web/gui/src/main/webapp/json/ev/_capture/rx/addLink_ex1.json
new file mode 100644
index 0000000..92c7848
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/addLink_ex1.json
@@ -0,0 +1,12 @@
+{
+ "event": "addLink",
+ "payload": {
+ "id": "of:0000000000000007/4-of:0000000000000006/1",
+ "type": "direct",
+ "linkWidth": 2,
+ "src": "of:0000000000000007",
+ "srcPort": "4",
+ "dst": "of:0000000000000006",
+ "dstPort": "1"
+ }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/removeDevice_fab.json b/web/gui/src/main/webapp/json/ev/_capture/rx/removeDevice_fab.json
new file mode 100644
index 0000000..0e8d47a
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/removeDevice_fab.json
@@ -0,0 +1,20 @@
+{
+ "__comments__": [
+ "fabricated event",
+ "not sure if this is the actual format",
+ "but we really only care about 'id' being in the payload"
+ ],
+ "event": "removeDevice",
+ "payload": {
+ "id": "of:0000000000000002",
+ "type": "switch",
+ "online": true,
+ "labels": [
+ "of:0000000000000002",
+ "2",
+ "",
+ null
+ ],
+ "props": {}
+ }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/removeHost_fab.json b/web/gui/src/main/webapp/json/ev/_capture/rx/removeHost_fab.json
new file mode 100644
index 0000000..4237199
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/removeHost_fab.json
@@ -0,0 +1,22 @@
+{
+ "__comments__": [
+ "fabricated event",
+ "not sure if this is the actual format",
+ "but we really only care about 'id' being in the payload"
+ ],
+ "event": "removeHost",
+ "payload": {
+ "id": "6A:40:24:F7:9C:2C/-1",
+ "ingress": "6A:40:24:F7:9C:2C/-1/0-of:0000000000000003/2",
+ "egress": "of:0000000000000003/2-6A:40:24:F7:9C:2C/-1/0",
+ "cp": {
+ "device": "of:0000000000000003",
+ "port": 2
+ },
+ "labels": [
+ "unknown",
+ "6A:40:24:F7:9C:2C"
+ ],
+ "props": {}
+ }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/removeLink_ex1.json b/web/gui/src/main/webapp/json/ev/_capture/rx/removeLink_ex1.json
new file mode 100644
index 0000000..8d1dd03
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/removeLink_ex1.json
@@ -0,0 +1,12 @@
+{
+ "event": "removeLink",
+ "payload": {
+ "id": "of:0000000000000001/1-of:0000000000000002/4",
+ "type": "direct",
+ "linkWidth": 2,
+ "src": "of:0000000000000001",
+ "srcPort": "1",
+ "dst": "of:0000000000000002",
+ "dstPort": "4"
+ }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/showPath_ex1.json b/web/gui/src/main/webapp/json/ev/_capture/rx/showPath_ex1.json
new file mode 100644
index 0000000..de1023e
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/showPath_ex1.json
@@ -0,0 +1,15 @@
+{
+ "event": "showPath",
+ "sid": 15,
+ "payload": {
+ "links": [
+ "62:4F:65:BF:FF:B3/-1/0-of:000000000000000b/1",
+ "of:000000000000000b/4-of:000000000000000a/1",
+ "of:000000000000000a/4-of:0000000000000001/3",
+ "of:0000000000000001/1-of:0000000000000002/4",
+ "of:0000000000000002/1-of:0000000000000003/4",
+ "of:0000000000000003/1-CA:4B:EE:A4:B0:33/-1/0"
+ ],
+ "intentId": "0x52a914f9"
+ }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/updateDevice_ex1.json b/web/gui/src/main/webapp/json/ev/_capture/rx/updateDevice_ex1.json
new file mode 100644
index 0000000..dda6186
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/updateDevice_ex1.json
@@ -0,0 +1,15 @@
+{
+ "event": "updateDevice",
+ "payload": {
+ "id": "of:0000000000000002",
+ "type": "switch",
+ "online": true,
+ "labels": [
+ "of:0000000000000002",
+ "2",
+ "",
+ null
+ ],
+ "props": {}
+ }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/updateDevice_ex2.json b/web/gui/src/main/webapp/json/ev/_capture/rx/updateDevice_ex2.json
new file mode 100644
index 0000000..d607f98
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/updateDevice_ex2.json
@@ -0,0 +1,15 @@
+{
+ "event": "updateDevice",
+ "payload": {
+ "id": "of:0000000000000002",
+ "type": "switch",
+ "online": false,
+ "labels": [
+ "of:0000000000000002",
+ "2",
+ "",
+ null
+ ],
+ "props": {}
+ }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/updateHost.json b/web/gui/src/main/webapp/json/ev/_capture/rx/updateHost.json
new file mode 100644
index 0000000..fd7361c
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/updateHost.json
@@ -0,0 +1,17 @@
+{
+ "event": "updateHost",
+ "payload": {
+ "id": "AA:C2:74:3F:B8:06/-1",
+ "ingress": "AA:C2:74:3F:B8:06/-1/0-of:0000000000000005/3",
+ "egress": "of:0000000000000005/3-AA:C2:74:3F:B8:06/-1/0",
+ "cp": {
+ "device": "of:0000000000000005",
+ "port": 3
+ },
+ "labels": [
+ "10.0.0.9",
+ "AA:C2:74:3F:B8:06"
+ ],
+ "props":{}
+ }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/updateLink_ex1.json b/web/gui/src/main/webapp/json/ev/_capture/rx/updateLink_ex1.json
new file mode 100644
index 0000000..3be5c5f
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/updateLink_ex1.json
@@ -0,0 +1,12 @@
+{
+ "event": "updateLink",
+ "payload": {
+ "id": "of:0000000000000002/4-of:0000000000000001/1",
+ "type": "direct",
+ "linkWidth": 2,
+ "src": "of:0000000000000002",
+ "srcPort": "4",
+ "dst": "of:0000000000000001",
+ "dstPort": "1"
+ }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/tx/requestPath_ex1.json b/web/gui/src/main/webapp/json/ev/_capture/tx/requestPath_ex1.json
new file mode 100644
index 0000000..4963865
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/tx/requestPath_ex1.json
@@ -0,0 +1,8 @@
+{
+ "event": "requestPath",
+ "sid": 15,
+ "payload": {
+ "one": "62:4F:65:BF:FF:B3/-1",
+ "two": "CA:4B:EE:A4:B0:33/-1"
+ }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/tx/updateMeta_ex1.json b/web/gui/src/main/webapp/json/ev/_capture/tx/updateMeta_ex1.json
new file mode 100644
index 0000000..c04727e
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/tx/updateMeta_ex1.json
@@ -0,0 +1,10 @@
+{
+ "event": "updateMeta",
+ "sid": 11,
+ "payload": {
+ "id": "62:4F:65:BF:FF:B3/-1",
+ "class": "host",
+ "x": 197,
+ "y": 177
+ }
+}
diff --git a/web/gui/src/main/webapp/json/ev/intent/ev_1_ui.json b/web/gui/src/main/webapp/json/ev/intentSketch/ev_1_ui.json
similarity index 100%
rename from web/gui/src/main/webapp/json/ev/intent/ev_1_ui.json
rename to web/gui/src/main/webapp/json/ev/intentSketch/ev_1_ui.json
diff --git a/web/gui/src/main/webapp/json/ev/intent/ev_2_onos.json b/web/gui/src/main/webapp/json/ev/intentSketch/ev_2_onos.json
similarity index 100%
rename from web/gui/src/main/webapp/json/ev/intent/ev_2_onos.json
rename to web/gui/src/main/webapp/json/ev/intentSketch/ev_2_onos.json
diff --git a/web/gui/src/main/webapp/json/ev/intent/ev_3_ui.json b/web/gui/src/main/webapp/json/ev/intentSketch/ev_3_ui.json
similarity index 100%
rename from web/gui/src/main/webapp/json/ev/intent/ev_3_ui.json
rename to web/gui/src/main/webapp/json/ev/intentSketch/ev_3_ui.json
diff --git a/web/gui/src/main/webapp/json/ev/intent/ev_4_onos.json b/web/gui/src/main/webapp/json/ev/intentSketch/ev_4_onos.json
similarity index 100%
rename from web/gui/src/main/webapp/json/ev/intent/ev_4_onos.json
rename to web/gui/src/main/webapp/json/ev/intentSketch/ev_4_onos.json
diff --git a/web/gui/src/main/webapp/json/ev/intent/ev_5_onos.json b/web/gui/src/main/webapp/json/ev/intentSketch/ev_5_onos.json
similarity index 100%
rename from web/gui/src/main/webapp/json/ev/intent/ev_5_onos.json
rename to web/gui/src/main/webapp/json/ev/intentSketch/ev_5_onos.json
diff --git a/web/gui/src/main/webapp/json/ev/intent/ev_6_onos.json b/web/gui/src/main/webapp/json/ev/intentSketch/ev_6_onos.json
similarity index 100%
rename from web/gui/src/main/webapp/json/ev/intent/ev_6_onos.json
rename to web/gui/src/main/webapp/json/ev/intentSketch/ev_6_onos.json
diff --git a/web/gui/src/main/webapp/json/ev/intent/ev_7_ui.json b/web/gui/src/main/webapp/json/ev/intentSketch/ev_7_ui.json
similarity index 100%
rename from web/gui/src/main/webapp/json/ev/intent/ev_7_ui.json
rename to web/gui/src/main/webapp/json/ev/intentSketch/ev_7_ui.json
diff --git a/web/gui/src/main/webapp/json/ev/intent/scenario.json b/web/gui/src/main/webapp/json/ev/intentSketch/scenario.json
similarity index 100%
rename from web/gui/src/main/webapp/json/ev/intent/scenario.json
rename to web/gui/src/main/webapp/json/ev/intentSketch/scenario.json
diff --git a/web/gui/src/main/webapp/json/ev/simple/ev_8_ui.json b/web/gui/src/main/webapp/json/ev/simple/ev_10_ui.json
similarity index 100%
rename from web/gui/src/main/webapp/json/ev/simple/ev_8_ui.json
rename to web/gui/src/main/webapp/json/ev/simple/ev_10_ui.json
diff --git a/web/gui/src/main/webapp/json/ev/simple/ev_3_onos.json b/web/gui/src/main/webapp/json/ev/simple/ev_3_onos.json
index ac521c4..73013a4 100644
--- a/web/gui/src/main/webapp/json/ev/simple/ev_3_onos.json
+++ b/web/gui/src/main/webapp/json/ev/simple/ev_3_onos.json
@@ -1,15 +1,18 @@
{
- "event": "addLink",
+ "event": "updateDevice",
"payload": {
- "id": "of:0000ffffffff0003/21-of:0000ffffffff0008/20",
- "type": "direct",
- "linkWidth": 2,
- "src": "of:0000ffffffff0003",
- "srcPort": "21",
- "dst": "of:0000ffffffff0008",
- "dstPort": "20",
- "props" : {
- "BW": "70 G"
+ "id": "of:0000ffffffff0008",
+ "type": "switch",
+ "online": true,
+ "labels": [
+ "0000ffffffff0008",
+ "FF:FF:FF:FF:00:08",
+ "sw-8-yo",
+ ""
+ ],
+ "metaUi": {
+ "x": 400,
+ "y": 280
}
}
}
diff --git a/web/gui/src/main/webapp/json/ev/simple/ev_4_onos.json b/web/gui/src/main/webapp/json/ev/simple/ev_4_onos.json
index 993570b..958af28 100644
--- a/web/gui/src/main/webapp/json/ev/simple/ev_4_onos.json
+++ b/web/gui/src/main/webapp/json/ev/simple/ev_4_onos.json
@@ -1,17 +1,18 @@
{
- "event": "addHost",
+ "event": "updateDevice",
"payload": {
- "id": "0E:2A:69:30:13:86/-1",
- "ingress": "0E:2A:69:30:13:86/-1/0-of:0000ffffffff0003/2",
- "egress": "of:0000ffffffff0003/2-0E:2A:69:30:13:86/-1/0",
- "cp": {
- "device": "of:0000ffffffff0003",
- "port": 2
- },
+ "id": "of:0000ffffffff0003",
+ "type": "switch",
+ "online": true,
"labels": [
- "unknown",
- "0E:2A:69:30:13:86"
+ "0000ffffffff0003",
+ "FF:FF:FF:FF:00:03",
+ "sw-3-yo",
+ ""
],
- "props": {}
+ "metaUi": {
+ "x": 800,
+ "y": 280
+ }
}
}
diff --git a/web/gui/src/main/webapp/json/ev/simple/ev_5_onos.json b/web/gui/src/main/webapp/json/ev/simple/ev_5_onos.json
index 17864a6..ac521c4 100644
--- a/web/gui/src/main/webapp/json/ev/simple/ev_5_onos.json
+++ b/web/gui/src/main/webapp/json/ev/simple/ev_5_onos.json
@@ -1,17 +1,15 @@
{
- "event": "addHost",
+ "event": "addLink",
"payload": {
- "id": "A6:96:E5:03:52:5F/-1",
- "ingress": "A6:96:E5:03:52:5F/-1/0-of:0000ffffffff0008/1",
- "egress": "of:0000ffffffff0008/1-A6:96:E5:03:52:5F/-1/0",
- "cp": {
- "device": "of:0000ffffffff0008",
- "port": 1
- },
- "labels": [
- "unknown",
- "A6:96:E5:03:52:5F"
- ],
- "props": {}
+ "id": "of:0000ffffffff0003/21-of:0000ffffffff0008/20",
+ "type": "direct",
+ "linkWidth": 2,
+ "src": "of:0000ffffffff0003",
+ "srcPort": "21",
+ "dst": "of:0000ffffffff0008",
+ "dstPort": "20",
+ "props" : {
+ "BW": "70 G"
+ }
}
}
diff --git a/web/gui/src/main/webapp/json/ev/simple/ev_6_onos.json b/web/gui/src/main/webapp/json/ev/simple/ev_6_onos.json
index 3a3ea9e..993570b 100644
--- a/web/gui/src/main/webapp/json/ev/simple/ev_6_onos.json
+++ b/web/gui/src/main/webapp/json/ev/simple/ev_6_onos.json
@@ -1,5 +1,5 @@
{
- "event": "updateHost",
+ "event": "addHost",
"payload": {
"id": "0E:2A:69:30:13:86/-1",
"ingress": "0E:2A:69:30:13:86/-1/0-of:0000ffffffff0003/2",
@@ -9,7 +9,7 @@
"port": 2
},
"labels": [
- "10.0.0.13",
+ "unknown",
"0E:2A:69:30:13:86"
],
"props": {}
diff --git a/web/gui/src/main/webapp/json/ev/simple/ev_7_onos.json b/web/gui/src/main/webapp/json/ev/simple/ev_7_onos.json
index 0fb56fa..17864a6 100644
--- a/web/gui/src/main/webapp/json/ev/simple/ev_7_onos.json
+++ b/web/gui/src/main/webapp/json/ev/simple/ev_7_onos.json
@@ -1,5 +1,5 @@
{
- "event": "updateHost",
+ "event": "addHost",
"payload": {
"id": "A6:96:E5:03:52:5F/-1",
"ingress": "A6:96:E5:03:52:5F/-1/0-of:0000ffffffff0008/1",
@@ -9,7 +9,7 @@
"port": 1
},
"labels": [
- "10.0.0.17",
+ "unknown",
"A6:96:E5:03:52:5F"
],
"props": {}
diff --git a/web/gui/src/main/webapp/json/ev/simple/ev_8_onos.json b/web/gui/src/main/webapp/json/ev/simple/ev_8_onos.json
new file mode 100644
index 0000000..3a3ea9e
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/simple/ev_8_onos.json
@@ -0,0 +1,17 @@
+{
+ "event": "updateHost",
+ "payload": {
+ "id": "0E:2A:69:30:13:86/-1",
+ "ingress": "0E:2A:69:30:13:86/-1/0-of:0000ffffffff0003/2",
+ "egress": "of:0000ffffffff0003/2-0E:2A:69:30:13:86/-1/0",
+ "cp": {
+ "device": "of:0000ffffffff0003",
+ "port": 2
+ },
+ "labels": [
+ "10.0.0.13",
+ "0E:2A:69:30:13:86"
+ ],
+ "props": {}
+ }
+}
diff --git a/web/gui/src/main/webapp/json/ev/simple/ev_9_onos.json b/web/gui/src/main/webapp/json/ev/simple/ev_9_onos.json
new file mode 100644
index 0000000..0fb56fa
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/simple/ev_9_onos.json
@@ -0,0 +1,17 @@
+{
+ "event": "updateHost",
+ "payload": {
+ "id": "A6:96:E5:03:52:5F/-1",
+ "ingress": "A6:96:E5:03:52:5F/-1/0-of:0000ffffffff0008/1",
+ "egress": "of:0000ffffffff0008/1-A6:96:E5:03:52:5F/-1/0",
+ "cp": {
+ "device": "of:0000ffffffff0008",
+ "port": 1
+ },
+ "labels": [
+ "10.0.0.17",
+ "A6:96:E5:03:52:5F"
+ ],
+ "props": {}
+ }
+}
diff --git a/web/gui/src/main/webapp/json/ev/simple/scenario.json b/web/gui/src/main/webapp/json/ev/simple/scenario.json
index e320413..19d6190 100644
--- a/web/gui/src/main/webapp/json/ev/simple/scenario.json
+++ b/web/gui/src/main/webapp/json/ev/simple/scenario.json
@@ -6,5 +6,17 @@
"title": "Simple Startup Scenario",
"params": {
"lastAuto": 0
- }
+ },
+ "description": [
+ "1. add device [8] (offline)",
+ "2. add device [3] (offline)",
+ "3. update device [8] (online)",
+ "4. update device [3] (online)",
+ "5. add link [3] --> [8]",
+ "6. add host (to [3])",
+ "7. add host (to [8])",
+ "8. update host[3] (IP now 10.0.0.13)",
+ "9. update host[8] (IP now 10.0.0.17)",
+ ""
+ ]
}
\ No newline at end of file