From: Claudio D. Gasparini Date: Sun, 11 Mar 2018 12:28:18 +0000 (+0100) Subject: BGPCEP-574: Remove unnesary methods X-Git-Tag: release/fluorine~189 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=ae65429b47dddf682bb54c6b3217b4c1dddbee2f;p=bgpcep.git BGPCEP-574: Remove unnesary methods - remove extract key - remove extract changed routes Change-Id: I6bc6e83be77edcc8312dde8509ebd18051d888ee Signed-off-by: Claudio D. Gasparini --- diff --git a/bgp/evpn/src/main/java/org/opendaylight/protocol/bgp/evpn/impl/EvpnRibSupport.java b/bgp/evpn/src/main/java/org/opendaylight/protocol/bgp/evpn/impl/EvpnRibSupport.java index f401bf22db..f6aaa0b3ad 100644 --- a/bgp/evpn/src/main/java/org/opendaylight/protocol/bgp/evpn/impl/EvpnRibSupport.java +++ b/bgp/evpn/src/main/java/org/opendaylight/protocol/bgp/evpn/impl/EvpnRibSupport.java @@ -48,8 +48,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.UnkeyedListNode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -final class EvpnRibSupport extends AbstractRIBSupport { +final class EvpnRibSupport extends AbstractRIBSupport { private static final EvpnRibSupport SINGLETON = new EvpnRibSupport(); private static final Logger LOG = LoggerFactory.getLogger(EvpnRibSupport.class); private static final QName ROUTE_KEY_QNAME = QName.create(EvpnRoute.QNAME, ROUTE_KEY).intern(); @@ -126,11 +125,6 @@ final class EvpnRibSupport extends AbstractRIBSupport changedRoutes(final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns - .yang.bgp.evpn.rev171213.bgp.rib.rib.peer.adj.rib.in.tables.routes.EvpnRoutesCase routes) { - final EvpnRoutes routeCont = routes.getEvpnRoutes(); - if (routeCont == null) { - return Collections.emptyList(); - } - return routeCont.getEvpnRoute(); - } } diff --git a/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/AbstractFlowspecRIBSupport.java b/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/AbstractFlowspecRIBSupport.java index 14c7e74329..b8b494f234 100644 --- a/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/AbstractFlowspecRIBSupport.java +++ b/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/AbstractFlowspecRIBSupport.java @@ -35,8 +35,8 @@ import org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild; import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode; public abstract class AbstractFlowspecRIBSupport - extends MultiPathAbstractRIBSupport { + R extends Route, S extends Identifier> + extends MultiPathAbstractRIBSupport { protected final T nlriParser; protected AbstractFlowspecRIBSupport( diff --git a/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/FlowspecIpv4RIBSupport.java b/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/FlowspecIpv4RIBSupport.java index 5e6d3cec06..4ba2fefca8 100644 --- a/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/FlowspecIpv4RIBSupport.java +++ b/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/FlowspecIpv4RIBSupport.java @@ -22,8 +22,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mess import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv4AddressFamily; public final class FlowspecIpv4RIBSupport extends AbstractFlowspecRIBSupport { + FlowspecRoute, FlowspecRouteKey> { public FlowspecIpv4RIBSupport(SimpleFlowspecExtensionProviderContext context) { super( @@ -43,11 +42,6 @@ public final class FlowspecIpv4RIBSupport extends AbstractFlowspecRIBSupport changedRoutes(final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns - .yang.bgp.flowspec.rev171207.bgp.rib.rib.peer.adj.rib.in.tables.routes.FlowspecRoutesCase routes) { - final FlowspecRoutes routesCont = routes.getFlowspecRoutes(); - if (routesCont == null) { - return Collections.emptyList(); - } - return routesCont.getFlowspecRoute(); - } - @Override public FlowspecRouteKey createNewRouteKey(final PathId pathId, final FlowspecRouteKey routeKey) { return new FlowspecRouteKey(pathId, routeKey.getRouteKey()); diff --git a/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/FlowspecIpv6RIBSupport.java b/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/FlowspecIpv6RIBSupport.java index 16e1c64d5e..2c3d6896a3 100644 --- a/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/FlowspecIpv6RIBSupport.java +++ b/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/FlowspecIpv6RIBSupport.java @@ -7,8 +7,6 @@ */ package org.opendaylight.protocol.bgp.flowspec; -import java.util.Collection; -import java.util.Collections; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.FlowspecSubsequentAddressFamily; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.bgp.rib.rib.loc.rib.tables.routes.FlowspecIpv6RoutesCase; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.flowspec.destination.ipv6.DestinationFlowspec; @@ -21,8 +19,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mess import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv6AddressFamily; public final class FlowspecIpv6RIBSupport extends AbstractFlowspecRIBSupport { + FlowspecRoute, FlowspecRouteKey> { public FlowspecIpv6RIBSupport(SimpleFlowspecExtensionProviderContext context) { super( @@ -42,11 +39,6 @@ public final class FlowspecIpv6RIBSupport extends AbstractFlowspecRIBSupport changedRoutes(final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns - .yang.bgp.flowspec.rev171207.bgp.rib.rib.peer.adj.rib.in.tables.routes.FlowspecIpv6RoutesCase routes) { - final FlowspecIpv6Routes routesCont = routes.getFlowspecIpv6Routes(); - if (routesCont == null) { - return Collections.emptyList(); - } - return routesCont.getFlowspecRoute(); - } - @Override public FlowspecRouteKey createNewRouteKey(final PathId pathId, final FlowspecRouteKey routeKey) { return new FlowspecRouteKey(pathId, routeKey.getRouteKey()); diff --git a/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/l3vpn/AbstractFlowspecL3vpnRIBSupport.java b/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/l3vpn/AbstractFlowspecL3vpnRIBSupport.java index 441b3cec45..a3c80e81a4 100644 --- a/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/l3vpn/AbstractFlowspecL3vpnRIBSupport.java +++ b/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/l3vpn/AbstractFlowspecL3vpnRIBSupport.java @@ -29,8 +29,8 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdent import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode; public abstract class AbstractFlowspecL3vpnRIBSupport - - extends AbstractFlowspecRIBSupport { + + extends AbstractFlowspecRIBSupport { private final NodeIdentifier routeDistinguisherNID; protected AbstractFlowspecL3vpnRIBSupport( diff --git a/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/l3vpn/ipv4/FlowspecL3vpnIpv4RIBSupport.java b/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/l3vpn/ipv4/FlowspecL3vpnIpv4RIBSupport.java index 1651e9595e..51fe882f93 100644 --- a/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/l3vpn/ipv4/FlowspecL3vpnIpv4RIBSupport.java +++ b/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/l3vpn/ipv4/FlowspecL3vpnIpv4RIBSupport.java @@ -7,8 +7,6 @@ */ package org.opendaylight.protocol.bgp.flowspec.l3vpn.ipv4; -import java.util.Collection; -import java.util.Collections; import org.opendaylight.protocol.bgp.flowspec.SimpleFlowspecExtensionProviderContext; import org.opendaylight.protocol.bgp.flowspec.l3vpn.AbstractFlowspecL3vpnRIBSupport; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.bgp.rib.rib.loc.rib.tables.routes.FlowspecL3vpnIpv4RoutesCase; @@ -22,8 +20,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mess import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv4AddressFamily; public final class FlowspecL3vpnIpv4RIBSupport extends AbstractFlowspecL3vpnRIBSupport { + FlowspecL3vpnRoute, FlowspecL3vpnRouteKey> { public FlowspecL3vpnIpv4RIBSupport(final SimpleFlowspecExtensionProviderContext context) { super( @@ -47,11 +44,6 @@ public final class FlowspecL3vpnIpv4RIBSupport extends AbstractFlowspecL3vpnRIBS return new FlowspecL3vpnRouteKey(pathId, routeKey.getRouteKey()); } - @Override - public FlowspecL3vpnRouteKey extractRouteKey(final FlowspecL3vpnRoute route) { - return route.getKey(); - } - @Override public FlowspecL3vpnRoute createRoute( final FlowspecL3vpnRoute route, @@ -66,14 +58,4 @@ public final class FlowspecL3vpnIpv4RIBSupport extends AbstractFlowspecL3vpnRIBS } return builder.setRouteKey(routeKey.getRouteKey()).setPathId(pathId).setAttributes(attributes).build(); } - - @Override - public Collection changedRoutes(final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml - .ns.yang.bgp.flowspec.rev171207.bgp.rib.rib.peer.adj.rib.in.tables.routes.FlowspecL3vpnIpv4RoutesCase routes) { - final FlowspecL3vpnIpv4Routes routeCont = routes.getFlowspecL3vpnIpv4Routes(); - if (routeCont == null) { - return Collections.emptyList(); - } - return routeCont.getFlowspecL3vpnRoute(); - } } diff --git a/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/l3vpn/ipv6/FlowspecL3vpnIpv6RIBSupport.java b/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/l3vpn/ipv6/FlowspecL3vpnIpv6RIBSupport.java index 794f67517e..b246759eeb 100644 --- a/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/l3vpn/ipv6/FlowspecL3vpnIpv6RIBSupport.java +++ b/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/l3vpn/ipv6/FlowspecL3vpnIpv6RIBSupport.java @@ -7,8 +7,6 @@ */ package org.opendaylight.protocol.bgp.flowspec.l3vpn.ipv6; -import java.util.Collection; -import java.util.Collections; import org.opendaylight.protocol.bgp.flowspec.SimpleFlowspecExtensionProviderContext; import org.opendaylight.protocol.bgp.flowspec.l3vpn.AbstractFlowspecL3vpnRIBSupport; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.bgp.rib.rib.loc.rib.tables.routes.FlowspecL3vpnIpv6RoutesCase; @@ -21,10 +19,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mess import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.Attributes; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv6AddressFamily; -public final class FlowspecL3vpnIpv6RIBSupport - extends AbstractFlowspecL3vpnRIBSupport { +public final class FlowspecL3vpnIpv6RIBSupport extends AbstractFlowspecL3vpnRIBSupport { private FlowspecL3vpnIpv6RIBSupport(SimpleFlowspecExtensionProviderContext context) { super( FlowspecL3vpnIpv6RoutesCase.class, @@ -47,11 +43,6 @@ public final class FlowspecL3vpnIpv6RIBSupport return new FlowspecL3vpnRouteKey(pathId, routeKey.getRouteKey()); } - @Override - public FlowspecL3vpnRouteKey extractRouteKey(final FlowspecL3vpnRoute route) { - return route.getKey(); - } - @Override public FlowspecL3vpnRoute createRoute( final FlowspecL3vpnRoute route, @@ -66,14 +57,4 @@ public final class FlowspecL3vpnIpv6RIBSupport } return builder.setRouteKey(routeKey.getRouteKey()).setPathId(pathId).setAttributes(attributes).build(); } - - @Override - public Collection changedRoutes(final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml - .ns.yang.bgp.flowspec.rev171207.bgp.rib.rib.peer.adj.rib.in.tables.routes.FlowspecL3vpnIpv6RoutesCase routes) { - final FlowspecL3vpnIpv6Routes routeCont = routes.getFlowspecL3vpnIpv6Routes(); - if (routeCont == null) { - return Collections.emptyList(); - } - return routeCont.getFlowspecL3vpnRoute(); - } } diff --git a/bgp/inet/src/main/java/org/opendaylight/protocol/bgp/inet/AbstractIPRibSupport.java b/bgp/inet/src/main/java/org/opendaylight/protocol/bgp/inet/AbstractIPRibSupport.java index 45e212ce4d..af48af6717 100644 --- a/bgp/inet/src/main/java/org/opendaylight/protocol/bgp/inet/AbstractIPRibSupport.java +++ b/bgp/inet/src/main/java/org/opendaylight/protocol/bgp/inet/AbstractIPRibSupport.java @@ -36,8 +36,7 @@ import org.slf4j.LoggerFactory; /** * Common {@link org.opendaylight.protocol.bgp.rib.spi.RIBSupport} class for IPv4 and IPv6 addresses. */ -abstract class AbstractIPRibSupport - extends MultiPathAbstractRIBSupport { +abstract class AbstractIPRibSupport extends MultiPathAbstractRIBSupport { private static final Logger LOG = LoggerFactory.getLogger(AbstractIPRibSupport.class); private final NodeIdentifier prefixNid; private final NodeIdentifier nlriRoutesList; diff --git a/bgp/inet/src/main/java/org/opendaylight/protocol/bgp/inet/IPv4RIBSupport.java b/bgp/inet/src/main/java/org/opendaylight/protocol/bgp/inet/IPv4RIBSupport.java index 592f6ed102..eb010764e2 100644 --- a/bgp/inet/src/main/java/org/opendaylight/protocol/bgp/inet/IPv4RIBSupport.java +++ b/bgp/inet/src/main/java/org/opendaylight/protocol/bgp/inet/IPv4RIBSupport.java @@ -9,7 +9,6 @@ package org.opendaylight.protocol.bgp.inet; import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.List; import javax.annotation.Nonnull; import org.opendaylight.protocol.bgp.parser.spi.PathIdUtil; @@ -35,9 +34,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNodes; /** * Class supporting IPv4 unicast RIBs. */ -final class IPv4RIBSupport extends AbstractIPRibSupport { +final class IPv4RIBSupport extends AbstractIPRibSupport { private static final IPv4RIBSupport SINGLETON = new IPv4RIBSupport(); @@ -77,11 +74,6 @@ final class IPv4RIBSupport extends AbstractIPRibSupport changedRoutes(final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang - .bgp.inet.rev171207.bgp.rib.rib.peer.adj.rib.in.tables.routes.Ipv4RoutesCase routes) { - final Ipv4Routes routeCont = routes.getIpv4Routes(); - if (routeCont == null) { - return Collections.emptyList(); - } - return routeCont.getIpv4Route(); - } - @Override public Ipv4RouteKey createNewRouteKey(final PathId pathId, final Ipv4RouteKey routeKey) { return new Ipv4RouteKey(pathId, routeKey.getPrefix()); diff --git a/bgp/inet/src/main/java/org/opendaylight/protocol/bgp/inet/IPv6RIBSupport.java b/bgp/inet/src/main/java/org/opendaylight/protocol/bgp/inet/IPv6RIBSupport.java index 56eb5ee73e..d65bf42194 100644 --- a/bgp/inet/src/main/java/org/opendaylight/protocol/bgp/inet/IPv6RIBSupport.java +++ b/bgp/inet/src/main/java/org/opendaylight/protocol/bgp/inet/IPv6RIBSupport.java @@ -9,7 +9,6 @@ package org.opendaylight.protocol.bgp.inet; import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.List; import org.opendaylight.protocol.bgp.parser.spi.PathIdUtil; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix; @@ -33,8 +32,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNodes; /** * Class supporting IPv6 unicast RIBs. */ -final class IPv6RIBSupport extends AbstractIPRibSupport { +final class IPv6RIBSupport extends AbstractIPRibSupport { private static final IPv6RIBSupport SINGLETON = new IPv6RIBSupport(); @@ -72,11 +70,6 @@ final class IPv6RIBSupport extends AbstractIPRibSupport changedRoutes(final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang - .bgp.inet.rev171207.bgp.rib.rib.peer.adj.rib.in.tables.routes.Ipv6RoutesCase routes) { - final Ipv6Routes routeCont = routes.getIpv6Routes(); - if (routeCont == null) { - return Collections.emptyList(); - } - return routeCont.getIpv6Route(); - } - @Override public Ipv6RouteKey createNewRouteKey(final PathId pathId, final Ipv6RouteKey routeKey) { return new Ipv6RouteKey(pathId, routeKey.getPrefix()); diff --git a/bgp/l3vpn/src/main/java/org/opendaylight/protocol/bgp/l3vpn/AbstractVpnRIBSupport.java b/bgp/l3vpn/src/main/java/org/opendaylight/protocol/bgp/l3vpn/AbstractVpnRIBSupport.java index f1e0aa464a..c5f37495de 100644 --- a/bgp/l3vpn/src/main/java/org/opendaylight/protocol/bgp/l3vpn/AbstractVpnRIBSupport.java +++ b/bgp/l3vpn/src/main/java/org/opendaylight/protocol/bgp/l3vpn/AbstractVpnRIBSupport.java @@ -55,7 +55,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.UnkeyedListNode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public abstract class AbstractVpnRIBSupport extends AbstractRIBSupport { +public abstract class AbstractVpnRIBSupport extends AbstractRIBSupport { private static final Logger LOG = LoggerFactory.getLogger(AbstractVpnRIBSupport.class); private final NodeIdentifier nlriRoutesListNid; private final NodeIdentifier prefixTypeNid; @@ -192,12 +192,6 @@ public abstract class AbstractVpnRIBSupport extends AbstractRI return new NodeIdentifierWithPredicates(routeQName(), this.routeKey, ByteArray.encodeBase64(buffer)); } - - @Override - public final VpnRouteKey extractRouteKey(final VpnRoute route) { - return route.getKey(); - } - @Override public final VpnRoute createRoute( final VpnRoute route, diff --git a/bgp/l3vpn/src/main/java/org/opendaylight/protocol/bgp/l3vpn/ipv4/VpnIpv4RIBSupport.java b/bgp/l3vpn/src/main/java/org/opendaylight/protocol/bgp/l3vpn/ipv4/VpnIpv4RIBSupport.java index a5cb5c9f44..bcee4558f5 100644 --- a/bgp/l3vpn/src/main/java/org/opendaylight/protocol/bgp/l3vpn/ipv4/VpnIpv4RIBSupport.java +++ b/bgp/l3vpn/src/main/java/org/opendaylight/protocol/bgp/l3vpn/ipv4/VpnIpv4RIBSupport.java @@ -7,8 +7,6 @@ */ package org.opendaylight.protocol.bgp.l3vpn.ipv4; -import java.util.Collection; -import java.util.Collections; import java.util.List; import org.opendaylight.protocol.bgp.l3vpn.AbstractVpnRIBSupport; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix; @@ -24,8 +22,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.vpn. import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode; -final class VpnIpv4RIBSupport extends AbstractVpnRIBSupport { +final class VpnIpv4RIBSupport extends AbstractVpnRIBSupport { /** * Default constructor. Requires the QName of the container augmented under the routes choice * node in instantiations of the rib grouping. It is assumed that this container is defined by @@ -60,14 +57,4 @@ final class VpnIpv4RIBSupport extends AbstractVpnRIBSupport changedRoutes(final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang - .bgp.vpn.ipv4.rev171207.bgp.rib.rib.peer.adj.rib.in.tables.routes.VpnIpv4RoutesCase routes) { - final VpnIpv4Routes routeCont = routes.getVpnIpv4Routes(); - if (routeCont == null) { - return Collections.emptyList(); - } - return routeCont.getVpnRoute(); - } } diff --git a/bgp/l3vpn/src/main/java/org/opendaylight/protocol/bgp/l3vpn/ipv6/VpnIpv6RIBSupport.java b/bgp/l3vpn/src/main/java/org/opendaylight/protocol/bgp/l3vpn/ipv6/VpnIpv6RIBSupport.java index b2fafce3c2..38b69e4da8 100644 --- a/bgp/l3vpn/src/main/java/org/opendaylight/protocol/bgp/l3vpn/ipv6/VpnIpv6RIBSupport.java +++ b/bgp/l3vpn/src/main/java/org/opendaylight/protocol/bgp/l3vpn/ipv6/VpnIpv6RIBSupport.java @@ -7,8 +7,6 @@ */ package org.opendaylight.protocol.bgp.l3vpn.ipv6; -import java.util.Collection; -import java.util.Collections; import java.util.List; import org.opendaylight.protocol.bgp.l3vpn.AbstractVpnRIBSupport; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix; @@ -24,8 +22,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.vpn. import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode; -final class VpnIpv6RIBSupport extends AbstractVpnRIBSupport { +final class VpnIpv6RIBSupport extends AbstractVpnRIBSupport { /** * Default constructor. Requires the QName of the container augmented under the routes choice @@ -61,14 +58,4 @@ final class VpnIpv6RIBSupport extends AbstractVpnRIBSupport changedRoutes(final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang - .bgp.vpn.ipv6.rev171207.bgp.rib.rib.peer.adj.rib.in.tables.routes.VpnIpv6RoutesCase routes) { - final VpnIpv6Routes routeCont = routes.getVpnIpv6Routes(); - if (routeCont == null) { - return Collections.emptyList(); - } - return routeCont.getVpnRoute(); - } } diff --git a/bgp/labeled-unicast/src/main/java/org/opendaylight/protocol/bgp/labeled/unicast/AbstractLabeledUnicastRIBSupport.java b/bgp/labeled-unicast/src/main/java/org/opendaylight/protocol/bgp/labeled/unicast/AbstractLabeledUnicastRIBSupport.java index a242ca6ebc..b9a5928649 100644 --- a/bgp/labeled-unicast/src/main/java/org/opendaylight/protocol/bgp/labeled/unicast/AbstractLabeledUnicastRIBSupport.java +++ b/bgp/labeled-unicast/src/main/java/org/opendaylight/protocol/bgp/labeled/unicast/AbstractLabeledUnicastRIBSupport.java @@ -52,8 +52,8 @@ import org.opendaylight.yangtools.yang.data.api.schema.UnkeyedListNode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -abstract class AbstractLabeledUnicastRIBSupport - extends MultiPathAbstractRIBSupport { +abstract class AbstractLabeledUnicastRIBSupport + extends MultiPathAbstractRIBSupport { private static final NodeIdentifier PREFIX_TYPE_NID = NodeIdentifier.create(QName.create(CLabeledUnicastDestination.QNAME, "prefix").intern()); private static final NodeIdentifier LABEL_STACK_NID = NodeIdentifier.create(QName.create(CLabeledUnicastDestination.QNAME, "label-stack").intern()); private static final NodeIdentifier LV_NID = NodeIdentifier.create(QName.create(CLabeledUnicastDestination.QNAME, "label-value").intern()); @@ -167,11 +167,6 @@ abstract class AbstractLabeledUnicastRIBSupport return new LabeledUnicastRouteKey(pathId, routeKey.getRouteKey()); } - @Override - public final LabeledUnicastRouteKey extractRouteKey(final LabeledUnicastRoute route) { - return route.getKey(); - } - @Override public final LabeledUnicastRoute createRoute(final LabeledUnicastRoute route, final LabeledUnicastRouteKey routeKey, diff --git a/bgp/labeled-unicast/src/main/java/org/opendaylight/protocol/bgp/labeled/unicast/LabeledUnicastIpv4RIBSupport.java b/bgp/labeled-unicast/src/main/java/org/opendaylight/protocol/bgp/labeled/unicast/LabeledUnicastIpv4RIBSupport.java index 51c81ffe9e..62215376cb 100644 --- a/bgp/labeled-unicast/src/main/java/org/opendaylight/protocol/bgp/labeled/unicast/LabeledUnicastIpv4RIBSupport.java +++ b/bgp/labeled-unicast/src/main/java/org/opendaylight/protocol/bgp/labeled/unicast/LabeledUnicastIpv4RIBSupport.java @@ -8,7 +8,6 @@ package org.opendaylight.protocol.bgp.labeled.unicast; import java.util.Collection; -import java.util.Collections; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.LabeledUnicastSubsequentAddressFamily; @@ -25,14 +24,12 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgum import org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode; import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode; -public final class LabeledUnicastIpv4RIBSupport extends AbstractLabeledUnicastRIBSupport { +public final class LabeledUnicastIpv4RIBSupport extends AbstractLabeledUnicastRIBSupport { private static final LabeledUnicastIpv4RIBSupport SINGLETON = new LabeledUnicastIpv4RIBSupport(); private LabeledUnicastIpv4RIBSupport() { super(LabeledUnicastRoutesCase.class, LabeledUnicastRoutes.class, LabeledUnicastRoute.class, - Ipv4AddressFamily.class, LabeledUnicastSubsequentAddressFamily.class, DestinationLabeledUnicast.QNAME); + Ipv4AddressFamily.class, LabeledUnicastSubsequentAddressFamily.class, DestinationLabeledUnicast.QNAME); } static LabeledUnicastIpv4RIBSupport getInstance() { @@ -42,14 +39,14 @@ public final class LabeledUnicastIpv4RIBSupport extends AbstractLabeledUnicastRI @Override protected DestinationType buildDestination(final Collection routes) { return new DestinationLabeledUnicastCaseBuilder().setDestinationLabeledUnicast( - new DestinationLabeledUnicastBuilder().setCLabeledUnicastDestination(extractRoutes(routes)).build()).build(); + new DestinationLabeledUnicastBuilder().setCLabeledUnicastDestination(extractRoutes(routes)).build()).build(); } @Override protected DestinationType buildWithdrawnDestination(final Collection routes) { return new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationLabeledUnicastCaseBuilder().setDestinationLabeledUnicast( - new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.destination.labeled.unicast._case.DestinationLabeledUnicastBuilder().setCLabeledUnicastDestination( - extractRoutes(routes)).build()).build(); + new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.destination.labeled.unicast._case.DestinationLabeledUnicastBuilder().setCLabeledUnicastDestination( + extractRoutes(routes)).build()).build(); } @Override @@ -60,15 +57,4 @@ public final class LabeledUnicastIpv4RIBSupport extends AbstractLabeledUnicastRI } return null; } - - @Override - public Collection changedRoutes(final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml - .ns.yang.bgp.labeled.unicast.rev171207.bgp.rib.rib.peer.adj.rib.in.tables.routes - .LabeledUnicastRoutesCase routes) { - final LabeledUnicastRoutes routeCont = routes.getLabeledUnicastRoutes(); - if (routeCont == null) { - return Collections.emptyList(); - } - return routeCont.getLabeledUnicastRoute(); - } } diff --git a/bgp/labeled-unicast/src/main/java/org/opendaylight/protocol/bgp/labeled/unicast/LabeledUnicastIpv6RIBSupport.java b/bgp/labeled-unicast/src/main/java/org/opendaylight/protocol/bgp/labeled/unicast/LabeledUnicastIpv6RIBSupport.java index 376b6e0a16..ca3261028c 100644 --- a/bgp/labeled-unicast/src/main/java/org/opendaylight/protocol/bgp/labeled/unicast/LabeledUnicastIpv6RIBSupport.java +++ b/bgp/labeled-unicast/src/main/java/org/opendaylight/protocol/bgp/labeled/unicast/LabeledUnicastIpv6RIBSupport.java @@ -9,7 +9,6 @@ package org.opendaylight.protocol.bgp.labeled.unicast; import java.util.Collection; -import java.util.Collections; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.LabeledUnicastSubsequentAddressFamily; @@ -25,14 +24,12 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode; import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode; -final class LabeledUnicastIpv6RIBSupport extends AbstractLabeledUnicastRIBSupport { +final class LabeledUnicastIpv6RIBSupport extends AbstractLabeledUnicastRIBSupport { private static final LabeledUnicastIpv6RIBSupport SINGLETON = new LabeledUnicastIpv6RIBSupport(); private LabeledUnicastIpv6RIBSupport() { super(LabeledUnicastIpv6RoutesCase.class, LabeledUnicastIpv6Routes.class, LabeledUnicastRoute.class, - Ipv4AddressFamily.class, LabeledUnicastSubsequentAddressFamily.class, DestinationIpv6LabeledUnicast.QNAME); + Ipv4AddressFamily.class, LabeledUnicastSubsequentAddressFamily.class, DestinationIpv6LabeledUnicast.QNAME); } static LabeledUnicastIpv6RIBSupport getInstance() { @@ -42,16 +39,16 @@ final class LabeledUnicastIpv6RIBSupport extends AbstractLabeledUnicastRIBSuppor @Override protected DestinationType buildDestination(final Collection routes) { return new DestinationIpv6LabeledUnicastCaseBuilder().setDestinationIpv6LabeledUnicast( - new DestinationIpv6LabeledUnicastBuilder().setCLabeledUnicastDestination(extractRoutes(routes)).build()).build(); + new DestinationIpv6LabeledUnicastBuilder().setCLabeledUnicastDestination(extractRoutes(routes)).build()).build(); } @Override protected DestinationType buildWithdrawnDestination(final Collection routes) { return new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.update.attributes.mp.unreach - .nlri.withdrawn.routes.destination.type.DestinationIpv6LabeledUnicastCaseBuilder().setDestinationIpv6LabeledUnicast( - new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.update.attributes.mp - .unreach.nlri.withdrawn.routes.destination.type.destination.ipv6.labeled.unicast._case.DestinationIpv6LabeledUnicastBuilder() - .setCLabeledUnicastDestination(extractRoutes(routes)).build()).build(); + .nlri.withdrawn.routes.destination.type.DestinationIpv6LabeledUnicastCaseBuilder().setDestinationIpv6LabeledUnicast( + new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.update.attributes.mp + .unreach.nlri.withdrawn.routes.destination.type.destination.ipv6.labeled.unicast._case.DestinationIpv6LabeledUnicastBuilder() + .setCLabeledUnicastDestination(extractRoutes(routes)).build()).build(); } @Override @@ -63,14 +60,4 @@ final class LabeledUnicastIpv6RIBSupport extends AbstractLabeledUnicastRIBSuppor } return null; } - - @Override - public Collection changedRoutes(final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml - .ns.yang.bgp.labeled.unicast.rev171207.bgp.rib.rib.peer.adj.rib.in.tables.routes.LabeledUnicastIpv6RoutesCase routes) { - final LabeledUnicastIpv6Routes routeCont = routes.getLabeledUnicastIpv6Routes(); - if (routeCont == null) { - return Collections.emptyList(); - } - return routeCont.getLabeledUnicastRoute(); - } } diff --git a/bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/impl/LinkstateRIBSupport.java b/bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/impl/LinkstateRIBSupport.java index 5598831081..ca34c507fe 100644 --- a/bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/impl/LinkstateRIBSupport.java +++ b/bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/impl/LinkstateRIBSupport.java @@ -12,7 +12,6 @@ import com.google.common.collect.ImmutableSet; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import java.util.Collection; -import java.util.Collections; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; @@ -49,9 +48,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.UnkeyedListNode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public final class LinkstateRIBSupport extends AbstractRIBSupport { +public final class LinkstateRIBSupport extends AbstractRIBSupport { private static final Logger LOG = LoggerFactory.getLogger(LinkstateRIBSupport.class); private static final QName ROUTE_KEY_QNAME = QName.create(LinkstateRoute.QNAME, ROUTE_KEY).intern(); private static final LinkstateRIBSupport SINGLETON = new LinkstateRIBSupport(); @@ -137,11 +134,6 @@ public final class LinkstateRIBSupport extends AbstractRIBSupport changedRoutes(final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns - .yang.bgp.linkstate.rev171207.bgp.rib.rib.peer.adj.rib.in.tables.routes.LinkstateRoutesCase routes) { - final LinkstateRoutes routeCont = routes.getLinkstateRoutes(); - if (routeCont == null) { - return Collections.emptyList(); - } - return routeCont.getLinkstateRoute(); - } } diff --git a/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/EffectiveRibInWriter.java b/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/EffectiveRibInWriter.java index 032766120e..0abb4a1400 100644 --- a/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/EffectiveRibInWriter.java +++ b/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/EffectiveRibInWriter.java @@ -111,8 +111,8 @@ final class EffectiveRibInWriter implements PrefixesReceivedCounters, PrefixesIn return this.adjInTracker.getTotalPrefixesInstalled(); } - private final class AdjInTracker implements PrefixesReceivedCounters, PrefixesInstalledCounters, AutoCloseable, - ClusteredDataTreeChangeListener { + private static final class AdjInTracker implements PrefixesReceivedCounters, PrefixesInstalledCounters, + AutoCloseable, ClusteredDataTreeChangeListener { private final RIBSupportContextRegistry registry; private final KeyedInstanceIdentifier peerIId; private final InstanceIdentifier effRibTables; @@ -194,7 +194,7 @@ final class EffectiveRibInWriter implements PrefixesReceivedCounters, PrefixesIn updateRoutes(tx, tk, ribSupport, tablePath, routesChangesContainer.getModifiedChildren()); break; case WRITE: - writeTable(tx, table.getDataAfter()); + writeTable(tx, table); break; default: LOG.warn("Ignoring unhandled root {}", table); @@ -213,14 +213,14 @@ final class EffectiveRibInWriter implements PrefixesReceivedCounters, PrefixesIn final KeyedInstanceIdentifier tablePath, final Collection> routeChanges) { for (final DataObjectModification routeChanged : routeChanges) { + final Identifier routeKey + = ((InstanceIdentifier.IdentifiableItem) routeChanged.getIdentifier()).getKey(); switch (routeChanged.getModificationType()) { case SUBTREE_MODIFIED: case WRITE: - writeRoutes(tx, tableKey, ribSupport, tablePath, (Route) routeChanged.getDataAfter()); + writeRoutes(tx, tableKey, ribSupport, tablePath, routeKey, (Route) routeChanged.getDataAfter()); break; case DELETE: - final Route routeDeleted = (Route) routeChanged.getDataBefore(); - final Identifier routeKey = ribSupport.extractRouteKey(routeDeleted); final InstanceIdentifier routeIID = ribSupport.createRouteIId(tablePath, routeKey); tx.delete(LogicalDatastoreType.OPERATIONAL, routeIID); break; @@ -230,8 +230,8 @@ final class EffectiveRibInWriter implements PrefixesReceivedCounters, PrefixesIn @SuppressWarnings("unchecked") private void writeRoutes(final WriteTransaction tx, final TablesKey tk, final RIBSupport ribSupport, - final KeyedInstanceIdentifier tablePath, final Route route) { - final Identifier routeKey = ribSupport.extractRouteKey(route); + final KeyedInstanceIdentifier tablePath, final Identifier routeKey, + final Route route) { final InstanceIdentifier routeIID = ribSupport.createRouteIId(tablePath, routeKey); CountersUtil.increment(this.prefixesReceived.get(tk), tk); final Optional effAtt = this.ribPolicies @@ -246,11 +246,12 @@ final class EffectiveRibInWriter implements PrefixesReceivedCounters, PrefixesIn } @SuppressWarnings("unchecked") - private void writeTable(final WriteTransaction tx, final Tables table) { - if (table == null) { + private void writeTable(final WriteTransaction tx, final DataObjectModification table) { + final Tables newTable = table.getDataAfter(); + if (newTable == null) { return; } - final TablesKey tableKey = table.getKey(); + final TablesKey tableKey = newTable.getKey(); final KeyedInstanceIdentifier tablePath = this.effRibTables.child(Tables.class, tableKey); @@ -258,17 +259,21 @@ final class EffectiveRibInWriter implements PrefixesReceivedCounters, PrefixesIn LOG.trace("Create Empty table", tablePath); tx.put(LogicalDatastoreType.OPERATIONAL, tablePath, new TablesBuilder() .setAfi(tableKey.getAfi()).setSafi(tableKey.getSafi()) - .setAttributes(table.getAttributes()).build()); + .setAttributes(newTable.getAttributes()).build()); final RIBSupport ribSupport = this.registry.getRIBSupport(tableKey); - final Routes routes = table.getRoutes(); + final Routes routes = newTable.getRoutes(); if (routes == null) { return; } - final Collection changedRoutes = ribSupport.changedRoutes(routes); - for (final Route route : changedRoutes) { - writeRoutes(tx, tableKey, ribSupport, tablePath, route); + + final DataObjectModification routesChangesContainer = + table.getModifiedChildContainer(ribSupport.routesContainerClass()); + + if (routesChangesContainer == null) { + return; } + updateRoutes(tx, tableKey, ribSupport, tablePath, routesChangesContainer.getModifiedChildren()); } @Override diff --git a/bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/AbstractRIBSupport.java b/bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/AbstractRIBSupport.java index 47eeff5ba3..2980331f61 100644 --- a/bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/AbstractRIBSupport.java +++ b/bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/AbstractRIBSupport.java @@ -64,8 +64,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @Beta -public abstract class AbstractRIBSupport - implements RIBSupport { +public abstract class AbstractRIBSupport + implements RIBSupport { public static final String ROUTE_KEY = "route-key"; private static final Logger LOG = LoggerFactory.getLogger(AbstractRIBSupport.class); private static final NodeIdentifier ADVERTISED_ROUTES = new NodeIdentifier(AdvertizedRoutes.QNAME); diff --git a/bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/MultiPathAbstractRIBSupport.java b/bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/MultiPathAbstractRIBSupport.java index a955ac1a72..e9d1a1b241 100644 --- a/bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/MultiPathAbstractRIBSupport.java +++ b/bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/MultiPathAbstractRIBSupport.java @@ -25,8 +25,8 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; /** * Implements common methods for Advertisement of Multiple Paths on ribSupport. */ -public abstract class MultiPathAbstractRIBSupport - extends AbstractRIBSupport { +public abstract class MultiPathAbstractRIBSupport + extends AbstractRIBSupport { private final QName routeKeyQname; private final QName pathIdQname; private final NodeIdentifier pathIdNid; diff --git a/bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/RIBSupport.java b/bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/RIBSupport.java index 74ee97b3a0..52eca3962c 100644 --- a/bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/RIBSupport.java +++ b/bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/RIBSupport.java @@ -40,7 +40,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNod * to register an implementation of this class and the RIB core then calls into it * to inquire about details specific to that particular model. */ -public interface RIBSupport extends AddPathRibSupport { +public interface RIBSupport extends AddPathRibSupport { /** * Return the table-type-specific empty routes container, as augmented into the * bgp-rib model under /rib/tables/routes choice node. This needs to include all @@ -198,15 +198,6 @@ public interface RIBSupport getSafi(); - /** - * Extract Routes from Route Container. - * - * @param routes container - * @return routes - */ - @Nonnull - Collection changedRoutes(@Nonnull C routes); - /** * Creates Route Rib out Peer InstanceIdentifier. * @@ -219,14 +210,6 @@ public interface RIBSupport ribOutIId, @Nonnull N newRouteKey); - /** - * Extract key route from route - * - * @param route container - * @return key - */ - N extractRouteKey(R route); - @Nonnull R createRoute(@Nullable R route, N routeKey, @Nullable PathId pathId, @Nonnull Attributes attributes); diff --git a/bgp/rib-spi/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/bgp/inet/rev150305/ipv4/routes/ipv4/routes/MultiPathAbstractTest.java b/bgp/rib-spi/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/bgp/inet/rev150305/ipv4/routes/ipv4/routes/MultiPathAbstractTest.java index 70a13e96db..cca2228960 100644 --- a/bgp/rib-spi/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/bgp/inet/rev150305/ipv4/routes/ipv4/routes/MultiPathAbstractTest.java +++ b/bgp/rib-spi/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/bgp/inet/rev150305/ipv4/routes/ipv4/routes/MultiPathAbstractTest.java @@ -17,7 +17,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mess import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.Attributes; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev171207.destination.DestinationType; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.Route; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.rib.tables.Routes; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv4AddressFamily; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.UnicastSubsequentAddressFamily; import org.opendaylight.yangtools.yang.binding.DataObject; @@ -78,19 +77,9 @@ public final class MultiPathAbstractTest extends MultiPathAbstractRIBSupport { return false; } - @Override - public Identifier extractRouteKey(final Route route) { - return null; - } - @Override public Route createRoute(final Route route, final Identifier routeKey, final PathId pathId , final Attributes attributes) { return null; } - - @Override - public Collection changedRoutes(final Routes routes) { - return null; - } } \ No newline at end of file