From 8acc5613345d9c50d0f33c3d74ae64e474b80724 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Thu, 4 Jan 2018 07:08:34 +0100 Subject: HONEYCOMB-424: bump ODL dependencies to Oxygen Change-Id: I3160e5df4e66b3b3c732619fc1fc7599459fda76 Signed-off-by: Marek Gradzki --- .../infra/bgp/ApplicationRibWriterFactory.java | 4 +-- .../io/fd/honeycomb/infra/bgp/BgpRIBProvider.java | 22 ++++++------- .../infra/bgp/BgpReaderFactoryProvider.java | 4 +-- .../infra/bgp/neighbors/BgpPeerWriterFactory.java | 5 ++- .../infra/bgp/neighbors/NeighborCustomizer.java | 6 ++-- .../bgp/neighbors/NeighborCustomizerTest.java | 38 +++++++++++++++++----- 6 files changed, 50 insertions(+), 29 deletions(-) (limited to 'infra/northbound/bgp') diff --git a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/ApplicationRibWriterFactory.java b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/ApplicationRibWriterFactory.java index 00a12e7ac..05a2a9602 100644 --- a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/ApplicationRibWriterFactory.java +++ b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/ApplicationRibWriterFactory.java @@ -23,8 +23,8 @@ import io.fd.honeycomb.translate.util.write.BindingBrokerWriter; import io.fd.honeycomb.translate.write.WriterFactory; import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder; import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.ApplicationRib; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.rib.Tables; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.ApplicationRib; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.rib.Tables; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; /** diff --git a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpRIBProvider.java b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpRIBProvider.java index 06444ae5b..76b34d5eb 100644 --- a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpRIBProvider.java +++ b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpRIBProvider.java @@ -16,9 +16,15 @@ package io.fd.honeycomb.infra.bgp; +import static org.opendaylight.protocol.bgp.rib.impl.config.OpenConfigMappingUtil.toTableTypes; + import com.google.inject.Inject; import io.fd.honeycomb.binding.init.ProviderTrait; import io.fd.honeycomb.data.init.ShutdownHandler; +import java.util.ArrayList; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec; import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; import org.opendaylight.controller.md.sal.dom.broker.impl.PingPongDataBroker; @@ -36,20 +42,13 @@ import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionConsumerContext; import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.multiprotocol.rev151009.bgp.common.afi.safi.list.AfiSafi; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.RibId; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.rib.TablesKey; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.RibId; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.rib.TablesKey; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.BgpId; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.ClusterIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.ArrayList; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - -import static org.opendaylight.protocol.bgp.rib.impl.config.OpenConfigMappingUtil.toTableTypes; - final class BgpRIBProvider extends ProviderTrait { private static final Logger LOG = LoggerFactory.getLogger(BgpRIBProvider.class); @@ -89,10 +88,11 @@ final class BgpRIBProvider extends ProviderTrait { // based on org.opendaylight.protocol.bgp.rib.impl.config.RibImpl.createRib final PingPongDataBroker pingPongDataBroker = new PingPongDataBroker(domBroker); final RIBImpl rib = - new RIBImpl(new NoopClusterSingletonServiceProvider(), new RibId(cfg.bgpProtocolInstanceName.get()), + new RIBImpl(new RibId(cfg.bgpProtocolInstanceName.get()), asNumber, new BgpId(routerId), clusterId, extensions, dispatcher, codec, pingPongDataBroker, toTableTypes(afiSafiList, tableTypeRegistry), pathSelectionModes, - extensions.getClassLoadingStrategy(), null); + extensions.getClassLoadingStrategy()); + rib.instantiateServiceInstance(); // required for proper RIB's CodecRegistry initialization (based on RIBImpl.start) schemaService.registerSchemaContextListener(rib); diff --git a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpReaderFactoryProvider.java b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpReaderFactoryProvider.java index 728bb14e5..6f5bd5066 100644 --- a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpReaderFactoryProvider.java +++ b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpReaderFactoryProvider.java @@ -24,8 +24,8 @@ import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder; import io.fd.honeycomb.translate.util.read.BindingBrokerReader; import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.BgpRib; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.BgpRibBuilder; +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.BgpRibBuilder; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; final class BgpReaderFactoryProvider extends ProviderTrait { diff --git a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/neighbors/BgpPeerWriterFactory.java b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/neighbors/BgpPeerWriterFactory.java index 848b4d504..5e924be7e 100644 --- a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/neighbors/BgpPeerWriterFactory.java +++ b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/neighbors/BgpPeerWriterFactory.java @@ -21,6 +21,7 @@ import io.fd.honeycomb.infra.bgp.BgpConfiguration; import io.fd.honeycomb.translate.impl.write.GenericListWriter; import io.fd.honeycomb.translate.write.WriterFactory; import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder; +import javax.annotation.Nonnull; import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryConsumer; import org.opendaylight.protocol.bgp.rib.impl.spi.BGPPeerRegistry; import org.opendaylight.protocol.bgp.rib.impl.spi.RIB; @@ -31,11 +32,9 @@ import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.network.instance.re import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.network.instance.rev151018.network.instance.top.network.instances.NetworkInstance; import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.network.instance.rev151018.network.instance.top.network.instances.network.instance.Protocols; import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.network.instance.rev151018.network.instance.top.network.instances.network.instance.protocols.Protocol; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev160614.Protocol1; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev171207.Protocol1; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import javax.annotation.Nonnull; - /** * Initializes writer for Bgp Neighbors ({@link Neighbor} node) and all its parents required by HC infra. */ diff --git a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/neighbors/NeighborCustomizer.java b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/neighbors/NeighborCustomizer.java index baccb9a1c..cdaffb6f6 100644 --- a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/neighbors/NeighborCustomizer.java +++ b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/neighbors/NeighborCustomizer.java @@ -88,7 +88,8 @@ final class NeighborCustomizer implements ListWriterCustomizer