diff options
Diffstat (limited to 'bgp')
3 files changed, 13 insertions, 16 deletions
diff --git a/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidMplsWriter.java b/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidMplsWriter.java index 472642e73..f62e03576 100644 --- a/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidMplsWriter.java +++ b/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidMplsWriter.java @@ -24,7 +24,6 @@ import io.fd.honeycomb.translate.write.WriteFailedException; import io.fd.vpp.jvpp.core.dto.MplsRouteAddDel; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import javax.annotation.Nonnull; -import javax.annotation.Nullable; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.routes.LabeledUnicastRoutes; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.routes.list.LabeledUnicastRoute; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.BgpRib; @@ -60,7 +59,7 @@ final class BgpPrefixSidMplsWriter @Override public void create(@Nonnull final InstanceIdentifier<LabeledUnicastRoute> id, - @Nullable final LabeledUnicastRoute route) + @Nonnull final LabeledUnicastRoute route) throws WriteFailedException.CreateFailedException { LOG.debug("Translating id={}, route={}", id, route); // Compute label based on BGP Prefix SID TLVs and add following VPP FIB entries @@ -82,7 +81,7 @@ final class BgpPrefixSidMplsWriter @Override public void delete(@Nonnull final InstanceIdentifier<LabeledUnicastRoute> id, - @Nullable final LabeledUnicastRoute route) + @Nonnull final LabeledUnicastRoute route) throws WriteFailedException.DeleteFailedException { LOG.debug("Removing id={}, route={}", id, route); // Remove non-eos VPP MPLS FIB entry: @@ -101,8 +100,8 @@ final class BgpPrefixSidMplsWriter @Override public void update(@Nonnull final InstanceIdentifier<LabeledUnicastRoute> id, - @Nullable final LabeledUnicastRoute routeBefore, - @Nullable final LabeledUnicastRoute routeAfter) + @Nonnull final LabeledUnicastRoute routeBefore, + @Nonnull final LabeledUnicastRoute routeAfter) throws WriteFailedException.UpdateFailedException { throw new WriteFailedException.UpdateFailedException(id, routeBefore, routeAfter, new UnsupportedOperationException("Operation not supported")); diff --git a/bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/Ipv4Writer.java b/bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/Ipv4Writer.java index 60af9166e..c628d3844 100644 --- a/bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/Ipv4Writer.java +++ b/bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/Ipv4Writer.java @@ -26,15 +26,14 @@ import io.fd.honeycomb.translate.write.WriteFailedException; import io.fd.vpp.jvpp.core.dto.IpAddDelRoute; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import javax.annotation.Nonnull; -import javax.annotation.Nullable; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address; 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.inet.rev171207.ipv4.routes.Ipv4Routes; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv4.routes.ipv4.routes.Ipv4Route; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.BgpRib; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.bgp.rib.Rib; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.bgp.rib.rib.LocRib; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.rib.Tables; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.BgpRib; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.CNextHop; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv4NextHopCase; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @@ -58,7 +57,7 @@ final class Ipv4Writer implements RouteWriter<Ipv4Route>, Ipv4Translator, JvppRe @Override public void create(@Nonnull final InstanceIdentifier<Ipv4Route> id, - @Nullable final Ipv4Route route) + @Nonnull final Ipv4Route route) throws WriteFailedException.CreateFailedException { final IpAddDelRoute request = request(route, true); LOG.debug("Translating id={}, route={} to {}", id, route, request); @@ -68,7 +67,7 @@ final class Ipv4Writer implements RouteWriter<Ipv4Route>, Ipv4Translator, JvppRe @Override public void delete(@Nonnull final InstanceIdentifier<Ipv4Route> id, - @Nullable final Ipv4Route route) + @Nonnull final Ipv4Route route) throws WriteFailedException.DeleteFailedException { LOG.debug("Removing id={}, route={}", id, route); getReplyForDelete(vppApi.ipAddDelRoute(request(route, false)).toCompletableFuture(), id); @@ -77,8 +76,8 @@ final class Ipv4Writer implements RouteWriter<Ipv4Route>, Ipv4Translator, JvppRe @Override public void update(@Nonnull final InstanceIdentifier<Ipv4Route> id, - @Nullable final Ipv4Route routeBefore, - @Nullable final Ipv4Route routeAfter) + @Nonnull final Ipv4Route routeBefore, + @Nonnull final Ipv4Route routeAfter) throws WriteFailedException.UpdateFailedException { throw new WriteFailedException.UpdateFailedException(id, routeBefore, routeAfter, new UnsupportedOperationException("Operation not supported")); diff --git a/bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/Ipv6Writer.java b/bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/Ipv6Writer.java index 45c147af3..f3712e2f4 100644 --- a/bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/Ipv6Writer.java +++ b/bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/Ipv6Writer.java @@ -26,7 +26,6 @@ import io.fd.honeycomb.translate.write.WriteFailedException; import io.fd.vpp.jvpp.core.dto.IpAddDelRoute; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import javax.annotation.Nonnull; -import javax.annotation.Nullable; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address; 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.inet.rev171207.ipv6.routes.Ipv6Routes; @@ -58,7 +57,7 @@ final class Ipv6Writer implements RouteWriter<Ipv6Route>, Ipv6Translator, JvppRe @Override public void create(@Nonnull final InstanceIdentifier<Ipv6Route> id, - @Nullable final Ipv6Route route) + @Nonnull final Ipv6Route route) throws WriteFailedException.CreateFailedException { final IpAddDelRoute request = request(route, true); LOG.debug("Translating id={}, route={} to {}", id, route, request); @@ -68,7 +67,7 @@ final class Ipv6Writer implements RouteWriter<Ipv6Route>, Ipv6Translator, JvppRe @Override public void delete(@Nonnull final InstanceIdentifier<Ipv6Route> id, - @Nullable final Ipv6Route route) + @Nonnull final Ipv6Route route) throws WriteFailedException.DeleteFailedException { LOG.debug("Removing id={}, route={}", id, route); getReplyForDelete(vppApi.ipAddDelRoute(request(route, false)).toCompletableFuture(), id); @@ -77,8 +76,8 @@ final class Ipv6Writer implements RouteWriter<Ipv6Route>, Ipv6Translator, JvppRe @Override public void update(@Nonnull final InstanceIdentifier<Ipv6Route> id, - @Nullable final Ipv6Route routeBefore, - @Nullable final Ipv6Route routeAfter) + @Nonnull final Ipv6Route routeBefore, + @Nonnull final Ipv6Route routeAfter) throws WriteFailedException.UpdateFailedException { throw new WriteFailedException.UpdateFailedException(id, routeBefore, routeAfter, new UnsupportedOperationException("Operation not supported")); |