Fixed issue with 'moveHost' event handling in the topo view, to
handle multi-homed hosts.
Change-Id: If605388b00aef70ffc89639b60bb88b22f0469d6
(cherry picked from commit 7df764f5ef87a0a205ad4abee0882389ff1892bd)
diff --git a/web/gui/src/test/_karma/ev/dualHomed/ev_1_addInstance.json b/web/gui/src/test/_karma/ev/dualHomed/ev_1_addInstance.json
new file mode 100644
index 0000000..daf074b
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/dualHomed/ev_1_addInstance.json
@@ -0,0 +1,15 @@
+{
+ "event": "addInstance",
+ "payload": {
+ "id": "127.0.0.1",
+ "ip": "127.0.0.1",
+ "online": true,
+ "ready": true,
+ "uiAttached": true,
+ "switches": 2,
+ "labels": [
+ "127.0.0.1",
+ "127.0.0.1"
+ ]
+ }
+}
diff --git a/web/gui/src/test/_karma/ev/dualHomed/ev_2_addDevice_01.json b/web/gui/src/test/_karma/ev/dualHomed/ev_2_addDevice_01.json
new file mode 100644
index 0000000..c30ea6b
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/dualHomed/ev_2_addDevice_01.json
@@ -0,0 +1,19 @@
+{
+ "event": "addDevice",
+ "payload": {
+ "id": "of:0000000000000001",
+ "type": "switch",
+ "online": true,
+ "master": "127.0.0.1",
+ "labels": [
+ "",
+ "of:0000000000000001",
+ "of:0000000000000001"
+ ],
+ "props": {
+ "managementAddress": "192.168.36.101",
+ "protocol": "OF_13",
+ "channelId": "192.168.36.101:55710"
+ }
+ }
+}
diff --git a/web/gui/src/test/_karma/ev/dualHomed/ev_3_addDevice_02.json b/web/gui/src/test/_karma/ev/dualHomed/ev_3_addDevice_02.json
new file mode 100644
index 0000000..2fde4a6
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/dualHomed/ev_3_addDevice_02.json
@@ -0,0 +1,19 @@
+{
+ "event": "addDevice",
+ "payload": {
+ "id": "of:0000000000000002",
+ "type": "switch",
+ "online": true,
+ "master": "127.0.0.1",
+ "labels": [
+ "",
+ "of:0000000000000002",
+ "of:0000000000000002"
+ ],
+ "props": {
+ "managementAddress": "192.168.36.101",
+ "protocol": "OF_13",
+ "channelId": "192.168.36.101:55712"
+ }
+ }
+}
diff --git a/web/gui/src/test/_karma/ev/dualHomed/ev_4_addLink_1to2.json b/web/gui/src/test/_karma/ev/dualHomed/ev_4_addLink_1to2.json
new file mode 100644
index 0000000..3ce5e3a
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/dualHomed/ev_4_addLink_1to2.json
@@ -0,0 +1,14 @@
+{
+ "event": "addLink",
+ "payload": {
+ "id": "of:0000000000000001/2-of:0000000000000002/2",
+ "type": "direct",
+ "expected": false,
+ "online": true,
+ "linkWidth": 1.2,
+ "src": "of:0000000000000001",
+ "srcPort": "2",
+ "dst": "of:0000000000000002",
+ "dstPort": "2"
+ }
+}
diff --git a/web/gui/src/test/_karma/ev/dualHomed/ev_5_addLink_2to1.json b/web/gui/src/test/_karma/ev/dualHomed/ev_5_addLink_2to1.json
new file mode 100644
index 0000000..ad4562e
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/dualHomed/ev_5_addLink_2to1.json
@@ -0,0 +1,14 @@
+{
+ "event": "addLink",
+ "payload": {
+ "id": "of:0000000000000002/2-of:0000000000000001/2",
+ "type": "direct",
+ "expected": false,
+ "online": true,
+ "linkWidth": 1.2,
+ "src": "of:0000000000000002",
+ "srcPort": "2",
+ "dst": "of:0000000000000001",
+ "dstPort": "2"
+ }
+}
diff --git a/web/gui/src/test/_karma/ev/dualHomed/ev_6_addHost_to1.json b/web/gui/src/test/_karma/ev/dualHomed/ev_6_addHost_to1.json
new file mode 100644
index 0000000..6a234a6
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/dualHomed/ev_6_addHost_to1.json
@@ -0,0 +1,23 @@
+{
+ "event": "addHost",
+ "payload": {
+ "id": "00:00:00:00:00:01/None",
+ "type": "endstation",
+ "cp": {
+ "device": "of:0000000000000001",
+ "port": 1
+ },
+ "allCps": [
+ {
+ "device": "of:0000000000000001",
+ "port": 1
+ }
+ ],
+ "labels": [
+ "10.0.0.1",
+ "10.0.0.1",
+ "00:00:00:00:00:01"
+ ],
+ "props": {}
+ }
+}
diff --git a/web/gui/src/test/_karma/ev/dualHomed/ev_7_updateDevice_01.json b/web/gui/src/test/_karma/ev/dualHomed/ev_7_updateDevice_01.json
new file mode 100644
index 0000000..214d10b
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/dualHomed/ev_7_updateDevice_01.json
@@ -0,0 +1,28 @@
+{
+ "event": "updateDevice",
+ "payload": {
+ "id": "of:0000000000000001",
+ "type": "switch",
+ "online": true,
+ "master": "127.0.0.1",
+ "labels": [
+ "",
+ "SW-A",
+ "of:0000000000000001"
+ ],
+ "props": {
+ "managementAddress": "192.168.36.101",
+ "protocol": "OF_13",
+ "latitude": "43.37",
+ "name": "SW-A",
+ "locType": "geo",
+ "channelId": "192.168.36.101:55710",
+ "longitude": "-104.6572"
+ },
+ "location": {
+ "locType": "geo",
+ "latOrY": 43.37,
+ "longOrX": -104.6572
+ }
+ }
+}
diff --git a/web/gui/src/test/_karma/ev/dualHomed/ev_8_updateDevice_02.json b/web/gui/src/test/_karma/ev/dualHomed/ev_8_updateDevice_02.json
new file mode 100644
index 0000000..3fbb1d4
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/dualHomed/ev_8_updateDevice_02.json
@@ -0,0 +1,28 @@
+{
+ "event": "updateDevice",
+ "payload": {
+ "id": "of:0000000000000002",
+ "type": "switch",
+ "online": true,
+ "master": "127.0.0.1",
+ "labels": [
+ "",
+ "SW-B",
+ "of:0000000000000002"
+ ],
+ "props": {
+ "managementAddress": "192.168.36.101",
+ "protocol": "OF_13",
+ "latitude": "38.5189",
+ "name": "SW-B",
+ "locType": "geo",
+ "channelId": "192.168.36.101:55712",
+ "longitude": "-109.2781"
+ },
+ "location": {
+ "locType": "geo",
+ "latOrY": 38.5189,
+ "longOrX": -109.2781
+ }
+ }
+}
diff --git a/web/gui/src/test/_karma/ev/dualHomed/ev_9_moveHost.json b/web/gui/src/test/_karma/ev/dualHomed/ev_9_moveHost.json
new file mode 100644
index 0000000..195208c
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/dualHomed/ev_9_moveHost.json
@@ -0,0 +1,41 @@
+{
+ "event": "moveHost",
+ "payload": {
+ "id": "00:00:00:00:00:01/None",
+ "type": "endstation",
+ "cp": {
+ "device": "of:0000000000000001",
+ "port": 1
+ },
+ "prevCp": {
+ "device": "of:0000000000000001",
+ "port": 1
+ },
+ "allCps": [
+ {
+ "device": "of:0000000000000001",
+ "port": 1
+ },
+ {
+ "device": "of:0000000000000002",
+ "port": 1
+ }
+ ],
+ "labels": [
+ "Host-X",
+ "10.0.0.1",
+ "00:00:00:00:00:01"
+ ],
+ "props": {
+ "name": "Host-X",
+ "locType": "geo",
+ "latitude": "39.9444",
+ "longitude": "-91.7822"
+ },
+ "location": {
+ "locType": "geo",
+ "latOrY": 39.9444,
+ "longOrX": -91.7822
+ }
+ }
+}
diff --git a/web/gui/src/test/_karma/ev/dualHomed/scenario.json b/web/gui/src/test/_karma/ev/dualHomed/scenario.json
new file mode 100644
index 0000000..a640d38
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/dualHomed/scenario.json
@@ -0,0 +1,22 @@
+{
+ "comments": [
+ "Single Host connected to two devices (Dual-Homed)."
+ ],
+ "title": "Dual-Homed Scenario",
+ "params": {
+ "lastAuto": 0
+ },
+ "description": [
+ "Simple sequence of events...",
+ "",
+ "1. add instance",
+ "2. add device [1]",
+ "3. add device [2]",
+ "4. add link [1] --> [2]",
+ "5. add link [2] --> [1]",
+ "6. add host (to [1])",
+ "7. update device [1]",
+ "8. update device [2]",
+ "9. move host (to include [2])"
+ ]
+}