package org.opendaylight.protocol.bgp.labeled.unicast;
import java.util.Collection;
-import javax.annotation.Nonnull;
+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;
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<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> {
private static final LabeledUnicastIpv4RIBSupport SINGLETON = new LabeledUnicastIpv4RIBSupport();
private LabeledUnicastIpv4RIBSupport() {
return SINGLETON;
}
- @Nonnull
@Override
- protected DestinationType buildDestination(@Nonnull final Collection<MapEntryNode> routes) {
+ protected DestinationType buildDestination(final Collection<MapEntryNode> routes) {
return new DestinationLabeledUnicastCaseBuilder().setDestinationLabeledUnicast(
new DestinationLabeledUnicastBuilder().setCLabeledUnicastDestination(extractRoutes(routes)).build()).build();
}
- @Nonnull
@Override
- protected DestinationType buildWithdrawnDestination(@Nonnull final Collection<MapEntryNode> routes) {
+ protected DestinationType buildWithdrawnDestination(final Collection<MapEntryNode> 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();
}
return null;
}
+
+ @Override
+ public Collection<LabeledUnicastRoute> 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();
+ }
}