Eliminate some leftovers from codegen change.
Change-Id: I6f81e7a59020f512c68a9cddb84c78bd5c33d275
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
*/
public final class L3VpnMcastIpv4RIBSupport
extends AbstractL3vpnMcastIpRIBSupport<L3vpnMcastRoutesIpv4Case, L3vpnMcastRoutesIpv4> {
- private static final L3vpnMcastRoutesIpv4 EMPTY_CONTAINER
- = new L3vpnMcastRoutesIpv4Builder().setL3vpnMcastRoute(Collections.emptyList()).build();
+ private static final L3vpnMcastRoutesIpv4 EMPTY_CONTAINER = new L3vpnMcastRoutesIpv4Builder().build();
private static L3VpnMcastIpv4RIBSupport SINGLETON;
*/
public final class L3VpnMcastIpv6RIBSupport
extends AbstractL3vpnMcastIpRIBSupport<L3vpnMcastRoutesIpv6Case, L3vpnMcastRoutesIpv6> {
- private static final L3vpnMcastRoutesIpv6 EMPTY_CONTAINER
- = new L3vpnMcastRoutesIpv6Builder().setL3vpnMcastRoute(Collections.emptyList()).build();
+ private static final L3vpnMcastRoutesIpv6 EMPTY_CONTAINER = new L3vpnMcastRoutesIpv6Builder().build();
private static L3VpnMcastIpv6RIBSupport SINGLETON;
import static com.google.common.base.Verify.verify;
-import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.vpn.rev180329.l3vpn.ip.route.VpnRouteKey;
public final class VpnIpv4RIBSupport extends AbstractVpnRIBSupport<VpnIpv4RoutesCase, VpnIpv4Routes> {
- private static final VpnIpv4Routes EMPTY_CONTAINER
- = new VpnIpv4RoutesBuilder().setVpnRoute(Collections.emptyList()).build();
+ private static final VpnIpv4Routes EMPTY_CONTAINER = new VpnIpv4RoutesBuilder().build();
private static VpnIpv4RIBSupport SINGLETON;
/**
import static com.google.common.base.Verify.verify;
-import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.vpn.rev180329.l3vpn.ip.route.VpnRouteKey;
public final class VpnIpv6RIBSupport extends AbstractVpnRIBSupport<VpnIpv6RoutesCase, VpnIpv6Routes> {
- private static final VpnIpv6Routes EMPTY_CONTAINER
- = new VpnIpv6RoutesBuilder().setVpnRoute(Collections.emptyList()).build();
+ private static final VpnIpv6Routes EMPTY_CONTAINER = new VpnIpv6RoutesBuilder().build();
private static VpnIpv6RIBSupport SINGLETON;
/**
import com.google.common.collect.ImmutableSet;
import java.util.Collection;
import java.util.Collections;
-import org.junit.Assert;
+import java.util.Map;
import org.junit.Test;
import org.opendaylight.mdsal.binding.spec.reflect.BindingReflections;
import org.opendaylight.protocol.bgp.rib.spi.AbstractRIBSupportTest;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.common.Uint32;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode;
.setRouteDistinguisher(RD)
.setPrefix(IPV4_PREFIX)
.build();
- private static final L3vpnMcastRoutesIpv4 MCAST_L3VPN_ROUTES
- = new L3vpnMcastRoutesIpv4Builder().setL3vpnMcastRoute(Collections.singletonList(ROUTE)).build();
+ private static final L3vpnMcastRoutesIpv4 MCAST_L3VPN_ROUTES = new L3vpnMcastRoutesIpv4Builder()
+ .setL3vpnMcastRoute(Map.of(ROUTE.key(), ROUTE))
+ .build();
private static final L3vpnMcastDestination MCAST_L3VPN_DESTINATION = new L3vpnMcastDestinationBuilder()
.setRouteDistinguisher(RD)
assertEquals(ROUTE, route);
}
-
@Test
public void testEmptyRoute() {
- Assert.assertEquals(createEmptyTable(), this.ribSupport.emptyTable());
+ assertEquals(createEmptyTable(), this.ribSupport.emptyTable());
}
@Test
@Test
public void testCacheableNlriObjects() {
- Assert.assertEquals(ImmutableSet.of(L3vpnMcastRoutesIpv4Case.class), this.ribSupport.cacheableNlriObjects());
+ assertEquals(ImmutableSet.of(L3vpnMcastRoutesIpv4Case.class), this.ribSupport.cacheableNlriObjects());
}
@Test
public void testCacheableAttributeObjects() {
- Assert.assertEquals(ImmutableSet.of(), this.ribSupport.cacheableAttributeObjects());
+ assertEquals(ImmutableSet.of(), this.ribSupport.cacheableAttributeObjects());
}
@Test
public void testRouteIdAddPath() {
- Assert.assertEquals(ROUTE_KEY, this.ribSupport.createRouteListKey(ROUTE_KEY.getPathId(),
- ROUTE_KEY.getRouteKey()));
+ assertEquals(ROUTE_KEY, this.ribSupport.createRouteListKey(ROUTE_KEY.getPathId(), ROUTE_KEY.getRouteKey()));
}
@Test
public void testRoutePath() {
- final YangInstanceIdentifier.NodeIdentifierWithPredicates prefixNii = createRouteNIWP(MCAST_L3VPN_ROUTES);
+ final NodeIdentifierWithPredicates prefixNii = createRouteNIWP(MCAST_L3VPN_ROUTES);
final YangInstanceIdentifier expected = getRoutePath().node(prefixNii);
final YangInstanceIdentifier actual = this.ribSupport.routePath(getTablePath(), prefixNii);
assertEquals(expected, actual);
@Test
public void testRouteAttributesIdentifier() {
- Assert.assertEquals(new YangInstanceIdentifier.NodeIdentifier(
- Attributes.QNAME.withModule(BindingReflections.getQNameModule(L3vpnMcastRoutesIpv4Case.class))),
- this.ribSupport.routeAttributesIdentifier());
+ assertEquals(new NodeIdentifier(Attributes.QNAME.bindTo(
+ BindingReflections.getQNameModule(L3vpnMcastRoutesIpv4Case.class))),
+ this.ribSupport.routeAttributesIdentifier());
}
@Test
public void testRoutesCaseClass() {
- Assert.assertEquals(L3vpnMcastRoutesIpv4Case.class, this.ribSupport.routesCaseClass());
+ assertEquals(L3vpnMcastRoutesIpv4Case.class, this.ribSupport.routesCaseClass());
}
@Test
public void testRoutesContainerClass() {
- Assert.assertEquals(L3vpnMcastRoutesIpv4.class, this.ribSupport.routesContainerClass());
+ assertEquals(L3vpnMcastRoutesIpv4.class, this.ribSupport.routesContainerClass());
}
@Test
public void testRoutesListClass() {
- Assert.assertEquals(L3vpnMcastRoute.class, this.ribSupport.routesListClass());
+ assertEquals(L3vpnMcastRoute.class, this.ribSupport.routesListClass());
}
@Test
import com.google.common.collect.ImmutableSet;
import java.util.Collection;
import java.util.Collections;
-import org.junit.Assert;
+import java.util.Map;
import org.junit.Test;
import org.opendaylight.mdsal.binding.spec.reflect.BindingReflections;
import org.opendaylight.protocol.bgp.rib.spi.AbstractRIBSupportTest;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.common.Uint32;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode;
.setPrefix(IPV6_PREFIX)
.build();
private static final L3vpnMcastRoutesIpv6 MCAST_L3VPN_ROUTES
- = new L3vpnMcastRoutesIpv6Builder().setL3vpnMcastRoute(Collections.singletonList(ROUTE)).build();
+ = new L3vpnMcastRoutesIpv6Builder().setL3vpnMcastRoute(Map.of(ROUTE.key(), ROUTE)).build();
private static final L3vpnMcastDestination MCAST_L3VPN_DESTINATION = new L3vpnMcastDestinationBuilder()
.setRouteDistinguisher(RD)
@Test
public void testEmptyRoute() {
- Assert.assertEquals(createEmptyTable(), this.ribSupport.emptyTable());
+ assertEquals(createEmptyTable(), this.ribSupport.emptyTable());
}
@Test
@Test
public void testCacheableNlriObjects() {
- Assert.assertEquals(ImmutableSet.of(L3vpnMcastRoutesIpv6Case.class), this.ribSupport.cacheableNlriObjects());
+ assertEquals(ImmutableSet.of(L3vpnMcastRoutesIpv6Case.class), this.ribSupport.cacheableNlriObjects());
}
@Test
public void testCacheableAttributeObjects() {
- Assert.assertEquals(ImmutableSet.of(), this.ribSupport.cacheableAttributeObjects());
+ assertEquals(ImmutableSet.of(), this.ribSupport.cacheableAttributeObjects());
}
@Test
public void testRouteIdAddPath() {
- Assert.assertEquals(ROUTE_KEY, this.ribSupport.createRouteListKey(ROUTE_KEY.getPathId(),
+ assertEquals(ROUTE_KEY, this.ribSupport.createRouteListKey(ROUTE_KEY.getPathId(),
ROUTE_KEY.getRouteKey()));
}
@Test
public void testRoutePath() {
- final YangInstanceIdentifier.NodeIdentifierWithPredicates prefixNii = createRouteNIWP(MCAST_L3VPN_ROUTES);
+ final NodeIdentifierWithPredicates prefixNii = createRouteNIWP(MCAST_L3VPN_ROUTES);
final YangInstanceIdentifier expected = getRoutePath().node(prefixNii);
final YangInstanceIdentifier actual = this.ribSupport.routePath(getTablePath(), prefixNii);
assertEquals(expected, actual);
@Test
public void testRouteAttributesIdentifier() {
- Assert.assertEquals(new YangInstanceIdentifier.NodeIdentifier(
- Attributes.QNAME.withModule(BindingReflections.getQNameModule(L3vpnMcastRoutesIpv6Case.class))),
- this.ribSupport.routeAttributesIdentifier());
+ assertEquals(new NodeIdentifier(Attributes.QNAME.bindTo(
+ BindingReflections.getQNameModule(L3vpnMcastRoutesIpv6Case.class))),
+ this.ribSupport.routeAttributesIdentifier());
}
@Test
public void testRoutesCaseClass() {
- Assert.assertEquals(L3vpnMcastRoutesIpv6Case.class, this.ribSupport.routesCaseClass());
+ assertEquals(L3vpnMcastRoutesIpv6Case.class, this.ribSupport.routesCaseClass());
}
@Test
public void testRoutesContainerClass() {
- Assert.assertEquals(L3vpnMcastRoutesIpv6.class, this.ribSupport.routesContainerClass());
+ assertEquals(L3vpnMcastRoutesIpv6.class, this.ribSupport.routesContainerClass());
}
@Test
public void testRoutesListClass() {
- Assert.assertEquals(L3vpnMcastRoute.class, this.ribSupport.routesListClass());
+ assertEquals(L3vpnMcastRoute.class, this.ribSupport.routesListClass());
}
@Test
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.LabelStack;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.LabelStackBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
assertEquals(mpReachExpected, testBuilder.build());
final ByteBuf output = Unpooled.buffer();
- PARSER.serializeAttribute(
- new AttributesBuilder().addAugmentation(Attributes1.class,
- new Attributes1Builder().setMpReachNlri(mpReachExpected).build()
- ).build(), output
- );
+ PARSER.serializeAttribute(new AttributesBuilder()
+ .addAugmentation(new Attributes1Builder().setMpReachNlri(mpReachExpected).build())
+ .build(), output);
assertArrayEquals(REACH_NLRI, ByteArray.readAllBytes(output));
}
assertEquals(mpUnreachExpected1, testBuilder.build());
final ByteBuf output = Unpooled.buffer();
- PARSER.serializeAttribute(
- new AttributesBuilder().addAugmentation(Attributes2.class,
- new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected2).build()
- ).build(), output
- );
+ PARSER.serializeAttribute(new AttributesBuilder()
+ .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected2).build())
+ .build(), output);
assertArrayEquals(UNREACH_NLRI, ByteArray.readAllBytes(output));
}
}
import com.google.common.collect.ImmutableSet;
import java.util.Collection;
import java.util.Collections;
+import java.util.Map;
import org.junit.Assert;
import org.junit.Test;
import org.opendaylight.protocol.bgp.rib.spi.AbstractRIBSupportTest;
.setAttributes(ATTRIBUTES).setPrefix(IPV4_PREFIX)
.setLabelStack(LABEL_STACK).setRouteDistinguisher(DISTINGUISHER).withKey(ROUTE_KEY).build();
private static final VpnIpv4Routes ROUTES = new VpnIpv4RoutesBuilder()
- .setVpnRoute(Collections.singletonList(ROUTE)).build();
+ .setVpnRoute(Map.of(ROUTE.key(), ROUTE)).build();
@Override
public void setUp() throws Exception {
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.LabelStack;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.LabelStackBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
assertEquals(mpReachExpected, testBuilder.build());
final ByteBuf output = Unpooled.buffer();
- PARSER.serializeAttribute(
- new AttributesBuilder().addAugmentation(Attributes1.class,
- new Attributes1Builder().setMpReachNlri(mpReachExpected).build()
- ).build(), output
- );
+ PARSER.serializeAttribute(new AttributesBuilder()
+ .addAugmentation(new Attributes1Builder().setMpReachNlri(mpReachExpected).build())
+ .build(), output);
assertArrayEquals(REACH_NLRI, ByteArray.readAllBytes(output));
}
assertEquals(mpUnreachExpected1, testBuilder.build());
final ByteBuf output = Unpooled.buffer();
- PARSER.serializeAttribute(
- new AttributesBuilder().addAugmentation(Attributes2.class,
- new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected2).build()
- ).build(), output
- );
+ PARSER.serializeAttribute(new AttributesBuilder()
+ .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected2).build())
+ .build(), output);
assertArrayEquals(UNREACH_NLRI, ByteArray.readAllBytes(output));
}
}
import com.google.common.collect.Lists;
import java.util.Collection;
import java.util.Collections;
+import java.util.Map;
import org.junit.Assert;
import org.junit.Test;
import org.opendaylight.protocol.bgp.rib.spi.AbstractRIBSupportTest;
.setAttributes(ATTRIBUTES).setPrefix(IPV6PREFIX)
.setLabelStack(LABEL_STACK).setRouteDistinguisher(DISTINGUISHER).withKey(ROUTE_KEY).build();
private static final VpnIpv6Routes ROUTES = new VpnIpv6RoutesBuilder()
- .setVpnRoute(Collections.singletonList(ROUTE)).build();
+ .setVpnRoute(Map.of(ROUTE.key(), ROUTE)).build();
@Override
public void setUp() throws Exception {