Simon Hunt

Oops! Fix updateLink() function in topology view.

(also add linkupdate scenario).

Change-Id: Ic0f6753745e43c5fc76a6cb180a0c8a66178c657
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
230 d = result.ldata; 230 d = result.ldata;
231 231
232 if (bad) { 232 if (bad) {
233 - //logicError(bad + ': ' + link.id); 233 + $log.debug(bad + ': ' + link.id);
234 return; 234 return;
235 } 235 }
236 236
...@@ -255,10 +255,10 @@ ...@@ -255,10 +255,10 @@
255 var result = tms.findLink(data, 'update'), 255 var result = tms.findLink(data, 'update'),
256 bad = result.badLogic; 256 bad = result.badLogic;
257 if (bad) { 257 if (bad) {
258 - //logicError(bad + ': ' + link.id); 258 + $log.debug(bad + ': ' + link.id);
259 return; 259 return;
260 } 260 }
261 - result.updateWith(link); 261 + result.updateWith(data);
262 } 262 }
263 263
264 function removeLink(data) { 264 function removeLink(data) {
......
1 +{
2 + "event": "removeLink",
3 + "payload": {
4 + "id": "of:000000000000000a/1-of:000000000000000b/2",
5 + "type": "direct",
6 + "online": true,
7 + "linkWidth": 1.2,
8 + "src": "of:000000000000000a",
9 + "srcPort": "1",
10 + "dst": "of:000000000000000b",
11 + "dstPort": "2"
12 + }
13 +}
1 +{
2 + "event": "removeLink",
3 + "payload": {
4 + "id": "of:000000000000000b/2-of:000000000000000a/1",
5 + "type": "direct",
6 + "online": true,
7 + "linkWidth": 1.2,
8 + "src": "of:000000000000000b",
9 + "srcPort": "2",
10 + "dst": "of:000000000000000a",
11 + "dstPort": "1"
12 + }
13 +}
1 +{
2 + "event": "addInstance",
3 + "payload": {
4 + "id": "onos",
5 + "ip": "192.168.56.101",
6 + "online": true,
7 + "uiAttached": true,
8 + "switches": 2,
9 + "labels": [
10 + "onos",
11 + "192.168.56.101"
12 + ]
13 + }
14 +}
1 +{
2 + "event": "addDevice",
3 + "payload": {
4 + "id": "of:000000000000000a",
5 + "type": "switch",
6 + "online": true,
7 + "master": "onos",
8 + "labels": [
9 + "",
10 + "sw-A",
11 + "000000000000000a"
12 + ],
13 + "metaUi": {
14 + "x": 300,
15 + "y": 300
16 + }
17 + }
18 +}
1 +{
2 + "event": "addDevice",
3 + "payload": {
4 + "id": "of:000000000000000b",
5 + "type": "switch",
6 + "online": true,
7 + "master": "onos",
8 + "labels": [
9 + "",
10 + "sw-B",
11 + "000000000000000b"
12 + ],
13 + "metaUi": {
14 + "x": 500,
15 + "y": 310
16 + }
17 + }
18 +}
1 +{
2 + "event": "addLink",
3 + "payload": {
4 + "id": "of:000000000000000a/1-of:000000000000000b/2",
5 + "type": "direct",
6 + "online": true,
7 + "linkWidth": 1.2,
8 + "src": "of:000000000000000a",
9 + "srcPort": "1",
10 + "dst": "of:000000000000000b",
11 + "dstPort": "2"
12 + }
13 +}
1 +{
2 + "event": "addLink",
3 + "payload": {
4 + "id": "of:000000000000000b/2-of:000000000000000a/1",
5 + "type": "direct",
6 + "online": true,
7 + "linkWidth": 1.2,
8 + "src": "of:000000000000000b",
9 + "srcPort": "2",
10 + "dst": "of:000000000000000a",
11 + "dstPort": "1"
12 + }
13 +}
1 +{
2 + "event": "updateLink",
3 + "payload": {
4 + "id": "of:000000000000000a/1-of:000000000000000b/2",
5 + "type": "direct",
6 + "online": false,
7 + "linkWidth": 1.2,
8 + "src": "of:000000000000000a",
9 + "srcPort": "1",
10 + "dst": "of:000000000000000b",
11 + "dstPort": "2"
12 + }
13 +}
1 +{
2 + "event": "updateLink",
3 + "payload": {
4 + "id": "of:000000000000000b/2-of:000000000000000a/1",
5 + "type": "direct",
6 + "online": false,
7 + "linkWidth": 1.2,
8 + "src": "of:000000000000000b",
9 + "srcPort": "2",
10 + "dst": "of:000000000000000a",
11 + "dstPort": "1"
12 + }
13 +}
1 +{
2 + "event": "updateLink",
3 + "payload": {
4 + "id": "of:000000000000000a/1-of:000000000000000b/2",
5 + "type": "direct",
6 + "online": true,
7 + "linkWidth": 1.2,
8 + "src": "of:000000000000000a",
9 + "srcPort": "1",
10 + "dst": "of:000000000000000b",
11 + "dstPort": "2"
12 + }
13 +}
1 +{
2 + "event": "updateLink",
3 + "payload": {
4 + "id": "of:000000000000000b/2-of:000000000000000a/1",
5 + "type": "direct",
6 + "online": true,
7 + "linkWidth": 1.2,
8 + "src": "of:000000000000000b",
9 + "srcPort": "2",
10 + "dst": "of:000000000000000a",
11 + "dstPort": "1"
12 + }
13 +}
1 +{
2 + "title": "Link Update scenario",
3 + "description": [
4 + "Add two devices and one link (auto).",
5 + "Send a couple of updateLink events."
6 + ],
7 + "params": {
8 + "lastAuto": 5
9 + }
10 +}