Fix: register a set of Affinity classes into distributed store

1. Purge group rules when issue k8s purge rules command.
2. Remove k8s port when remove OVS port.
3. Re-install group rules during sync rules.
4. Install: 1) install group rule; 2) install flow rule
   Uninstall: 1) uninstall flow rule; 2) uninstall group rule
5. Add/remove group buckets when receiving POD update/remove
   events.
6. Lower down the endpoint update logging level

Change-Id: Ib50e359a9b2c0cd9cb1490c6172864ad118b2247
diff --git a/apps/k8s-networking/api/src/main/java/org/onosproject/k8snetworking/api/K8sGroupRuleService.java b/apps/k8s-networking/api/src/main/java/org/onosproject/k8snetworking/api/K8sGroupRuleService.java
index fc935c0..d91b0be 100644
--- a/apps/k8s-networking/api/src/main/java/org/onosproject/k8snetworking/api/K8sGroupRuleService.java
+++ b/apps/k8s-networking/api/src/main/java/org/onosproject/k8snetworking/api/K8sGroupRuleService.java
@@ -39,4 +39,25 @@
      */
     void setRule(ApplicationId appId, DeviceId deviceId, int groupId,
                  Type type, List<GroupBucket> buckets, boolean install);
+
+    /**
+     * Checks whether has the group in store with given device ID and group ID.
+     *
+     * @param deviceId      device ID
+     * @param groupId       group ID
+     * @return true if the group exists, false otherwise
+     */
+    boolean hasGroup(DeviceId deviceId, int groupId);
+
+    /**
+     * Configures buckets to the existing group.
+     *
+     * @param appId         application ID
+     * @param deviceId      device ID
+     * @param groupId       group ID
+     * @param buckets       a list of group buckets
+     * @param install       true for buckets addition, false for buckets removal
+     */
+    void setBuckets(ApplicationId appId, DeviceId deviceId, int groupId,
+                    List<GroupBucket> buckets, boolean install);
 }