X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=applications%2Fforwardingrules-sync%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fapplications%2Ffrsync%2Fimpl%2FDSInputFactory.java;h=2fdf40625904b8bf797cb7a3bfd40b1e6501a7d7;hb=05f8db12159673d0e0a95642fe86e62c14b7dc7b;hp=2d8eb77c7e943d51be3dfed2a67945bef61ba5fd;hpb=864f9b901d0afa8267f8d91de83ebca978fb3553;p=openflowplugin.git diff --git a/applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/DSInputFactory.java b/applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/DSInputFactory.java index 2d8eb77c7e..2fdf406259 100644 --- a/applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/DSInputFactory.java +++ b/applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/DSInputFactory.java @@ -1,11 +1,10 @@ -/** +/* * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.openflowplugin.applications.frsync.impl; import java.util.ArrayList; @@ -20,6 +19,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.acti import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.output.action._case.OutputActionBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionKey; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowId; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.Meter; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.MeterBuilder; @@ -45,12 +45,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.meter /** * Provides create methods for dataObjects involved in - * {@link org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener} by inventory. + * {@link org.opendaylight.mdsal.binding.api.DataTreeChangeListener} by inventory. */ -public class DSInputFactory { +public final class DSInputFactory { + private DSInputFactory() { + } + public static Group createGroup(final long groupIdValue) { final Buckets buckets = new BucketsBuilder() - .setBucket(Collections.emptyList()) + .setBucket(Collections.emptyList()) .build(); return new GroupBuilder() .setGroupId(new GroupId(groupIdValue)) @@ -131,6 +134,7 @@ public class DSInputFactory { public static Group createGroupWithPreconditions(final long groupIdValue, final long... requiredId) { final List actionBag = new ArrayList<>(); + int key = 0; for (long groupIdPrecondition : requiredId) { final GroupAction groupAction = new GroupActionBuilder() .setGroupId(groupIdPrecondition) @@ -140,6 +144,7 @@ public class DSInputFactory { .build(); final Action action = new ActionBuilder() .setAction(groupActionCase) + .withKey(new ActionKey(key++)) .build(); actionBag.add(action); }