GUI -- Updated 'simple' scenario, and minor enhancement to mock server.
Change-Id: I08b015ad81d5b356d63edaa779418a5445d24edf
diff --git a/web/gui/src/test/_karma/ev/simple/ev_8_onos.json b/web/gui/src/test/_karma/ev/simple/ev_10_updateHost_03.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/simple/ev_8_onos.json
rename to web/gui/src/test/_karma/ev/simple/ev_10_updateHost_03.json
diff --git a/web/gui/src/test/_karma/ev/simple/ev_9_onos.json b/web/gui/src/test/_karma/ev/simple/ev_11_updateHost_08.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/simple/ev_9_onos.json
rename to web/gui/src/test/_karma/ev/simple/ev_11_updateHost_08.json
diff --git a/web/gui/src/test/_karma/ev/simple/ev_10_onos.json b/web/gui/src/test/_karma/ev/simple/ev_12_updateLink.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/simple/ev_10_onos.json
rename to web/gui/src/test/_karma/ev/simple/ev_12_updateLink.json
diff --git a/web/gui/src/test/_karma/ev/simple/ev_11_onos.json b/web/gui/src/test/_karma/ev/simple/ev_13_updateLink.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/simple/ev_11_onos.json
rename to web/gui/src/test/_karma/ev/simple/ev_13_updateLink.json
diff --git a/web/gui/src/test/_karma/ev/simple/ev_12_onos.json b/web/gui/src/test/_karma/ev/simple/ev_14_removeLink.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/simple/ev_12_onos.json
rename to web/gui/src/test/_karma/ev/simple/ev_14_removeLink.json
diff --git a/web/gui/src/test/_karma/ev/simple/ev_13_onos.json b/web/gui/src/test/_karma/ev/simple/ev_15_removeHost_08.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/simple/ev_13_onos.json
rename to web/gui/src/test/_karma/ev/simple/ev_15_removeHost_08.json
diff --git a/web/gui/src/test/_karma/ev/simple/ev_14_onos.json b/web/gui/src/test/_karma/ev/simple/ev_16_removeDevice_03.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/simple/ev_14_onos.json
rename to web/gui/src/test/_karma/ev/simple/ev_16_removeDevice_03.json
diff --git a/web/gui/src/test/_karma/ev/simple/ev_1_addInstanceA.json b/web/gui/src/test/_karma/ev/simple/ev_1_addInstanceA.json
new file mode 100644
index 0000000..ea1fa0f
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/simple/ev_1_addInstanceA.json
@@ -0,0 +1,14 @@
+{
+ "event": "addInstance",
+ "payload": {
+ "id": "myInstA",
+ "ip": "192.168.56.101",
+ "online": true,
+ "uiAttached": true,
+ "switches": 2,
+ "labels": [
+ "myInstA",
+ "192.168.56.101"
+ ]
+ }
+}
diff --git a/web/gui/src/test/_karma/ev/simple/ev_2_addInstanceB.json b/web/gui/src/test/_karma/ev/simple/ev_2_addInstanceB.json
new file mode 100644
index 0000000..5b09dec
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/simple/ev_2_addInstanceB.json
@@ -0,0 +1,14 @@
+{
+ "event": "addInstance",
+ "payload": {
+ "id": "myInstB",
+ "ip": "192.168.56.102",
+ "online": true,
+ "uiAttached": false,
+ "switches": 4,
+ "labels": [
+ "myInstB",
+ "192.168.56.102"
+ ]
+ }
+}
diff --git a/web/gui/src/test/_karma/ev/simple/ev_1_onos.json b/web/gui/src/test/_karma/ev/simple/ev_3_addDevice_08.json
similarity index 92%
rename from web/gui/src/test/_karma/ev/simple/ev_1_onos.json
rename to web/gui/src/test/_karma/ev/simple/ev_3_addDevice_08.json
index b86a73c..9c16f2b 100644
--- a/web/gui/src/test/_karma/ev/simple/ev_1_onos.json
+++ b/web/gui/src/test/_karma/ev/simple/ev_3_addDevice_08.json
@@ -4,6 +4,7 @@
"id": "of:0000ffffffff0008",
"type": "switch",
"online": false,
+ "master": "myInstA",
"location": {
"type": "latlng",
"lat": 37.7833,
diff --git a/web/gui/src/test/_karma/ev/simple/ev_2_onos.json b/web/gui/src/test/_karma/ev/simple/ev_4_addDevice_03.json
similarity index 92%
rename from web/gui/src/test/_karma/ev/simple/ev_2_onos.json
rename to web/gui/src/test/_karma/ev/simple/ev_4_addDevice_03.json
index 2df409a..0b8f044 100644
--- a/web/gui/src/test/_karma/ev/simple/ev_2_onos.json
+++ b/web/gui/src/test/_karma/ev/simple/ev_4_addDevice_03.json
@@ -4,6 +4,7 @@
"id": "of:0000ffffffff0003",
"type": "switch",
"online": false,
+ "master": "myInstB",
"location": {
"type": "latlng",
"lat": 40.7127,
diff --git a/web/gui/src/test/_karma/ev/simple/ev_3_onos.json b/web/gui/src/test/_karma/ev/simple/ev_5_updateDevice_08_online.json
similarity index 90%
rename from web/gui/src/test/_karma/ev/simple/ev_3_onos.json
rename to web/gui/src/test/_karma/ev/simple/ev_5_updateDevice_08_online.json
index 0083530..3b42283 100644
--- a/web/gui/src/test/_karma/ev/simple/ev_3_onos.json
+++ b/web/gui/src/test/_karma/ev/simple/ev_5_updateDevice_08_online.json
@@ -4,6 +4,7 @@
"id": "of:0000ffffffff0008",
"type": "switch",
"online": true,
+ "master": "myInstA",
"labels": [
"",
"switch-8",
diff --git a/web/gui/src/test/_karma/ev/simple/ev_4_onos.json b/web/gui/src/test/_karma/ev/simple/ev_6_updateDevice_03_online.json
similarity index 90%
rename from web/gui/src/test/_karma/ev/simple/ev_4_onos.json
rename to web/gui/src/test/_karma/ev/simple/ev_6_updateDevice_03_online.json
index 57e3347..d05aea6 100644
--- a/web/gui/src/test/_karma/ev/simple/ev_4_onos.json
+++ b/web/gui/src/test/_karma/ev/simple/ev_6_updateDevice_03_online.json
@@ -4,6 +4,7 @@
"id": "of:0000ffffffff0003",
"type": "switch",
"online": true,
+ "master": "myInstB",
"labels": [
"",
"switch-3",
diff --git a/web/gui/src/test/_karma/ev/simple/ev_5_onos.json b/web/gui/src/test/_karma/ev/simple/ev_7_addLink_03_08.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/simple/ev_5_onos.json
rename to web/gui/src/test/_karma/ev/simple/ev_7_addLink_03_08.json
diff --git a/web/gui/src/test/_karma/ev/simple/ev_6_onos.json b/web/gui/src/test/_karma/ev/simple/ev_8_addHost_03.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/simple/ev_6_onos.json
rename to web/gui/src/test/_karma/ev/simple/ev_8_addHost_03.json
diff --git a/web/gui/src/test/_karma/ev/simple/ev_7_onos.json b/web/gui/src/test/_karma/ev/simple/ev_9_addHost_08.json
similarity index 100%
rename from web/gui/src/test/_karma/ev/simple/ev_7_onos.json
rename to web/gui/src/test/_karma/ev/simple/ev_9_addHost_08.json
diff --git a/web/gui/src/test/_karma/ev/simple/scenario.json b/web/gui/src/test/_karma/ev/simple/scenario.json
index 524377c..38daa5c 100644
--- a/web/gui/src/test/_karma/ev/simple/scenario.json
+++ b/web/gui/src/test/_karma/ev/simple/scenario.json
@@ -8,23 +8,23 @@
"lastAuto": 0
},
"description": [
- "Press 'H' to show hosts.",
+ "Simple sequence of events...",
"",
- "Press '-' to fire further events.",
- "",
- "1. add device [8] (offline)",
- "2. add device [3] (offline)",
- "3. update device [8] (online, label3 change)",
- "4. update device [3] (online, label3 change)",
- "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)",
- "10. update link (increase width, update props)",
- "11. update link (reduce width, update props)",
- "12. remove link",
- "13. remove host (10.0.0.17)",
- "13. remove device [3]"
+ "1. add instance A",
+ "2. add instance B",
+ "3. add device [8] (offline)",
+ "4. add device [3] (offline)",
+ "5. update device [8] (online, label3 change)",
+ "6. update device [3] (online, label3 change)",
+ "7. add link [3] --> [8]",
+ "8. add host (to [3])",
+ "9. add host (to [8])",
+ "10. update host[3] (IP now 10.0.0.13)",
+ "11. update host[8] (IP now 10.0.0.17)",
+ "12. update link (increase width, update props)",
+ "13. update link (reduce width, update props)",
+ "14. remove link",
+ "15. remove host (10.0.0.17)",
+ "16. remove device [3]"
]
}
diff --git a/web/gui/src/test/_karma/mockserver.js b/web/gui/src/test/_karma/mockserver.js
index a89bcd5..454d686 100644
--- a/web/gui/src/test/_karma/mockserver.js
+++ b/web/gui/src/test/_karma/mockserver.js
@@ -281,7 +281,8 @@
} else {
evdata = JSON.parse(data);
console.log(); // get past prompt
- console.log('Sending event #' + evno + ' [' + evdata.event + ']');
+ console.log('Sending event #' + evno + ' [' + evdata.event +
+ '] from ' + eventsById[evno].fname);
connection.sendUTF(data);
evno++;
}