Fix: re-order the flow rule and group rule install/uninstall sequence

Change-Id: Ifddee6ce181ba11acaec403fe55410a1ffd32538
diff --git a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingArpHandler.java b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingArpHandler.java
index 6eb882e..f061510 100644
--- a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingArpHandler.java
+++ b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingArpHandler.java
@@ -795,12 +795,26 @@
                                                     boolean isTunnel,
                                                     boolean install) {
 
-        // add group rule
+        if (install) {
+            processGroupTableRules(osNode, netId, true);
+            processFlowTableRules(osNode, segId, netId, isTunnel, true);
+        } else {
+            processFlowTableRules(osNode, segId, netId, isTunnel, false);
+            processGroupTableRules(osNode, netId, false);
+        }
+    }
+
+    private void processGroupTableRules(OpenstackNode osNode,
+                                        String netId, boolean install) {
         int groupId = netId.hashCode();
         osGroupRuleService.setRule(appId, osNode.intgBridge(), groupId,
                 ALL, Lists.newArrayList(), install);
+    }
 
-        // add flow rule
+    private void processFlowTableRules(OpenstackNode osNode,
+                                        String segId, String netId,
+                                        boolean isTunnel,
+                                        boolean install) {
         TrafficSelector.Builder sBuilder = DefaultTrafficSelector.builder()
                 .matchEthType(EthType.EtherType.ARP.ethType().toShort())
                 .matchArpOp(ARP.OP_REQUEST);