diff options
Diffstat (limited to 'infra/northbound')
19 files changed, 103 insertions, 91 deletions
diff --git a/infra/northbound/bgp-extensions/evpn/src/main/java/io/fd/honeycomb/northbound/bgp/extension/EvpnModule.java b/infra/northbound/bgp-extensions/evpn/src/main/java/io/fd/honeycomb/northbound/bgp/extension/EvpnModule.java index b3bf0af0a..7b24b2ff7 100644 --- a/infra/northbound/bgp-extensions/evpn/src/main/java/io/fd/honeycomb/northbound/bgp/extension/EvpnModule.java +++ b/infra/northbound/bgp-extensions/evpn/src/main/java/io/fd/honeycomb/northbound/bgp/extension/EvpnModule.java @@ -16,25 +16,24 @@ package io.fd.honeycomb.northbound.bgp.extension; +import static io.fd.honeycomb.northbound.bgp.extension.AbstractBgpExtensionModule.TableTypeRegistration.tableType; + import com.google.common.collect.ImmutableSet; import com.google.inject.Provider; import io.fd.honeycomb.translate.write.WriterFactory; +import java.util.Collections; +import java.util.Set; import org.opendaylight.protocol.bgp.evpn.impl.BGPActivator; import org.opendaylight.protocol.bgp.evpn.impl.RIBActivator; import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderActivator; import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderActivator; 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.http.openconfig.net.yang.bgp.types.rev151009.L2VPNEVPN; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev160321.EvpnSubsequentAddressFamily; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev160321.L2vpnAddressFamily; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev171213.EvpnSubsequentAddressFamily; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev171213.L2vpnAddressFamily; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.Collections; -import java.util.Set; - -import static io.fd.honeycomb.northbound.bgp.extension.AbstractBgpExtensionModule.TableTypeRegistration.tableType; - public class EvpnModule extends AbstractBgpExtensionModule { private static final Logger LOG = LoggerFactory.getLogger(EvpnModule.class); diff --git a/infra/northbound/bgp-extensions/evpn/src/main/java/io/fd/honeycomb/northbound/bgp/extension/EvpnWriterFactory.java b/infra/northbound/bgp-extensions/evpn/src/main/java/io/fd/honeycomb/northbound/bgp/extension/EvpnWriterFactory.java index e06c79baa..82567dd26 100644 --- a/infra/northbound/bgp-extensions/evpn/src/main/java/io/fd/honeycomb/northbound/bgp/extension/EvpnWriterFactory.java +++ b/infra/northbound/bgp-extensions/evpn/src/main/java/io/fd/honeycomb/northbound/bgp/extension/EvpnWriterFactory.java @@ -16,19 +16,18 @@ package io.fd.honeycomb.northbound.bgp.extension; +import static io.fd.honeycomb.northbound.bgp.extension.AbstractBgpExtensionModule.TABLES_IID; + import com.google.inject.Inject; import com.google.inject.name.Named; import io.fd.honeycomb.translate.util.write.BindingBrokerWriter; import io.fd.honeycomb.translate.write.WriterFactory; import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder; +import javax.annotation.Nonnull; import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev160321.evpn.routes.EvpnRoutes; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev171213.evpn.routes.EvpnRoutes; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import javax.annotation.Nonnull; - -import static io.fd.honeycomb.northbound.bgp.extension.AbstractBgpExtensionModule.TABLES_IID; - public class EvpnWriterFactory implements WriterFactory { private static final InstanceIdentifier<EvpnRoutes> EVPN_ROUTES_IID = TABLES_IID.child((Class) EvpnRoutes.class); diff --git a/infra/northbound/bgp-extensions/extension-common/src/main/java/io/fd/honeycomb/northbound/bgp/extension/AbstractBgpExtensionModule.java b/infra/northbound/bgp-extensions/extension-common/src/main/java/io/fd/honeycomb/northbound/bgp/extension/AbstractBgpExtensionModule.java index a9540442b..a43885761 100644 --- a/infra/northbound/bgp-extensions/extension-common/src/main/java/io/fd/honeycomb/northbound/bgp/extension/AbstractBgpExtensionModule.java +++ b/infra/northbound/bgp-extensions/extension-common/src/main/java/io/fd/honeycomb/northbound/bgp/extension/AbstractBgpExtensionModule.java @@ -20,20 +20,19 @@ import com.google.inject.AbstractModule; import com.google.inject.Singleton; import com.google.inject.multibindings.Multibinder; import io.fd.honeycomb.translate.write.WriterFactory; +import javax.annotation.Nonnull; import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryConsumer; import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderActivator; import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderActivator; 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.http.openconfig.net.yang.bgp.types.rev151009.AfiSafiType; -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.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.types.rev130919.AddressFamily; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.SubsequentAddressFamily; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; -import javax.annotation.Nonnull; - /** * General blueprint for any module that wants to bind new BGP extension */ diff --git a/infra/northbound/bgp-extensions/inet/src/main/java/io/fd/honeycomb/northbound/bgp/extension/InetModule.java b/infra/northbound/bgp-extensions/inet/src/main/java/io/fd/honeycomb/northbound/bgp/extension/InetModule.java index 477d0ec8c..9d798c849 100644 --- a/infra/northbound/bgp-extensions/inet/src/main/java/io/fd/honeycomb/northbound/bgp/extension/InetModule.java +++ b/infra/northbound/bgp-extensions/inet/src/main/java/io/fd/honeycomb/northbound/bgp/extension/InetModule.java @@ -16,11 +16,14 @@ package io.fd.honeycomb.northbound.bgp.extension; +import static io.fd.honeycomb.northbound.bgp.extension.AbstractBgpExtensionModule.TableTypeRegistration.tableType; + import com.google.common.collect.ImmutableSet; import com.google.inject.Inject; import com.google.inject.Provider; import io.fd.honeycomb.infra.bgp.BgpConfiguration; import io.fd.honeycomb.translate.write.WriterFactory; +import java.util.Set; import org.opendaylight.protocol.bgp.inet.BGPActivator; import org.opendaylight.protocol.bgp.inet.RIBActivator; import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderActivator; @@ -29,18 +32,14 @@ import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.multiprotocol.r import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.multiprotocol.rev151009.bgp.common.afi.safi.list.AfiSafiBuilder; import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.IPV4UNICAST; import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.IPV6UNICAST; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev160614.AfiSafi2; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev160614.AfiSafi2Builder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev171207.AfiSafi2; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev171207.AfiSafi2Builder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv4AddressFamily; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv6AddressFamily; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.UnicastSubsequentAddressFamily; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.Set; - -import static io.fd.honeycomb.northbound.bgp.extension.AbstractBgpExtensionModule.TableTypeRegistration.tableType; - public class InetModule extends AbstractBgpExtensionModule { private static final Logger LOG = LoggerFactory.getLogger(InetModule.class); diff --git a/infra/northbound/bgp-extensions/inet/src/main/java/io/fd/honeycomb/northbound/bgp/extension/InetWriterFactory.java b/infra/northbound/bgp-extensions/inet/src/main/java/io/fd/honeycomb/northbound/bgp/extension/InetWriterFactory.java index cc7064c79..69bda6fe8 100644 --- a/infra/northbound/bgp-extensions/inet/src/main/java/io/fd/honeycomb/northbound/bgp/extension/InetWriterFactory.java +++ b/infra/northbound/bgp-extensions/inet/src/main/java/io/fd/honeycomb/northbound/bgp/extension/InetWriterFactory.java @@ -22,8 +22,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.inet.rev150305.ipv4.routes.Ipv4Routes; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev150305.ipv6.routes.Ipv6Routes; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv4.routes.Ipv4Routes; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv6.routes.Ipv6Routes; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import javax.annotation.Nonnull; diff --git a/infra/northbound/bgp-extensions/l3-vpn-v4/src/main/java/io/fd/honeycomb/northbound/bgp/extension/L3VpnV4WriterFactory.java b/infra/northbound/bgp-extensions/l3-vpn-v4/src/main/java/io/fd/honeycomb/northbound/bgp/extension/L3VpnV4WriterFactory.java index 255a55d53..01051e2b2 100644 --- a/infra/northbound/bgp-extensions/l3-vpn-v4/src/main/java/io/fd/honeycomb/northbound/bgp/extension/L3VpnV4WriterFactory.java +++ b/infra/northbound/bgp-extensions/l3-vpn-v4/src/main/java/io/fd/honeycomb/northbound/bgp/extension/L3VpnV4WriterFactory.java @@ -16,19 +16,18 @@ package io.fd.honeycomb.northbound.bgp.extension; +import static io.fd.honeycomb.northbound.bgp.extension.AbstractBgpExtensionModule.TABLES_IID; + import com.google.inject.Inject; import com.google.inject.name.Named; import io.fd.honeycomb.translate.util.write.BindingBrokerWriter; import io.fd.honeycomb.translate.write.WriterFactory; import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder; +import javax.annotation.Nonnull; import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.vpn.ipv4.rev160210.l3vpn.ipv4.routes.VpnIpv4Routes; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.vpn.ipv4.rev171207.l3vpn.ipv4.routes.VpnIpv4Routes; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import javax.annotation.Nonnull; - -import static io.fd.honeycomb.northbound.bgp.extension.AbstractBgpExtensionModule.TABLES_IID; - public class L3VpnV4WriterFactory implements WriterFactory { private static final InstanceIdentifier<VpnIpv4Routes> V4_ROUTES_IID = TABLES_IID.child((Class) VpnIpv4Routes.class); diff --git a/infra/northbound/bgp-extensions/l3-vpn-v6/src/main/java/io/fd/honeycomb/northbound/bgp/extension/L3VpnV6WriterFactory.java b/infra/northbound/bgp-extensions/l3-vpn-v6/src/main/java/io/fd/honeycomb/northbound/bgp/extension/L3VpnV6WriterFactory.java index 3e2c3cdf7..65a28173b 100644 --- a/infra/northbound/bgp-extensions/l3-vpn-v6/src/main/java/io/fd/honeycomb/northbound/bgp/extension/L3VpnV6WriterFactory.java +++ b/infra/northbound/bgp-extensions/l3-vpn-v6/src/main/java/io/fd/honeycomb/northbound/bgp/extension/L3VpnV6WriterFactory.java @@ -16,19 +16,18 @@ package io.fd.honeycomb.northbound.bgp.extension; +import static io.fd.honeycomb.northbound.bgp.extension.AbstractBgpExtensionModule.TABLES_IID; + import com.google.inject.Inject; import com.google.inject.name.Named; import io.fd.honeycomb.translate.util.write.BindingBrokerWriter; import io.fd.honeycomb.translate.write.WriterFactory; import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder; +import javax.annotation.Nonnull; import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.vpn.ipv6.rev160331.l3vpn.ipv6.routes.VpnIpv6Routes; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.vpn.ipv6.rev171207.l3vpn.ipv6.routes.VpnIpv6Routes; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import javax.annotation.Nonnull; - -import static io.fd.honeycomb.northbound.bgp.extension.AbstractBgpExtensionModule.TABLES_IID; - public class L3VpnV6WriterFactory implements WriterFactory { private static final InstanceIdentifier<VpnIpv6Routes> V6_ROUTES_IID = TABLES_IID.child((Class) VpnIpv6Routes.class); diff --git a/infra/northbound/bgp-extensions/labeled-unicast/src/main/java/io/fd/honeycomb/northbound/bgp/extension/LabeledUnicastModule.java b/infra/northbound/bgp-extensions/labeled-unicast/src/main/java/io/fd/honeycomb/northbound/bgp/extension/LabeledUnicastModule.java index fd32c5472..9aab1fc28 100644 --- a/infra/northbound/bgp-extensions/labeled-unicast/src/main/java/io/fd/honeycomb/northbound/bgp/extension/LabeledUnicastModule.java +++ b/infra/northbound/bgp-extensions/labeled-unicast/src/main/java/io/fd/honeycomb/northbound/bgp/extension/LabeledUnicastModule.java @@ -16,11 +16,14 @@ package io.fd.honeycomb.northbound.bgp.extension; +import static io.fd.honeycomb.northbound.bgp.extension.AbstractBgpExtensionModule.TableTypeRegistration.tableType; + import com.google.common.collect.ImmutableSet; import com.google.inject.Inject; import com.google.inject.Provider; import io.fd.honeycomb.infra.bgp.BgpConfiguration; import io.fd.honeycomb.translate.write.WriterFactory; +import java.util.Set; import org.opendaylight.protocol.bgp.labeled.unicast.BGPActivator; import org.opendaylight.protocol.bgp.labeled.unicast.RIBActivator; import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderActivator; @@ -29,18 +32,14 @@ import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.multiprotocol.r import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.multiprotocol.rev151009.bgp.common.afi.safi.list.AfiSafiBuilder; import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.IPV4LABELLEDUNICAST; import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.IPV6LABELLEDUNICAST; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev150525.LabeledUnicastSubsequentAddressFamily; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev160614.AfiSafi2; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev160614.AfiSafi2Builder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.LabeledUnicastSubsequentAddressFamily; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev171207.AfiSafi2; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev171207.AfiSafi2Builder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv4AddressFamily; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv6AddressFamily; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.Set; - -import static io.fd.honeycomb.northbound.bgp.extension.AbstractBgpExtensionModule.TableTypeRegistration.tableType; - public class LabeledUnicastModule extends AbstractBgpExtensionModule { private static final Logger LOG = LoggerFactory.getLogger(LabeledUnicastModule.class); diff --git a/infra/northbound/bgp-extensions/labeled-unicast/src/main/java/io/fd/honeycomb/northbound/bgp/extension/LabeledUnicastWriterFactory.java b/infra/northbound/bgp-extensions/labeled-unicast/src/main/java/io/fd/honeycomb/northbound/bgp/extension/LabeledUnicastWriterFactory.java index 0db8f525f..37bb0fa9b 100644 --- a/infra/northbound/bgp-extensions/labeled-unicast/src/main/java/io/fd/honeycomb/northbound/bgp/extension/LabeledUnicastWriterFactory.java +++ b/infra/northbound/bgp-extensions/labeled-unicast/src/main/java/io/fd/honeycomb/northbound/bgp/extension/LabeledUnicastWriterFactory.java @@ -16,20 +16,19 @@ package io.fd.honeycomb.northbound.bgp.extension; +import static io.fd.honeycomb.northbound.bgp.extension.AbstractBgpExtensionModule.TABLES_IID; + import com.google.inject.Inject; import com.google.inject.name.Named; import io.fd.honeycomb.translate.util.write.BindingBrokerWriter; import io.fd.honeycomb.translate.write.WriterFactory; import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder; +import javax.annotation.Nonnull; import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev150525.labeled.unicast.ipv6.routes.LabeledUnicastIpv6Routes; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev150525.labeled.unicast.routes.LabeledUnicastRoutes; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.ipv6.routes.LabeledUnicastIpv6Routes; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.routes.LabeledUnicastRoutes; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import javax.annotation.Nonnull; - -import static io.fd.honeycomb.northbound.bgp.extension.AbstractBgpExtensionModule.TABLES_IID; - public class LabeledUnicastWriterFactory implements WriterFactory { diff --git a/infra/northbound/bgp-extensions/linkstate/src/main/java/io/fd/honeycomb/northbound/bgp/extension/LinkstateModule.java b/infra/northbound/bgp-extensions/linkstate/src/main/java/io/fd/honeycomb/northbound/bgp/extension/LinkstateModule.java index 528fe6461..ca98b6d51 100644 --- a/infra/northbound/bgp-extensions/linkstate/src/main/java/io/fd/honeycomb/northbound/bgp/extension/LinkstateModule.java +++ b/infra/northbound/bgp-extensions/linkstate/src/main/java/io/fd/honeycomb/northbound/bgp/extension/LinkstateModule.java @@ -16,29 +16,28 @@ package io.fd.honeycomb.northbound.bgp.extension; +import static io.fd.honeycomb.northbound.bgp.extension.AbstractBgpExtensionModule.TableTypeRegistration.tableType; + import com.google.common.collect.ImmutableSet; import com.google.inject.Inject; import com.google.inject.Provider; import io.fd.honeycomb.infra.bgp.BgpConfiguration; import io.fd.honeycomb.translate.write.WriterFactory; +import java.util.Set; import org.opendaylight.protocol.bgp.linkstate.impl.BGPActivator; import org.opendaylight.protocol.bgp.linkstate.impl.RIBActivator; import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderActivator; import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderActivator; 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.http.openconfig.net.yang.bgp.multiprotocol.rev151009.bgp.common.afi.safi.list.AfiSafiBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev150210.LinkstateAddressFamily; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev150210.LinkstateSubsequentAddressFamily; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev160614.AfiSafi2; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev160614.AfiSafi2Builder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev160614.LINKSTATE; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev171207.LinkstateAddressFamily; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev171207.LinkstateSubsequentAddressFamily; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev171207.AfiSafi2; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev171207.AfiSafi2Builder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev171207.LINKSTATE; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.Set; - -import static io.fd.honeycomb.northbound.bgp.extension.AbstractBgpExtensionModule.TableTypeRegistration.tableType; - public class LinkstateModule extends AbstractBgpExtensionModule { private static final Logger LOG = LoggerFactory.getLogger(LinkstateModule.class); diff --git a/infra/northbound/bgp-extensions/linkstate/src/main/java/io/fd/honeycomb/northbound/bgp/extension/LinkstateWriterFactory.java b/infra/northbound/bgp-extensions/linkstate/src/main/java/io/fd/honeycomb/northbound/bgp/extension/LinkstateWriterFactory.java index 7f4aaba27..bcb3f684a 100644 --- a/infra/northbound/bgp-extensions/linkstate/src/main/java/io/fd/honeycomb/northbound/bgp/extension/LinkstateWriterFactory.java +++ b/infra/northbound/bgp-extensions/linkstate/src/main/java/io/fd/honeycomb/northbound/bgp/extension/LinkstateWriterFactory.java @@ -16,19 +16,18 @@ package io.fd.honeycomb.northbound.bgp.extension; +import static io.fd.honeycomb.northbound.bgp.extension.AbstractBgpExtensionModule.TABLES_IID; + import com.google.inject.Inject; import com.google.inject.name.Named; import io.fd.honeycomb.translate.util.write.BindingBrokerWriter; import io.fd.honeycomb.translate.write.WriterFactory; import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder; +import javax.annotation.Nonnull; import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev150210.linkstate.routes.LinkstateRoutes; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev171207.linkstate.routes.LinkstateRoutes; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import javax.annotation.Nonnull; - -import static io.fd.honeycomb.northbound.bgp.extension.AbstractBgpExtensionModule.TABLES_IID; - public class LinkstateWriterFactory implements WriterFactory { private static final InstanceIdentifier<LinkstateRoutes> LINKSTATE_ROUTES_IID = TABLES_IID.child((Class) LinkstateRoutes.class); 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); } diff --git a/infra/northbound/bgp/src/test/java/io/fd/honeycomb/infra/bgp/neighbors/NeighborCustomizerTest.java b/infra/northbound/bgp/src/test/java/io/fd/honeycomb/infra/bgp/neighbors/NeighborCustomizerTest.java index ba71cc90e..64e0b9bd1 100644 --- a/infra/northbound/bgp/src/test/java/io/fd/honeycomb/infra/bgp/neighbors/NeighborCustomizerTest.java +++ b/infra/northbound/bgp/src/test/java/io/fd/honeycomb/infra/bgp/neighbors/NeighborCustomizerTest.java @@ -18,22 +18,29 @@ package io.fd.honeycomb.infra.bgp.neighbors; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static org.mockito.MockitoAnnotations.initMocks; +import com.google.common.util.concurrent.CheckedFuture; import io.fd.honeycomb.translate.write.WriteContext; import io.fd.honeycomb.translate.write.WriteFailedException; import java.util.Collections; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; -import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier; +import org.opendaylight.controller.md.sal.dom.api.DOMDataTreeChangeService; +import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction; +import org.opendaylight.controller.md.sal.dom.api.DOMTransactionChain; import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryConsumer; import org.opendaylight.protocol.bgp.rib.impl.config.PeerBean; +import org.opendaylight.protocol.bgp.rib.impl.spi.BGPDispatcher; import org.opendaylight.protocol.bgp.rib.impl.spi.BGPPeerRegistry; +import org.opendaylight.protocol.bgp.rib.impl.spi.ImportPolicyPeerTracker; import org.opendaylight.protocol.bgp.rib.impl.spi.RIB; +import org.opendaylight.protocol.bgp.rib.impl.spi.RIBSupportContextRegistry; import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.multiprotocol.rev151009.bgp.common.afi.safi.list.AfiSafiBuilder; import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.rev151009.bgp.neighbor.group.AfiSafisBuilder; import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.rev151009.bgp.neighbor.group.ConfigBuilder; @@ -45,12 +52,12 @@ import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.PeerType; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress; 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.openconfig.extensions.rev160614.Config2; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev160614.Config2Builder; -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.RibId; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.bgp.rib.Rib; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.bgp.rib.RibKey; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev171207.Config2; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev171207.Config2Builder; +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.RibId; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.bgp.rib.Rib; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.bgp.rib.RibKey; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; @@ -70,6 +77,12 @@ public class NeighborCustomizerTest { private BGPTableTypeRegistryConsumer tableTypeRegistry; @Mock private WriteContext ctx; + @Mock + private DOMTransactionChain chain; + @Mock + private DOMDataWriteTransaction tx; + @Mock + private BGPDispatcher dispatcher; private NeighborCustomizer customizer; @@ -77,8 +90,15 @@ public class NeighborCustomizerTest { public void setUp() { initMocks(this); when(globalRib.getYangRibId()).thenReturn(YangInstanceIdentifier.EMPTY); - when(globalRib.getRibIServiceGroupIdentifier()).thenReturn(ServiceGroupIdentifier.create("sgid")); when(globalRib.getInstanceIdentifier()).thenReturn(RIB_IID); + when(globalRib.createPeerChain(any())).thenReturn(chain); + when(chain.newWriteOnlyTransaction()).thenReturn(tx); + when(tx.submit()).thenReturn(mock(CheckedFuture.class)); + when(globalRib.getImportPolicyPeerTracker()).thenReturn(mock(ImportPolicyPeerTracker.class)); + when(globalRib.getRibSupportContext()).thenReturn(mock(RIBSupportContextRegistry.class)); + when(globalRib.getService()).thenReturn(mock(DOMDataTreeChangeService.class)); + when(globalRib.getDispatcher()).thenReturn(dispatcher); + when(dispatcher.getBGPPeerRegistry()).thenReturn(peerRegistry); customizer = new NeighborCustomizer(globalRib, peerRegistry, tableTypeRegistry); } @@ -123,7 +143,7 @@ public class NeighborCustomizerTest { customizer.updateCurrentAttributes(ID, before, after, ctx); verify(peer).closeServiceInstance(); verify(peer).close(); - verify(peer).start(globalRib, after, tableTypeRegistry, null); + verify(peer).start(globalRib, after, tableTypeRegistry); } @Test diff --git a/infra/northbound/restconf/pom.xml b/infra/northbound/restconf/pom.xml index 8342e1a87..5cf74d23c 100644 --- a/infra/northbound/restconf/pom.xml +++ b/infra/northbound/restconf/pom.xml @@ -70,7 +70,7 @@ <!-- ODL-Restconf --> <dependency> <groupId>org.opendaylight.netconf</groupId> - <artifactId>sal-rest-connector</artifactId> + <artifactId>restconf-nb-bierman02</artifactId> </dependency> <!-- Jersey + Jetty for RESTCONF --> diff --git a/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfProvider.java b/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfProvider.java index e924dd751..a3b3fe902 100644 --- a/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfProvider.java +++ b/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfProvider.java @@ -53,6 +53,7 @@ final class RestconfProvider extends ProviderTrait<RestConnector> { protected RestconfProviderImpl create() { final RestconfProviderImpl instance = new RestconfProviderImpl(domDataBroker, schemaService, rpcService, notificationService, mountPointService, + schemaService, IpAddressBuilder.getDefaultInstance(cfg.restconfWebsocketAddress.get()), new PortNumber(cfg.restconfWebsocketPort.get())); |