Modified GroupAction class to use NeightborSet

Change-Id: Icc54a4125025dcec383c1215e8ad285bae957f98
diff --git a/src/main/java/net/onrc/onos/apps/segmentrouting/SegmentRoutingManager.java b/src/main/java/net/onrc/onos/apps/segmentrouting/SegmentRoutingManager.java
index 8482e74..60cf0b1 100644
--- a/src/main/java/net/onrc/onos/apps/segmentrouting/SegmentRoutingManager.java
+++ b/src/main/java/net/onrc/onos/apps/segmentrouting/SegmentRoutingManager.java
@@ -13,6 +13,7 @@
 import java.util.concurrent.TimeUnit;
 
 import net.floodlightcontroller.core.IFloodlightProviderService;
+import net.floodlightcontroller.core.IOF13Switch.NeighborSet;
 import net.floodlightcontroller.core.module.FloodlightModuleContext;
 import net.floodlightcontroller.core.module.FloodlightModuleException;
 import net.floodlightcontroller.core.module.IFloodlightModule;
@@ -468,7 +469,7 @@
                     net.onrc.onos.core.matchaction.MatchActionOperations.Operator.ADD,
                     matchAction);
 
-        MatchActionOperationEntry(maEntry);
+        printMatchActionOperationEntry(sw, maEntry);
 
     }
 
@@ -518,7 +519,7 @@
                     net.onrc.onos.core.matchaction.MatchActionOperations.Operator.ADD,
                     matchAction);
 
-        MatchActionOperationEntry(maEntry);
+        printMatchActionOperationEntry(sw, maEntry);
 
     }
 
@@ -528,9 +529,9 @@
      *
      * @param maEntry
      */
-    private void MatchActionOperationEntry(MatchActionOperationEntry maEntry) {
+    private void printMatchActionOperationEntry(Switch sw, MatchActionOperationEntry maEntry) {
 
-        StringBuilder logStr = new StringBuilder();
+        StringBuilder logStr = new StringBuilder("In switch " + sw.getDpid() + ", ");
 
         MatchAction ma = maEntry.getTarget();
         Match m = ma.getMatch();
@@ -562,10 +563,9 @@
             }
             else if (action instanceof GroupAction) {
                 logStr.append("Forward packet to < ");
-                List<Dpid> dpids = ((GroupAction)action).getDpids();
-                for (Dpid dpid: dpids) {
-                    logStr.append(dpid.toString() + ",");
-                }
+                NeighborSet dpids = ((GroupAction)action).getDpids();
+                logStr.append(dpids.toString() + ",");
+
             }
             else if (action instanceof PopMplsAction) {
                 logStr.append("Pop MPLS label, ");
diff --git a/src/main/java/net/onrc/onos/core/matchaction/action/GroupAction.java b/src/main/java/net/onrc/onos/core/matchaction/action/GroupAction.java
index 77dd7ff..5dfdfae 100644
--- a/src/main/java/net/onrc/onos/core/matchaction/action/GroupAction.java
+++ b/src/main/java/net/onrc/onos/core/matchaction/action/GroupAction.java
@@ -1,22 +1,20 @@
 package net.onrc.onos.core.matchaction.action;
 
-import java.util.ArrayList;
-import java.util.List;
-
+import net.floodlightcontroller.core.IOF13Switch.NeighborSet;
 import net.onrc.onos.core.util.Dpid;
 
 public class GroupAction implements Action {
-    List<Dpid> fwdSws;
+    NeighborSet fwdSws;
 
     public GroupAction() {
-        fwdSws = new ArrayList<Dpid>();
+        fwdSws = new NeighborSet();
     }
 
     public void addSwitch(Dpid d) {
-        fwdSws.add(d);
+        fwdSws.addDpid(d);
     }
 
-    public List<Dpid> getDpids() {
+    public NeighborSet getDpids() {
         return fwdSws;
     }
 }