Simon Hunt

GUI -- Fixed link lookup bug when removing links.

 - fixed and extended the 'startup' test scenario  to show device coming online (and links added), followed by device going offline (and links removed).

Change-Id: I58f79b5b16d37504793f36db9959f8c3c26b5261
Showing 44 changed files with 226 additions and 85 deletions
...@@ -5,5 +5,9 @@ ...@@ -5,5 +5,9 @@
5 "title": "Host Intent Scenario", 5 "title": "Host Intent Scenario",
6 "params": { 6 "params": {
7 "lastAuto": 0 7 "lastAuto": 0
8 - } 8 + },
9 + "description": [
10 + "Currently this is just a sketch of the event sequence,",
11 + " but is NOT YET a runnable scenario."
12 + ]
9 } 13 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 "payload": { 3 "payload": {
4 "id": "of:0000ffffffffff04", 4 "id": "of:0000ffffffffff04",
5 "type": "roadm", 5 "type": "roadm",
6 - "online": false, 6 + "online": true,
7 "labels": [ 7 "labels": [
8 "0000ffffffffff04", 8 "0000ffffffffff04",
9 "FF:FF:FF:FF:FF:04", 9 "FF:FF:FF:FF:FF:04",
......
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
3 "payload": { 3 "payload": {
4 "id": "of:0000ffffffff000A", 4 "id": "of:0000ffffffff000A",
5 "type": "switch", 5 "type": "switch",
6 - "online": false, 6 + "online": true,
7 "labels": [ 7 "labels": [
8 "0000ffffffff000A", 8 "0000ffffffff000A",
9 "FF:FF:FF:FF:00:0A", 9 "FF:FF:FF:FF:00:0A",
10 "?" 10 "?"
11 ], 11 ],
12 "metaUi": { 12 "metaUi": {
13 - "Zx": 832, 13 + "x": 832,
14 - "Zy": 223 14 + "y": 223
15 } 15 }
16 } 16 }
17 } 17 }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 "payload": { 3 "payload": {
4 "id": "of:0000ffffffff0001", 4 "id": "of:0000ffffffff0001",
5 "type": "switch", 5 "type": "switch",
6 - "online": false, 6 + "online": true,
7 "labels": [ 7 "labels": [
8 "0000ffffffff0001", 8 "0000ffffffff0001",
9 "FF:FF:FF:FF:00:01", 9 "FF:FF:FF:FF:00:01",
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 "payload": { 3 "payload": {
4 "id": "of:0000ffffffffff01", 4 "id": "of:0000ffffffffff01",
5 "type": "roadm", 5 "type": "roadm",
6 - "online": false, 6 + "online": true,
7 "labels": [ 7 "labels": [
8 "0000ffffffffff01", 8 "0000ffffffffff01",
9 "FF:FF:FF:FF:FF:01", 9 "FF:FF:FF:FF:FF:01",
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 "payload": { 3 "payload": {
4 "id": "of:0000ffffffff0004", 4 "id": "of:0000ffffffff0004",
5 "type": "switch", 5 "type": "switch",
6 - "online": false, 6 + "online": true,
7 "labels": [ 7 "labels": [
8 "0000ffffffff0004", 8 "0000ffffffff0004",
9 "FF:FF:FF:FF:00:04", 9 "FF:FF:FF:FF:00:04",
......
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
3 "payload": { 3 "payload": {
4 "id": "of:0000ffffffffff0A", 4 "id": "of:0000ffffffffff0A",
5 "type": "roadm", 5 "type": "roadm",
6 - "online": false, 6 + "online": true,
7 "labels": [ 7 "labels": [
8 "0000ffffffffff0A", 8 "0000ffffffffff0A",
9 "FF:FF:FF:FF:FF:0A", 9 "FF:FF:FF:FF:FF:0A",
10 "?" 10 "?"
11 ], 11 ],
12 "metaUi": { 12 "metaUi": {
13 - "Zx": 840, 13 + "x": 840,
14 - "Zy": 290 14 + "y": 290
15 } 15 }
16 } 16 }
17 } 17 }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 "payload": { 3 "payload": {
4 "id": "of:0000ffffffffff09", 4 "id": "of:0000ffffffffff09",
5 "type": "roadm", 5 "type": "roadm",
6 - "online": false, 6 + "online": true,
7 "labels": [ 7 "labels": [
8 "0000ffffffffff09", 8 "0000ffffffffff09",
9 "FF:FF:FF:FF:FF:09", 9 "FF:FF:FF:FF:FF:09",
......
1 { 1 {
2 "event": "addLink", 2 "event": "addLink",
3 "payload": { 3 "payload": {
4 + "id": "of:0000ffffffffff02/20-of:0000ffffffffff05/10",
5 + "type": "optical",
6 + "linkWidth": 4,
4 "src": "of:0000ffffffffff02", 7 "src": "of:0000ffffffffff02",
5 "srcPort": "20", 8 "srcPort": "20",
6 "dst": "of:0000ffffffffff05", 9 "dst": "of:0000ffffffffff05",
7 "dstPort": "10", 10 "dstPort": "10",
8 - "type": "optical",
9 - "linkWidth": 6,
10 "props" : { 11 "props" : {
11 "BW": "80 G" 12 "BW": "80 G"
12 } 13 }
......
1 { 1 {
2 "event": "addLink", 2 "event": "addLink",
3 "payload": { 3 "payload": {
4 + "id": "of:0000ffffffff000A/2-of:0000ffffffffff0A/1",
5 + "type": "optical",
6 + "linkWidth": 2,
4 "src": "of:0000ffffffff000A", 7 "src": "of:0000ffffffff000A",
5 "srcPort": "2", 8 "srcPort": "2",
6 "dst": "of:0000ffffffffff0A", 9 "dst": "of:0000ffffffffff0A",
7 "dstPort": "1", 10 "dstPort": "1",
8 - "type": "optical",
9 - "linkWidth": 2,
10 "props" : { 11 "props" : {
11 "BW": "100 G" 12 "BW": "100 G"
12 } 13 }
......
1 { 1 {
2 "event": "addLink", 2 "event": "addLink",
3 "payload": { 3 "payload": {
4 + "id": "of:0000ffffffffff03/10-of:0000ffffffffff02/10",
5 + "type": "optical",
6 + "linkWidth": 2,
4 "src": "of:0000ffffffffff03", 7 "src": "of:0000ffffffffff03",
5 "srcPort": "10", 8 "srcPort": "10",
6 "dst": "of:0000ffffffffff02", 9 "dst": "of:0000ffffffffff02",
7 "dstPort": "10", 10 "dstPort": "10",
8 - "type": "optical",
9 - "linkWidth": 2,
10 "props" : { 11 "props" : {
11 "BW": "70 G" 12 "BW": "70 G"
12 } 13 }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 "payload": { 3 "payload": {
4 "id": "of:0000ffffffffff08", 4 "id": "of:0000ffffffffff08",
5 "type": "roadm", 5 "type": "roadm",
6 - "online": false, 6 + "online": true,
7 "labels": [ 7 "labels": [
8 "0000ffffffffff08", 8 "0000ffffffffff08",
9 "FF:FF:FF:FF:FF:08", 9 "FF:FF:FF:FF:FF:08",
......
1 { 1 {
2 "event": "addLink", 2 "event": "addLink",
3 "payload": { 3 "payload": {
4 + "id": "of:0000ffffffffff07/21-of:0000ffffffffff05/20",
5 + "type": "optical",
6 + "linkWidth": 2,
4 "src": "of:0000ffffffffff07", 7 "src": "of:0000ffffffffff07",
5 "srcPort": "21", 8 "srcPort": "21",
6 "dst": "of:0000ffffffffff05", 9 "dst": "of:0000ffffffffff05",
7 "dstPort": "20", 10 "dstPort": "20",
8 - "type": "optical",
9 - "linkWidth": 2,
10 "props" : { 11 "props" : {
11 "BW": "70 G" 12 "BW": "70 G"
12 } 13 }
......
1 { 1 {
2 "event": "addLink", 2 "event": "addLink",
3 "payload": { 3 "payload": {
4 + "id": "of:0000ffffffff0001/2-of:0000ffffffffff01/1",
5 + "type": "optical",
6 + "linkWidth": 2,
4 "src": "of:0000ffffffff0001", 7 "src": "of:0000ffffffff0001",
5 "srcPort": "2", 8 "srcPort": "2",
6 "dst": "of:0000ffffffffff01", 9 "dst": "of:0000ffffffffff01",
7 "dstPort": "1", 10 "dstPort": "1",
8 - "type": "optical",
9 - "linkWidth": 2,
10 "props" : { 11 "props" : {
11 "BW": "70 G" 12 "BW": "70 G"
12 } 13 }
......
1 { 1 {
2 "event": "addLink", 2 "event": "addLink",
3 "payload": { 3 "payload": {
4 + "id": "of:0000ffffffffff09/20-of:0000ffffffffff0A/20",
5 + "type": "optical",
6 + "linkWidth": 2,
4 "src": "of:0000ffffffffff09", 7 "src": "of:0000ffffffffff09",
5 "srcPort": "20", 8 "srcPort": "20",
6 "dst": "of:0000ffffffffff0A", 9 "dst": "of:0000ffffffffff0A",
7 "dstPort": "20", 10 "dstPort": "20",
8 - "type": "optical",
9 - "linkWidth": 2,
10 "props" : { 11 "props" : {
11 "BW": "70 G" 12 "BW": "70 G"
12 } 13 }
......
1 { 1 {
2 "event": "addLink", 2 "event": "addLink",
3 "payload": { 3 "payload": {
4 - "src": "of:0000ffffffffff06", 4 + "id": "of:0000ffffffffff07/30-of:0000ffffffffff08/20",
5 - "srcPort": "20",
6 - "dst": "of:0000ffffffffff05",
7 - "dstPort": "30",
8 "type": "optical", 5 "type": "optical",
9 - "linkWidth": 6, 6 + "linkWidth": 4,
7 + "src": "of:0000ffffffffff07",
8 + "srcPort": "30",
9 + "dst": "of:0000ffffffffff08",
10 + "dstPort": "20",
10 "props" : { 11 "props" : {
11 "BW": "70 G" 12 "BW": "70 G"
12 } 13 }
......
1 { 1 {
2 "event": "addLink", 2 "event": "addLink",
3 "payload": { 3 "payload": {
4 - "src": "of:0000ffffffffff07", 4 + "id": "of:0000ffffffffff02/10-of:0000ffffffffff01/10",
5 - "srcPort": "30",
6 - "dst": "of:0000ffffffffff08",
7 - "dstPort": "20",
8 "type": "optical", 5 "type": "optical",
9 - "linkWidth": 6, 6 + "linkWidth": 2,
7 + "src": "of:0000ffffffffff02",
8 + "srcPort": "10",
9 + "dst": "of:0000ffffffffff01",
10 + "dstPort": "10",
10 "props" : { 11 "props" : {
11 "BW": "70 G" 12 "BW": "70 G"
12 } 13 }
......
1 { 1 {
2 "event": "addLink", 2 "event": "addLink",
3 "payload": { 3 "payload": {
4 - "src": "of:0000ffffffffff03", 4 + "id": "of:0000ffffffffff04/27-of:0000ffffffffff08/10",
5 - "srcPort": "20", 5 + "src": "of:0000ffffffffff04",
6 - "dst": "of:0000ffffffffff06", 6 + "srcPort": "27",
7 + "dst": "of:0000ffffffffff08",
7 "dstPort": "10", 8 "dstPort": "10",
8 "type": "optical", 9 "type": "optical",
9 "linkWidth": 2, 10 "linkWidth": 2,
10 "props" : { 11 "props" : {
11 - "BW": "70 G" 12 + "BW": "30 G"
12 } 13 }
13 } 14 }
14 } 15 }
......
1 { 1 {
2 "event": "addLink", 2 "event": "addLink",
3 "payload": { 3 "payload": {
4 - "src": "of:0000ffffffffff02", 4 + "id": "of:0000ffffffff0003/2-of:0000ffffffffff03/1",
5 - "srcPort": "10",
6 - "dst": "of:0000ffffffffff01",
7 - "dstPort": "10",
8 "type": "optical", 5 "type": "optical",
9 "linkWidth": 2, 6 "linkWidth": 2,
7 + "src": "of:0000ffffffff0003",
8 + "srcPort": "2",
9 + "dst": "of:0000ffffffffff03",
10 + "dstPort": "1",
10 "props" : { 11 "props" : {
11 "BW": "70 G" 12 "BW": "70 G"
12 } 13 }
......
1 { 1 {
2 "event": "addLink", 2 "event": "addLink",
3 "payload": { 3 "payload": {
4 + "id": "of:0000ffffffffff09/1-of:0000ffffffff0009/2",
5 + "type": "optical",
6 + "linkWidth": 2,
4 "src": "of:0000ffffffffff09", 7 "src": "of:0000ffffffffff09",
5 "srcPort": "1", 8 "srcPort": "1",
6 "dst": "of:0000ffffffff0009", 9 "dst": "of:0000ffffffff0009",
7 "dstPort": "2", 10 "dstPort": "2",
8 - "type": "optical",
9 - "linkWidth": 2,
10 "props" : { 11 "props" : {
11 "BW": "70 G" 12 "BW": "70 G"
12 } 13 }
......
1 { 1 {
2 "event": "addLink", 2 "event": "addLink",
3 "payload": { 3 "payload": {
4 + "id": "of:0000ffffffffff03/30-of:0000ffffffffff04/10",
5 + "type": "optical",
6 + "linkWidth": 2,
4 "src": "of:0000ffffffffff03", 7 "src": "of:0000ffffffffff03",
5 "srcPort": "30", 8 "srcPort": "30",
6 "dst": "of:0000ffffffffff04", 9 "dst": "of:0000ffffffffff04",
7 "dstPort": "10", 10 "dstPort": "10",
8 - "type": "optical",
9 - "linkWidth": 2,
10 "props" : { 11 "props" : {
11 "BW": "70 G" 12 "BW": "70 G"
12 } 13 }
......
1 { 1 {
2 "event": "addLink", 2 "event": "addLink",
3 "payload": { 3 "payload": {
4 + "id": "of:0000ffffffffff07/20-of:0000ffffffffff09/10",
5 + "type": "optical",
6 + "linkWidth": 2,
4 "src": "of:0000ffffffffff07", 7 "src": "of:0000ffffffffff07",
5 "srcPort": "20", 8 "srcPort": "20",
6 "dst": "of:0000ffffffffff09", 9 "dst": "of:0000ffffffffff09",
7 "dstPort": "10", 10 "dstPort": "10",
8 - "type": "optical",
9 - "linkWidth": 2,
10 "props" : { 11 "props" : {
11 "BW": "70 G" 12 "BW": "70 G"
12 } 13 }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 "payload": { 3 "payload": {
4 "id": "of:0000ffffffffff03", 4 "id": "of:0000ffffffffff03",
5 "type": "roadm", 5 "type": "roadm",
6 - "online": false, 6 + "online": true,
7 "labels": [ 7 "labels": [
8 "0000ffffffffff03", 8 "0000ffffffffff03",
9 "FF:FF:FF:FF:FF:03", 9 "FF:FF:FF:FF:FF:03",
......
1 { 1 {
2 "event": "addLink", 2 "event": "addLink",
3 "payload": { 3 "payload": {
4 + "id": "of:0000ffffffffff0A/10-of:0000ffffffffff08/30",
5 + "type": "optical",
6 + "linkWidth": 4,
4 "src": "of:0000ffffffffff0A", 7 "src": "of:0000ffffffffff0A",
5 "srcPort": "10", 8 "srcPort": "10",
6 "dst": "of:0000ffffffffff08", 9 "dst": "of:0000ffffffffff08",
7 "dstPort": "30", 10 "dstPort": "30",
8 - "type": "optical",
9 - "linkWidth": 6,
10 "props" : { 11 "props" : {
11 "BW": "70 G" 12 "BW": "70 G"
12 } 13 }
......
1 { 1 {
2 "event": "addLink", 2 "event": "addLink",
3 "payload": { 3 "payload": {
4 + "id": "of:0000ffffffff0004/2-of:0000ffffffffff04/1",
5 + "type": "optical",
6 + "linkWidth": 2,
4 "src": "of:0000ffffffff0004", 7 "src": "of:0000ffffffff0004",
5 "srcPort": "2", 8 "srcPort": "2",
6 "dst": "of:0000ffffffffff04", 9 "dst": "of:0000ffffffffff04",
7 "dstPort": "1", 10 "dstPort": "1",
8 - "type": "optical",
9 - "linkWidth": 2,
10 "props" : { 11 "props" : {
11 "BW": "70 G" 12 "BW": "70 G"
12 } 13 }
......
1 { 1 {
2 "event": "addLink", 2 "event": "addLink",
3 "payload": { 3 "payload": {
4 + "id": "of:0000ffffffffff07/1-of:0000ffffffff0007/2",
5 + "type": "optical",
6 + "linkWidth": 2,
4 "src": "of:0000ffffffffff07", 7 "src": "of:0000ffffffffff07",
5 "srcPort": "1", 8 "srcPort": "1",
6 "dst": "of:0000ffffffff0007", 9 "dst": "of:0000ffffffff0007",
7 "dstPort": "2", 10 "dstPort": "2",
8 - "type": "optical",
9 - "linkWidth": 2,
10 "props" : { 11 "props" : {
11 "BW": "70 G" 12 "BW": "70 G"
12 } 13 }
......
1 { 1 {
2 - "event": "addLink", 2 + "event": "updateDevice",
3 "payload": { 3 "payload": {
4 - "src": "of:0000ffffffff0003", 4 + "id": "of:0000ffffffffff06",
5 - "srcPort": "2", 5 + "type": "roadm",
6 - "dst": "of:0000ffffffffff03", 6 + "online": true,
7 - "dstPort": "1", 7 + "labels": [
8 - "type": "optical", 8 + "0000ffffffffff06",
9 - "linkWidth": 2, 9 + "FF:FF:FF:FF:FF:06",
10 - "props" : { 10 + "?"
11 - "BW": "70 G" 11 + ],
12 + "metaUi": {
13 + "x": 336,
14 + "y": 254
12 } 15 }
13 } 16 }
14 } 17 }
......
1 { 1 {
2 "event": "addLink", 2 "event": "addLink",
3 "payload": { 3 "payload": {
4 + "id": "of:0000ffffffffff06/20-of:0000ffffffffff05/30",
4 "src": "of:0000ffffffffff06", 5 "src": "of:0000ffffffffff06",
5 - "srcPort": "30", 6 + "srcPort": "20",
6 - "dst": "of:0000ffffffffff08", 7 + "dst": "of:0000ffffffffff05",
7 - "dstPort": "10", 8 + "dstPort": "30",
8 "type": "optical", 9 "type": "optical",
9 - "linkWidth": 6, 10 + "linkWidth": 4,
10 "props" : { 11 "props" : {
11 "BW": "70 G" 12 "BW": "70 G"
12 } 13 }
......
1 { 1 {
2 "event": "addLink", 2 "event": "addLink",
3 "payload": { 3 "payload": {
4 - "src": "of:0000ffffffffff04", 4 + "id": "of:0000ffffffffff03/20-of:0000ffffffffff06/10",
5 - "srcPort": "27",
6 - "dst": "of:0000ffffffffff08",
7 - "dstPort": "10",
8 "type": "optical", 5 "type": "optical",
9 "linkWidth": 2, 6 "linkWidth": 2,
7 + "src": "of:0000ffffffffff03",
8 + "srcPort": "20",
9 + "dst": "of:0000ffffffffff06",
10 + "dstPort": "10",
10 "props" : { 11 "props" : {
11 - "BW": "30 G" 12 + "BW": "70 G"
12 } 13 }
13 } 14 }
14 } 15 }
......
1 +{
2 + "event": "addLink",
3 + "payload": {
4 + "id": "of:0000ffffffffff06/30-of:0000ffffffffff08/10",
5 + "type": "optical",
6 + "linkWidth": 4,
7 + "src": "of:0000ffffffffff06",
8 + "srcPort": "30",
9 + "dst": "of:0000ffffffffff08",
10 + "dstPort": "10",
11 + "props" : {
12 + "BW": "70 G"
13 + }
14 + }
15 +}
1 +{
2 + "event": "updateDevice",
3 + "payload": {
4 + "id": "of:0000ffffffffff08",
5 + "type": "roadm",
6 + "online": false,
7 + "labels": [
8 + "0000ffffffffff08",
9 + "FF:FF:FF:FF:FF:08",
10 + "?"
11 + ],
12 + "metaUi": {
13 + "x": 539,
14 + "y": 186
15 + }
16 + }
17 +}
1 +{
2 + "event": "removeLink",
3 + "payload": {
4 + "id": "of:0000ffffffffff07/30-of:0000ffffffffff08/20",
5 + "type": "optical",
6 + "linkWidth": 4,
7 + "src": "of:0000ffffffffff07",
8 + "srcPort": "30",
9 + "dst": "of:0000ffffffffff08",
10 + "dstPort": "20",
11 + "props" : {
12 + "BW": "70 G"
13 + }
14 + }
15 +}
1 +{
2 + "event": "removeLink",
3 + "payload": {
4 + "id": "of:0000ffffffffff04/27-of:0000ffffffffff08/10",
5 + "src": "of:0000ffffffffff04",
6 + "srcPort": "27",
7 + "dst": "of:0000ffffffffff08",
8 + "dstPort": "10",
9 + "type": "optical",
10 + "linkWidth": 2,
11 + "props" : {
12 + "BW": "30 G"
13 + }
14 + }
15 +}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 "payload": { 3 "payload": {
4 "id": "of:0000ffffffff0007", 4 "id": "of:0000ffffffff0007",
5 "type": "switch", 5 "type": "switch",
6 - "online": false, 6 + "online": true,
7 "labels": [ 7 "labels": [
8 "0000ffffffff0007", 8 "0000ffffffff0007",
9 "FF:FF:FF:FF:00:07", 9 "FF:FF:FF:FF:00:07",
......
1 +{
2 + "event": "removeLink",
3 + "payload": {
4 + "id": "of:0000ffffffffff0A/10-of:0000ffffffffff08/30",
5 + "type": "optical",
6 + "linkWidth": 4,
7 + "src": "of:0000ffffffffff0A",
8 + "srcPort": "10",
9 + "dst": "of:0000ffffffffff08",
10 + "dstPort": "30",
11 + "props" : {
12 + "BW": "70 G"
13 + }
14 + }
15 +}
1 +{
2 + "event": "removeLink",
3 + "payload": {
4 + "id": "of:0000ffffffffff06/30-of:0000ffffffffff08/10",
5 + "type": "optical",
6 + "linkWidth": 4,
7 + "src": "of:0000ffffffffff06",
8 + "srcPort": "30",
9 + "dst": "of:0000ffffffffff08",
10 + "dstPort": "10",
11 + "props" : {
12 + "BW": "70 G"
13 + }
14 + }
15 +}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 "payload": { 3 "payload": {
4 "id": "of:0000ffffffff0009", 4 "id": "of:0000ffffffff0009",
5 "type": "switch", 5 "type": "switch",
6 - "online": false, 6 + "online": true,
7 "labels": [ 7 "labels": [
8 "0000ffffffff0009", 8 "0000ffffffff0009",
9 "FF:FF:FF:FF:00:09", 9 "FF:FF:FF:FF:00:09",
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 "payload": { 3 "payload": {
4 "id": "of:0000ffffffffff02", 4 "id": "of:0000ffffffffff02",
5 "type": "roadm", 5 "type": "roadm",
6 - "online": false, 6 + "online": true,
7 "labels": [ 7 "labels": [
8 "0000ffffffffff02", 8 "0000ffffffffff02",
9 "FF:FF:FF:FF:FF:02", 9 "FF:FF:FF:FF:FF:02",
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 "payload": { 3 "payload": {
4 "id": "of:0000ffffffff0003", 4 "id": "of:0000ffffffff0003",
5 "type": "switch", 5 "type": "switch",
6 - "online": false, 6 + "online": true,
7 "labels": [ 7 "labels": [
8 "0000ffffffff0003", 8 "0000ffffffff0003",
9 "FF:FF:FF:FF:00:03", 9 "FF:FF:FF:FF:00:03",
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 "payload": { 3 "payload": {
4 "id": "of:0000ffffffffff07", 4 "id": "of:0000ffffffffff07",
5 "type": "roadm", 5 "type": "roadm",
6 - "online": false, 6 + "online": true,
7 "labels": [ 7 "labels": [
8 "0000ffffffffff07", 8 "0000ffffffffff07",
9 "FF:FF:FF:FF:FF:07", 9 "FF:FF:FF:FF:FF:07",
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 "payload": { 3 "payload": {
4 "id": "of:0000ffffffffff05", 4 "id": "of:0000ffffffffff05",
5 "type": "roadm", 5 "type": "roadm",
6 - "online": false, 6 + "online": true,
7 "labels": [ 7 "labels": [
8 "0000ffffffffff05", 8 "0000ffffffffff05",
9 "FF:FF:FF:FF:FF:05", 9 "FF:FF:FF:FF:FF:05",
......
...@@ -6,5 +6,15 @@ ...@@ -6,5 +6,15 @@
6 "title": "Startup Scenario", 6 "title": "Startup Scenario",
7 "params": { 7 "params": {
8 "lastAuto": 32 8 "lastAuto": 32
9 - } 9 + },
10 + "description": [
11 + "Loads 16 devices (10 optical, 6 packet)",
12 + " and their associated links.",
13 + "",
14 + "Press 'S' to load initial events.",
15 + "",
16 + "Press spacebar to complete the scenario...",
17 + " * 4 events - device online, add 3 links",
18 + " * 5 events - device offline, remove 4 links"
19 + ]
10 } 20 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
30 // configuration data 30 // configuration data
31 var config = { 31 var config = {
32 useLiveData: true, 32 useLiveData: true,
33 + fnTrace: true,
33 debugOn: false, 34 debugOn: false,
34 debug: { 35 debug: {
35 showNodeXY: true, 36 showNodeXY: true,
...@@ -180,6 +181,11 @@ ...@@ -180,6 +181,11 @@
180 return config.debugOn && config.debug[what]; 181 return config.debugOn && config.debug[what];
181 } 182 }
182 183
184 + function fnTrace(msg, id) {
185 + if (config.fnTrace) {
186 + console.log('FN: ' + msg + ' [' + id + ']');
187 + }
188 + }
183 189
184 // ============================== 190 // ==============================
185 // Key Callbacks 191 // Key Callbacks
...@@ -220,7 +226,7 @@ ...@@ -220,7 +226,7 @@
220 var v = scenario.view, 226 var v = scenario.view,
221 frame; 227 frame;
222 if (stack.length === 0) { 228 if (stack.length === 0) {
223 - v.alert('Error:\n\nNo event #' + evn + ' found.'); 229 + v.alert('Oops!\n\nNo event #' + evn + ' found.');
224 return; 230 return;
225 } 231 }
226 frame = stack.shift(); 232 frame = stack.shift();
...@@ -334,6 +340,7 @@ ...@@ -334,6 +340,7 @@
334 function logicError(msg) { 340 function logicError(msg) {
335 // TODO, report logic error to server, via websock, so it can be logged 341 // TODO, report logic error to server, via websock, so it can be logged
336 network.view.alert('Logic Error:\n\n' + msg); 342 network.view.alert('Logic Error:\n\n' + msg);
343 + console.warn(msg);
337 } 344 }
338 345
339 var eventDispatch = { 346 var eventDispatch = {
...@@ -350,6 +357,7 @@ ...@@ -350,6 +357,7 @@
350 }; 357 };
351 358
352 function addDevice(data) { 359 function addDevice(data) {
360 + fnTrace('addDevice', data.payload.id);
353 var device = data.payload, 361 var device = data.payload,
354 nodeData = createDeviceNode(device); 362 nodeData = createDeviceNode(device);
355 network.nodes.push(nodeData); 363 network.nodes.push(nodeData);
...@@ -359,6 +367,7 @@ ...@@ -359,6 +367,7 @@
359 } 367 }
360 368
361 function addLink(data) { 369 function addLink(data) {
370 + fnTrace('addLink', data.payload.id);
362 var link = data.payload, 371 var link = data.payload,
363 lnk = createLink(link); 372 lnk = createLink(link);
364 if (lnk) { 373 if (lnk) {
...@@ -370,6 +379,7 @@ ...@@ -370,6 +379,7 @@
370 } 379 }
371 380
372 function addHost(data) { 381 function addHost(data) {
382 + fnTrace('addHost', data.payload.id);
373 var host = data.payload, 383 var host = data.payload,
374 node = createHostNode(host), 384 node = createHostNode(host),
375 lnk; 385 lnk;
...@@ -388,6 +398,7 @@ ...@@ -388,6 +398,7 @@
388 } 398 }
389 399
390 function updateDevice(data) { 400 function updateDevice(data) {
401 + fnTrace('updateDevice', data.payload.id);
391 var device = data.payload, 402 var device = data.payload,
392 id = device.id, 403 id = device.id,
393 nodeData = network.lookup[id]; 404 nodeData = network.lookup[id];
...@@ -400,6 +411,7 @@ ...@@ -400,6 +411,7 @@
400 } 411 }
401 412
402 function updateLink(data) { 413 function updateLink(data) {
414 + fnTrace('updateLink', data.payload.id);
403 var link = data.payload, 415 var link = data.payload,
404 id = link.id, 416 id = link.id,
405 linkData = network.lookup[id]; 417 linkData = network.lookup[id];
...@@ -412,6 +424,7 @@ ...@@ -412,6 +424,7 @@
412 } 424 }
413 425
414 function updateHost(data) { 426 function updateHost(data) {
427 + fnTrace('updateHost', data.payload.id);
415 var host = data.payload, 428 var host = data.payload,
416 id = host.id, 429 id = host.id,
417 hostData = network.lookup[id]; 430 hostData = network.lookup[id];
...@@ -424,6 +437,7 @@ ...@@ -424,6 +437,7 @@
424 } 437 }
425 438
426 function removeLink(data) { 439 function removeLink(data) {
440 + fnTrace('removeLink', data.payload.id);
427 var link = data.payload, 441 var link = data.payload,
428 id = link.id, 442 id = link.id,
429 linkData = network.lookup[id]; 443 linkData = network.lookup[id];
...@@ -435,6 +449,7 @@ ...@@ -435,6 +449,7 @@
435 } 449 }
436 450
437 function showPath(data) { 451 function showPath(data) {
452 + fnTrace('showPath', data.payload.id);
438 var links = data.payload.links, 453 var links = data.payload.links,
439 s = [ data.event + "\n" + links.length ]; 454 s = [ data.event + "\n" + links.length ];
440 links.forEach(function (d, i) { 455 links.forEach(function (d, i) {
...@@ -883,7 +898,7 @@ ...@@ -883,7 +898,7 @@
883 // remove from links array 898 // remove from links array
884 var idx = find(linkData.id, network.links); 899 var idx = find(linkData.id, network.links);
885 900
886 - network.links.splice(linkData.index, 1); 901 + network.links.splice(idx, 1);
887 // remove from SVG 902 // remove from SVG
888 updateLinks(); 903 updateLinks();
889 } 904 }
...@@ -1058,13 +1073,12 @@ ...@@ -1058,13 +1073,12 @@
1058 d3.json(urlSc, function(err, data) { 1073 d3.json(urlSc, function(err, data) {
1059 var p = data && data.params || {}, 1074 var p = data && data.params || {},
1060 desc = data && data.description || null, 1075 desc = data && data.description || null,
1061 - intro; 1076 + intro = data && data.title;
1062 1077
1063 if (err) { 1078 if (err) {
1064 view.alert('No scenario found:\n\n' + urlSc + '\n\n' + err); 1079 view.alert('No scenario found:\n\n' + urlSc + '\n\n' + err);
1065 } else { 1080 } else {
1066 sc.params = p; 1081 sc.params = p;
1067 - intro = "Scenario loaded: " + ctx + '\n\n' + data.title;
1068 if (desc) { 1082 if (desc) {
1069 intro += '\n\n ' + desc.join('\n '); 1083 intro += '\n\n ' + desc.join('\n ');
1070 } 1084 }
......