Simon Hunt

GUI -- Updated 'simple' scenario, and minor enhancement to mock server.

Change-Id: I08b015ad81d5b356d63edaa779418a5445d24edf
Showing 18 changed files with 51 additions and 18 deletions
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 +}
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
4 "id": "of:0000ffffffff0008", 4 "id": "of:0000ffffffff0008",
5 "type": "switch", 5 "type": "switch",
6 "online": false, 6 "online": false,
7 + "master": "myInstA",
7 "location": { 8 "location": {
8 "type": "latlng", 9 "type": "latlng",
9 "lat": 37.7833, 10 "lat": 37.7833,
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
4 "id": "of:0000ffffffff0003", 4 "id": "of:0000ffffffff0003",
5 "type": "switch", 5 "type": "switch",
6 "online": false, 6 "online": false,
7 + "master": "myInstB",
7 "location": { 8 "location": {
8 "type": "latlng", 9 "type": "latlng",
9 "lat": 40.7127, 10 "lat": 40.7127,
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
4 "id": "of:0000ffffffff0008", 4 "id": "of:0000ffffffff0008",
5 "type": "switch", 5 "type": "switch",
6 "online": true, 6 "online": true,
7 + "master": "myInstA",
7 "labels": [ 8 "labels": [
8 "", 9 "",
9 "switch-8", 10 "switch-8",
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
4 "id": "of:0000ffffffff0003", 4 "id": "of:0000ffffffff0003",
5 "type": "switch", 5 "type": "switch",
6 "online": true, 6 "online": true,
7 + "master": "myInstB",
7 "labels": [ 8 "labels": [
8 "", 9 "",
9 "switch-3", 10 "switch-3",
......
...@@ -8,23 +8,23 @@ ...@@ -8,23 +8,23 @@
8 "lastAuto": 0 8 "lastAuto": 0
9 }, 9 },
10 "description": [ 10 "description": [
11 - "Press 'H' to show hosts.", 11 + "Simple sequence of events...",
12 "", 12 "",
13 - "Press '-' to fire further events.", 13 + "1. add instance A",
14 - "", 14 + "2. add instance B",
15 - "1. add device [8] (offline)", 15 + "3. add device [8] (offline)",
16 - "2. add device [3] (offline)", 16 + "4. add device [3] (offline)",
17 - "3. update device [8] (online, label3 change)", 17 + "5. update device [8] (online, label3 change)",
18 - "4. update device [3] (online, label3 change)", 18 + "6. update device [3] (online, label3 change)",
19 - "5. add link [3] --> [8]", 19 + "7. add link [3] --> [8]",
20 - "6. add host (to [3])", 20 + "8. add host (to [3])",
21 - "7. add host (to [8])", 21 + "9. add host (to [8])",
22 - "8. update host[3] (IP now 10.0.0.13)", 22 + "10. update host[3] (IP now 10.0.0.13)",
23 - "9. update host[8] (IP now 10.0.0.17)", 23 + "11. update host[8] (IP now 10.0.0.17)",
24 - "10. update link (increase width, update props)", 24 + "12. update link (increase width, update props)",
25 - "11. update link (reduce width, update props)", 25 + "13. update link (reduce width, update props)",
26 - "12. remove link", 26 + "14. remove link",
27 - "13. remove host (10.0.0.17)", 27 + "15. remove host (10.0.0.17)",
28 - "13. remove device [3]" 28 + "16. remove device [3]"
29 ] 29 ]
30 } 30 }
......
...@@ -281,7 +281,8 @@ function nextEvent() { ...@@ -281,7 +281,8 @@ function nextEvent() {
281 } else { 281 } else {
282 evdata = JSON.parse(data); 282 evdata = JSON.parse(data);
283 console.log(); // get past prompt 283 console.log(); // get past prompt
284 - console.log('Sending event #' + evno + ' [' + evdata.event + ']'); 284 + console.log('Sending event #' + evno + ' [' + evdata.event +
285 + '] from ' + eventsById[evno].fname);
285 connection.sendUTF(data); 286 connection.sendUTF(data);
286 evno++; 287 evno++;
287 } 288 }
......