Support to inject external bridge into k8s node for external routing

1. Add group bucket related rules on receiving endpoint events
   rather than POD events.

Change-Id: I1152343cf8ff6bbccaed3dc34908a3affbc70980
diff --git a/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/impl/K8sNodeManagerTest.java b/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/impl/K8sNodeManagerTest.java
index a07d60e..fbccdd0 100644
--- a/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/impl/K8sNodeManagerTest.java
+++ b/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/impl/K8sNodeManagerTest.java
@@ -76,10 +76,15 @@
     private static final Device MINION_2_INTG_DEVICE = createDevice(2);
     private static final Device MINION_3_INTG_DEVICE = createDevice(3);
 
+    private static final Device MINION_1_EXT_DEVICE = createDevice(4);
+    private static final Device MINION_2_EXT_DEVICE = createDevice(5);
+    private static final Device MINION_3_EXT_DEVICE = createDevice(6);
+
     private static final K8sNode MINION_1 = createNode(
             MINION_1_HOSTNAME,
             MINION,
             MINION_1_INTG_DEVICE,
+            MINION_1_EXT_DEVICE,
             IpAddress.valueOf("10.100.0.1"),
             INIT
     );
@@ -87,6 +92,7 @@
             MINION_2_HOSTNAME,
             MINION,
             MINION_2_INTG_DEVICE,
+            MINION_2_EXT_DEVICE,
             IpAddress.valueOf("10.100.0.2"),
             INIT
     );
@@ -94,6 +100,7 @@
             MINION_3_HOSTNAME,
             MINION,
             MINION_3_INTG_DEVICE,
+            MINION_3_EXT_DEVICE,
             IpAddress.valueOf("10.100.0.3"),
             COMPLETE
     );
@@ -320,12 +327,13 @@
     }
 
     private static K8sNode createNode(String hostname, K8sNode.Type type,
-                                      Device intgBridge, IpAddress ipAddr,
-                                      K8sNodeState state) {
+                                      Device intgBridge, Device extBridge,
+                                      IpAddress ipAddr, K8sNodeState state) {
         return DefaultK8sNode.builder()
                 .hostname(hostname)
                 .type(type)
                 .intgBridge(intgBridge.id())
+                .extBridge(extBridge.id())
                 .managementIp(ipAddr)
                 .dataIp(ipAddr)
                 .state(state)
diff --git a/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/web/K8sNodeWebResourceTest.java b/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/web/K8sNodeWebResourceTest.java
index 90f7d0d..207bd0e 100644
--- a/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/web/K8sNodeWebResourceTest.java
+++ b/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/web/K8sNodeWebResourceTest.java
@@ -94,6 +94,7 @@
                 .dataIp(IpAddress.valueOf("10.134.34.222"))
                 .managementIp(IpAddress.valueOf("10.134.231.30"))
                 .intgBridge(DeviceId.deviceId("of:00000000000000a1"))
+                .extBridge(DeviceId.deviceId("of:00000000000000b1"))
                 .state(K8sNodeState.INIT)
                 .build();
 
diff --git a/apps/k8s-node/app/src/test/resources/org/onosproject/k8snode/codec/K8sMinionNode.json b/apps/k8s-node/app/src/test/resources/org/onosproject/k8snode/codec/K8sMinionNode.json
index a6760f5..9ed649e 100644
--- a/apps/k8s-node/app/src/test/resources/org/onosproject/k8snode/codec/K8sMinionNode.json
+++ b/apps/k8s-node/app/src/test/resources/org/onosproject/k8snode/codec/K8sMinionNode.json
@@ -3,5 +3,6 @@
   "type": "MINION",
   "managementIp": "172.16.130.4",
   "dataIp": "172.16.130.4",
-  "integrationBridge": "of:00000000000000a1"
+  "integrationBridge": "of:00000000000000a1",
+  "externalBridge": "of:00000000000000b1"
 }
\ No newline at end of file
diff --git a/apps/k8s-node/app/src/test/resources/org/onosproject/k8snode/web/k8s-node-minion-config.json b/apps/k8s-node/app/src/test/resources/org/onosproject/k8snode/web/k8s-node-minion-config.json
index 725766e..8c65bb5 100644
--- a/apps/k8s-node/app/src/test/resources/org/onosproject/k8snode/web/k8s-node-minion-config.json
+++ b/apps/k8s-node/app/src/test/resources/org/onosproject/k8snode/web/k8s-node-minion-config.json
@@ -5,7 +5,8 @@
       "type" : "MINION",
       "managementIp" : "10.134.231.32",
       "dataIp" : "10.134.34.224",
-      "integrationBridge" : "of:00000000000000a2"
+      "integrationBridge" : "of:00000000000000a2",
+      "externalBridge" : "of:00000000000000b2"
     }
   ]
 }
\ No newline at end of file