summaryrefslogtreecommitdiffstats
path: root/infra/northbound/bgp/src/main
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2018-01-04 07:08:34 +0100
committerMarek Gradzki <mgradzki@cisco.com>2018-03-23 06:54:25 +0100
commit8acc5613345d9c50d0f33c3d74ae64e474b80724 (patch)
tree130723e4f6e4daa2fcc57538d971dfd34886c8a8 /infra/northbound/bgp/src/main
parentbc559d4e6ccbdbaf65e612e56b2fe5d0614ff623 (diff)
HONEYCOMB-424: bump ODL dependencies to Oxygen
Change-Id: I3160e5df4e66b3b3c732619fc1fc7599459fda76 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'infra/northbound/bgp/src/main')
-rw-r--r--infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/ApplicationRibWriterFactory.java4
-rw-r--r--infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpRIBProvider.java22
-rw-r--r--infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpReaderFactoryProvider.java4
-rw-r--r--infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/neighbors/BgpPeerWriterFactory.java5
-rw-r--r--infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/neighbors/NeighborCustomizer.java6
5 files changed, 21 insertions, 20 deletions
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<RIB> {
private static final Logger LOG = LoggerFactory.getLogger(BgpRIBProvider.class);
@@ -89,10 +88,11 @@ final class BgpRIBProvider extends ProviderTrait<RIB> {
// 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<ReaderFactory> {
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<Neighbor, Neighbo
peer = new BgpPeer(null);
}
LOG.debug("Starting bgp peer for {}", id);
- peer.start(globalRib, neighbor, tableTypeRegistry, null);
+ peer.start(globalRib, neighbor, tableTypeRegistry);
+ peer.instantiateServiceInstance();
addPeer(id, peer);
}
@@ -102,7 +103,8 @@ final class NeighborCustomizer implements ListWriterCustomizer<Neighbor, Neighbo
final PeerBean peer = peers.get(id);
checkState(peer != null, "Could not find peer bean while updating neighbor {}", id);
closePeerBean(peer);
- peer.start(globalRib, dataAfter, tableTypeRegistry, null);
+ peer.start(globalRib, dataAfter, tableTypeRegistry);
+ peer.instantiateServiceInstance();
LOG.debug("Peer instance updated {}", peer);
}