From dabd8f1b137c311935c984bed8c79931c79640cc Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Fri, 7 Jul 2017 15:30:29 +0200 Subject: HC2VPP-188 - Ordering fixed for routing entries Change-Id: Iec8df0668a74f50b5abb4413e33c1fd3a0391779 Signed-off-by: Jan Srnicek --- .../io/fd/hc2vpp/routing/write/RoutingWriterFactory.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/RoutingWriterFactory.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/RoutingWriterFactory.java index 4b5a3bb39..c5224abf8 100644 --- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/RoutingWriterFactory.java +++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/RoutingWriterFactory.java @@ -65,6 +65,10 @@ public final class RoutingWriterFactory implements WriterFactory, Ipv4WriteRouti private static final InstanceIdentifier PREFIX_ID = ROUTING_ADVERTISMENT_ID.child(PrefixList.class).child(Prefix.class); + private static final InstanceIdentifier IFACE_ID = + InstanceIdentifier.create(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces.class) + .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface.class); + @Inject private FutureJVppCore vppApi; @@ -106,12 +110,12 @@ public final class RoutingWriterFactory implements WriterFactory, Ipv4WriteRouti final InstanceIdentifier ipv4RouteIdentifier = ipv4RouteIdentifier(staticRoutesInstanceIdentifier); final InstanceIdentifier ipv6RouteIdentifier = ipv6RouteIdentifier(staticRoutesInstanceIdentifier); - registry.subtreeAdd(ipv4RoutingHandledChildren(ipv4RouteSubtree()), new GenericWriter<>(ipv4RouteIdentifier, + registry.subtreeAddAfter(ipv4RoutingHandledChildren(ipv4RouteSubtree()), new GenericWriter<>(ipv4RouteIdentifier, new Ipv4RouteCustomizer(vppApi, interfaceContext, routeContext, routingProtocolContext, routHopContext, - vppClassifierContextManager))); - registry.subtreeAdd(ipv6RoutingHandledChildren(ipv6RouteSubtree()), new GenericWriter<>(ipv6RouteIdentifier, + vppClassifierContextManager)), IFACE_ID); + registry.subtreeAddAfter(ipv6RoutingHandledChildren(ipv6RouteSubtree()), new GenericWriter<>(ipv6RouteIdentifier, new Ipv6RouteCustomizer(vppApi, interfaceContext, routeContext, routingProtocolContext, routHopContext, - vppClassifierContextManager))); + vppClassifierContextManager)), IFACE_ID); registry.add(new GenericWriter<>(ROUTING_INTERFACE_ID, new RoutingInterfaceCustomizer())); registry.subtreeAdd(raHandledChildren(), new GenericWriter<>(ROUTING_ADVERTISMENT_ID, new RouterAdvertisementsCustomizer(vppApi, interfaceContext))); -- cgit 1.2.3-korg