Committed by
Gerrit Code Review
Bug fix for Dell driver to use dummy group as flow-actions
Change-Id: I2ca81217ad8a51fe0f8f907a1befaa0fd947e40f
Showing
2 changed files
with
20 additions
and
2 deletions
| ... | @@ -1116,11 +1116,18 @@ public class SpringOpenTTP extends AbstractHandlerBehaviour | ... | @@ -1116,11 +1116,18 @@ public class SpringOpenTTP extends AbstractHandlerBehaviour |
| 1116 | } | 1116 | } |
| 1117 | } | 1117 | } |
| 1118 | 1118 | ||
| 1119 | - @SuppressWarnings("unused") | ||
| 1120 | public GroupKey key() { | 1119 | public GroupKey key() { |
| 1121 | return key; | 1120 | return key; |
| 1122 | } | 1121 | } |
| 1123 | 1122 | ||
| 1123 | + public boolean dummy() { | ||
| 1124 | + return dummy; | ||
| 1125 | + } | ||
| 1126 | + | ||
| 1127 | + public TrafficTreatment treatment() { | ||
| 1128 | + return treatment; | ||
| 1129 | + } | ||
| 1130 | + | ||
| 1124 | @Override | 1131 | @Override |
| 1125 | public byte[] data() { | 1132 | public byte[] data() { |
| 1126 | return appKryo.serialize(this); | 1133 | return appKryo.serialize(this); | ... | ... |
| ... | @@ -137,6 +137,14 @@ public class SpringOpenTTPDell extends SpringOpenTTP { | ... | @@ -137,6 +137,14 @@ public class SpringOpenTTPDell extends SpringOpenTTP { |
| 137 | 137 | ||
| 138 | if (next != null) { | 138 | if (next != null) { |
| 139 | SpringOpenGroup soGroup = appKryo.deserialize(next.data()); | 139 | SpringOpenGroup soGroup = appKryo.deserialize(next.data()); |
| 140 | + if (soGroup.dummy()) { | ||
| 141 | + log.debug("Adding {} flow-actions for fwd. obj. {} -> next:{} " | ||
| 142 | + + "in dev: {}", soGroup.treatment().allInstructions().size(), | ||
| 143 | + fwd.id(), fwd.nextId(), deviceId); | ||
| 144 | + for (Instruction ins : soGroup.treatment().allInstructions()) { | ||
| 145 | + treatmentBuilder.add(ins); | ||
| 146 | + } | ||
| 147 | + } else { | ||
| 140 | Group group = groupService.getGroup(deviceId, soGroup.key()); | 148 | Group group = groupService.getGroup(deviceId, soGroup.key()); |
| 141 | 149 | ||
| 142 | if (group == null) { | 150 | if (group == null) { |
| ... | @@ -145,7 +153,10 @@ public class SpringOpenTTPDell extends SpringOpenTTP { | ... | @@ -145,7 +153,10 @@ public class SpringOpenTTPDell extends SpringOpenTTP { |
| 145 | return Collections.emptySet(); | 153 | return Collections.emptySet(); |
| 146 | } | 154 | } |
| 147 | treatmentBuilder.group(group.id()); | 155 | treatmentBuilder.group(group.id()); |
| 148 | - log.debug("Adding OUTGROUP action"); | 156 | + log.debug("Adding OUTGROUP action to group:{} for fwd. obj. {} " |
| 157 | + + "for next:{} in dev: {}", group.id(), fwd.id(), | ||
| 158 | + fwd.nextId(), deviceId); | ||
| 159 | + } | ||
| 149 | } else { | 160 | } else { |
| 150 | log.warn("processSpecific: No associated next objective object"); | 161 | log.warn("processSpecific: No associated next objective object"); |
| 151 | fail(fwd, ObjectiveError.GROUPMISSING); | 162 | fail(fwd, ObjectiveError.GROUPMISSING); | ... | ... |
-
Please register or login to post a comment