From b16cea20258ba537db7c0755208c82ab93331ff7 Mon Sep 17 00:00:00 2001 From: Michal Cmarada Date: Mon, 8 Apr 2019 11:37:45 +0200 Subject: HONEYCOMB-443: ODL bump to Neon - bumps ODL dependencies to neon - migrates guava optional to java.utils.optional Change-Id: Ibdaa365c7e21a341103aba88dfd67277e40d2969 Signed-off-by: Michal Cmarada --- .../main/java/io/fd/honeycomb/infra/bgp/BgpModule.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpModule.java') diff --git a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpModule.java b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpModule.java index 7123caf14..8820b995d 100644 --- a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpModule.java +++ b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpModule.java @@ -25,12 +25,12 @@ import com.google.inject.name.Names; import io.fd.honeycomb.infra.distro.data.BindingDataBrokerProvider; import io.fd.honeycomb.infra.distro.data.DataStoreProvider; import io.fd.honeycomb.infra.distro.data.InmemoryDOMDataBrokerProvider; +import io.fd.honeycomb.infra.distro.data.LegacyBindingDataBrokerProvider; import io.fd.honeycomb.translate.bgp.RibWriter; import io.netty.channel.EventLoopGroup; -import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; -import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; -import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore; +import org.opendaylight.mdsal.binding.api.DataBroker; +import org.opendaylight.mdsal.dom.api.DOMDataBroker; +import org.opendaylight.mdsal.dom.store.inmemory.InMemoryDOMDataStore; import org.opendaylight.protocol.bgp.rib.impl.spi.BGPDispatcher; import org.opendaylight.protocol.bgp.rib.impl.spi.RIB; import org.slf4j.Logger; @@ -67,12 +67,12 @@ public final class BgpModule extends PrivateModule { private void configureRIB() { // Create inmemory config data store for HONEYCOMB_BGP bind(InMemoryDOMDataStore.class).annotatedWith(Names.named(CONFIG)) - .toProvider(new DataStoreProvider(CONFIG, LogicalDatastoreType.CONFIGURATION)) + .toProvider(new DataStoreProvider(CONFIG)) .in(Singleton.class); // Create inmemory operational data store for HONEYCOMB_BGP bind(InMemoryDOMDataStore.class).annotatedWith(Names.named(OPERATIONAL)) - .toProvider(new DataStoreProvider(OPERATIONAL, LogicalDatastoreType.OPERATIONAL)) + .toProvider(new DataStoreProvider(OPERATIONAL)) .in(Singleton.class); // Wrap datastores as DOMDataBroker @@ -84,6 +84,12 @@ public final class BgpModule extends PrivateModule { .in(Singleton.class); expose(DataBroker.class).annotatedWith(Names.named(HONEYCOMB_BGP)); + bind(org.opendaylight.controller.md.sal.binding.api.DataBroker.class).annotatedWith(Names.named(HONEYCOMB_BGP)) + .toProvider(LegacyBindingDataBrokerProvider.class) + .in(Singleton.class); + expose(org.opendaylight.controller.md.sal.binding.api.DataBroker.class) + .annotatedWith(Names.named(HONEYCOMB_BGP)); + // Create RIB instance bind(RIB.class).toProvider(BgpRIBProvider.class).in(Singleton.class); expose(RIB.class); -- cgit 1.2.3-korg