Bug fix for Dell driver to use dummy group as flow-actions

Change-Id: I2ca81217ad8a51fe0f8f907a1befaa0fd947e40f
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java
index 049e0c5..ad235f9 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java
@@ -1116,11 +1116,18 @@
             }
         }
 
-        @SuppressWarnings("unused")
         public GroupKey key() {
             return key;
         }
 
+        public boolean dummy() {
+            return dummy;
+        }
+
+        public TrafficTreatment treatment() {
+            return treatment;
+        }
+
         @Override
         public byte[] data() {
             return appKryo.serialize(this);
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTPDell.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTPDell.java
index e1249a9..8043e24 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTPDell.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTPDell.java
@@ -137,15 +137,26 @@
 
             if (next != null) {
                 SpringOpenGroup soGroup = appKryo.deserialize(next.data());
-                Group group = groupService.getGroup(deviceId, soGroup.key());
+                if (soGroup.dummy()) {
+                    log.debug("Adding {} flow-actions for fwd. obj. {} -> next:{} "
+                            + "in dev: {}", soGroup.treatment().allInstructions().size(),
+                            fwd.id(), fwd.nextId(), deviceId);
+                    for (Instruction ins : soGroup.treatment().allInstructions()) {
+                        treatmentBuilder.add(ins);
+                    }
+                } else {
+                    Group group = groupService.getGroup(deviceId, soGroup.key());
 
-                if (group == null) {
-                    log.warn("The group left!");
-                    fail(fwd, ObjectiveError.GROUPMISSING);
-                    return Collections.emptySet();
+                    if (group == null) {
+                        log.warn("The group left!");
+                        fail(fwd, ObjectiveError.GROUPMISSING);
+                        return Collections.emptySet();
+                    }
+                    treatmentBuilder.group(group.id());
+                    log.debug("Adding OUTGROUP action to group:{} for fwd. obj. {} "
+                            + "for next:{} in dev: {}", group.id(), fwd.id(),
+                            fwd.nextId(), deviceId);
                 }
-                treatmentBuilder.group(group.id());
-                log.debug("Adding OUTGROUP action");
             } else {
                 log.warn("processSpecific: No associated next objective object");
                 fail(fwd, ObjectiveError.GROUPMISSING);