GUI -- Added routerId to AnnotationKeys; added test scenario for multi-homed hosts (routers).

Change-Id: Ief5f23fa1678152d5375a2b54fe5735c9632d588
diff --git a/core/api/src/main/java/org/onosproject/net/AnnotationKeys.java b/core/api/src/main/java/org/onosproject/net/AnnotationKeys.java
index b7c8a32..8427d76 100644
--- a/core/api/src/main/java/org/onosproject/net/AnnotationKeys.java
+++ b/core/api/src/main/java/org/onosproject/net/AnnotationKeys.java
@@ -80,6 +80,10 @@
      */
     public static final String PORT_NAME = "portName";
 
+    /**
+     * Annotation key for the router ID.
+     */
+    public static final String ROUTER_ID = "routerId";
 
     /**
      * Returns the value annotated object for the specified annotation key.
diff --git a/web/gui/src/test/_karma/ev/multiHomed/ev_1_addInstanceA.json b/web/gui/src/test/_karma/ev/multiHomed/ev_1_addInstanceA.json
new file mode 100644
index 0000000..ea1fa0f
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/multiHomed/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/multiHomed/ev_2_addInstanceB.json b/web/gui/src/test/_karma/ev/multiHomed/ev_2_addInstanceB.json
new file mode 100644
index 0000000..5b09dec
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/multiHomed/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/multiHomed/ev_3_addDevice_08.json b/web/gui/src/test/_karma/ev/multiHomed/ev_3_addDevice_08.json
new file mode 100644
index 0000000..029dec1
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/multiHomed/ev_3_addDevice_08.json
@@ -0,0 +1,18 @@
+{
+  "event": "addDevice",
+  "payload": {
+    "id": "of:0000ffffffff0008",
+    "type": "switch",
+    "online": true,
+    "master": "myInstA",
+    "labels": [
+      "",
+      "switch-8",
+      "0000ffffffff0008"
+    ],
+    "metaUi": {
+      "x": 520,
+      "y": 350
+    }
+  }
+}
diff --git a/web/gui/src/test/_karma/ev/multiHomed/ev_4_addDevice_03.json b/web/gui/src/test/_karma/ev/multiHomed/ev_4_addDevice_03.json
new file mode 100644
index 0000000..39aa5cf
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/multiHomed/ev_4_addDevice_03.json
@@ -0,0 +1,18 @@
+{
+  "event": "addDevice",
+  "payload": {
+    "id": "of:0000ffffffff0003",
+    "type": "switch",
+    "online": true,
+    "master": "myInstB",
+    "labels": [
+      "",
+      "switch-3",
+      "0000ffffffff0003"
+    ],
+    "metaUi": {
+      "x": 800,
+      "y": 280
+    }
+  }
+}
diff --git a/web/gui/src/test/_karma/ev/multiHomed/ev_5_addLink_03_08.json b/web/gui/src/test/_karma/ev/multiHomed/ev_5_addLink_03_08.json
new file mode 100644
index 0000000..755255a
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/multiHomed/ev_5_addLink_03_08.json
@@ -0,0 +1,16 @@
+{
+  "event": "addLink",
+  "payload": {
+    "id": "of:0000ffffffff0003/21-of:0000ffffffff0008/20",
+    "type": "direct",
+    "online": true,
+    "linkWidth": 2,
+    "src": "of:0000ffffffff0003",
+    "srcPort": "21",
+    "dst": "of:0000ffffffff0008",
+    "dstPort": "20",
+    "props" : {
+      "BW": "70 Gb"
+    }
+  }
+}
diff --git a/web/gui/src/test/_karma/ev/multiHomed/ev_6_addHost_03.json b/web/gui/src/test/_karma/ev/multiHomed/ev_6_addHost_03.json
new file mode 100644
index 0000000..0862d61
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/multiHomed/ev_6_addHost_03.json
@@ -0,0 +1,19 @@
+{
+  "event": "addHost",
+  "payload": {
+    "id": "0E:2A:69:30:13:86/-1",
+    "ingress": "0E:2A:69:30:13:86/-1/0-of:0000ffffffff0003/2",
+    "egress": "of:0000ffffffff0003/2-0E:2A:69:30:13:86/-1/0",
+    "cp": {
+      "device": "of:0000ffffffff0003",
+      "port": 2
+    },
+    "labels": [
+      "192.168.1.201",
+      "0E:2A:69:30:13:86"
+    ],
+    "props": {
+      "routerId": "router-one"
+    }
+  }
+}
diff --git a/web/gui/src/test/_karma/ev/multiHomed/ev_7_addHost_08.json b/web/gui/src/test/_karma/ev/multiHomed/ev_7_addHost_08.json
new file mode 100644
index 0000000..ed49aae
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/multiHomed/ev_7_addHost_08.json
@@ -0,0 +1,19 @@
+{
+  "event": "addHost",
+  "payload": {
+    "id": "A6:96:E5:03:52:5F/-1",
+    "ingress": "A6:96:E5:03:52:5F/-1/0-of:0000ffffffff0008/1",
+    "egress": "of:0000ffffffff0008/1-A6:96:E5:03:52:5F/-1/0",
+    "cp": {
+      "device": "of:0000ffffffff0008",
+      "port": 1
+    },
+    "labels": [
+      "192.168.1.202",
+      "A6:96:E5:03:52:5F"
+    ],
+    "props": {
+      "routerId": "router-one"
+    }
+  }
+}
diff --git a/web/gui/src/test/_karma/ev/multiHomed/scenario.json b/web/gui/src/test/_karma/ev/multiHomed/scenario.json
new file mode 100644
index 0000000..a720ab8
--- /dev/null
+++ b/web/gui/src/test/_karma/ev/multiHomed/scenario.json
@@ -0,0 +1,21 @@
+{
+  "comments": [
+    "Add two devices and one link (auto), and two 'hosts'.",
+    "But the hosts are the same box with two NICs."
+  ],
+  "title": "Multi-Homed Scenario",
+  "params": {
+    "lastAuto": 0
+  },
+  "description": [
+    "Simple sequence of events...",
+    "",
+    "1. add instance A",
+    "2. add instance B",
+    "3. add device [8]",
+    "4. add device [3]",
+    "5. add link [3] --> [8]",
+    "6. add host (to [3])",
+    "7. add host (to [8])"
+  ]
+}