use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.group._case.GroupAction in project openflowplugin by opendaylight.
the class ReconcileUtilTest method createGroupWithPreconditions.
private Group createGroupWithPreconditions(final long groupIdValue, final long... requiredId) {
final List<Action> actionBag = new ArrayList<>();
for (long groupIdPrecondition : requiredId) {
final GroupAction groupAction = new GroupActionBuilder().setGroupId(groupIdPrecondition).build();
final GroupActionCase groupActionCase = new GroupActionCaseBuilder().setGroupAction(groupAction).build();
final Action action = new ActionBuilder().setAction(groupActionCase).build();
actionBag.add(action);
}
final Bucket bucket = new BucketBuilder().setAction(actionBag).build();
final Buckets buckets = new BucketsBuilder().setBucket(Collections.singletonList(bucket)).build();
return new GroupBuilder().setGroupId(new GroupId(groupIdValue)).setBuckets(buckets).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.group._case.GroupAction in project openflowplugin by opendaylight.
the class DSInputFactory method createGroupWithPreconditions.
public static Group createGroupWithPreconditions(final long groupIdValue, final long... requiredId) {
final List<Action> actionBag = new ArrayList<>();
for (long groupIdPrecondition : requiredId) {
final GroupAction groupAction = new GroupActionBuilder().setGroupId(groupIdPrecondition).build();
final GroupActionCase groupActionCase = new GroupActionCaseBuilder().setGroupAction(groupAction).build();
final Action action = new ActionBuilder().setAction(groupActionCase).build();
actionBag.add(action);
}
final Bucket bucket = new BucketBuilder().setAction(actionBag).build();
final Buckets buckets = new BucketsBuilder().setBucket(Collections.singletonList(bucket)).build();
return new GroupBuilder().setGroupId(new GroupId(groupIdValue)).setBuckets(buckets).build();
}
Aggregations