From 376fb276f70629cfe0256dcebf3a0c9b09edf0b5 Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Thu, 12 Jan 2017 10:46:28 +0100 Subject: HONEYCOMB-325 - Null pointer while routing attr not defined Fixes multiple null pointers Change-Id: Iaa1df9a8b0a886d1835fe7cb87bcf7cf5130c6f5 Signed-off-by: Jan Srnicek --- .../write/factory/MultipathHopRequestFactory.java | 15 +++++------ .../write/factory/SimpleHopRequestFactory.java | 20 +++++++------- .../hc2vpp/routing/Ipv4RouteNamesFactoryTest.java | 2 +- .../hc2vpp/routing/Ipv6RouteNamesFactoryTest.java | 2 +- .../routing/write/Ipv4RouteCustomizerTest.java | 14 +++++----- .../routing/write/Ipv6RouteCustomizerTest.java | 12 ++++----- .../MultipathHopRequestFactoryIpv4Test.java | 31 +++++++++++++++++++--- .../MultipathHopRequestFactoryIpv6Test.java | 4 +-- .../factory/SimpleHopRequestFactoryIpv4Test.java | 28 +++++++++++++------ .../factory/SimpleHopRequestFactoryIpv6Test.java | 27 +++++++++++++------ .../SpecialNextHopRequestFactoryIpv4Test.java | 8 +++--- .../SpecialNextHopRequestFactoryIpv6Test.java | 8 +++--- .../ipv4/multiHopRouteWithClassifier.json | 31 ---------------------- .../ipv4/multiHopRouteWithoutClassifier.json | 30 --------------------- .../ipv4/multihop/multiHopRouteWithClassifier.json | 31 ++++++++++++++++++++++ .../multihop/multiHopRouteWithNoRouteAttrs.json | 28 +++++++++++++++++++ .../multihop/multiHopRouteWithoutClassifier.json | 30 +++++++++++++++++++++ .../ipv4/simpleHopRouteWithClassifier.json | 17 ------------ .../ipv4/simpleHopRouteWithoutClassifier.json | 16 ----------- .../ipv4/simplehop/simpleHopRouteNoRouteAttrs.json | 14 ++++++++++ .../simplehop/simpleHopRouteWithClassifier.json | 17 ++++++++++++ .../simplehop/simpleHopRouteWithoutClassifier.json | 16 +++++++++++ .../resources/ipv4/specialHopRouteBlackhole.json | 13 --------- .../resources/ipv4/specialHopRouteProhibited.json | 13 --------- .../resources/ipv4/specialHopRouteReceive.json | 13 --------- .../resources/ipv4/specialHopRouteUnreachable.json | 13 --------- .../ipv4/specialhop/specialHopRouteBlackhole.json | 13 +++++++++ .../ipv4/specialhop/specialHopRouteProhibited.json | 13 +++++++++ .../ipv4/specialhop/specialHopRouteReceive.json | 13 +++++++++ .../specialhop/specialHopRouteUnreachable.json | 13 +++++++++ .../ipv6/multiHopRouteWithClassifier.json | 31 ---------------------- .../ipv6/multiHopRouteWithoutClassifier.json | 30 --------------------- .../ipv6/multihop/multiHopRouteWithClassifier.json | 31 ++++++++++++++++++++++ .../multihop/multiHopRouteWithoutClassifier.json | 30 +++++++++++++++++++++ .../multihop/multiHopRouteWithoutRouteAttrs.json | 28 +++++++++++++++++++ .../ipv6/simpleHopRouteWithClassifier.json | 17 ------------ .../ipv6/simpleHopRouteWithoutClassifier.json | 16 ----------- .../simplehop/simpleHopRouteWithClassifier.json | 17 ++++++++++++ .../simplehop/simpleHopRouteWithoutClassifier.json | 16 +++++++++++ .../simplehop/simpleHopRouteWithoutRouteAttrs.json | 14 ++++++++++ .../resources/ipv6/specialHopRouteBlackhole.json | 13 --------- .../resources/ipv6/specialHopRouteProhibited.json | 13 --------- .../resources/ipv6/specialHopRouteReceive.json | 13 --------- .../resources/ipv6/specialHopRouteUnreachable.json | 13 --------- .../ipv6/specialhop/specialHopRouteBlackhole.json | 13 +++++++++ .../ipv6/specialhop/specialHopRouteProhibited.json | 13 +++++++++ .../ipv6/specialhop/specialHopRouteReceive.json | 13 +++++++++ .../specialhop/specialHopRouteUnreachable.json | 13 +++++++++ 48 files changed, 484 insertions(+), 355 deletions(-) delete mode 100644 routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithClassifier.json delete mode 100644 routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithoutClassifier.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithClassifier.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithNoRouteAttrs.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithoutClassifier.json delete mode 100644 routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithClassifier.json delete mode 100644 routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithoutClassifier.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteNoRouteAttrs.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteWithClassifier.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteWithoutClassifier.json delete mode 100644 routing/routing-impl/src/test/resources/ipv4/specialHopRouteBlackhole.json delete mode 100644 routing/routing-impl/src/test/resources/ipv4/specialHopRouteProhibited.json delete mode 100644 routing/routing-impl/src/test/resources/ipv4/specialHopRouteReceive.json delete mode 100644 routing/routing-impl/src/test/resources/ipv4/specialHopRouteUnreachable.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteBlackhole.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteProhibited.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteReceive.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteUnreachable.json delete mode 100644 routing/routing-impl/src/test/resources/ipv6/multiHopRouteWithClassifier.json delete mode 100644 routing/routing-impl/src/test/resources/ipv6/multiHopRouteWithoutClassifier.json create mode 100644 routing/routing-impl/src/test/resources/ipv6/multihop/multiHopRouteWithClassifier.json create mode 100644 routing/routing-impl/src/test/resources/ipv6/multihop/multiHopRouteWithoutClassifier.json create mode 100644 routing/routing-impl/src/test/resources/ipv6/multihop/multiHopRouteWithoutRouteAttrs.json delete mode 100644 routing/routing-impl/src/test/resources/ipv6/simpleHopRouteWithClassifier.json delete mode 100644 routing/routing-impl/src/test/resources/ipv6/simpleHopRouteWithoutClassifier.json create mode 100644 routing/routing-impl/src/test/resources/ipv6/simplehop/simpleHopRouteWithClassifier.json create mode 100644 routing/routing-impl/src/test/resources/ipv6/simplehop/simpleHopRouteWithoutClassifier.json create mode 100644 routing/routing-impl/src/test/resources/ipv6/simplehop/simpleHopRouteWithoutRouteAttrs.json delete mode 100644 routing/routing-impl/src/test/resources/ipv6/specialHopRouteBlackhole.json delete mode 100644 routing/routing-impl/src/test/resources/ipv6/specialHopRouteProhibited.json delete mode 100644 routing/routing-impl/src/test/resources/ipv6/specialHopRouteReceive.json delete mode 100644 routing/routing-impl/src/test/resources/ipv6/specialHopRouteUnreachable.json create mode 100644 routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteBlackhole.json create mode 100644 routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteProhibited.json create mode 100644 routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteReceive.json create mode 100644 routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteUnreachable.json diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/MultipathHopRequestFactory.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/MultipathHopRequestFactory.java index 4599c8b82..4497e81dc 100644 --- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/MultipathHopRequestFactory.java +++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/MultipathHopRequestFactory.java @@ -16,8 +16,6 @@ package io.fd.hc2vpp.routing.write.factory; -import static com.google.common.base.Preconditions.checkNotNull; - import io.fd.hc2vpp.common.translate.util.NamingContext; import io.fd.hc2vpp.routing.write.factory.base.BasicHopRequestFactory; import io.fd.hc2vpp.routing.write.trait.RouteRequestProducer; @@ -57,13 +55,12 @@ public class MultipathHopRequestFactory extends BasicHopRequestFactory implement @Nonnull final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ipv4.unicast.routing.rev140524.routing.routing.instance.routing.protocols.routing.protocol._static.routes.ipv4.Route route, @Nonnull final NextHop hop, @Nonnull final MappingContext mappingContext) { - - final VppIpv4Route routingAttributes = checkNotNull(route.getVppIpv4Route(), "VppIpv4Route not defined"); + final VppIpv4Route routingAttributes = route.getVppIpv4Route(); final int nextHopInterfaceIndex = getInterfaceNamingContext().getIndex(hop.getOutgoingInterface(), mappingContext); - if (classifyTablePresent(routingAttributes.getClassifyTable(), getVppClassifierContextManager(), + if (routingAttributes!= null && classifyTablePresent(routingAttributes.getClassifyTable(), getVppClassifierContextManager(), mappingContext)) { return getMultipathHopRequest(add, route.getDestinationPrefix(), @@ -82,7 +79,7 @@ public class MultipathHopRequestFactory extends BasicHopRequestFactory implement hop.getAddress(), toByte(hop.getWeight()), getRoutingProtocolContext().getIndex(parentProtocolName, mappingContext), - optionalVni(routingAttributes.getSecondaryVrf()), + optionalVni(null), 0, false); } @@ -93,12 +90,12 @@ public class MultipathHopRequestFactory extends BasicHopRequestFactory implement @Nonnull final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ipv6.unicast.routing.rev140525.routing.routing.instance.routing.protocols.routing.protocol._static.routes.ipv6.Route route, @Nonnull final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ipv6.unicast.routing.rev140525.routing.routing.instance.routing.protocols.routing.protocol._static.routes.ipv6.route.next.hop.options.next.hop.list.next.hop.list.NextHop hop, @Nonnull final MappingContext mappingContext) { - final VppIpv6Route routingAttributes = checkNotNull(route.getVppIpv6Route(), "VppIpv6Route not defined"); + final VppIpv6Route routingAttributes = route.getVppIpv6Route(); final int nextHopInterfaceIndex = getInterfaceNamingContext().getIndex(hop.getOutgoingInterface(), mappingContext); - if (classifyTablePresent(routingAttributes.getClassifyTable(), getVppClassifierContextManager(), + if (routingAttributes != null && classifyTablePresent(routingAttributes.getClassifyTable(), getVppClassifierContextManager(), mappingContext)) { return getMultipathHopRequest(add, route.getDestinationPrefix(), @@ -117,7 +114,7 @@ public class MultipathHopRequestFactory extends BasicHopRequestFactory implement hop.getAddress(), toByte(hop.getWeight()), getRoutingProtocolContext().getIndex(parentProtocolName, mappingContext), - optionalVni(routingAttributes.getSecondaryVrf()), + optionalVni(null), 0, false); } diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactory.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactory.java index 68a5f3d71..98c36e4ad 100644 --- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactory.java +++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactory.java @@ -16,8 +16,6 @@ package io.fd.hc2vpp.routing.write.factory; -import static com.google.common.base.Preconditions.checkNotNull; - import io.fd.hc2vpp.common.translate.util.NamingContext; import io.fd.hc2vpp.routing.write.factory.base.BasicHopRequestFactory; import io.fd.hc2vpp.routing.write.trait.RouteRequestProducer; @@ -58,12 +56,13 @@ public class SimpleHopRequestFactory extends BasicHopRequestFactory implements R @Nonnull final MappingContext mappingContext) { final SimpleNextHop hop = SimpleNextHop.class.cast(route.getNextHopOptions()); - final VppIpv4Route routingAttributes = checkNotNull(route.getVppIpv4Route(), "VppIpv4Route not defined"); + final VppIpv4Route routingAttributes = route.getVppIpv4Route(); final int nextHopInterfaceIndex = getInterfaceNamingContext().getIndex(hop.getOutgoingInterface(), mappingContext); - if (classifyTablePresent(routingAttributes.getClassifyTable(), getVppClassifierContextManager(), - mappingContext)) { + if (routingAttributes != null && + classifyTablePresent(routingAttributes.getClassifyTable(), getVppClassifierContextManager(), + mappingContext)) { return getSimpleHopRequest(add, route.getDestinationPrefix(), nextHopInterfaceIndex, @@ -79,7 +78,7 @@ public class SimpleHopRequestFactory extends BasicHopRequestFactory implements R nextHopInterfaceIndex, hop.getNextHop(), getRoutingProtocolContext().getIndex(parentProtocolName, mappingContext), - optionalVni(routingAttributes.getSecondaryVrf()), + optionalVni(null), 0, false); } @@ -93,12 +92,13 @@ public class SimpleHopRequestFactory extends BasicHopRequestFactory implements R hop = (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ipv6.unicast.routing.rev140525.routing.routing.instance.routing.protocols.routing.protocol._static.routes.ipv6.route.next.hop.options.SimpleNextHop) route .getNextHopOptions(); - final VppIpv6Route routingAttributes = checkNotNull(route.getVppIpv6Route(), "VppIpv6Route not defined"); + final VppIpv6Route routingAttributes = route.getVppIpv6Route(); final int nextHopInterfaceIndex = getInterfaceNamingContext().getIndex(hop.getOutgoingInterface(), mappingContext); - if (classifyTablePresent(routingAttributes.getClassifyTable(), getVppClassifierContextManager(), - mappingContext)) { + if (routingAttributes != null && + classifyTablePresent(routingAttributes.getClassifyTable(), getVppClassifierContextManager(), + mappingContext)) { return getSimpleHopRequest(add, route.getDestinationPrefix(), nextHopInterfaceIndex, @@ -114,7 +114,7 @@ public class SimpleHopRequestFactory extends BasicHopRequestFactory implements R nextHopInterfaceIndex, hop.getNextHop(), getRoutingProtocolContext().getIndex(parentProtocolName, mappingContext), - optionalVni(routingAttributes.getSecondaryVrf()), + optionalVni(null), 0, false); } diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/Ipv4RouteNamesFactoryTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/Ipv4RouteNamesFactoryTest.java index 1fc8152eb..79650e81c 100644 --- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/Ipv4RouteNamesFactoryTest.java +++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/Ipv4RouteNamesFactoryTest.java @@ -72,7 +72,7 @@ public class Ipv4RouteNamesFactoryTest @Test public void testUniqueRouteName( - @InjectTestData(resourcePath = "/ipv4/simpleHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) + @InjectTestData(resourcePath = "/ipv4/simplehop/simpleHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) StaticRoutes data) { assertEquals("tst-protocol_19216821_24", factory.uniqueRouteName(ROUTE_PROTOCOL_NAME, getIpv4RouteWithId(data, 1L))); diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/Ipv6RouteNamesFactoryTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/Ipv6RouteNamesFactoryTest.java index 4f95ae328..a993b9b65 100644 --- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/Ipv6RouteNamesFactoryTest.java +++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/Ipv6RouteNamesFactoryTest.java @@ -72,7 +72,7 @@ public class Ipv6RouteNamesFactoryTest implements RoutingRequestTestHelper, Sche @Test public void testUniqueRouteName( - @InjectTestData(resourcePath = "/ipv6/simpleHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) + @InjectTestData(resourcePath = "/ipv6/simplehop/simpleHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) StaticRoutes data) { assertEquals("tst-protocol_2001db8a0b12f01_64", factory.uniqueRouteName(ROUTE_PROTOCOL_NAME, getIpv6RouteWithId(data, 1L))); diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizerTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizerTest.java index 13b434716..9cefb345a 100644 --- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizerTest.java +++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizerTest.java @@ -96,7 +96,7 @@ public class Ipv4RouteCustomizerTest extends WriterCustomizerTest @Test public void testWriteSingleHop( - @InjectTestData(resourcePath = "/ipv4/simpleHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) StaticRoutes route) + @InjectTestData(resourcePath = "/ipv4/simplehop/simpleHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) StaticRoutes route) throws WriteFailedException { final Route route1 = getIpv4RouteWithId(route, 1L); noMappingDefined(mappingContext, namesFactory.uniqueRouteName(ROUTE_PROTOCOL_NAME, route1), "route-context"); @@ -111,7 +111,7 @@ public class Ipv4RouteCustomizerTest extends WriterCustomizerTest @Test public void testWriteHopList( - @InjectTestData(resourcePath = "/ipv4/multiHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) StaticRoutes route) + @InjectTestData(resourcePath = "/ipv4/multihop/multiHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) StaticRoutes route) throws WriteFailedException { final Route route1 = getIpv4RouteWithId(route, 1L); noMappingDefined(mappingContext, namesFactory.uniqueRouteName(ROUTE_PROTOCOL_NAME, route1), "route-context"); @@ -141,7 +141,7 @@ public class Ipv4RouteCustomizerTest extends WriterCustomizerTest @Test public void testWriteSpecialHop( - @InjectTestData(resourcePath = "/ipv4/specialHopRouteBlackhole.json", id = STATIC_ROUTE_PATH) StaticRoutes route) + @InjectTestData(resourcePath = "/ipv4/specialhop/specialHopRouteBlackhole.json", id = STATIC_ROUTE_PATH) StaticRoutes route) throws WriteFailedException { final Route route1 = getIpv4RouteWithId(route, 1L); noMappingDefined(mappingContext, namesFactory.uniqueRouteName(ROUTE_PROTOCOL_NAME, route1), "route-context"); @@ -154,7 +154,7 @@ public class Ipv4RouteCustomizerTest extends WriterCustomizerTest @Test public void testUpdate( - @InjectTestData(resourcePath = "/ipv4/specialHopRouteBlackhole.json", id = STATIC_ROUTE_PATH) StaticRoutes route) { + @InjectTestData(resourcePath = "/ipv4/specialhop/specialHopRouteBlackhole.json", id = STATIC_ROUTE_PATH) StaticRoutes route) { try { customizer.updateCurrentAttributes(validId, new RouteBuilder().build(), getIpv4RouteWithId(route, 1L), writeContext); @@ -169,7 +169,7 @@ public class Ipv4RouteCustomizerTest extends WriterCustomizerTest @Test public void testDeleteSingleHop( - @InjectTestData(resourcePath = "/ipv4/simpleHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) StaticRoutes route) + @InjectTestData(resourcePath = "/ipv4/simplehop/simpleHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) StaticRoutes route) throws WriteFailedException { customizer.deleteCurrentAttributes(validId, getIpv4RouteWithId(route, 1L), writeContext); verifyInvocation(1, ImmutableList @@ -180,7 +180,7 @@ public class Ipv4RouteCustomizerTest extends WriterCustomizerTest @Test public void testDeleteHopList( - @InjectTestData(resourcePath = "/ipv4/multiHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) StaticRoutes route) + @InjectTestData(resourcePath = "/ipv4/multihop/multiHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) StaticRoutes route) throws WriteFailedException { final Route route1 = getIpv4RouteWithId(route, 1L); noMappingDefined(mappingContext, namesFactory.uniqueRouteName(ROUTE_PROTOCOL_NAME, route1), "route-context"); @@ -209,7 +209,7 @@ public class Ipv4RouteCustomizerTest extends WriterCustomizerTest @Test public void testDeleteSpecialHop( - @InjectTestData(resourcePath = "/ipv4/specialHopRouteBlackhole.json", id = STATIC_ROUTE_PATH) StaticRoutes route) + @InjectTestData(resourcePath = "/ipv4/specialhop/specialHopRouteBlackhole.json", id = STATIC_ROUTE_PATH) StaticRoutes route) throws WriteFailedException { customizer.deleteCurrentAttributes(validId, getIpv4RouteWithId(route, 1L), writeContext); diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizerTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizerTest.java index c776ca7f7..6ba973340 100644 --- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizerTest.java +++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizerTest.java @@ -91,7 +91,7 @@ public class Ipv6RouteCustomizerTest extends WriterCustomizerTest @Test public void testWriteSingleHop( - @InjectTestData(resourcePath = "/ipv6/simpleHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) StaticRoutes route) + @InjectTestData(resourcePath = "/ipv6/simplehop/simpleHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) StaticRoutes route) throws WriteFailedException { whenAddRouteThenSuccess(api); customizer.writeCurrentAttributes(validId, getIpv6RouteWithId(route, 1L), writeContext); @@ -103,7 +103,7 @@ public class Ipv6RouteCustomizerTest extends WriterCustomizerTest @Test public void testWriteHopList( - @InjectTestData(resourcePath = "/ipv6/multiHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) StaticRoutes route) + @InjectTestData(resourcePath = "/ipv6/multihop/multiHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) StaticRoutes route) throws WriteFailedException { whenAddRouteThenSuccess(api); customizer.writeCurrentAttributes(validId, getIpv6RouteWithId(route, 1L), writeContext); @@ -133,7 +133,7 @@ public class Ipv6RouteCustomizerTest extends WriterCustomizerTest @Test public void testDeleteSpecialHop( - @InjectTestData(resourcePath = "/ipv6/specialHopRouteBlackhole.json", id = STATIC_ROUTE_PATH) StaticRoutes route) + @InjectTestData(resourcePath = "/ipv6/specialhop/specialHopRouteBlackhole.json", id = STATIC_ROUTE_PATH) StaticRoutes route) throws WriteFailedException { whenAddRouteThenSuccess(api); customizer.deleteCurrentAttributes(validId, getIpv6RouteWithId(route, 1L), @@ -145,7 +145,7 @@ public class Ipv6RouteCustomizerTest extends WriterCustomizerTest @Test public void testDeleteSingleHop( - @InjectTestData(resourcePath = "/ipv6/simpleHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) StaticRoutes route) + @InjectTestData(resourcePath = "/ipv6/simplehop/simpleHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) StaticRoutes route) throws WriteFailedException { whenAddRouteThenSuccess(api); customizer.deleteCurrentAttributes(validId, getIpv6RouteWithId(route, 1L), writeContext); @@ -157,7 +157,7 @@ public class Ipv6RouteCustomizerTest extends WriterCustomizerTest @Test public void testDeleteHopList( - @InjectTestData(resourcePath = "/ipv6/multiHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) StaticRoutes route) + @InjectTestData(resourcePath = "/ipv6/multihop/multiHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) StaticRoutes route) throws WriteFailedException { whenAddRouteThenSuccess(api); customizer.deleteCurrentAttributes(validId, getIpv6RouteWithId(route, 1L), writeContext); @@ -174,7 +174,7 @@ public class Ipv6RouteCustomizerTest extends WriterCustomizerTest @Test public void testWriteSpecialHop( - @InjectTestData(resourcePath = "/ipv6/specialHopRouteBlackhole.json", id = STATIC_ROUTE_PATH) StaticRoutes route) + @InjectTestData(resourcePath = "/ipv6/specialhop/specialHopRouteBlackhole.json", id = STATIC_ROUTE_PATH) StaticRoutes route) throws WriteFailedException { whenAddRouteThenSuccess(api); customizer.writeCurrentAttributes(validId, getIpv6RouteWithId(route, 1L), diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/MultipathHopRequestFactoryIpv4Test.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/MultipathHopRequestFactoryIpv4Test.java index 43d01abbf..1eb91aa37 100644 --- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/MultipathHopRequestFactoryIpv4Test.java +++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/MultipathHopRequestFactoryIpv4Test.java @@ -51,18 +51,24 @@ public class MultipathHopRequestFactoryIpv4Test @Mock private MappingContext mappingContext; - @InjectTestData(resourcePath = "/ipv4/multiHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) + @InjectTestData(resourcePath = "/ipv4/multihop/multiHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) private StaticRoutes ipv4StaticRoutesWithClassifier; - @InjectTestData(resourcePath = "/ipv4/multiHopRouteWithoutClassifier.json", id = STATIC_ROUTE_PATH) + @InjectTestData(resourcePath = "/ipv4/multihop/multiHopRouteWithoutClassifier.json", id = STATIC_ROUTE_PATH) private StaticRoutes ipv4StaticRoutesWithoutClassifier; + @InjectTestData(resourcePath = "/ipv4/multihop/multiHopRouteWithNoRouteAttrs.json", id = STATIC_ROUTE_PATH) + private StaticRoutes ipv4StaticRoutesWithoutRouteAttrs; + private Route ipv4MutlipathRouteWithClassifier; private NextHop ipv4nextHopWithClassifier; private Route ipv4MutlipathRouteWithoutClassifier; private NextHop ipv4nextHopWithoutClassifier; + private Route ipv4MutlipathRouteWithoutRouteAtts; + private NextHop ipv4nextHopWithoutRouteAtts; + private NamingContext interfaceContext; private NamingContext routingProtocolContext; private MultipathHopRequestFactory factory; @@ -88,10 +94,17 @@ public class MultipathHopRequestFactoryIpv4Test ipv4MutlipathRouteWithoutClassifier = getIpv4RouteWithId(ipv4StaticRoutesWithoutClassifier, 1L); final List ipv4HopsNonClassified = - NextHopList.class.cast(ipv4MutlipathRouteWithClassifier.getNextHopOptions()).getNextHopList() + NextHopList.class.cast(ipv4MutlipathRouteWithoutClassifier.getNextHopOptions()).getNextHopList() .getNextHop(); ipv4nextHopWithoutClassifier = ipv4HopsNonClassified.stream().filter(nextHop -> nextHop.getId() == 1L).findFirst().get(); + + ipv4MutlipathRouteWithoutRouteAtts = getIpv4RouteWithId(ipv4StaticRoutesWithoutRouteAttrs, 1L); + final List ipv4HopsNonRouteAttrs = + NextHopList.class.cast(ipv4MutlipathRouteWithoutRouteAtts.getNextHopOptions()).getNextHopList() + .getNextHop(); + ipv4nextHopWithoutRouteAtts = + ipv4HopsNonClassified.stream().filter(nextHop -> nextHop.getId() == 1L).findFirst().get(); } @Test @@ -116,4 +129,16 @@ public class MultipathHopRequestFactoryIpv4Test desiredFlaglessResult(0, 0, 1, Ipv4RouteData.FIRST_ADDRESS_AS_ARRAY, 24, Ipv4RouteData.FIRST_ADDRESS_AS_ARRAY, INTERFACE_INDEX, 2, 1, 1, 0, 0, 0), request); } + + @Test + public void testIpv4WithoutRouteAttrs() { + final IpAddDelRoute request = + factory.createIpv4MultipathHopRequest(false, ROUTE_PROTOCOL_NAME, ipv4MutlipathRouteWithoutRouteAtts, + ipv4nextHopWithoutRouteAtts, + mappingContext); + + assertEquals( + desiredFlaglessResult(0, 0, 1, Ipv4RouteData.FIRST_ADDRESS_AS_ARRAY, 24, + Ipv4RouteData.FIRST_ADDRESS_AS_ARRAY, INTERFACE_INDEX, 2, 1, 1, 0, 0, 0), request); + } } diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/MultipathHopRequestFactoryIpv6Test.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/MultipathHopRequestFactoryIpv6Test.java index 9fc5fae65..dfbd093de 100644 --- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/MultipathHopRequestFactoryIpv6Test.java +++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/MultipathHopRequestFactoryIpv6Test.java @@ -50,10 +50,10 @@ public class MultipathHopRequestFactoryIpv6Test @Mock private MappingContext mappingContext; - @InjectTestData(resourcePath = "/ipv6/multiHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) + @InjectTestData(resourcePath = "/ipv6/multihop/multiHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) private StaticRoutes ipv6StaticRoutesWithClassifier; - @InjectTestData(resourcePath = "/ipv6/multiHopRouteWithoutClassifier.json", id = STATIC_ROUTE_PATH) + @InjectTestData(resourcePath = "/ipv6/multihop/multiHopRouteWithoutClassifier.json", id = STATIC_ROUTE_PATH) private StaticRoutes ipv6StaticRoutesWithoutClassifier; private Route ipv6MultipathRouteWithClassifier; diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactoryIpv4Test.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactoryIpv4Test.java index cfb352daa..d344e016e 100644 --- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactoryIpv4Test.java +++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactoryIpv4Test.java @@ -46,12 +46,6 @@ public class SimpleHopRequestFactoryIpv4Test @Mock private MappingContext mappingContext; - @InjectTestData(resourcePath = "/ipv4/simpleHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) - private StaticRoutes ipv4StaticRouteWithClassifier; - - @InjectTestData(resourcePath = "/ipv4/simpleHopRouteWithoutClassifier.json", id = STATIC_ROUTE_PATH) - private StaticRoutes ipv4StaticRouteWithoutClassifier; - private NamingContext interfaceContext; private NamingContext routingProtocolContext; private SimpleHopRequestFactory factory; @@ -70,7 +64,9 @@ public class SimpleHopRequestFactoryIpv4Test } @Test - public void testIpv4WithClassifier() { + public void testIpv4WithClassifier( + @InjectTestData(resourcePath = "/ipv4/simplehop/simpleHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) + StaticRoutes ipv4StaticRouteWithClassifier) { final IpAddDelRoute request = factory.createIpv4SimpleHopRequest(false, ROUTE_PROTOCOL_NAME, getIpv4RouteWithId(ipv4StaticRouteWithClassifier, 1L), @@ -82,7 +78,9 @@ public class SimpleHopRequestFactoryIpv4Test } @Test - public void testIpv4WithoutClassifier() { + public void testIpv4WithoutClassifier( + @InjectTestData(resourcePath = "/ipv4/simplehop/simpleHopRouteWithoutClassifier.json", id = STATIC_ROUTE_PATH) + StaticRoutes ipv4StaticRouteWithoutClassifier) { final IpAddDelRoute request = factory.createIpv4SimpleHopRequest(false, ROUTE_PROTOCOL_NAME, ipv4StaticRouteWithoutClassifier.getAugmentation(StaticRoutes1.class).getIpv4().getRoute() @@ -92,4 +90,18 @@ public class SimpleHopRequestFactoryIpv4Test desiredFlaglessResult(0, 0, 0, Ipv4RouteData.FIRST_ADDRESS_AS_ARRAY, 24, Ipv4RouteData.SECOND_ADDRESS_AS_ARRAY, INTERFACE_INDEX, 0, 1, 1, 0, 0, 0), request); } + + @Test + public void testIpv4WithoutVppAttrs( + @InjectTestData(resourcePath = "/ipv4/simplehop/simpleHopRouteNoRouteAttrs.json", id = STATIC_ROUTE_PATH) + StaticRoutes ipv4StaticRouteWithoutRouteAttrs) { + final IpAddDelRoute request = + factory.createIpv4SimpleHopRequest(false, ROUTE_PROTOCOL_NAME, + ipv4StaticRouteWithoutRouteAttrs.getAugmentation(StaticRoutes1.class).getIpv4().getRoute() + .get(0), mappingContext); + + assertEquals( + desiredFlaglessResult(0, 0, 0, Ipv4RouteData.FIRST_ADDRESS_AS_ARRAY, 24, + Ipv4RouteData.SECOND_ADDRESS_AS_ARRAY, INTERFACE_INDEX, 0, 1, 1, 0, 0, 0), request); + } } diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactoryIpv6Test.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactoryIpv6Test.java index e95a66775..721fac315 100644 --- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactoryIpv6Test.java +++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactoryIpv6Test.java @@ -47,12 +47,6 @@ public class SimpleHopRequestFactoryIpv6Test @Mock private MappingContext mappingContext; - @InjectTestData(resourcePath = "/ipv6/simpleHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) - private StaticRoutes ipv6StaticRouteWithClassifier; - - @InjectTestData(resourcePath = "/ipv6/simpleHopRouteWithoutClassifier.json", id = STATIC_ROUTE_PATH) - private StaticRoutes ipv6StaticRouteWithoutClassifier; - private NamingContext interfaceContext; private NamingContext routingProtocolContext; private SimpleHopRequestFactory factory; @@ -71,7 +65,9 @@ public class SimpleHopRequestFactoryIpv6Test } @Test - public void testIpv6WithClassifier() { + public void testIpv6WithClassifier( + @InjectTestData(resourcePath = "/ipv6/simplehop/simpleHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) + StaticRoutes ipv6StaticRouteWithClassifier) { final IpAddDelRoute request = factory.createIpv6SimpleHopRequest(false, ROUTE_PROTOCOL_NAME, ipv6StaticRouteWithClassifier.getAugmentation(StaticRoutes1.class).getIpv6().getRoute().get(0), @@ -83,7 +79,9 @@ public class SimpleHopRequestFactoryIpv6Test } @Test - public void testIpv6WithoutClassifier() { + public void testIpv6WithoutClassifier( + @InjectTestData(resourcePath = "/ipv6/simplehop/simpleHopRouteWithoutClassifier.json", id = STATIC_ROUTE_PATH) + StaticRoutes ipv6StaticRouteWithoutClassifier) { final IpAddDelRoute request = factory.createIpv6SimpleHopRequest(false, ROUTE_PROTOCOL_NAME, ipv6StaticRouteWithoutClassifier.getAugmentation(StaticRoutes1.class).getIpv6().getRoute() @@ -93,4 +91,17 @@ public class SimpleHopRequestFactoryIpv6Test assertEquals(desiredFlaglessResult(0, 1, 0, Ipv6RouteData.FIRST_ADDRESS_AS_ARRAY, 64, Ipv6RouteData.SECOND_ADDRESS_AS_ARRAY, INTERFACE_INDEX, 0, 1, 1, 0, 0, 0), request); } + + @Test + public void testIpv6WithoutRouteAttrs(@InjectTestData(resourcePath = "/ipv6/simplehop/simpleHopRouteWithoutRouteAttrs.json", id = STATIC_ROUTE_PATH) + StaticRoutes ipv6StaticRouteWithoutRouteAttrs) { + final IpAddDelRoute request = + factory.createIpv6SimpleHopRequest(false, ROUTE_PROTOCOL_NAME, + ipv6StaticRouteWithoutRouteAttrs.getAugmentation(StaticRoutes1.class).getIpv6().getRoute() + .get(0), + mappingContext); + + assertEquals(desiredFlaglessResult(0, 1, 0, Ipv6RouteData.FIRST_ADDRESS_AS_ARRAY, 64, + Ipv6RouteData.SECOND_ADDRESS_AS_ARRAY, INTERFACE_INDEX, 0, 1, 1, 0, 0, 0), request); + } } diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SpecialNextHopRequestFactoryIpv4Test.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SpecialNextHopRequestFactoryIpv4Test.java index dd93de59a..253a1b1a9 100644 --- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SpecialNextHopRequestFactoryIpv4Test.java +++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SpecialNextHopRequestFactoryIpv4Test.java @@ -65,7 +65,7 @@ public class SpecialNextHopRequestFactoryIpv4Test @Test public void testIpv4WithClassifierBlackhole( - @InjectTestData(resourcePath = "/ipv4/specialHopRouteBlackhole.json", id = STATIC_ROUTE_PATH) + @InjectTestData(resourcePath = "/ipv4/specialhop/specialHopRouteBlackhole.json", id = STATIC_ROUTE_PATH) StaticRoutes routes) { final IpAddDelRoute request = factory.createIpv4SpecialHopRequest(true, extractSingleRoute(routes, 1L), mappingContext, @@ -76,7 +76,7 @@ public class SpecialNextHopRequestFactoryIpv4Test @Test public void testIpv4WithClassifierReceive( - @InjectTestData(resourcePath = "/ipv4/specialHopRouteReceive.json", id = STATIC_ROUTE_PATH) + @InjectTestData(resourcePath = "/ipv4/specialhop/specialHopRouteReceive.json", id = STATIC_ROUTE_PATH) StaticRoutes routes) { final IpAddDelRoute request = factory.createIpv4SpecialHopRequest(true, extractSingleRoute(routes, 1L), mappingContext, Receive); @@ -86,7 +86,7 @@ public class SpecialNextHopRequestFactoryIpv4Test @Test public void testIpv4WithClassifierUnreach( - @InjectTestData(resourcePath = "/ipv4/specialHopRouteUnreachable.json", id = STATIC_ROUTE_PATH) + @InjectTestData(resourcePath = "/ipv4/specialhop/specialHopRouteUnreachable.json", id = STATIC_ROUTE_PATH) StaticRoutes routes) { final IpAddDelRoute request = factory.createIpv4SpecialHopRequest(true, extractSingleRoute(routes, 1L), mappingContext, Unreachable); @@ -96,7 +96,7 @@ public class SpecialNextHopRequestFactoryIpv4Test @Test public void testIpv4WithClassifierProhibited( - @InjectTestData(resourcePath = "/ipv4/specialHopRouteProhibited.json", id = STATIC_ROUTE_PATH) + @InjectTestData(resourcePath = "/ipv4/specialhop/specialHopRouteProhibited.json", id = STATIC_ROUTE_PATH) StaticRoutes routes) { final IpAddDelRoute request = factory.createIpv4SpecialHopRequest(true, extractSingleRoute(routes, 1L), mappingContext, Prohibit); diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SpecialNextHopRequestFactoryIpv6Test.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SpecialNextHopRequestFactoryIpv6Test.java index b129eef59..d5f504094 100644 --- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SpecialNextHopRequestFactoryIpv6Test.java +++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SpecialNextHopRequestFactoryIpv6Test.java @@ -63,7 +63,7 @@ public class SpecialNextHopRequestFactoryIpv6Test @Test public void testIpv6Blackhole( - @InjectTestData(resourcePath = "/ipv6/specialHopRouteBlackhole.json", id = STATIC_ROUTE_PATH) + @InjectTestData(resourcePath = "/ipv6/specialhop/specialHopRouteBlackhole.json", id = STATIC_ROUTE_PATH) StaticRoutes routes) { final IpAddDelRoute request = factory.createIpv6SpecialHopRequest(true, extractSingleRoute(routes, 1L), mappingContext, Blackhole); @@ -74,7 +74,7 @@ public class SpecialNextHopRequestFactoryIpv6Test @Test public void testIpv6Receive( - @InjectTestData(resourcePath = "/ipv6/specialHopRouteReceive.json", id = STATIC_ROUTE_PATH) + @InjectTestData(resourcePath = "/ipv6/specialhop/specialHopRouteReceive.json", id = STATIC_ROUTE_PATH) StaticRoutes routes) { final IpAddDelRoute request = factory.createIpv6SpecialHopRequest(true, extractSingleRoute(routes, 1L), mappingContext, Receive); @@ -84,7 +84,7 @@ public class SpecialNextHopRequestFactoryIpv6Test @Test public void testIpv6Unreach( - @InjectTestData(resourcePath = "/ipv6/specialHopRouteUnreachable.json", id = STATIC_ROUTE_PATH) + @InjectTestData(resourcePath = "/ipv6/specialhop/specialHopRouteUnreachable.json", id = STATIC_ROUTE_PATH) StaticRoutes routes) { final IpAddDelRoute request = factory.createIpv6SpecialHopRequest(true, extractSingleRoute(routes, 1L), mappingContext, Unreachable); @@ -94,7 +94,7 @@ public class SpecialNextHopRequestFactoryIpv6Test @Test public void testIpv6Prohibited( - @InjectTestData(resourcePath = "/ipv6/specialHopRouteProhibited.json", id = STATIC_ROUTE_PATH) + @InjectTestData(resourcePath = "/ipv6/specialhop/specialHopRouteProhibited.json", id = STATIC_ROUTE_PATH) StaticRoutes routes) { final IpAddDelRoute request = factory.createIpv6SpecialHopRequest(true, extractSingleRoute(routes, 1L), mappingContext, Prohibit); diff --git a/routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithClassifier.json b/routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithClassifier.json deleted file mode 100644 index 99c987e03..000000000 --- a/routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithClassifier.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "static-routes": { - "ipv4": { - "route": [ - { - "id": 1, - "destination-prefix": "192.168.2.1/24", - "vpp-ipv4-route": { - "classify-table": "classify-table-one" - }, - "next-hop-list": { - "next-hop": [ - { - "id": "1", - "address": "192.168.2.1", - "outgoing-interface": "iface", - "weight": "2" - }, - { - "id": "2", - "address": "192.168.2.2", - "outgoing-interface": "iface", - "weight": "3" - } - ] - } - } - ] - } - } -} \ No newline at end of file diff --git a/routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithoutClassifier.json b/routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithoutClassifier.json deleted file mode 100644 index d4d4a0693..000000000 --- a/routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithoutClassifier.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "static-routes": { - "ipv4": { - "route": [ - { - "id": 1, - "destination-prefix": "192.168.2.1/24", - "vpp-ipv4-route": { - }, - "next-hop-list": { - "next-hop": [ - { - "id": "1", - "address": "192.168.2.1", - "outgoing-interface": "iface", - "weight": "2" - }, - { - "id": "2", - "address": "192.168.2.2", - "outgoing-interface": "iface", - "weight": "3" - } - ] - } - } - ] - } - } -} \ No newline at end of file diff --git a/routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithClassifier.json b/routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithClassifier.json new file mode 100644 index 000000000..99c987e03 --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithClassifier.json @@ -0,0 +1,31 @@ +{ + "static-routes": { + "ipv4": { + "route": [ + { + "id": 1, + "destination-prefix": "192.168.2.1/24", + "vpp-ipv4-route": { + "classify-table": "classify-table-one" + }, + "next-hop-list": { + "next-hop": [ + { + "id": "1", + "address": "192.168.2.1", + "outgoing-interface": "iface", + "weight": "2" + }, + { + "id": "2", + "address": "192.168.2.2", + "outgoing-interface": "iface", + "weight": "3" + } + ] + } + } + ] + } + } +} \ No newline at end of file diff --git a/routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithNoRouteAttrs.json b/routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithNoRouteAttrs.json new file mode 100644 index 000000000..71cefa6cb --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithNoRouteAttrs.json @@ -0,0 +1,28 @@ +{ + "static-routes": { + "ipv4": { + "route": [ + { + "id": 1, + "destination-prefix": "192.168.2.1/24", + "next-hop-list": { + "next-hop": [ + { + "id": "1", + "address": "192.168.2.1", + "outgoing-interface": "iface", + "weight": "2" + }, + { + "id": "2", + "address": "192.168.2.2", + "outgoing-interface": "iface", + "weight": "3" + } + ] + } + } + ] + } + } +} \ No newline at end of file diff --git a/routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithoutClassifier.json b/routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithoutClassifier.json new file mode 100644 index 000000000..d4d4a0693 --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithoutClassifier.json @@ -0,0 +1,30 @@ +{ + "static-routes": { + "ipv4": { + "route": [ + { + "id": 1, + "destination-prefix": "192.168.2.1/24", + "vpp-ipv4-route": { + }, + "next-hop-list": { + "next-hop": [ + { + "id": "1", + "address": "192.168.2.1", + "outgoing-interface": "iface", + "weight": "2" + }, + { + "id": "2", + "address": "192.168.2.2", + "outgoing-interface": "iface", + "weight": "3" + } + ] + } + } + ] + } + } +} \ No newline at end of file diff --git a/routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithClassifier.json b/routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithClassifier.json deleted file mode 100644 index d00d9a06a..000000000 --- a/routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithClassifier.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "static-routes": { - "ipv4": { - "route": [ - { - "id": 1, - "destination-prefix": "192.168.2.1/24", - "vpp-ipv4-route": { - "classify-table": "classify-table-one" - }, - "next-hop": "192.168.2.2", - "outgoing-interface": "iface" - } - ] - } - } -} diff --git a/routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithoutClassifier.json b/routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithoutClassifier.json deleted file mode 100644 index 0ef7cf765..000000000 --- a/routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithoutClassifier.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "static-routes": { - "ipv4": { - "route": [ - { - "id": 1, - "destination-prefix": "192.168.2.1/24", - "vpp-ipv4-route": { - }, - "next-hop": "192.168.2.2", - "outgoing-interface": "iface" - } - ] - } - } -} diff --git a/routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteNoRouteAttrs.json b/routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteNoRouteAttrs.json new file mode 100644 index 000000000..d987bb6b1 --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteNoRouteAttrs.json @@ -0,0 +1,14 @@ +{ + "static-routes": { + "ipv4": { + "route": [ + { + "id": 1, + "destination-prefix": "192.168.2.1/24", + "next-hop": "192.168.2.2", + "outgoing-interface": "iface" + } + ] + } + } +} diff --git a/routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteWithClassifier.json b/routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteWithClassifier.json new file mode 100644 index 000000000..d00d9a06a --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteWithClassifier.json @@ -0,0 +1,17 @@ +{ + "static-routes": { + "ipv4": { + "route": [ + { + "id": 1, + "destination-prefix": "192.168.2.1/24", + "vpp-ipv4-route": { + "classify-table": "classify-table-one" + }, + "next-hop": "192.168.2.2", + "outgoing-interface": "iface" + } + ] + } + } +} diff --git a/routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteWithoutClassifier.json b/routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteWithoutClassifier.json new file mode 100644 index 000000000..0ef7cf765 --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteWithoutClassifier.json @@ -0,0 +1,16 @@ +{ + "static-routes": { + "ipv4": { + "route": [ + { + "id": 1, + "destination-prefix": "192.168.2.1/24", + "vpp-ipv4-route": { + }, + "next-hop": "192.168.2.2", + "outgoing-interface": "iface" + } + ] + } + } +} diff --git a/routing/routing-impl/src/test/resources/ipv4/specialHopRouteBlackhole.json b/routing/routing-impl/src/test/resources/ipv4/specialHopRouteBlackhole.json deleted file mode 100644 index b2ddc238b..000000000 --- a/routing/routing-impl/src/test/resources/ipv4/specialHopRouteBlackhole.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "static-routes": { - "ipv4": { - "route": [ - { - "id": 1, - "destination-prefix": "192.168.2.1/24", - "special-next-hop": "blackhole" - } - ] - } - } -} diff --git a/routing/routing-impl/src/test/resources/ipv4/specialHopRouteProhibited.json b/routing/routing-impl/src/test/resources/ipv4/specialHopRouteProhibited.json deleted file mode 100644 index fe9faf44c..000000000 --- a/routing/routing-impl/src/test/resources/ipv4/specialHopRouteProhibited.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "static-routes": { - "ipv4": { - "route": [ - { - "id": 1, - "destination-prefix": "192.168.2.1/24", - "special-next-hop": "prohibit" - } - ] - } - } -} diff --git a/routing/routing-impl/src/test/resources/ipv4/specialHopRouteReceive.json b/routing/routing-impl/src/test/resources/ipv4/specialHopRouteReceive.json deleted file mode 100644 index c967aa542..000000000 --- a/routing/routing-impl/src/test/resources/ipv4/specialHopRouteReceive.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "static-routes": { - "ipv4": { - "route": [ - { - "id": 1, - "destination-prefix": "192.168.2.1/24", - "special-next-hop": "receive" - } - ] - } - } -} diff --git a/routing/routing-impl/src/test/resources/ipv4/specialHopRouteUnreachable.json b/routing/routing-impl/src/test/resources/ipv4/specialHopRouteUnreachable.json deleted file mode 100644 index bae467fbd..000000000 --- a/routing/routing-impl/src/test/resources/ipv4/specialHopRouteUnreachable.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "static-routes": { - "ipv4": { - "route": [ - { - "id": 1, - "destination-prefix": "192.168.2.1/24", - "special-next-hop": "unreachable" - } - ] - } - } -} \ No newline at end of file diff --git a/routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteBlackhole.json b/routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteBlackhole.json new file mode 100644 index 000000000..b2ddc238b --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteBlackhole.json @@ -0,0 +1,13 @@ +{ + "static-routes": { + "ipv4": { + "route": [ + { + "id": 1, + "destination-prefix": "192.168.2.1/24", + "special-next-hop": "blackhole" + } + ] + } + } +} diff --git a/routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteProhibited.json b/routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteProhibited.json new file mode 100644 index 000000000..fe9faf44c --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteProhibited.json @@ -0,0 +1,13 @@ +{ + "static-routes": { + "ipv4": { + "route": [ + { + "id": 1, + "destination-prefix": "192.168.2.1/24", + "special-next-hop": "prohibit" + } + ] + } + } +} diff --git a/routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteReceive.json b/routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteReceive.json new file mode 100644 index 000000000..c967aa542 --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteReceive.json @@ -0,0 +1,13 @@ +{ + "static-routes": { + "ipv4": { + "route": [ + { + "id": 1, + "destination-prefix": "192.168.2.1/24", + "special-next-hop": "receive" + } + ] + } + } +} diff --git a/routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteUnreachable.json b/routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteUnreachable.json new file mode 100644 index 000000000..bae467fbd --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteUnreachable.json @@ -0,0 +1,13 @@ +{ + "static-routes": { + "ipv4": { + "route": [ + { + "id": 1, + "destination-prefix": "192.168.2.1/24", + "special-next-hop": "unreachable" + } + ] + } + } +} \ No newline at end of file diff --git a/routing/routing-impl/src/test/resources/ipv6/multiHopRouteWithClassifier.json b/routing/routing-impl/src/test/resources/ipv6/multiHopRouteWithClassifier.json deleted file mode 100644 index c8b1e208e..000000000 --- a/routing/routing-impl/src/test/resources/ipv6/multiHopRouteWithClassifier.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "static-routes": { - "ipv6": { - "route": [ - { - "id": 1, - "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", - "vpp-ipv6-route": { - "classify-table": "classify-table-one" - }, - "next-hop-list": { - "next-hop": [ - { - "id": "1", - "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", - "outgoing-interface": "iface", - "weight": "2" - }, - { - "id": "2", - "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", - "outgoing-interface": "iface", - "weight": "2" - } - ] - } - } - ] - } - } -} \ No newline at end of file diff --git a/routing/routing-impl/src/test/resources/ipv6/multiHopRouteWithoutClassifier.json b/routing/routing-impl/src/test/resources/ipv6/multiHopRouteWithoutClassifier.json deleted file mode 100644 index 2e44ebcf5..000000000 --- a/routing/routing-impl/src/test/resources/ipv6/multiHopRouteWithoutClassifier.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "static-routes": { - "ipv6": { - "route": [ - { - "id": 1, - "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", - "vpp-ipv6-route": { - }, - "next-hop-list": { - "next-hop": [ - { - "id": "1", - "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", - "outgoing-interface": "iface", - "weight": "2" - }, - { - "id": "2", - "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", - "outgoing-interface": "iface", - "weight": "2" - } - ] - } - } - ] - } - } -} \ No newline at end of file diff --git a/routing/routing-impl/src/test/resources/ipv6/multihop/multiHopRouteWithClassifier.json b/routing/routing-impl/src/test/resources/ipv6/multihop/multiHopRouteWithClassifier.json new file mode 100644 index 000000000..c8b1e208e --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv6/multihop/multiHopRouteWithClassifier.json @@ -0,0 +1,31 @@ +{ + "static-routes": { + "ipv6": { + "route": [ + { + "id": 1, + "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", + "vpp-ipv6-route": { + "classify-table": "classify-table-one" + }, + "next-hop-list": { + "next-hop": [ + { + "id": "1", + "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", + "outgoing-interface": "iface", + "weight": "2" + }, + { + "id": "2", + "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", + "outgoing-interface": "iface", + "weight": "2" + } + ] + } + } + ] + } + } +} \ No newline at end of file diff --git a/routing/routing-impl/src/test/resources/ipv6/multihop/multiHopRouteWithoutClassifier.json b/routing/routing-impl/src/test/resources/ipv6/multihop/multiHopRouteWithoutClassifier.json new file mode 100644 index 000000000..2e44ebcf5 --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv6/multihop/multiHopRouteWithoutClassifier.json @@ -0,0 +1,30 @@ +{ + "static-routes": { + "ipv6": { + "route": [ + { + "id": 1, + "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", + "vpp-ipv6-route": { + }, + "next-hop-list": { + "next-hop": [ + { + "id": "1", + "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", + "outgoing-interface": "iface", + "weight": "2" + }, + { + "id": "2", + "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", + "outgoing-interface": "iface", + "weight": "2" + } + ] + } + } + ] + } + } +} \ No newline at end of file diff --git a/routing/routing-impl/src/test/resources/ipv6/multihop/multiHopRouteWithoutRouteAttrs.json b/routing/routing-impl/src/test/resources/ipv6/multihop/multiHopRouteWithoutRouteAttrs.json new file mode 100644 index 000000000..f85b1b716 --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv6/multihop/multiHopRouteWithoutRouteAttrs.json @@ -0,0 +1,28 @@ +{ + "static-routes": { + "ipv6": { + "route": [ + { + "id": 1, + "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", + "next-hop-list": { + "next-hop": [ + { + "id": "1", + "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", + "outgoing-interface": "iface", + "weight": "2" + }, + { + "id": "2", + "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", + "outgoing-interface": "iface", + "weight": "2" + } + ] + } + } + ] + } + } +} \ No newline at end of file diff --git a/routing/routing-impl/src/test/resources/ipv6/simpleHopRouteWithClassifier.json b/routing/routing-impl/src/test/resources/ipv6/simpleHopRouteWithClassifier.json deleted file mode 100644 index c011a8d01..000000000 --- a/routing/routing-impl/src/test/resources/ipv6/simpleHopRouteWithClassifier.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "static-routes": { - "ipv6": { - "route": [ - { - "id": 1, - "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", - "vpp-ipv6-route": { - "classify-table": "classify-table-one" - }, - "next-hop": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", - "outgoing-interface": "iface" - } - ] - } - } -} \ No newline at end of file diff --git a/routing/routing-impl/src/test/resources/ipv6/simpleHopRouteWithoutClassifier.json b/routing/routing-impl/src/test/resources/ipv6/simpleHopRouteWithoutClassifier.json deleted file mode 100644 index 1cb663ca7..000000000 --- a/routing/routing-impl/src/test/resources/ipv6/simpleHopRouteWithoutClassifier.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "static-routes": { - "ipv6": { - "route": [ - { - "id": 1, - "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", - "vpp-ipv6-route": { - }, - "next-hop": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", - "outgoing-interface": "iface" - } - ] - } - } -} \ No newline at end of file diff --git a/routing/routing-impl/src/test/resources/ipv6/simplehop/simpleHopRouteWithClassifier.json b/routing/routing-impl/src/test/resources/ipv6/simplehop/simpleHopRouteWithClassifier.json new file mode 100644 index 000000000..c011a8d01 --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv6/simplehop/simpleHopRouteWithClassifier.json @@ -0,0 +1,17 @@ +{ + "static-routes": { + "ipv6": { + "route": [ + { + "id": 1, + "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", + "vpp-ipv6-route": { + "classify-table": "classify-table-one" + }, + "next-hop": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", + "outgoing-interface": "iface" + } + ] + } + } +} \ No newline at end of file diff --git a/routing/routing-impl/src/test/resources/ipv6/simplehop/simpleHopRouteWithoutClassifier.json b/routing/routing-impl/src/test/resources/ipv6/simplehop/simpleHopRouteWithoutClassifier.json new file mode 100644 index 000000000..1cb663ca7 --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv6/simplehop/simpleHopRouteWithoutClassifier.json @@ -0,0 +1,16 @@ +{ + "static-routes": { + "ipv6": { + "route": [ + { + "id": 1, + "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", + "vpp-ipv6-route": { + }, + "next-hop": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", + "outgoing-interface": "iface" + } + ] + } + } +} \ No newline at end of file diff --git a/routing/routing-impl/src/test/resources/ipv6/simplehop/simpleHopRouteWithoutRouteAttrs.json b/routing/routing-impl/src/test/resources/ipv6/simplehop/simpleHopRouteWithoutRouteAttrs.json new file mode 100644 index 000000000..a735c193c --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv6/simplehop/simpleHopRouteWithoutRouteAttrs.json @@ -0,0 +1,14 @@ +{ + "static-routes": { + "ipv6": { + "route": [ + { + "id": 1, + "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", + "next-hop": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", + "outgoing-interface": "iface" + } + ] + } + } +} \ No newline at end of file diff --git a/routing/routing-impl/src/test/resources/ipv6/specialHopRouteBlackhole.json b/routing/routing-impl/src/test/resources/ipv6/specialHopRouteBlackhole.json deleted file mode 100644 index 1cc319107..000000000 --- a/routing/routing-impl/src/test/resources/ipv6/specialHopRouteBlackhole.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "static-routes": { - "ipv6": { - "route": [ - { - "id": 1, - "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/24", - "special-next-hop": "blackhole" - } - ] - } - } -} diff --git a/routing/routing-impl/src/test/resources/ipv6/specialHopRouteProhibited.json b/routing/routing-impl/src/test/resources/ipv6/specialHopRouteProhibited.json deleted file mode 100644 index d69e817d7..000000000 --- a/routing/routing-impl/src/test/resources/ipv6/specialHopRouteProhibited.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "static-routes": { - "ipv6": { - "route": [ - { - "id": 1, - "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/24", - "special-next-hop": "prohibit" - } - ] - } - } -} diff --git a/routing/routing-impl/src/test/resources/ipv6/specialHopRouteReceive.json b/routing/routing-impl/src/test/resources/ipv6/specialHopRouteReceive.json deleted file mode 100644 index 50d447de0..000000000 --- a/routing/routing-impl/src/test/resources/ipv6/specialHopRouteReceive.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "static-routes": { - "ipv6": { - "route": [ - { - "id": 1, - "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/24", - "special-next-hop": "receive" - } - ] - } - } -} diff --git a/routing/routing-impl/src/test/resources/ipv6/specialHopRouteUnreachable.json b/routing/routing-impl/src/test/resources/ipv6/specialHopRouteUnreachable.json deleted file mode 100644 index c874549d1..000000000 --- a/routing/routing-impl/src/test/resources/ipv6/specialHopRouteUnreachable.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "static-routes": { - "ipv6": { - "route": [ - { - "id": 1, - "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/24", - "special-next-hop": "unreachable" - } - ] - } - } -} \ No newline at end of file diff --git a/routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteBlackhole.json b/routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteBlackhole.json new file mode 100644 index 000000000..1cc319107 --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteBlackhole.json @@ -0,0 +1,13 @@ +{ + "static-routes": { + "ipv6": { + "route": [ + { + "id": 1, + "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/24", + "special-next-hop": "blackhole" + } + ] + } + } +} diff --git a/routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteProhibited.json b/routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteProhibited.json new file mode 100644 index 000000000..d69e817d7 --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteProhibited.json @@ -0,0 +1,13 @@ +{ + "static-routes": { + "ipv6": { + "route": [ + { + "id": 1, + "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/24", + "special-next-hop": "prohibit" + } + ] + } + } +} diff --git a/routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteReceive.json b/routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteReceive.json new file mode 100644 index 000000000..50d447de0 --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteReceive.json @@ -0,0 +1,13 @@ +{ + "static-routes": { + "ipv6": { + "route": [ + { + "id": 1, + "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/24", + "special-next-hop": "receive" + } + ] + } + } +} diff --git a/routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteUnreachable.json b/routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteUnreachable.json new file mode 100644 index 000000000..c874549d1 --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteUnreachable.json @@ -0,0 +1,13 @@ +{ + "static-routes": { + "ipv6": { + "route": [ + { + "id": 1, + "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/24", + "special-next-hop": "unreachable" + } + ] + } + } +} \ No newline at end of file -- cgit 1.2.3-korg