use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupType in project openflowplugin by opendaylight.
the class GroupConvertor method salToOFBucketList.
private List<BucketsList> salToOFBucketList(Buckets buckets, short version, int groupType, BigInteger datapathid) {
final List<BucketsList> bucketLists = new ArrayList<>();
final ActionConvertorData data = new ActionConvertorData(version);
data.setDatapathId(datapathid);
for (org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket groupBucket : buckets.getBucket()) {
BucketsListBuilder bucketBuilder = new BucketsListBuilder();
salToOFBucketListWeight(groupBucket, bucketBuilder, groupType);
salToOFBucketListWatchGroup(groupBucket, bucketBuilder, groupType);
salToOFBucketListWatchPort(groupBucket, bucketBuilder, groupType);
Optional<List<Action>> bucketActionList = getConvertorExecutor().convert(groupBucket.getAction(), data);
bucketBuilder.setAction(bucketActionList.orElse(Collections.emptyList()));
BucketsList bucket = bucketBuilder.build();
bucketLists.add(bucket);
}
return bucketLists;
}
Aggregations