Committed by
Gerrit Code Review
[ONOS-4476]As with Group type is FAILOVER,watchPort&watchGroup does not set corr…
…ectly When builds the Group Modification Openflow message Change-Id: I344e3b03cd18e16f4e30ceb5b67ce9e55e871876
Showing
1 changed file
with
11 additions
and
2 deletions
providers/openflow/group/src/main/java/org/onosproject/provider/of/group/impl/GroupModBuilder.java
100644 → 100755
... | @@ -194,8 +194,17 @@ public final class GroupModBuilder { | ... | @@ -194,8 +194,17 @@ public final class GroupModBuilder { |
194 | if (type == GroupDescription.Type.SELECT) { | 194 | if (type == GroupDescription.Type.SELECT) { |
195 | bucketBuilder.setWeight(1); | 195 | bucketBuilder.setWeight(1); |
196 | } | 196 | } |
197 | - bucketBuilder.setWatchGroup(OFGroup.ANY); | 197 | + if (type == GroupDescription.Type.FAILOVER && bucket.watchPort() != null) { |
198 | - bucketBuilder.setWatchPort(OFPort.ANY); | 198 | + bucketBuilder.setWatchPort(OFPort.of((int) bucket.watchPort().toLong())); |
199 | + } else { | ||
200 | + bucketBuilder.setWatchPort(OFPort.ANY); | ||
201 | + } | ||
202 | + if (type == GroupDescription.Type.FAILOVER && bucket.watchGroup() != null) { | ||
203 | + bucketBuilder.setWatchGroup(OFGroup.of(bucket.watchGroup().id())); | ||
204 | + } else { | ||
205 | + bucketBuilder.setWatchGroup(OFGroup.ANY); | ||
206 | + } | ||
207 | + | ||
199 | OFBucket ofBucket = bucketBuilder.build(); | 208 | OFBucket ofBucket = bucketBuilder.build(); |
200 | ofBuckets.add(ofBucket); | 209 | ofBuckets.add(ofBucket); |
201 | } | 210 | } | ... | ... |
-
Please register or login to post a comment