Victor Silva

[ONOS-5166] GroupModBuilder: no longer ignore weights

We provide an interface for assigning weights to buckets
in a group and thus we should not silently ignore it.
Properly set bucket weight to bucket.weight().

Change-Id: I7dce89e793140ee365a016f4bf26f0ccf206b8dd
...@@ -152,7 +152,7 @@ public final class GroupModBuilder { ...@@ -152,7 +152,7 @@ public final class GroupModBuilder {
152 OFBucket.Builder bucketBuilder = factory.buildBucket(); 152 OFBucket.Builder bucketBuilder = factory.buildBucket();
153 bucketBuilder.setActions(actions); 153 bucketBuilder.setActions(actions);
154 if (type == GroupDescription.Type.SELECT) { 154 if (type == GroupDescription.Type.SELECT) {
155 - bucketBuilder.setWeight(1); 155 + bucketBuilder.setWeight(bucket.weight());
156 } 156 }
157 157
158 if (type == GroupDescription.Type.FAILOVER && bucket.watchPort() != null) { 158 if (type == GroupDescription.Type.FAILOVER && bucket.watchPort() != null) {
...@@ -192,7 +192,7 @@ public final class GroupModBuilder { ...@@ -192,7 +192,7 @@ public final class GroupModBuilder {
192 OFBucket.Builder bucketBuilder = factory.buildBucket(); 192 OFBucket.Builder bucketBuilder = factory.buildBucket();
193 bucketBuilder.setActions(actions); 193 bucketBuilder.setActions(actions);
194 if (type == GroupDescription.Type.SELECT) { 194 if (type == GroupDescription.Type.SELECT) {
195 - bucketBuilder.setWeight(1); 195 + bucketBuilder.setWeight(bucket.weight());
196 } 196 }
197 if (type == GroupDescription.Type.FAILOVER && bucket.watchPort() != null) { 197 if (type == GroupDescription.Type.FAILOVER && bucket.watchPort() != null) {
198 bucketBuilder.setWatchPort(OFPort.of((int) bucket.watchPort().toLong())); 198 bucketBuilder.setWatchPort(OFPort.of((int) bucket.watchPort().toLong()));
......