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 {
OFBucket.Builder bucketBuilder = factory.buildBucket();
bucketBuilder.setActions(actions);
if (type == GroupDescription.Type.SELECT) {
bucketBuilder.setWeight(1);
bucketBuilder.setWeight(bucket.weight());
}
if (type == GroupDescription.Type.FAILOVER && bucket.watchPort() != null) {
......@@ -192,7 +192,7 @@ public final class GroupModBuilder {
OFBucket.Builder bucketBuilder = factory.buildBucket();
bucketBuilder.setActions(actions);
if (type == GroupDescription.Type.SELECT) {
bucketBuilder.setWeight(1);
bucketBuilder.setWeight(bucket.weight());
}
if (type == GroupDescription.Type.FAILOVER && bucket.watchPort() != null) {
bucketBuilder.setWatchPort(OFPort.of((int) bucket.watchPort().toLong()));
......