- org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.BucketsBuilder salBucketsDesc =
- new org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.BucketsBuilder();
- List<Bucket> allBuckets = new ArrayList<>();
- int bucketKey = 0;
- for(BucketsList bucketDetails : bucketDescStats){
- BucketBuilder bucketDesc = new BucketBuilder();
- List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action> convertedSalActions =
- ActionConvertor.toMDSalActions (bucketDetails.getAction(), ofVersion,
- ActionPath.GROUPDESCSTATSUPDATED_GROUPDESCSTATS_BUCKETS_BUCKET_ACTION);
-
- List<Action> actions = new ArrayList<>();
- int actionKey = 0;
- for (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action action : convertedSalActions){
- ActionBuilder wrappedAction = new ActionBuilder();
- wrappedAction.setAction(action);
- wrappedAction.setKey(new ActionKey(actionKey));
- wrappedAction.setOrder(actionKey);
- actions.add(wrappedAction.build());
- actionKey++;
- }
- bucketDesc.setAction(actions);
- bucketDesc.setWeight(bucketDetails.getWeight());
- bucketDesc.setWatchPort(bucketDetails.getWatchPort().getValue());
- bucketDesc.setWatchGroup(bucketDetails.getWatchGroup());
- BucketId bucketId = new BucketId((long)bucketKey);
- bucketDesc.setBucketId(bucketId);
- bucketDesc.setKey(new BucketKey(bucketId));
- bucketKey++;
- allBuckets.add(bucketDesc.build());
+ salGroupStats.setDuration(time.build());
+ salGroupStats.setGroupId(new GroupId(groupStats.getGroupId().getValue()));
+ salGroupStats.setPacketCount(new Counter64(groupStats.getPacketCount()));
+ salGroupStats.setRefCount(new Counter32(groupStats.getRefCount()));
+ salGroupStats.withKey(new GroupStatsKey(salGroupStats.getGroupId()));
+ convertedSALGroups.add(salGroupStats.build());