summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaros Marsalek <mmarsale@cisco.com>2016-09-05 12:10:26 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-09-07 06:50:30 +0000
commit1326e9fa5cffe326b82aeee9d82d008526aff947 (patch)
treef8ca808f3aa3a9338573d8892b83305210a664a1
parent6e77db8e850be8ad8a3d91bf43fb8986125ae60f (diff)
Cleanup TODOs and FIXMEs
- Fix minor ones - Report bigger and include issue number in comment - Pull common dependencies into dependency management of common/parents Change-Id: I06a6ac37c52b603fd73ed42023d6b2e7fa18010f Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
-rw-r--r--common/api-parent/pom.xml4
-rw-r--r--common/impl-parent/pom.xml50
-rw-r--r--common/minimal-distribution-parent/pom.xml117
-rw-r--r--infra/artifacts/pom.xml96
-rw-r--r--infra/cfg-init/pom.xml1
-rw-r--r--infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/AbstractDataTreeConverter.java5
-rw-r--r--infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/InitializerRegistryImpl.java2
-rw-r--r--infra/data-api/pom.xml3
-rw-r--r--infra/data-impl/pom.xml17
-rw-r--r--infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModifiableDataTreeDelegator.java4
-rw-r--r--infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModificationDiff.java2
-rw-r--r--infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/PersistingDataTreeAdapter.java8
-rw-r--r--infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ReadableDataTreeDelegator.java5
-rw-r--r--infra/impl/pom.xml14
-rw-r--r--infra/impl/src/main/java/io/fd/honeycomb/impl/NetconfMonitoringReaderFactory.java45
-rw-r--r--infra/impl/src/main/java/io/fd/honeycomb/impl/NorthboundFacadeHoneycombDOMBroker.java7
-rw-r--r--infra/it/it-test/pom.xml9
-rw-r--r--infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombSubtreeReadInfraTest.java4
-rw-r--r--infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombWriteInfraTest.java2
-rw-r--r--infra/it/pom.xml1
-rw-r--r--infra/minimal-distribution/pom.xml48
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java1
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.java4
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/InmemoryDOMDataBrokerProvider.java2
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.java4
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfModule.java3
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringReaderFactoryProvider.java27
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfSshServerProvider.java2
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NettyTimerProvider.java35
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/HttpsConnectorProvider.java2
-rw-r--r--infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/WEB-INF/web.xml2
-rw-r--r--infra/notification/api/pom.xml3
-rw-r--r--infra/notification/impl/pom.xml5
-rw-r--r--infra/notification/pom.xml1
-rw-r--r--infra/pom.xml3
-rw-r--r--infra/translate-api/pom.xml15
-rw-r--r--infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/Reader.java2
-rw-r--r--infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/registry/ModifiableReaderRegistryBuilder.java2
-rw-r--r--infra/translate-api/src/main/java/io/fd/honeycomb/translate/write/registry/WriterRegistry.java2
-rw-r--r--infra/translate-impl/pom.xml1
-rw-r--r--infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericListReader.java6
-rw-r--r--infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericReader.java6
-rw-r--r--infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/write/GenericListWriter.java18
-rw-r--r--infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/write/GenericWriter.java20
-rw-r--r--infra/translate-spi/pom.xml15
-rw-r--r--infra/translate-spi/src/main/java/io/fd/honeycomb/translate/spi/read/ListReaderCustomizer.java1
-rw-r--r--infra/translate-spi/src/main/java/io/fd/honeycomb/translate/spi/read/ReaderCustomizer.java5
-rw-r--r--infra/translate-utils/pom.xml26
-rw-r--r--infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/AbstractSubtreeManagerRegistryBuilderBuilder.java4
-rw-r--r--infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/RWUtils.java13
-rw-r--r--infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/TransactionMappingContext.java2
-rw-r--r--infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/AbstractGenericReader.java3
-rw-r--r--infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/registry/SubtreeReader.java23
-rw-r--r--infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/write/TransactionWriteContext.java5
-rw-r--r--infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/write/registry/FlatWriterRegistry.java5
-rw-r--r--infra/translate-utils/src/test/java/io/fd/honeycomb/translate/impl/write/util/TransactionWriteContextTest.java7
-rwxr-xr-xlisp/api/pom.xml12
-rwxr-xr-xlisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv4Matcher.java (renamed from lisp/api/src/main/java/lisp/Ipv4Matcher.java)6
-rwxr-xr-xlisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv6Matcher.java (renamed from lisp/api/src/main/java/lisp/Ipv6Matcher.java)4
-rwxr-xr-xlisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/MacMatcher.java (renamed from lisp/api/src/main/java/lisp/MacMatcher.java)4
-rw-r--r--lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/SimpleAddressBuilder.java9
-rwxr-xr-xlisp/lisp2vpp/pom.xml10
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/cfgattrs/LispConfiguration.java18
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/AdjacencyCustomizer.java2
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/factory/LocatorSetsReaderFactory.java5
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/util/EidConverter.java2
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/write/LocatorSetCustomizer.java6
-rwxr-xr-xlisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/util/EidConverterTest.java2
-rwxr-xr-xlisp/pom.xml1
-rw-r--r--nsh/api/pom.xml12
-rw-r--r--nsh/impl/pom.xml7
-rw-r--r--samples/interfaces/Readme.adoc2
-rw-r--r--samples/interfaces/mapping/pom.xml3
-rw-r--r--samples/interfaces/models/pom.xml12
-rw-r--r--tools/pom.xml1
-rw-r--r--v3po/api/pom.xml12
-rw-r--r--v3po/v3po2vpp/pom.xml11
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java6
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/SubinterfaceAugmentationWriterFactory.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/V3poModule.java1
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppStateHoneycombReaderFactory.java6
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/InterfacesInitializer.java13
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/VppInitializer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/EthernetCustomizer.java3
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/InterconnectionWriteUtils.java6
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/InterfaceCustomizer.java3
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/L2Customizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/RoutingCustomizer.java3
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceCustomizer.java11
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceL2Customizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/VhostUserCustomizer.java10
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/VxlanCustomizer.java1
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/AbstractAceWriter.java4
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/IetfAClWriter.java26
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4AddressCustomizer.java6
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4Customizer.java11
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4NeighbourCustomizer.java4
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4WriteUtils.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv6Customizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/SubInterfaceIpv4AddressCustomizer.java6
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterconnectionReadUtils.java7
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceUtils.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ProxyArpCustomizer.java6
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/SubInterfaceCustomizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4Customizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4ReadUtils.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv6Customizer.java10
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/notification/InterfaceChangeNotificationProducer.java4
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vpp/ArpTerminationTableEntryCustomizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vpp/BridgeDomainCustomizer.java45
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vppclassifier/ClassifySessionReader.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vppstate/BridgeDomainCustomizer.java4
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vppstate/L2FibEntryCustomizer.java2
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/GreCustomizerTest.java2
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceCustomizerTest.java17
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/VhostUserCustomizerTest.java2
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/VxlanCustomizerTest.java2
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/VxlanGpeCustomizerTest.java2
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceCustomizerTest.java3
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vpp/BridgeDomainCustomizerTest.java4
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppstate/VppStateTest.java7
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppstate/VppStateTestUtils.java4
-rw-r--r--vpp-common/minimal-distribution/pom.xml5
-rw-r--r--vpp-common/naming-context-api/pom.xml12
-rw-r--r--vpp-common/naming-context-impl/pom.xml6
-rw-r--r--vpp-common/pom.xml1
-rw-r--r--vpp-common/vpp-impl-parent/pom.xml49
-rw-r--r--vpp-common/vpp-translate-utils/pom.xml27
-rw-r--r--vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/AbstractInterfaceTypeCustomizer.java3
-rw-r--r--vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/TagRewriteOperation.java10
-rw-r--r--vpp-integration/pom.xml2
132 files changed, 536 insertions, 706 deletions
diff --git a/common/api-parent/pom.xml b/common/api-parent/pom.xml
index 20105f6aa..17466d0a8 100644
--- a/common/api-parent/pom.xml
+++ b/common/api-parent/pom.xml
@@ -40,7 +40,7 @@
<!-- Override checkstyle configuration to fit Honeycomb coding style-->
<configLocation>honeycomb-checkstyle.xml</configLocation>
<includeTestResources>true</includeTestResources>
- <!--TODO enable fail on violation after issues are resolved + set in as errors in checkstyle xml-->
+ <!--TODO HONEYCOMB-155 enable fail on violation after issues are resolved + set in as errors in checkstyle xml-->
</configuration>
<executions>
@@ -100,7 +100,7 @@
</dependencies>
</plugin>
<!-- Deactivate strict java8 checks -->
- <!-- FIXME fix all the javadoc offenders of doclint -->
+ <!-- TODO HONEYCOMB-156 fix all the javadoc offenders of doclint -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
diff --git a/common/impl-parent/pom.xml b/common/impl-parent/pom.xml
index fbcd4c8f7..8a04b4b8f 100644
--- a/common/impl-parent/pom.xml
+++ b/common/impl-parent/pom.xml
@@ -34,8 +34,53 @@
<nexusproxy>http://nexus.fd.io/content</nexusproxy>
<guice.version>4.1.0</guice.version>
<guice.config.version>1.2.0</guice.config.version>
+ <mdsal.controller.version>1.3.2-Beryllium-SR2</mdsal.controller.version>
+ <mdsal.version>2.0.2-Beryllium-SR2</mdsal.version>
+ <netconf.version>1.0.2-Beryllium-SR2</netconf.version>
</properties>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>mdsal-artifacts</artifactId>
+ <version>${mdsal.controller.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>mdsal-artifacts</artifactId>
+ <version>${mdsal.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>netconf-artifacts</artifactId>
+ <version>${netconf.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <!-- DI -->
+ <dependency>
+ <groupId>com.google.inject</groupId>
+ <artifactId>guice</artifactId>
+ <version>${guice.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.jmob</groupId>
+ <artifactId>guice.conf</artifactId>
+ <version>${guice.config.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.inject.extensions</groupId>
+ <artifactId>guice-multibindings</artifactId>
+ <version>${guice.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
<build>
<pluginManagement>
<plugins>
@@ -45,7 +90,7 @@
<!-- Override checkstyle configuration to fit Honeycomb coding style-->
<configLocation>honeycomb-checkstyle.xml</configLocation>
<includeTestResources>true</includeTestResources>
- <!--TODO enable fail on violation after issues are resolved + set in as errors in checkstyle xml-->
+ <!--TODO HONEYCOMB-155 enable fail on violation after issues are resolved + set in as errors in checkstyle xml-->
</configuration>
<executions>
@@ -105,7 +150,7 @@
</dependencies>
</plugin>
<!-- Deactivate strict java8 checks -->
- <!-- FIXME fix all the javadoc offenders of doclint -->
+ <!-- TODO HONEYCOMB-156 fix all the javadoc offenders of doclint -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
@@ -160,6 +205,7 @@
</plugins>
</build>
+
<distributionManagement>
<repository>
<id>fdio-release</id>
diff --git a/common/minimal-distribution-parent/pom.xml b/common/minimal-distribution-parent/pom.xml
index e69b1c8f1..cdaf92582 100644
--- a/common/minimal-distribution-parent/pom.xml
+++ b/common/minimal-distribution-parent/pom.xml
@@ -17,6 +17,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>io.fd.honeycomb.common</groupId>
+ <artifactId>minimal-distribution-parent</artifactId>
+ <version>1.16.12-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
<properties>
<nexusproxy>http://nexus.fd.io/content</nexusproxy>
<!--<main.class>Main</main.class>-->
@@ -31,16 +37,109 @@
<jetty.version>9.3.11.v20160721</jetty.version>
<servlet.version>3.1.0</servlet.version>
<yangtools.version>0.8.2-Beryllium-SR2</yangtools.version>
- <mdsal.version>1.3.2-Beryllium-SR2</mdsal.version>
+ <mdsal.controller.version>1.3.2-Beryllium-SR2</mdsal.controller.version>
+ <mdsal.version>2.0.2-Beryllium-SR2</mdsal.version>
<!-- Used by mdsal as provided/runtime dependency-->
<osgi.core.version>5.0.0</osgi.core.version>
</properties>
- <modelVersion>4.0.0</modelVersion>
- <groupId>io.fd.honeycomb.common</groupId>
- <artifactId>minimal-distribution-parent</artifactId>
- <version>1.16.12-SNAPSHOT</version>
- <packaging>pom</packaging>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>mdsal-artifacts</artifactId>
+ <version>${mdsal.controller.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>mdsal-artifacts</artifactId>
+ <version>${mdsal.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>netconf-artifacts</artifactId>
+ <version>${netconf.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>restconf-artifacts</artifactId>
+ <version>${restconf.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yangtools-artifacts</artifactId>
+ <version>${yangtools.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <!-- DI -->
+ <dependency>
+ <groupId>com.google.inject</groupId>
+ <artifactId>guice</artifactId>
+ <version>${guice.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.jmob</groupId>
+ <artifactId>guice.conf</artifactId>
+ <version>${guice.config.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.inject.extensions</groupId>
+ <artifactId>guice-multibindings</artifactId>
+ <version>${guice.version}</version>
+ </dependency>
+ <!-- Jersey + Jetty for RESTCONF -->
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ <version>${jetty.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>${servlet.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-webapp</artifactId>
+ <version>${jetty.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlets</artifactId>
+ <version>${jetty.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-server</artifactId>
+ <version>${jersey.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-core</artifactId>
+ <version>${jersey.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-servlet</artifactId>
+ <version>${jersey.version}</version>
+ </dependency>
+ <!-- OSGI Even tough not running in OSGI, dependency needs to be here since some deprecated MD-SAL APIs rely on osgi core -->
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <version>${osgi.core.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
<!-- Generate executable shell script -->
<build>
@@ -138,11 +237,7 @@
<goal>execute</goal>
</goals>
<configuration>
- <!-- TODO add remote debug option -->
- <!-- TODO add clean option -->
- <!-- TODO add shutdown script -->
- <!-- TODO add restart script -->
- <!-- TODO pass options to JVM? -->
+ <!-- TODO HONEYCOMB-157 Make scripts more robust -->
<source>
import java.nio.file.Paths
diff --git a/infra/artifacts/pom.xml b/infra/artifacts/pom.xml
deleted file mode 100644
index f3bb46ee1..000000000
--- a/infra/artifacts/pom.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2015 Cisco and/or its affiliates.
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at:
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
- <groupId>io.fd.honeycomb</groupId>
- <artifactId>honeycomb-artifacts</artifactId>
- <version>1.16.12-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>data-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>notification-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>notification-impl</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>notification-spi</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>data-utils</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>data-impl</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>translate-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>translate-spi</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>translate-impl</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>translate-utils</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>cfg-init</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>honeycomb-impl</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>honeycomb-features</artifactId>
- <version>${project.version}</version>
- <classifier>features</classifier>
- <type>xml</type>
- </dependency>
- </dependencies>
- </dependencyManagement>
-</project>
diff --git a/infra/cfg-init/pom.xml b/infra/cfg-init/pom.xml
index df481b7da..c1fd353dc 100644
--- a/infra/cfg-init/pom.xml
+++ b/infra/cfg-init/pom.xml
@@ -39,6 +39,7 @@
<artifactId>data-api</artifactId>
<version>${project.version}</version>
</dependency>
+
<!-- Testing Dependencies -->
<dependency>
<groupId>junit</groupId>
diff --git a/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/AbstractDataTreeConverter.java b/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/AbstractDataTreeConverter.java
index 5476bb423..86188dd3f 100644
--- a/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/AbstractDataTreeConverter.java
+++ b/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/AbstractDataTreeConverter.java
@@ -97,9 +97,10 @@ public abstract class AbstractDataTreeConverter<O extends DataObject, C extends
writeTx.submit().checkedGet();
}
- // TODO make this class concrete and use function dependency instead of abstract method
+ // TODO HONEYCOMB-158 make this class concrete and use function dependency instead of abstract method
/**
- * Converts operational data to config data for given root node
+ * Converts operational data to config data for given root node.
+ *
* @param operationalData data object representing operational data
* @return data object representing config data
*/
diff --git a/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/InitializerRegistryImpl.java b/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/InitializerRegistryImpl.java
index 2433130a9..cc1c2dbeb 100644
--- a/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/InitializerRegistryImpl.java
+++ b/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/InitializerRegistryImpl.java
@@ -35,7 +35,7 @@ public class InitializerRegistryImpl implements InitializerRegistry {
@Override
public void initialize() throws InitializeException {
- // TODO check if readers are there
+ // TODO HONEYCOMB-159 check if readers are there
LOG.debug("InitializerRegistryImpl.initialize()");
for (DataTreeInitializer initializer : initializers) {
initializer.initialize();
diff --git a/infra/data-api/pom.xml b/infra/data-api/pom.xml
index bc420bc7a..c2d8465a3 100644
--- a/infra/data-api/pom.xml
+++ b/infra/data-api/pom.xml
@@ -46,10 +46,7 @@
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-common-api</artifactId>
- <!-- FIXME use dependency management -->
- <version>1.3.2-Beryllium-SR2</version>
</dependency>
-
</dependencies>
</project> \ No newline at end of file
diff --git a/infra/data-impl/pom.xml b/infra/data-impl/pom.xml
index f90c7cd84..341378192 100644
--- a/infra/data-impl/pom.xml
+++ b/infra/data-impl/pom.xml
@@ -51,30 +51,13 @@
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-core-api</artifactId>
- <!-- FIXME use dependency management -->
- <version>1.3.2-Beryllium-SR2</version>
</dependency>
- <!-- FIXME workaround for https://git.opendaylight.org/gerrit/#/c/37499/-->
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>ietf-netconf-monitoring</artifactId>
- <version>1.0.2-Beryllium-SR2</version>
- </dependency>
- <!-- FIXME workaround for https://git.opendaylight.org/gerrit/#/c/37499/-->
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>ietf-netconf-monitoring-extension</artifactId>
- <version>1.0.2-Beryllium-SR2</version>
- </dependency>
-
- <!-- Testing Dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
-
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
diff --git a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModifiableDataTreeDelegator.java b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModifiableDataTreeDelegator.java
index d5d810e0a..7af9847d7 100644
--- a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModifiableDataTreeDelegator.java
+++ b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModifiableDataTreeDelegator.java
@@ -60,7 +60,7 @@ public final class ModifiableDataTreeDelegator extends ModifiableDataTreeManager
private final WriterRegistry writerRegistry;
private final org.opendaylight.controller.md.sal.binding.api.DataBroker contextBroker;
- // TODO what to use instead of deprecated BindingNormalizedNodeSerializer ?
+ // TODO HONEYCOMB-161 what to use instead of deprecated BindingNormalizedNodeSerializer ?
private final BindingNormalizedNodeSerializer serializer;
/**
@@ -145,7 +145,7 @@ public final class ModifiableDataTreeDelegator extends ModifiableDataTreeManager
throw e; // fail with success revert
} catch (TransactionCommitFailedException e) {
- // FIXME revert should probably occur when context is not written successfully
+ // TODO HONEYCOMB-162 revert should probably occur when context is not written successfully
final String msg = "Error while updating mapping context data";
LOG.error(msg, e);
throw new TranslationException(msg, e);
diff --git a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModificationDiff.java b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModificationDiff.java
index 710f8a053..1c87bc03a 100644
--- a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModificationDiff.java
+++ b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModificationDiff.java
@@ -114,7 +114,7 @@ final class ModificationDiff {
// Check if there are any modified leaves and if so, consider current node as modified
final Boolean directLeavesModified = currentCandidate.getChildNodes().stream()
.filter(ModificationDiff::isLeaf)
- // For some reason, we get modifications on unmodified list keys TODO debug and report ODL bug
+ // For some reason, we get modifications on unmodified list keys
// and that messes up our modifications collection here, so we need to skip
.filter(ModificationDiff::isBeforeAndAfterDifferent)
.filter(child -> LEAF_MODIFICATIONS.contains(child.getModificationType()))
diff --git a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/PersistingDataTreeAdapter.java b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/PersistingDataTreeAdapter.java
index 94c5e4446..459971436 100644
--- a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/PersistingDataTreeAdapter.java
+++ b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/PersistingDataTreeAdapter.java
@@ -103,17 +103,17 @@ public class PersistingDataTreeAdapter implements DataTree, AutoCloseable {
delegateDependency.commit(dataTreeCandidate);
LOG.debug("Delegate commit successful. Persisting data");
- // FIXME doing full read and full write might not be the fastest way of persisting data here
+ // TODO HONEYCOMB-163 doing full read and full write might not be the fastest way of persisting data here
final DataTreeSnapshot dataTreeSnapshot = delegateDependency.takeSnapshot();
- // TODO this can be handled in background by a dedicated thread + a limited blocking queue
- // TODO enable configurable granularity for persists. Maybe doing write on every modification is too much
+ // TODO HONEYCOMB-163 this can be handled in background by a dedicated thread + a limited blocking queue
+ // TODO HONEYCOMB-163 enable configurable granularity for persists. Maybe doing write on every modification is too much
// and we could do bulk persist
persistCurrentData(dataTreeSnapshot.readNode(YangInstanceIdentifier.EMPTY));
}
private void persistCurrentData(final Optional<NormalizedNode<?, ?>> currentRoot) {
- if(currentRoot.isPresent()) {
+ if (currentRoot.isPresent()) {
try {
LOG.trace("Persisting current data: {} into: {}", currentRoot.get(), path);
JsonUtils.writeJsonRoot(currentRoot.get(), schemaServiceDependency.getGlobalContext(),
diff --git a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ReadableDataTreeDelegator.java b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ReadableDataTreeDelegator.java
index 775f6326c..ae29fa08b 100644
--- a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ReadableDataTreeDelegator.java
+++ b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ReadableDataTreeDelegator.java
@@ -91,7 +91,7 @@ public final class ReadableDataTreeDelegator implements ReadableDataManager {
org.opendaylight.controller.md.sal.common.api.data.ReadFailedException> read(
@Nonnull final YangInstanceIdentifier yangInstanceIdentifier) {
- try(TransactionMappingContext mappingContext = new TransactionMappingContext(contextBroker.newReadWriteTransaction());
+ try (TransactionMappingContext mappingContext = new TransactionMappingContext(contextBroker.newReadWriteTransaction());
ReadContext ctx = new ReadContextImpl(mappingContext)) {
final Optional<NormalizedNode<?, ?>> value;
@@ -113,7 +113,8 @@ public final class ReadableDataTreeDelegator implements ReadableDataManager {
return Futures.immediateFailedCheckedFuture(
new org.opendaylight.controller.md.sal.common.api.data.ReadFailedException("Failed to read data", e));
} catch (TransactionCommitFailedException e) {
- // FIXME revert should probably occur when context is not written successfully
+ // Context write failed. This should not happen, but if it does, there's not much that can be done here
+ // ... try to read again
final String msg = "Error while updating mapping context data";
LOG.error(msg, e);
return Futures.immediateFailedCheckedFuture(
diff --git a/infra/impl/pom.xml b/infra/impl/pom.xml
index f3548965a..0bbe23e6c 100644
--- a/infra/impl/pom.xml
+++ b/infra/impl/pom.xml
@@ -49,30 +49,16 @@
<artifactId>cfg-init</artifactId>
<version>${project.version}</version>
</dependency>
- <!-- TODO used by NetconfMonitoringReaderModule, get it out of here-->
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>ietf-netconf-monitoring</artifactId>
- <version>1.0.2-Beryllium-SR2</version>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>ietf-netconf-monitoring-extension</artifactId>
- <version>1.0.2-Beryllium-SR2</version>
- </dependency>
-
<dependency>
<groupId>org.opendaylight.mdsal.model</groupId>
<artifactId>ietf-topology</artifactId>
</dependency>
- <!-- Testing Dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
-
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
diff --git a/infra/impl/src/main/java/io/fd/honeycomb/impl/NetconfMonitoringReaderFactory.java b/infra/impl/src/main/java/io/fd/honeycomb/impl/NetconfMonitoringReaderFactory.java
deleted file mode 100644
index 244ae585e..000000000
--- a/infra/impl/src/main/java/io/fd/honeycomb/impl/NetconfMonitoringReaderFactory.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.fd.honeycomb.impl;
-
-import io.fd.honeycomb.translate.read.ReaderFactory;
-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.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.NetconfState;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.NetconfStateBuilder;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-/**
- * {@link ReaderFactory} initiating reader into NETCONF's dedicated data store.
- * Making NETCONF operational data available over NETCONF/RESTCONF
- */
-public final class NetconfMonitoringReaderFactory implements ReaderFactory {
-
- private final DataBroker netconfMonitoringBindingBrokerDependency;
-
- public NetconfMonitoringReaderFactory(final DataBroker netconfMonitoringBindingBrokerDependency) {
- this.netconfMonitoringBindingBrokerDependency = netconfMonitoringBindingBrokerDependency;
- }
-
- @Override
- public void init(final ModifiableReaderRegistryBuilder registry) {
- registry.add(new BindingBrokerReader<>(InstanceIdentifier.create(NetconfState.class),
- netconfMonitoringBindingBrokerDependency,
- LogicalDatastoreType.OPERATIONAL, NetconfStateBuilder.class));
- }
-}
diff --git a/infra/impl/src/main/java/io/fd/honeycomb/impl/NorthboundFacadeHoneycombDOMBroker.java b/infra/impl/src/main/java/io/fd/honeycomb/impl/NorthboundFacadeHoneycombDOMBroker.java
index 4af0a9d4a..d49741797 100644
--- a/infra/impl/src/main/java/io/fd/honeycomb/impl/NorthboundFacadeHoneycombDOMBroker.java
+++ b/infra/impl/src/main/java/io/fd/honeycomb/impl/NorthboundFacadeHoneycombDOMBroker.java
@@ -61,13 +61,12 @@ public class NorthboundFacadeHoneycombDOMBroker implements AutoCloseable, Broker
@Nonnull final DOMNotificationService domNotificatioNService) {
services = Maps.newHashMap();
services.put(DOMDataBroker.class, domDataBrokerDependency);
- // All services below are required to be present by Restconf northbound
services.put(SchemaService.class, schemaBiService);
- services.put(DOMRpcService.class, EMPTY_DOM_RPC_SERVICE);
- services.put(DOMMountPointService.class, EMPTY_DOM_MOUNT_SERVICE);
services.put(DOMNotificationService.class, domNotificatioNService);
- // TODO do both notification service types have to be registered ?
services.put(DOMNotificationPublishService.class, domNotificatioNService);
+ // All services below are required to be present by Restconf northbound even if not used
+ services.put(DOMRpcService.class, EMPTY_DOM_RPC_SERVICE);
+ services.put(DOMMountPointService.class, EMPTY_DOM_MOUNT_SERVICE);
}
@Override
diff --git a/infra/it/it-test/pom.xml b/infra/it/it-test/pom.xml
index 5cde7b00b..5a55c339f 100644
--- a/infra/it/it-test/pom.xml
+++ b/infra/it/it-test/pom.xml
@@ -28,6 +28,10 @@
<artifactId>honeycomb-it-test</artifactId>
<version>1.16.12-SNAPSHOT</version>
+ <properties>
+ <skinny.logback.version>1.0.8</skinny.logback.version>
+ </properties>
+
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -40,9 +44,10 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <!-- We want logs from these tests -->
<groupId>org.skinny-framework</groupId>
<artifactId>skinny-logback</artifactId>
- <version>1.0.8</version>
+ <version>${skinny.logback.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -61,6 +66,4 @@
<version>${project.version}</version>
</dependency>
</dependencies>
-
-
</project> \ No newline at end of file
diff --git a/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombSubtreeReadInfraTest.java b/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombSubtreeReadInfraTest.java
index a43f70a84..5bb81b477 100644
--- a/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombSubtreeReadInfraTest.java
+++ b/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombSubtreeReadInfraTest.java
@@ -68,7 +68,7 @@ public class HoneycombSubtreeReadInfraTest extends AbstractInfraTest {
public List<ListInContainerKey> getAllIds(@Nonnull final InstanceIdentifier<ListInContainer> id,
@Nonnull final ReadContext context)
throws ReadFailedException {
- // FIXME this is the only way of extending subtree reader via its list child
+ // This is the only way of extending subtree reader's list child
// Reflexive list reader has to be used in place of the list(managed by subtree reader perent)
// to enable further children readers. However, it will not work out of the box, because
// reflexive list reader has no way to tell what are the IDs to correctly invoke its children.
@@ -89,7 +89,7 @@ public class HoneycombSubtreeReadInfraTest extends AbstractInfraTest {
private Reader<ContainerInList, ContainerInListBuilder> containerInListReader =
HoneycombReadInfraTest.mockReader(Ids.CONTAINER_IN_LIST_ID, this::readContainerInList, ContainerInListBuilder.class);
- // TODO Test subtree readers especially composite structure where readers are under subtree reader
+ // TODO HONEYCOMB-178 Test subtree readers especially composite structure where readers are under subtree reader
@Override
void postSetup() {
diff --git a/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombWriteInfraTest.java b/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombWriteInfraTest.java
index 90a18dd7a..fe679d14f 100644
--- a/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombWriteInfraTest.java
+++ b/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombWriteInfraTest.java
@@ -169,7 +169,7 @@ public class HoneycombWriteInfraTest extends AbstractInfraTest {
private void verifyOrderedWrites(final Writer<?>[] orderedWriters, final InOrder inOrder)
throws WriteFailedException {
- // TODO Modifications are not produced for nodes that do not contain any actual leaves (except when choice is a child) do we need those triggers ?
+ // Modifications are not produced for nodes that do not contain any actual leaves (except when choice is a child)
// Unordered
// verify(complexAugmentWriter).update(eq(COMPLEX_AUGMENT_ID), eq(null), eq(getComplexAugment()), any(WriteContext.class));
// 1
diff --git a/infra/it/pom.xml b/infra/it/pom.xml
index 93265ee61..6151ec6ac 100644
--- a/infra/it/pom.xml
+++ b/infra/it/pom.xml
@@ -24,6 +24,7 @@
<prerequisites>
<maven>3.1.1</maven>
</prerequisites>
+
<modules>
<module>test-model</module>
<module>it-test</module>
diff --git a/infra/minimal-distribution/pom.xml b/infra/minimal-distribution/pom.xml
index 4094c56e9..a03e3a97e 100644
--- a/infra/minimal-distribution/pom.xml
+++ b/infra/minimal-distribution/pom.xml
@@ -61,123 +61,111 @@
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
- <version>${guice.version}</version>
</dependency>
<dependency>
<groupId>net.jmob</groupId>
<artifactId>guice.conf</artifactId>
- <version>${guice.config.version}</version>
</dependency>
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-multibindings</artifactId>
- <version>${guice.version}</version>
</dependency>
<!-- ODL -->
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-data-impl</artifactId>
- <version>${yangtools.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-core-api</artifactId>
- <version>${mdsal.version}</version>
</dependency>
<!-- ODL-Restconf -->
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>sal-rest-connector</artifactId>
- <version>${restconf.version}</version>
</dependency>
<!-- ODL-Netconf -->
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>netconf-impl</artifactId>
- <version>${netconf.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>netconf-ssh</artifactId>
- <version>${netconf.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>mdsal-netconf-notification</artifactId>
- <version>${netconf.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>mdsal-netconf-monitoring</artifactId>
- <version>${netconf.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>mdsal-netconf-connector</artifactId>
- <version>${netconf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>ietf-netconf-monitoring</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>ietf-netconf-monitoring-extension</artifactId>
</dependency>
<!-- Jersey + Jetty for RESTCONF -->
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
- <version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
- <version>${servlet.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
- <version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
- <version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
- <version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
- <version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
- <version>${jersey.version}</version>
+ </dependency>
+
+ <!-- OSGI Even tough not running in OSGI, dependency needs to be here since some deprecated MD-SAL APIs rely on osgi core -->
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <scope>compile</scope>
</dependency>
<!-- HC -->
<dependency>
- <groupId>io.fd.honeycomb</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>data-impl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>io.fd.honeycomb</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>honeycomb-impl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>io.fd.honeycomb</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>notification-impl</artifactId>
<version>${project.version}</version>
</dependency>
-
- <!-- OSGI Even tough not running in OSGI, dependency needs to be here since some deprecated MD-SAL APIs rely on osgi core -->
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <version>${osgi.core.version}</version>
- <scope>compile</scope>
- </dependency>
</dependencies>
-
</project>
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java
index d43e33096..c592fd3b3 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java
@@ -69,7 +69,6 @@ public final class Main {
private Main() {}
public static void main(String[] args) {
- // TODO add "clean" argument
init(BASE_MODULES);
}
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.java
index e25cb1569..f2e81a9f6 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.java
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.java
@@ -59,9 +59,9 @@ public final class HoneycombNotificationManagerProvider extends ProviderTrait<No
new NotificationProducerTracker(notificationProducerRegistry, honeycombNotificationCollector,
notificationRouter);
- // TODO wire with restconf
// DOMNotificationService is already provided by DOMBroker injected into RESTCONF, however RESTCONF
- // only supports data-change notification, nothing else. So currently its impossible.
+ // only supports data-change notification, nothing else. So currently (Beryllium-SR2) honeycomb notifications
+ // won't be available over RESTCONF.
return honeycombNotificationCollector;
}
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/InmemoryDOMDataBrokerProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/InmemoryDOMDataBrokerProvider.java
index 7db2f7856..f5f04d2a7 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/InmemoryDOMDataBrokerProvider.java
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/InmemoryDOMDataBrokerProvider.java
@@ -49,7 +49,7 @@ public final class InmemoryDOMDataBrokerProvider extends ProviderTrait<DOMDataBr
ExecutorService listenableFutureExecutor =
SpecialExecutors.newBlockingBoundedCachedThreadPool(1, 100, "commits");
ExecutorService commitExecutor = SpecialExecutors.newBoundedSingleThreadExecutor(100, "WriteTxCommit");
- // TODO try to provide more lightweight implementation of DataBroker, maybe a single executor would be enough
+ // TODO HONEYCOMB-164 try to provide more lightweight implementation of DataBroker
Map<LogicalDatastoreType, DOMStore> map = new LinkedHashMap<>();
map.put(LogicalDatastoreType.CONFIGURATION, cfgDataStore);
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.java
index 3954af896..f60366c7e 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.java
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.java
@@ -68,7 +68,7 @@ public final class HoneycombNotification2NetconfProvider
new TranslatingNotificationListener(netconfNotifReg, streamType, schemaService);
// NotificationManager is used to provide list of available notifications (which are all of the notifications registered)
- // TODO make available notifications configurable here so that any number of notification streams for HONEYCOMB_NETCONF
+ // TODO HONEYCOMB-165 make available notifications configurable here so that any number of notification streams for netconf
// can be configured on top of a single notification manager
LOG.debug("Current notifications to be exposed over HONEYCOMB_NETCONF: {}",
hcNotificationCollector.getNotificationTypes());
@@ -77,7 +77,7 @@ public final class HoneycombNotification2NetconfProvider
.collect(Collectors.toList());
// Register as listener to HC'OPERATIONAL DOM notification service
- // TODO This should only be triggered when HONEYCOMB_NETCONF notifications are activated
+ // TODO HONEYCOMB-166 This should only be triggered when HONEYCOMB_NETCONF notifications are activated
// Because this way we actually start all notification producers
// final Collection<QName> notificationQNames =
ListenerRegistration<DOMNotificationListener> domNotifListenerReg = notificationRouter
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfModule.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfModule.java
index 9beb10dbc..3466362cf 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfModule.java
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfModule.java
@@ -29,6 +29,7 @@ import io.fd.honeycomb.infra.distro.data.HoneycombNotificationManagerProvider;
import io.fd.honeycomb.infra.distro.data.InmemoryDOMDataBrokerProvider;
import io.fd.honeycomb.notification.NotificationCollector;
import io.netty.channel.nio.NioEventLoopGroup;
+import io.netty.util.HashedWheelTimer;
import io.netty.util.Timer;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
@@ -118,7 +119,7 @@ public class NetconfModule extends PrivateModule {
*/
private AnnotatedElementBuilder configureServer() {
bind(NioEventLoopGroup.class).toProvider(NettyThreadGroupProvider.class).in(Singleton.class);
- bind(Timer.class).toProvider(NettyTimerProvider.class).in(Singleton.class);
+ bind(Timer.class).toInstance(new HashedWheelTimer());
bind(NetconfServerDispatcher.class).toProvider(NetconfServerDispatcherProvider.class).in(Singleton.class);
bind(NetconfTcpServerProvider.NetconfTcpServer.class).toProvider(NetconfTcpServerProvider.class)
.in(Singleton.class);
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringReaderFactoryProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringReaderFactoryProvider.java
index 583b15055..3a4c13697 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringReaderFactoryProvider.java
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringReaderFactoryProvider.java
@@ -18,10 +18,15 @@ package io.fd.honeycomb.infra.distro.netconf;
import com.google.inject.Inject;
import com.google.inject.name.Named;
-import io.fd.honeycomb.impl.NetconfMonitoringReaderFactory;
import io.fd.honeycomb.infra.distro.ProviderTrait;
import io.fd.honeycomb.translate.read.ReaderFactory;
+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.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.NetconfState;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.NetconfStateBuilder;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public final class NetconfMonitoringReaderFactoryProvider extends ProviderTrait<ReaderFactory> {
@@ -34,4 +39,24 @@ public final class NetconfMonitoringReaderFactoryProvider extends ProviderTrait<
protected NetconfMonitoringReaderFactory create() {
return new NetconfMonitoringReaderFactory(netconfDataBroker);
}
+
+ /**
+ * {@link io.fd.honeycomb.translate.read.ReaderFactory} initiating reader into NETCONF's dedicated data store.
+ * Making NETCONF operational data available over NETCONF/RESTCONF
+ */
+ private static final class NetconfMonitoringReaderFactory implements ReaderFactory {
+
+ private final DataBroker netconfMonitoringBindingBrokerDependency;
+
+ NetconfMonitoringReaderFactory(final DataBroker netconfMonitoringBindingBrokerDependency) {
+ this.netconfMonitoringBindingBrokerDependency = netconfMonitoringBindingBrokerDependency;
+ }
+
+ @Override
+ public void init(final ModifiableReaderRegistryBuilder registry) {
+ registry.add(new BindingBrokerReader<>(InstanceIdentifier.create(NetconfState.class),
+ netconfMonitoringBindingBrokerDependency,
+ LogicalDatastoreType.OPERATIONAL, NetconfStateBuilder.class));
+ }
+ }
}
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfSshServerProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfSshServerProvider.java
index 0b3be9f1f..2c1eceeaf 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfSshServerProvider.java
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfSshServerProvider.java
@@ -75,7 +75,7 @@ public final class NetconfSshServerProvider extends ProviderTrait<NetconfSshServ
final SshProxyServerConfigurationBuilder sshConfigBuilder = new SshProxyServerConfigurationBuilder();
sshConfigBuilder.setBindingAddress(bindingAddress);
sshConfigBuilder.setLocalAddress(localAddress);
- // TODO only simple authProvider checking ConfigAttributes
+ // Only simple authProvider checking ConfigAttributes, checking the config file
sshConfigBuilder.setAuthenticator(new SimplelAuthProvider(cfgAttributes));
sshConfigBuilder.setIdleTimeout(Integer.MAX_VALUE);
sshConfigBuilder.setKeyPairProvider(new PEMGeneratorHostKeyProvider());
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NettyTimerProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NettyTimerProvider.java
deleted file mode 100644
index 6ae960cea..000000000
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NettyTimerProvider.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.fd.honeycomb.infra.distro.netconf;
-
-import com.google.inject.Inject;
-import io.fd.honeycomb.infra.distro.ProviderTrait;
-import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration;
-import io.netty.util.HashedWheelTimer;
-import io.netty.util.Timer;
-
-public final class NettyTimerProvider extends ProviderTrait<Timer> {
-
- @Inject
- private HoneycombConfiguration cfgAttributes;
-
- @Override
- protected HashedWheelTimer create() {
- // TODO expose configuration,
- return new HashedWheelTimer();
- }
-}
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/HttpsConnectorProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/HttpsConnectorProvider.java
index 76fc72f3f..8dca157a6 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/HttpsConnectorProvider.java
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/HttpsConnectorProvider.java
@@ -53,7 +53,7 @@ public final class HttpsConnectorProvider extends ProviderTrait<ServerConnector>
URL truststoreURL = getClass().getResource(cfg.restconfTruststore.get());
sslContextFactory.setTrustStorePath(truststoreURL.getPath());
sslContextFactory.setTrustStorePassword((cfg.truststorePassword.get()));
- // TODO make this more configurable
+ // TODO HONEYCOMB-167 make this more configurable
sslContextFactory.setExcludeCipherSuites("SSL_RSA_WITH_DES_CBC_SHA", "SSL_DHE_RSA_WITH_DES_CBC_SHA",
"SSL_DHE_DSS_WITH_DES_CBC_SHA", "SSL_RSA_EXPORT_WITH_RC4_40_MD5", "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
"SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA", "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA");
diff --git a/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/WEB-INF/web.xml b/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/WEB-INF/web.xml
index 7e59a1a7d..45fcce741 100644
--- a/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/WEB-INF/web.xml
+++ b/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/WEB-INF/web.xml
@@ -42,7 +42,7 @@
<param-value>application/xml,application/yang.data+xml,xml,application/json,application/yang.data+json</param-value>
</init-param>
</filter>
- <!-- FIXME gzip filter is deprecated -->
+ <!-- TODO HONEYCOMB-168 gzip filter is deprecated -->
<filter-mapping>
<filter-name>GzipFilter</filter-name>
<url-pattern>/*</url-pattern>
diff --git a/infra/notification/api/pom.xml b/infra/notification/api/pom.xml
index 1c4f3d933..81913591d 100644
--- a/infra/notification/api/pom.xml
+++ b/infra/notification/api/pom.xml
@@ -32,9 +32,6 @@
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-dom-api</artifactId>
- <version>2.0.2-Beryllium-SR2</version>
</dependency>
</dependencies>
-
-
</project>
diff --git a/infra/notification/impl/pom.xml b/infra/notification/impl/pom.xml
index 53223ef65..083cb98eb 100644
--- a/infra/notification/impl/pom.xml
+++ b/infra/notification/impl/pom.xml
@@ -29,7 +29,6 @@
<packaging>bundle</packaging>
<dependencies>
-
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>notification-api</artifactId>
@@ -38,14 +37,12 @@
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-binding-config</artifactId>
- <version>1.3.2-Beryllium-SR2</version>
</dependency>
-
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>netconf-notifications-api</artifactId>
- <version>1.0.2-Beryllium-SR2</version>
</dependency>
+
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
diff --git a/infra/notification/pom.xml b/infra/notification/pom.xml
index dc4f4d28d..6d4c15fa0 100644
--- a/infra/notification/pom.xml
+++ b/infra/notification/pom.xml
@@ -31,6 +31,7 @@
<prerequisites>
<maven>3.1.1</maven>
</prerequisites>
+
<modules>
<module>api</module>
<module>impl</module>
diff --git a/infra/pom.xml b/infra/pom.xml
index 91395356e..782f1f442 100644
--- a/infra/pom.xml
+++ b/infra/pom.xml
@@ -31,6 +31,7 @@
<prerequisites>
<maven>3.1.1</maven>
</prerequisites>
+
<modules>
<module>data-api</module>
<module>data-impl</module>
@@ -42,9 +43,9 @@
<module>cfg-init</module>
<module>impl</module>
<module>minimal-distribution</module>
- <module>artifacts</module>
<module>it</module>
</modules>
+
<!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
<build>
<plugins>
diff --git a/infra/translate-api/pom.xml b/infra/translate-api/pom.xml
index bb9f6f1df..88801f13c 100644
--- a/infra/translate-api/pom.xml
+++ b/infra/translate-api/pom.xml
@@ -28,18 +28,6 @@
<version>1.16.12-SNAPSHOT</version>
<packaging>bundle</packaging>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.mdsal</groupId>
- <artifactId>mdsal-artifacts</artifactId>
- <version>2.0.2-Beryllium-SR2</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
@@ -50,7 +38,6 @@
<artifactId>mdsal-binding-api</artifactId>
</dependency>
- <!-- Testing Dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -61,7 +48,5 @@
<artifactId>mockito-all</artifactId>
<scope>test</scope>
</dependency>
-
</dependencies>
-
</project>
diff --git a/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/Reader.java b/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/Reader.java
index 177b52415..dd9944624 100644
--- a/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/Reader.java
+++ b/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/Reader.java
@@ -32,7 +32,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@Beta
public interface Reader<D extends DataObject, B extends Builder<D>> extends SubtreeManager<D> {
- // TODO make async
+ // TODO HONEYCOMB-169 make async
/**
* Reads data identified by id
diff --git a/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/registry/ModifiableReaderRegistryBuilder.java b/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/registry/ModifiableReaderRegistryBuilder.java
index 10dcd9280..67029b17c 100644
--- a/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/registry/ModifiableReaderRegistryBuilder.java
+++ b/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/registry/ModifiableReaderRegistryBuilder.java
@@ -31,7 +31,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public interface ModifiableReaderRegistryBuilder
extends ModifiableSubtreeManagerRegistryBuilder<Reader<? extends DataObject, ? extends Builder<?>>> {
- // TODO we should be able to add structural/reflexive readers automatically in the registry builder, we just need builder class
+ // TODO HONEYCOMB-179 we should be able to add structural/reflexive readers automatically in the registry builder, we just need builder class
// We would need generated class loading strategy instance and then load builder classes relying on naming + package conventions of Binding spec
/**
* Add a structural reader that performs no read operation on its own, just fills in the hierarchy.
diff --git a/infra/translate-api/src/main/java/io/fd/honeycomb/translate/write/registry/WriterRegistry.java b/infra/translate-api/src/main/java/io/fd/honeycomb/translate/write/registry/WriterRegistry.java
index 402335115..d281ee558 100644
--- a/infra/translate-api/src/main/java/io/fd/honeycomb/translate/write/registry/WriterRegistry.java
+++ b/infra/translate-api/src/main/java/io/fd/honeycomb/translate/write/registry/WriterRegistry.java
@@ -183,7 +183,7 @@ public interface WriterRegistry {
@Beta
class RevertFailedException extends TranslationException {
- // TODO change to list of VppDataModifications to make debugging easier
+ // TODO HONEYCOMB-170 change to list of VppDataModifications to make debugging easier
private final Set<InstanceIdentifier<?>> notRevertedChanges;
/**
diff --git a/infra/translate-impl/pom.xml b/infra/translate-impl/pom.xml
index 1dbc734d1..99b3a9846 100644
--- a/infra/translate-impl/pom.xml
+++ b/infra/translate-impl/pom.xml
@@ -45,7 +45,6 @@
<version>${project.version}</version>
</dependency>
- <!-- Testing Dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
diff --git a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericListReader.java b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericListReader.java
index c6e7f3cb5..d8accec91 100644
--- a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericListReader.java
+++ b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericListReader.java
@@ -106,7 +106,11 @@ public final class GenericListReader<C extends DataObject & Identifiable<K>, K e
public void readCurrentAttributes(@Nonnull final InstanceIdentifier<C> id, @Nonnull final B builder,
@Nonnull final ReadContext ctx)
throws ReadFailedException {
- customizer.readCurrentAttributes(id, builder, ctx);
+ try {
+ customizer.readCurrentAttributes(id, builder, ctx);
+ } catch (RuntimeException e) {
+ throw new ReadFailedException(id, e);
+ }
}
@Override
diff --git a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericReader.java b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericReader.java
index 1c638317a..f60c8f137 100644
--- a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericReader.java
+++ b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericReader.java
@@ -54,7 +54,11 @@ public final class GenericReader<C extends DataObject, B extends Builder<C>> ext
public void readCurrentAttributes(@Nonnull final InstanceIdentifier<C> id,
@Nonnull final B builder,
@Nonnull final ReadContext ctx) throws ReadFailedException {
- customizer.readCurrentAttributes(id, builder, ctx);
+ try {
+ customizer.readCurrentAttributes(id, builder, ctx);
+ } catch (RuntimeException e) {
+ throw new ReadFailedException(id, e);
+ }
}
@Override
diff --git a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/write/GenericListWriter.java b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/write/GenericListWriter.java
index f61812931..4e05ce018 100644
--- a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/write/GenericListWriter.java
+++ b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/write/GenericListWriter.java
@@ -46,20 +46,32 @@ public final class GenericListWriter<D extends DataObject & Identifiable<K>, K e
@Override
protected void writeCurrentAttributes(@Nonnull final InstanceIdentifier<D> id, @Nonnull final D data,
@Nonnull final WriteContext ctx) throws WriteFailedException {
- customizer.writeCurrentAttributes(id, data, ctx);
+ try {
+ customizer.writeCurrentAttributes(id, data, ctx);
+ } catch (RuntimeException e) {
+ throw new WriteFailedException.CreateFailedException(id, data, e);
+ }
}
@Override
protected void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<D> id, @Nonnull final D dataBefore,
@Nonnull final WriteContext ctx) throws WriteFailedException {
- customizer.deleteCurrentAttributes(id, dataBefore, ctx);
+ try {
+ customizer.deleteCurrentAttributes(id, dataBefore, ctx);
+ } catch (RuntimeException e) {
+ throw new WriteFailedException.DeleteFailedException(id, e);
+ }
}
@Override
protected void updateCurrentAttributes(@Nonnull final InstanceIdentifier<D> id, @Nonnull final D dataBefore,
@Nonnull final D dataAfter, @Nonnull final WriteContext ctx)
throws WriteFailedException {
- customizer.updateCurrentAttributes(id, dataBefore, dataAfter, ctx);
+ try {
+ customizer.updateCurrentAttributes(id, dataBefore, dataAfter, ctx);
+ } catch (RuntimeException e) {
+ throw new WriteFailedException.UpdateFailedException(id, dataBefore, dataAfter, e);
+ }
}
@Override
diff --git a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/write/GenericWriter.java b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/write/GenericWriter.java
index 486da9b4a..30d15e370 100644
--- a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/write/GenericWriter.java
+++ b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/write/GenericWriter.java
@@ -40,15 +40,21 @@ public final class GenericWriter<D extends DataObject> extends AbstractGenericWr
@Override
protected void writeCurrentAttributes(@Nonnull final InstanceIdentifier<D> id, @Nonnull final D data,
@Nonnull final WriteContext ctx) throws WriteFailedException {
- // TODO wrap all customizer invocations in try catch, and wrap runtime exceptions in ReadFailed
- // TODO same for readers
- customizer.writeCurrentAttributes(id, data, ctx);
+ try {
+ customizer.writeCurrentAttributes(id, data, ctx);
+ } catch (RuntimeException e) {
+ throw new WriteFailedException.CreateFailedException(id, data, e);
+ }
}
@Override
protected void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<D> id, @Nonnull final D dataBefore,
@Nonnull final WriteContext ctx) throws WriteFailedException {
- customizer.deleteCurrentAttributes(id, dataBefore, ctx);
+ try {
+ customizer.deleteCurrentAttributes(id, dataBefore, ctx);
+ } catch (RuntimeException e) {
+ throw new WriteFailedException.DeleteFailedException(id, e);
+ }
}
@Override
@@ -56,6 +62,10 @@ public final class GenericWriter<D extends DataObject> extends AbstractGenericWr
@Nonnull final D dataBefore,
@Nonnull final D dataAfter,
@Nonnull final WriteContext ctx) throws WriteFailedException {
- customizer.updateCurrentAttributes(id, dataBefore, dataAfter, ctx);
+ try {
+ customizer.updateCurrentAttributes(id, dataBefore, dataAfter, ctx);
+ } catch (RuntimeException e) {
+ throw new WriteFailedException.UpdateFailedException(id, dataBefore, dataAfter, e);
+ }
}
}
diff --git a/infra/translate-spi/pom.xml b/infra/translate-spi/pom.xml
index f1e3148f5..18de9b1d4 100644
--- a/infra/translate-spi/pom.xml
+++ b/infra/translate-spi/pom.xml
@@ -28,18 +28,6 @@
<version>1.16.12-SNAPSHOT</version>
<packaging>bundle</packaging>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.mdsal</groupId>
- <artifactId>mdsal-artifacts</artifactId>
- <version>2.0.2-Beryllium-SR2</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
@@ -55,7 +43,6 @@
<artifactId>mdsal-binding-api</artifactId>
</dependency>
- <!-- Testing Dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -66,7 +53,5 @@
<artifactId>mockito-all</artifactId>
<scope>test</scope>
</dependency>
-
</dependencies>
-
</project>
diff --git a/infra/translate-spi/src/main/java/io/fd/honeycomb/translate/spi/read/ListReaderCustomizer.java b/infra/translate-spi/src/main/java/io/fd/honeycomb/translate/spi/read/ListReaderCustomizer.java
index deb0a279d..7c64e7f7b 100644
--- a/infra/translate-spi/src/main/java/io/fd/honeycomb/translate/spi/read/ListReaderCustomizer.java
+++ b/infra/translate-spi/src/main/java/io/fd/honeycomb/translate/spi/read/ListReaderCustomizer.java
@@ -49,7 +49,6 @@ public interface ListReaderCustomizer<C extends DataObject & Identifiable<K>, K
@Nonnull
List<K> getAllIds(@Nonnull final InstanceIdentifier<C> id, @Nonnull final ReadContext context) throws
ReadFailedException;
- // TODO does it make sense with vpp APIs ? Should we replace it with a simple readAll ?
/**
* Merge read data into provided parent builder.
diff --git a/infra/translate-spi/src/main/java/io/fd/honeycomb/translate/spi/read/ReaderCustomizer.java b/infra/translate-spi/src/main/java/io/fd/honeycomb/translate/spi/read/ReaderCustomizer.java
index 610fe1514..a13e518a6 100644
--- a/infra/translate-spi/src/main/java/io/fd/honeycomb/translate/spi/read/ReaderCustomizer.java
+++ b/infra/translate-spi/src/main/java/io/fd/honeycomb/translate/spi/read/ReaderCustomizer.java
@@ -44,16 +44,13 @@ public interface ReaderCustomizer<C extends DataObject, B extends Builder<C>> {
*
* @param id id of current data object
* @param builder builder for creating read value
- * @param ctx
+ * @param ctx context for current read
* @throws ReadFailedException if read was unsuccessful
*/
void readCurrentAttributes(@Nonnull final InstanceIdentifier<C> id,
@Nonnull final B builder,
@Nonnull final ReadContext ctx) throws ReadFailedException;
- // FIXME need to capture parent builder type, but that's inconvenient at best, is it ok to leave it Builder<?> and
- // cast in specific customizers ? ... probably better than adding another type parameter
-
/**
* Merge read data into provided parent builder.
*/
diff --git a/infra/translate-utils/pom.xml b/infra/translate-utils/pom.xml
index 51b1194f1..f2b5a0c75 100644
--- a/infra/translate-utils/pom.xml
+++ b/infra/translate-utils/pom.xml
@@ -28,24 +28,9 @@
<version>1.16.12-SNAPSHOT</version>
<packaging>bundle</packaging>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.mdsal</groupId>
- <artifactId>mdsal-artifacts</artifactId>
- <version>2.0.2-Beryllium-SR2</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>mdsal-artifacts</artifactId>
- <version>1.3.2-Beryllium-SR2</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
+ <properties>
+ <jgrapht.version>0.9.2</jgrapht.version>
+ </properties>
<dependencies>
<dependency>
@@ -73,10 +58,9 @@
<dependency>
<groupId>org.jgrapht</groupId>
<artifactId>jgrapht-core</artifactId>
- <version>0.9.2</version>
+ <version>${jgrapht.version}</version>
</dependency>
- <!-- Testing Dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -87,7 +71,5 @@
<artifactId>mockito-all</artifactId>
<scope>test</scope>
</dependency>
-
</dependencies>
-
</project>
diff --git a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/AbstractSubtreeManagerRegistryBuilderBuilder.java b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/AbstractSubtreeManagerRegistryBuilderBuilder.java
index bf1e89c12..07f2bf1ee 100644
--- a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/AbstractSubtreeManagerRegistryBuilderBuilder.java
+++ b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/AbstractSubtreeManagerRegistryBuilderBuilder.java
@@ -192,10 +192,10 @@ public abstract class AbstractSubtreeManagerRegistryBuilderBuilder<S extends Sub
}
});
- // TODO we could optimize subtree handlers, if there is a dedicated handler for a node managed by a subtree
+ // TODO HONEYCOMB-171 we could optimize subtree handlers, if there is a dedicated handler for a node managed by a subtree
// handler, recreate the subtree handler with a subset of handled child nodes
// This way it is not necessary to change the configuration of subtree writer, just to add a dedicated child
- // writer. This will be needed if we ever switch to annotations for reader/writer hierarchy initialization
+ // writer
return builder.build();
}
diff --git a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/RWUtils.java b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/RWUtils.java
index 695ce6806..4616f8347 100644
--- a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/RWUtils.java
+++ b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/RWUtils.java
@@ -38,10 +38,12 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public final class RWUtils {
+ // TODO HONEYCOMB-172 update the utils methods considering Java8. Make sure they still work by wiring a detailed unit test first
+
private RWUtils() {}
/**
- * Collector expecting only a single resulting item from a stream
+ * Collector expecting only a single resulting item from a stream.
*/
public static<T> Collector<T,?,T> singleItemCollector() {
return Collectors.collectingAndThen(
@@ -56,12 +58,11 @@ public final class RWUtils {
}
/**
- * Find next item in ID after provided type
+ * Find next item in ID after provided type.
*/
@Nonnull
public static InstanceIdentifier.PathArgument getNextId(@Nonnull final InstanceIdentifier<? extends DataObject> id,
@Nonnull final InstanceIdentifier<? extends DataObject> type) {
- // TODO this is inefficient(maybe, depending on actual Iterable type)
final Iterable<InstanceIdentifier.PathArgument> pathArguments = id.getPathArguments();
final int i = Iterables.indexOf(pathArguments, new Predicate<InstanceIdentifier.PathArgument>() {
@Override
@@ -74,7 +75,7 @@ public final class RWUtils {
}
/**
- * Replace last item in ID with a provided IdentifiableItem of the same type
+ * Replace last item in ID with a provided IdentifiableItem of the same type.
*/
@SuppressWarnings("unchecked")
@Nonnull
@@ -90,7 +91,7 @@ public final class RWUtils {
}
/**
- * Create IdentifiableItem from target type of provided ID with provided key
+ * Create IdentifiableItem from target type of provided ID with provided key.
*/
@Nonnull
public static <D extends DataObject & Identifiable<K>, K extends Identifier<D>> InstanceIdentifier.IdentifiableItem<D, K> getCurrentIdItem(
@@ -99,7 +100,7 @@ public final class RWUtils {
}
/**
- * Trim InstanceIdentifier at indexOf(type)
+ * Trim InstanceIdentifier at indexOf(type).
*/
@SuppressWarnings("unchecked")
@Nonnull
diff --git a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/TransactionMappingContext.java b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/TransactionMappingContext.java
index 1b6504c78..4d4e9fddd 100644
--- a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/TransactionMappingContext.java
+++ b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/TransactionMappingContext.java
@@ -34,7 +34,7 @@ public class TransactionMappingContext implements MappingContext {
private final ReadWriteTransaction readWriteTransaction;
- // TODO make async
+ // TODO HONEYCOMB-169 make async
public TransactionMappingContext(final ReadWriteTransaction readWriteTransaction) {
this.readWriteTransaction = readWriteTransaction;
diff --git a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/AbstractGenericReader.java b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/AbstractGenericReader.java
index 75a2a673c..40c78b3c9 100644
--- a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/AbstractGenericReader.java
+++ b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/AbstractGenericReader.java
@@ -56,7 +56,8 @@ public abstract class AbstractGenericReader<D extends DataObject, B extends Buil
@Nonnull final ReadContext ctx) throws ReadFailedException {
LOG.debug("{}: Reading current: {}", this, id);
final B builder = getBuilder(id);
- // Cache empty value to determine if anything has changed later TODO cache in a field
+ // The empty value could be cached, but no caching is safer since we call overridden getBuilder each time
+ // and the build could produce something different (even if it shouldn't)
final D emptyValue = builder.build();
LOG.trace("{}: Reading current attributes", this);
diff --git a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/registry/SubtreeReader.java b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/registry/SubtreeReader.java
index 720bd0b11..260fb241b 100644
--- a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/registry/SubtreeReader.java
+++ b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/registry/SubtreeReader.java
@@ -19,7 +19,6 @@ package io.fd.honeycomb.translate.util.read.registry;
import static com.google.common.base.Preconditions.checkArgument;
import com.google.common.base.Optional;
-import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import io.fd.honeycomb.translate.read.ListReader;
import io.fd.honeycomb.translate.read.ReadContext;
@@ -34,7 +33,6 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import org.opendaylight.yangtools.concepts.Builder;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.Identifiable;
@@ -143,7 +141,6 @@ class SubtreeReader<D extends DataObject, B extends Builder<D>> implements Reade
private static Optional<? extends DataObject> findNextParent(@Nonnull final DataObject parent,
@Nonnull final InstanceIdentifier.PathArgument nextId,
@Nonnull final Class<?> managedType) {
- // TODO is there a better way than reflection ? e.g. convert into NN and filter out with a utility
Optional<Method> method = ReflectionUtils.findMethodReflex(managedType, "get",
Collections.emptyList(), nextId.getType());
@@ -172,19 +169,13 @@ class SubtreeReader<D extends DataObject, B extends Builder<D>> implements Reade
checkArgument(nextId instanceof InstanceIdentifier.IdentifiableItem<?, ?>,
"Unable to perform wildcarded read for %s", nextId);
final Identifier key = ((InstanceIdentifier.IdentifiableItem) nextId).getKey();
- // TODO replace with stream().filter().findFirst() when we switch to using java's Optional instead of Guava's
- // because now we would have to do awkward Optional transformation since findFirstReturns guava's optional
- return Iterables.tryFind(invoke, new Predicate<DataObject>() {
-
- @Override
- public boolean apply(@Nullable final DataObject input) {
- final Optional<Method> keyGetter = ReflectionUtils.findMethodReflex(nextId.getType(), "get",
- Collections.emptyList(), key.getClass());
- final Object actualKey;
- actualKey = invoke(keyGetter.get(), nextId, input);
- return key.equals(actualKey);
- }
- });
+
+ final Method keyGetter = ReflectionUtils.findMethodReflex(nextId.getType(), "get",
+ Collections.emptyList(), key.getClass()).get();
+
+ return Optional.fromNullable(invoke.stream()
+ .filter(item -> key.equals(invoke(keyGetter, nextId, item)))
+ .findFirst().orElse(null));
}
private static DataObject filterSingle(final DataObject parent,
diff --git a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/write/TransactionWriteContext.java b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/write/TransactionWriteContext.java
index 5d801edab..0128ee4a8 100644
--- a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/write/TransactionWriteContext.java
+++ b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/write/TransactionWriteContext.java
@@ -50,14 +50,13 @@ public final class TransactionWriteContext implements WriteContext {
final DOMDataReadOnlyTransaction afterTx,
final MappingContext mappingContext) {
this.serializer = serializer;
- // TODO do we have a BA transaction adapter ? If so, use it here and don't pass serializer
this.beforeTx = beforeTx;
this.afterTx = afterTx;
this.mappingContext = mappingContext;
this.ctx = new ModificationCache();
}
- // TODO make this asynchronous
+ // TODO HONEYCOMB-169 make this asynchronous
@Override
public <T extends DataObject> Optional<T> readBefore(@Nonnull final InstanceIdentifier<T> currentId) {
@@ -78,7 +77,7 @@ public final class TransactionWriteContext implements WriteContext {
tx.read(LogicalDatastoreType.CONFIGURATION, path);
try {
- // TODO once the APIs are asynchronous use just Futures.transform
+ // TODO HONEYCOMB-169 once the APIs are asynchronous use just Futures.transform
final Optional<NormalizedNode<?, ?>> optional = read.checkedGet();
if (!optional.isPresent()) {
diff --git a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/write/registry/FlatWriterRegistry.java b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/write/registry/FlatWriterRegistry.java
index df8ec107b..ab80eb4ac 100644
--- a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/write/registry/FlatWriterRegistry.java
+++ b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/write/registry/FlatWriterRegistry.java
@@ -139,13 +139,11 @@ final class FlatWriterRegistry implements WriterRegistry {
}
private Writer<?> getSubtreeWriterResponsible(final InstanceIdentifier<?> singleType) {
- final Writer<?> writer;// This is slow ( minor TODO-perf )
- writer = writers.values().stream()
+ return writers.values().stream()
.filter(w -> w instanceof SubtreeWriter)
.filter(w -> ((SubtreeWriter<?>) w).getHandledChildTypes().contains(singleType))
.findFirst()
.get();
- return writer;
}
private Collection<DataObjectUpdate> getParentDataObjectUpdate(final WriteContext ctx,
@@ -255,7 +253,6 @@ final class FlatWriterRegistry implements WriterRegistry {
return writers.get(singleType);
}
- // FIXME unit test
private final class ReverterImpl implements Reverter {
private final Collection<InstanceIdentifier<?>> processedNodes;
diff --git a/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/impl/write/util/TransactionWriteContextTest.java b/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/impl/write/util/TransactionWriteContextTest.java
index 001e5567a..79155bdd6 100644
--- a/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/impl/write/util/TransactionWriteContextTest.java
+++ b/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/impl/write/util/TransactionWriteContextTest.java
@@ -29,10 +29,10 @@ import static org.mockito.MockitoAnnotations.initMocks;
import com.google.common.base.Optional;
import com.google.common.util.concurrent.Futures;
+import io.fd.honeycomb.translate.MappingContext;
import io.fd.honeycomb.translate.ModificationCache;
import io.fd.honeycomb.translate.util.DataObjects;
import io.fd.honeycomb.translate.util.write.TransactionWriteContext;
-import io.fd.honeycomb.translate.MappingContext;
import java.util.Map;
import org.junit.Before;
import org.junit.Test;
@@ -125,7 +125,10 @@ public class TransactionWriteContextTest {
@Test
public void testClose() throws Exception {
final ModificationCache context = transactionWriteContext.getModificationCache();
+ final Object o = new Object();
+ context.put(o, o);
+ assertTrue(context.containsKey(o));
transactionWriteContext.close();
- // TODO verify context was closed
+ assertFalse(context.containsKey(o));
}
} \ No newline at end of file
diff --git a/lisp/api/pom.xml b/lisp/api/pom.xml
index eb02e9325..960f88bc0 100755
--- a/lisp/api/pom.xml
+++ b/lisp/api/pom.xml
@@ -32,18 +32,6 @@
<project.translate.groupId>io.fd.honeycomb</project.translate.groupId>
</properties>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.mdsal.model</groupId>
- <artifactId>mdsal-model-artifacts</artifactId>
- <version>0.8.2-Beryllium-SR2</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<dependencies>
<dependency>
<groupId>org.opendaylight.mdsal.model</groupId>
diff --git a/lisp/api/src/main/java/lisp/Ipv4Matcher.java b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv4Matcher.java
index 546d40460..55f0ec907 100755
--- a/lisp/api/src/main/java/lisp/Ipv4Matcher.java
+++ b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv4Matcher.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 Cisco and/or its affiliates.
+ * Copyright (c) 2016 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package lisp;
+package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105;
import java.util.List;
import java.util.regex.Pattern;
@@ -22,7 +22,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.
/**
- * Class that checks whether {@link String} can represent Ipv4Address
+ * Class that checks whether {@link String} can represent Ipv4Address.
*/
public final class Ipv4Matcher {
diff --git a/lisp/api/src/main/java/lisp/Ipv6Matcher.java b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv6Matcher.java
index 209868ec8..947088f8f 100755
--- a/lisp/api/src/main/java/lisp/Ipv6Matcher.java
+++ b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv6Matcher.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 Cisco and/or its affiliates.
+ * Copyright (c) 2016 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package lisp;
+package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105;
import java.util.List;
import java.util.regex.Pattern;
diff --git a/lisp/api/src/main/java/lisp/MacMatcher.java b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/MacMatcher.java
index 611c92e1e..663f4ff22 100755
--- a/lisp/api/src/main/java/lisp/MacMatcher.java
+++ b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/MacMatcher.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 Cisco and/or its affiliates.
+ * Copyright (c) 2016 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package lisp;
+package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105;
import java.util.List;
import java.util.regex.Pattern;
diff --git a/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/SimpleAddressBuilder.java b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/SimpleAddressBuilder.java
index 3d340855e..681e87277 100644
--- a/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/SimpleAddressBuilder.java
+++ b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/SimpleAddressBuilder.java
@@ -18,9 +18,6 @@ package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.addre
import static com.google.common.base.Preconditions.checkNotNull;
-import lisp.Ipv4Matcher;
-import lisp.Ipv6Matcher;
-import lisp.MacMatcher;
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.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address;
@@ -29,13 +26,12 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.
/**
* The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation.
* In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32).
- *
+ * <p/>
* The reason behind putting it under src/main/java is:
* This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent
* loss of user code.
- *
*/
-public class SimpleAddressBuilder {
+public final class SimpleAddressBuilder {
public static SimpleAddress getDefaultInstance(String defaultValue) {
checkNotNull(defaultValue, "Cannot convert null address");
@@ -47,7 +43,6 @@ public class SimpleAddressBuilder {
} else if (MacMatcher.matches(defaultValue)) {
return new SimpleAddress(new MacAddress(defaultValue));
} else {
- //TODO - implement other conversions
throw new IllegalArgumentException("Unknown type");
}
}
diff --git a/lisp/lisp2vpp/pom.xml b/lisp/lisp2vpp/pom.xml
index 920d33a7e..3a5942ad5 100755
--- a/lisp/lisp2vpp/pom.xml
+++ b/lisp/lisp2vpp/pom.xml
@@ -16,10 +16,10 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>io.fd.honeycomb.common</groupId>
- <artifactId>impl-parent</artifactId>
+ <groupId>io.fd.honeycomb.vpp</groupId>
+ <artifactId>vpp-impl-parent</artifactId>
<version>1.16.12-SNAPSHOT</version>
- <relativePath>../../common/impl-parent</relativePath>
+ <relativePath>../../vpp-common/vpp-impl-parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -62,24 +62,20 @@
<dependency>
<groupId>io.fd.vpp</groupId>
<artifactId>jvpp-core</artifactId>
- <version>16.12-SNAPSHOT</version>
</dependency>
<!-- DI -->
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
- <version>${guice.version}</version>
</dependency>
<dependency>
<groupId>net.jmob</groupId>
<artifactId>guice.conf</artifactId>
- <version>${guice.config.version}</version>
</dependency>
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-multibindings</artifactId>
- <version>${guice.version}</version>
</dependency>
<!-- Testing Dependencies -->
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/cfgattrs/LispConfiguration.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/cfgattrs/LispConfiguration.java
index c38ca602f..dae41cebd 100644
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/cfgattrs/LispConfiguration.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/cfgattrs/LispConfiguration.java
@@ -21,44 +21,44 @@ import net.jmob.guice.conf.core.Syntax;
/**
* Class containing static configuration for Lisp module,<br>
- * either loaded from property file or statically typed
+ * either loaded from property file or statically typed.
*/
@BindConfig(value = "lisp", syntax = Syntax.JSON)
public class LispConfiguration {
- //TODO - this constant should be part of V3po plugin
+ //TODO HONEYCOMB-176 - this constant should be part of V3po plugin
/**
- * Interface index to name mapping
+ * Interface index to name mapping.
*/
public static final String INTERFACE_CONTEXT = "interface-context";
/**
- * Locator set index to name mapping
+ * Locator set index to name mapping.
*/
public static final String LOCATOR_SET_CONTEXT = "locator-set-context";
/**
- * Local mappings's eid to name mapping
+ * Local mappings's eid to name mapping.
*/
public static final String LOCAL_MAPPING_CONTEXT = "local-mapping-context";
/**
- * Remote mappings's eid to name mapping
+ * Remote mappings's eid to name mapping.
*/
public static final String REMOTE_MAPPING_CONTEXT = "remote-mapping-context";
/**
- * Central honeycomb initializer
+ * Central honeycomb initializer.
*/
public static final String HONEYCOMB_INITIALIZER = "honeycomb-initializer";
/**
- * Unique prefix for naming context of interfaces
+ * Unique prefix for naming context of interfaces.
**/
public static final String INTERFACE_CONTEXT_PREFIX = "interface-";
/**
- * Unique prefix for naming context of locator sets
+ * Unique prefix for naming context of locator sets.
**/
public static final String LOCATOR_SET_CONTEXT_PREFIX = "locator-set-";
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/AdjacencyCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/AdjacencyCustomizer.java
index 1a9721ca0..50baf6b0e 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/AdjacencyCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/AdjacencyCustomizer.java
@@ -66,7 +66,7 @@ public class AdjacencyCustomizer extends FutureJVppCustomizer
public void readCurrentAttributes(@Nonnull final InstanceIdentifier<Adjacency> id,
@Nonnull final AdjacencyBuilder builder, @Nonnull final ReadContext ctx)
throws ReadFailedException {
- //TODO - finish after https://jira.fd.io/browse/VPP-362
+ // TODO - finish after https://jira.fd.io/browse/VPP-362
throw new ReadFailedException(id, new OperationNotSupportedException("Operation not supported"));
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/factory/LocatorSetsReaderFactory.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/factory/LocatorSetsReaderFactory.java
index 3d0801969..cc500e159 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/factory/LocatorSetsReaderFactory.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/factory/LocatorSetsReaderFactory.java
@@ -34,7 +34,7 @@ import org.openvpp.jvpp.core.future.FutureJVppCore;
/**
- * Produces reader for {@link LocatorSets} <br> and all its inhired child readers
+ * Produces reader for {@link LocatorSets} <br> and all its inhired child readers.
*/
public class LocatorSetsReaderFactory extends AbstractLispReaderFactoryBase implements ReaderFactory {
@@ -42,8 +42,7 @@ public class LocatorSetsReaderFactory extends AbstractLispReaderFactoryBase impl
private LocatorSetsReaderFactory(final InstanceIdentifier<LispState> lispStateId,
final FutureJVppCore vppApi,
final NamingContext interfaceContext,
- final NamingContext locatorSetContext
- ) {
+ final NamingContext locatorSetContext) {
super(lispStateId, vppApi);
this.interfaceContext = interfaceContext;
this.locatorSetContext = locatorSetContext;
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/util/EidConverter.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/util/EidConverter.java
index 39d0fe7f0..b0ca7fc04 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/util/EidConverter.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/util/EidConverter.java
@@ -206,7 +206,6 @@ public final class EidConverter {
} else if (address instanceof Mac) {
return MAC;
} else {
- //TODO - other types
throw new IllegalStateException("Unknown type detected");
}
}
@@ -256,7 +255,6 @@ public final class EidConverter {
case MAC:
return TranslateUtils.parseMac(((Mac) address).getMac().getValue());
default:
- //TODO - other types
throw new IllegalArgumentException("Unsupported type");
}
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/write/LocatorSetCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/write/LocatorSetCustomizer.java
index c2db3b845..d6eaf4f68 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/write/LocatorSetCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/write/LocatorSetCustomizer.java
@@ -47,7 +47,7 @@ import org.openvpp.jvpp.core.future.FutureJVppCore;
/**
- * Customizer for {@link LocatorSet} entity
+ * Customizer for {@link LocatorSet} entity.
*
* @see LocatorSet
*/
@@ -77,7 +77,7 @@ public class LocatorSetCustomizer extends FutureJVppCustomizer
final String locatorSetName = dataAfter.getName();
checkNotNull(locatorSetName, "LocatorSet name is null");
- //TODO check and fill mapping when api returns index of created locator set
+ // TODO VPP-323 check and fill mapping when api returns index of created locator set
// checkState(!locatorSetContext.containsIndex(locatorSetName, writeContext.getMappingContext()),
// "Locator set with name %s allready defined", locatorSetName);
@@ -102,7 +102,7 @@ public class LocatorSetCustomizer extends FutureJVppCustomizer
public void updateCurrentAttributes(@Nonnull InstanceIdentifier<LocatorSet> id,
@Nonnull LocatorSet dataBefore,
@Nonnull LocatorSet dataAfter,
- WriteContext writeContext) throws WriteFailedException {
+ @Nonnull WriteContext writeContext) throws WriteFailedException {
throw new UnsupportedOperationException("Operation not supported");
}
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/util/EidConverterTest.java b/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/util/EidConverterTest.java
index 15087ef24..0f06d2984 100755
--- a/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/util/EidConverterTest.java
+++ b/lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/util/EidConverterTest.java
@@ -43,7 +43,5 @@ public class EidConverterTest {
new MacAddress("aa:bb:cc:dd:ee:ff"))
.build())
.build()));
-
- //TODO testing of other types when they are implemented
}
}
diff --git a/lisp/pom.xml b/lisp/pom.xml
index a3cab037c..2f06d6585 100755
--- a/lisp/pom.xml
+++ b/lisp/pom.xml
@@ -32,6 +32,7 @@
<prerequisites>
<maven>3.1.1</maven>
</prerequisites>
+
<modules>
<module>api</module>
<module>lisp2vpp</module>
diff --git a/nsh/api/pom.xml b/nsh/api/pom.xml
index 4eaedafed..94c6e772d 100644
--- a/nsh/api/pom.xml
+++ b/nsh/api/pom.xml
@@ -28,18 +28,6 @@
<version>1.16.12-SNAPSHOT</version>
<packaging>bundle</packaging>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.mdsal.model</groupId>
- <artifactId>mdsal-model-artifacts</artifactId>
- <version>0.8.2-Beryllium-SR2</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<dependencies>
<dependency>
<groupId>org.opendaylight.mdsal.model</groupId>
diff --git a/nsh/impl/pom.xml b/nsh/impl/pom.xml
index 21ff8f283..276f4f87a 100644
--- a/nsh/impl/pom.xml
+++ b/nsh/impl/pom.xml
@@ -16,10 +16,10 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>io.fd.honeycomb.common</groupId>
- <artifactId>impl-parent</artifactId>
+ <groupId>io.fd.honeycomb.vpp</groupId>
+ <artifactId>vpp-impl-parent</artifactId>
<version>1.16.12-SNAPSHOT</version>
- <relativePath>../../common/impl-parent</relativePath>
+ <relativePath>../../vpp-common/vpp-impl-parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -34,6 +34,7 @@
<artifactId>nsh-api</artifactId>
<version>${project.version}</version>
</dependency>
+
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
diff --git a/samples/interfaces/Readme.adoc b/samples/interfaces/Readme.adoc
index 6d73df456..1ee409164 100644
--- a/samples/interfaces/Readme.adoc
+++ b/samples/interfaces/Readme.adoc
@@ -6,5 +6,3 @@ Only sample data are used, that are not actually handled
== Notifications
A sample notification was added to the models to showcase notification capabilities
-
-// TODO provide a groovy version, will be more compact \ No newline at end of file
diff --git a/samples/interfaces/mapping/pom.xml b/samples/interfaces/mapping/pom.xml
index 49b0111a8..bd5eabfe6 100644
--- a/samples/interfaces/mapping/pom.xml
+++ b/samples/interfaces/mapping/pom.xml
@@ -41,17 +41,14 @@
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
- <version>${guice.version}</version>
</dependency>
<dependency>
<groupId>net.jmob</groupId>
<artifactId>guice.conf</artifactId>
- <version>${guice.config.version}</version>
</dependency>
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-multibindings</artifactId>
- <version>${guice.version}</version>
</dependency>
<dependency>
diff --git a/samples/interfaces/models/pom.xml b/samples/interfaces/models/pom.xml
index 3bb506032..712f82cfa 100644
--- a/samples/interfaces/models/pom.xml
+++ b/samples/interfaces/models/pom.xml
@@ -27,18 +27,6 @@
<version>1.16.12-SNAPSHOT</version>
<packaging>bundle</packaging>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.mdsal.model</groupId>
- <artifactId>mdsal-model-artifacts</artifactId>
- <version>0.8.2-Beryllium-SR2</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<dependencies>
<!-- Uncomment if iana-if-type model is imported -->
<!--<dependency>-->
diff --git a/tools/pom.xml b/tools/pom.xml
index 41c8c111b..c8fb53bf0 100644
--- a/tools/pom.xml
+++ b/tools/pom.xml
@@ -13,6 +13,7 @@
<artifactId>honeycomb-tools</artifactId>
<packaging>pom</packaging>
<version>1.16.12-SNAPSHOT</version>
+
<modules>
<module>archetype</module>
</modules>
diff --git a/v3po/api/pom.xml b/v3po/api/pom.xml
index 46871727d..91102b86e 100644
--- a/v3po/api/pom.xml
+++ b/v3po/api/pom.xml
@@ -27,18 +27,6 @@
<version>1.16.12-SNAPSHOT</version>
<packaging>bundle</packaging>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.mdsal.model</groupId>
- <artifactId>mdsal-model-artifacts</artifactId>
- <version>0.8.2-Beryllium-SR2</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<dependencies>
<dependency>
<groupId>org.opendaylight.mdsal.model</groupId>
diff --git a/v3po/v3po2vpp/pom.xml b/v3po/v3po2vpp/pom.xml
index 5ab45c04c..24619a203 100644
--- a/v3po/v3po2vpp/pom.xml
+++ b/v3po/v3po2vpp/pom.xml
@@ -16,10 +16,10 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>io.fd.honeycomb.common</groupId>
- <artifactId>impl-parent</artifactId>
+ <groupId>io.fd.honeycomb.vpp</groupId>
+ <artifactId>vpp-impl-parent</artifactId>
<version>1.16.12-SNAPSHOT</version>
- <relativePath>../../common/impl-parent</relativePath>
+ <relativePath>../../vpp-common/vpp-impl-parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -68,24 +68,20 @@
<dependency>
<groupId>io.fd.vpp</groupId>
<artifactId>jvpp-core</artifactId>
- <version>16.12-SNAPSHOT</version>
</dependency>
<!-- DI -->
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
- <version>${guice.version}</version>
</dependency>
<dependency>
<groupId>net.jmob</groupId>
<artifactId>guice.conf</artifactId>
- <version>${guice.config.version}</version>
</dependency>
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-multibindings</artifactId>
- <version>${guice.version}</version>
</dependency>
<!-- Testing Dependencies -->
@@ -105,6 +101,5 @@
<version>1.0.8</version>
<scope>test</scope>
</dependency>
-
</dependencies>
</project>
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java
index 163457b2e..69ac8f9b8 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java
@@ -107,7 +107,6 @@ public final class InterfacesStateReaderFactory implements ReaderFactory {
final InstanceIdentifier<Interface2> ifc2AugId = ifcId.augmentation(Interface2.class);
registry.addStructuralReader(ifc2AugId, Interface2Builder.class);
// Ipv4
- // TODO unfinished customizer
final InstanceIdentifier<Ipv4> ipv4Id = ifc2AugId.child(Ipv4.class);
registry.add(new GenericReader<>(ipv4Id, new Ipv4Customizer(jvpp)));
// Address
@@ -117,7 +116,6 @@ public final class InterfacesStateReaderFactory implements ReaderFactory {
final InstanceIdentifier<Neighbor> neighborId = ipv4Id.child(Neighbor.class);
registry.add(new GenericListReader<>(neighborId, new Ipv4NeighbourCustomizer(jvpp)));
// Ipv6
- // TODO unfinished customizer
final InstanceIdentifier<Ipv6> ipv6Id = ifc2AugId.child(Ipv6.class);
registry.add(new GenericReader<>(ipv6Id, new Ipv6Customizer(jvpp, ifcCtx)));
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java
index 6ffe3c30c..bfef255ef 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java
@@ -109,14 +109,14 @@ public final class InterfacesWriterFactory implements WriterFactory {
addVppInterfaceAgmentationWriters(IFC_ID, registry);
// Interface1 (ietf-ip augmentation)
addInterface1AugmentationWriters(IFC_ID, registry);
- // SubinterfaceAugmentation TODO make dedicated module for subIfc writer factory
+ // SubinterfaceAugmentation
new SubinterfaceAugmentationWriterFactory(jvpp, aclWriter, ifcContext, bdContext, classifyTableContext).init(registry);
}
private void addInterface1AugmentationWriters(final InstanceIdentifier<Interface> ifcId,
final ModifiableWriterRegistryBuilder registry) {
final InstanceIdentifier<Interface1> ifc1AugId = ifcId.augmentation(Interface1.class);
- // Ipv6(after interface) TODO unfinished customizer =
+ // Ipv6(after interface) =
registry.addAfter(new GenericWriter<>(ifc1AugId.child(Ipv6.class), new Ipv6Customizer(jvpp)),
ifcId);
// Ipv4(after interface)
@@ -159,7 +159,7 @@ public final class InterfacesWriterFactory implements WriterFactory {
final Set<InstanceIdentifier<?>> specificIfcTypes = Sets.newHashSet(vhostId, vxlanGpeId, vxlanGpeId, tapId);
- // Ethernet(No dependency, customizer not finished TODO) =
+ // Ethernet =
registry.add(new GenericWriter<>(VPP_IFC_AUG_ID.child(Ethernet.class), new EthernetCustomizer(jvpp)));
// Routing(Execute only after specific interface customizers) =
registry.addAfter(
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/SubinterfaceAugmentationWriterFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/SubinterfaceAugmentationWriterFactory.java
index 85c867e9b..4f47f494f 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/SubinterfaceAugmentationWriterFactory.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/SubinterfaceAugmentationWriterFactory.java
@@ -86,7 +86,7 @@ public final class SubinterfaceAugmentationWriterFactory implements WriterFactor
// Subinterfaces
// Subinterface(Handle only after all interface related stuff gets processed) =
registry.subtreeAddAfter(
- // TODO this customizer covers quite a lot of complex child nodes (maybe refactor ?)
+ // TODO HONEYCOMB-188 this customizer covers quite a lot of complex child nodes (maybe refactor ?)
Sets.newHashSet(
InstanceIdentifier.create(SubInterface.class).child(Tags.class),
InstanceIdentifier.create(SubInterface.class).child(Tags.class).child(Tag.class),
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/V3poModule.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/V3poModule.java
index ada8f9d00..8485519f5 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/V3poModule.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/V3poModule.java
@@ -41,6 +41,7 @@ public class V3poModule extends AbstractModule {
install(ConfigurationModule.create());
requestInjection(V3poConfiguration.class);
+ // TODO HONEYCOMB-173 put into constants
// Naming contexts
bind(NamingContext.class)
.annotatedWith(Names.named("interface-context"))
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppStateHoneycombReaderFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppStateHoneycombReaderFactory.java
index ea6b2e460..75779d949 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppStateHoneycombReaderFactory.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppStateHoneycombReaderFactory.java
@@ -70,13 +70,11 @@ public final class VppStateHoneycombReaderFactory implements ReaderFactory {
registry.addStructuralReader(vppStateId, VppStateBuilder.class);
// Version
// Wrap with keepalive reader to detect connection issues
- // TODO keepalive reader wrapper relies on VersionReaderCustomizer (to perform timeout on reads)
- // Once readers+customizers are asynchronous, pull the timeout to keepalive executor so that keepalive wrapper
- // is truly generic
+ // Relying on VersionCustomizer to provide a "timing out read"
registry.add(new KeepaliveReaderWrapper<>(
new GenericReader<>(vppStateId.child(Version.class), new VersionCustomizer(jVpp)),
keepaliveExecutor, ReadTimeoutException.class, 30,
- // FIXME-minimal trigger jvpp reinitialization here
+ // FIXME HONEYCOMB-78 trigger jvpp reinitialization here
() -> LOG.error("Keepalive failed. VPP is probably DOWN!")));
// BridgeDomains(Structural)
final InstanceIdentifier<BridgeDomains> bridgeDomainsId = vppStateId.child(BridgeDomains.class);
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/InterfacesInitializer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/InterfacesInitializer.java
index e9beccfb7..d78f33296 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/InterfacesInitializer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/InterfacesInitializer.java
@@ -93,11 +93,9 @@ public class InterfacesInitializer extends AbstractDataTreeConverter<InterfacesS
return interfacesBuilder.build();
}
- // FIXME https://jira.fd.io/browse/HONEYCOMB-73 this kind of initialization/transformation is bad
+ // TODO https://jira.fd.io/browse/HONEYCOMB-73 this kind of initialization/transformation is bad
// There is no relation to readers, it cannot be extended (readers can) and its hard to keep in sync with readers
- // TODO add IP v4/ v6 initializer
-
private static Interface initialize(
final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface input) {
InterfaceBuilder builder = new InterfaceBuilder();
@@ -105,7 +103,8 @@ public class InterfacesInitializer extends AbstractDataTreeConverter<InterfacesS
builder.setName(input.getName());
builder.setType(input.getType());
builder.setEnabled(AdminStatus.Up.equals(input.getAdminStatus()));
- // builder.setLinkUpDownTrapEnable(); TODO not present in interfaces-state
+ // Not present in interfaces-state
+ // builder.setLinkUpDownTrapEnable();
initializeVppInterfaceStateAugmentation(input, builder);
SubInterfaceInitializationUtils.initializeSubinterfaceStateAugmentation(input, builder);
@@ -163,7 +162,7 @@ public class InterfacesInitializer extends AbstractDataTreeConverter<InterfacesS
setAcl(augmentBuilder, acl);
}
- // TODO set routing, not present in interface-state
+ // Routing is not present in interface-state. Doing nothing for it
builder.addAugmentation(VppInterfaceAugmentation.class, augmentBuilder.build());
}
@@ -196,8 +195,6 @@ public class InterfacesInitializer extends AbstractDataTreeConverter<InterfacesS
augmentBuilder.setIpv4(new Ipv4Builder().setAddress(collect).setNeighbor(neighbors).build());
}
- // TODO ipv6
-
builder.addAugmentation(Interface1.class, augmentBuilder.build());
}
}
@@ -206,7 +203,7 @@ public class InterfacesInitializer extends AbstractDataTreeConverter<InterfacesS
final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.address.Subnet
subnet = address.getSubnet();
- // TODO only prefix length supported
+ // Only prefix length supported
Preconditions.checkArgument(
subnet instanceof org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.address.subnet.PrefixLength);
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/VppInitializer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/VppInitializer.java
index b2fc436e7..1df162ff6 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/VppInitializer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/VppInitializer.java
@@ -50,8 +50,6 @@ public class VppInitializer extends AbstractDataTreeConverter<VppState, Vpp> {
super(bindingDataBroker, InstanceIdentifier.create(VppState.class), InstanceIdentifier.create(Vpp.class));
}
- // TODO move to v3po2vpp
-
@Override
protected Vpp convert(final VppState operationalData) {
LOG.debug("VppInitializer.convert()");
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/EthernetCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/EthernetCustomizer.java
index 2055e35b5..ebc6874ac 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/EthernetCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/EthernetCustomizer.java
@@ -39,7 +39,6 @@ public class EthernetCustomizer extends FutureJVppCustomizer implements WriterCu
public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<Ethernet> id,
@Nonnull final Ethernet dataAfter, @Nonnull final WriteContext writeContext)
throws WriteFailedException {
- // TODO
LOG.warn("Unsupported, ignoring configuration {}", dataAfter);
// VPP API does not support setting MTU
}
@@ -48,14 +47,12 @@ public class EthernetCustomizer extends FutureJVppCustomizer implements WriterCu
public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<Ethernet> id,
@Nonnull final Ethernet dataBefore, @Nonnull final Ethernet dataAfter,
@Nonnull final WriteContext writeContext) {
- // TODO
LOG.warn("Unsupported, ignoring configuration {}", dataAfter);
}
@Override
public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Ethernet> id,
@Nonnull final Ethernet dataBefore, @Nonnull final WriteContext writeContext) {
- // TODO
LOG.warn("Unsupported, ignoring configuration delete {}", id);
}
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/InterconnectionWriteUtils.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/InterconnectionWriteUtils.java
index 8ff0da04a..64d262f23 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/InterconnectionWriteUtils.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/InterconnectionWriteUtils.java
@@ -70,10 +70,8 @@ final class InterconnectionWriteUtils {
} else if (ic instanceof BridgeBased) {
setBridgeBasedL2(id, swIfIndex, ifcName, (BridgeBased) ic, writeContext, (byte) 1 /*enable*/);
} else {
- // FIXME how does choice extensibility work
- // FIXME it is not even possible to create a dedicated customizer for Interconnection, since it's not a DataObject
- // FIXME we might need a choice customizer
- // THis choice is already from augment, so its probably not possible to augment augmented choice
+ // Choices&cases are not data objects, so they cannot have a dedicated Reader/Writer
+ // This choice is already from augment, so its not possible to augment augmented choice
LOG.error("Unable to handle Interconnection of type {}", ic.getClass());
throw new WriteFailedException(id, "Unable to handle Interconnection of type " + ic.getClass());
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/InterfaceCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/InterfaceCustomizer.java
index 082cf64e1..be0c4af09 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/InterfaceCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/InterfaceCustomizer.java
@@ -81,8 +81,7 @@ public class InterfaceCustomizer extends FutureJVppCustomizer implements ListWri
public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Interface> id,
@Nonnull final Interface dataBefore,
@Nonnull final WriteContext writeContext) {
-
- // TODO Handle deletes
+ // Nothing to be done here, customizers for specific interface types e.g. vxlan handle the delete
}
private void setInterface(final InstanceIdentifier<Interface> id, final Interface swIf,
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/L2Customizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/L2Customizer.java
index 7c84186ac..c000f0a1d 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/L2Customizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/L2Customizer.java
@@ -59,7 +59,7 @@ public class L2Customizer extends FutureJVppCustomizer implements WriterCustomiz
final String ifcName = id.firstKeyOf(Interface.class).getName();
final int swIfc = interfaceContext.getIndex(ifcName, writeContext.getMappingContext());
- // TODO handle update properly (if possible)
+ // No update, again calling set
setL2(id, swIfc, ifcName, dataAfter, writeContext);
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/RoutingCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/RoutingCustomizer.java
index 77037a1f2..51bf31d07 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/RoutingCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/RoutingCustomizer.java
@@ -67,7 +67,6 @@ public class RoutingCustomizer extends FutureJVppCustomizer implements WriterCus
final String ifName = id.firstKeyOf(Interface.class).getName();
try {
- // TODO handle updates properly
setRouting(id, ifName, dataAfter, writeContext);
} catch (VppBaseCallException e) {
LOG.warn("Failed to update routing for interface: {}, {}, vxlan: {}", ifName, writeContext, dataAfter);
@@ -78,7 +77,7 @@ public class RoutingCustomizer extends FutureJVppCustomizer implements WriterCus
@Override
public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Routing> id,
@Nonnull final Routing dataBefore, @Nonnull final WriteContext writeContext) {
- // TODO implement delete
+ // TODO HONEYCOMB-176 implement delete
}
private void setRouting(final InstanceIdentifier<Routing> id, final String name, final Routing rt,
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceCustomizer.java
index bfaa42e44..10dd60841 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceCustomizer.java
@@ -29,7 +29,7 @@ import io.fd.honeycomb.translate.v3po.util.TranslateUtils;
import io.fd.honeycomb.translate.v3po.util.WriteTimeoutException;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
-import java.util.Objects;
+import java.util.List;
import java.util.concurrent.CompletionStage;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
@@ -102,7 +102,7 @@ public class SubInterfaceCustomizer extends FutureJVppCustomizer
}
private CreateSubif getCreateSubifRequest(@Nonnull final SubInterface subInterface, final int swIfIndex) {
- // TODO add validation
+ // TODO HONEYCOMB-183 add validation
CreateSubif request = new CreateSubif();
request.subId = Math.toIntExact(subInterface.getIdentifier().intValue());
request.swIfIndex = swIfIndex;
@@ -121,7 +121,8 @@ public class SubInterfaceCustomizer extends FutureJVppCustomizer
}
request.dot1Ad = booleanToByte(_802dot1ad.class == subInterface.getVlanType());
- final MatchType matchType = subInterface.getMatch().getMatchType(); // todo match should be mandatory
+ // TODO HONEYCOMB-183 match should be mandatory
+ final MatchType matchType = subInterface.getMatch().getMatchType();
request.exactMatch =
booleanToByte(matchType instanceof VlanTagged && ((VlanTagged) matchType).isMatchExactTags());
request.defaultSub = booleanToByte(matchType instanceof Default);
@@ -167,10 +168,6 @@ public class SubInterfaceCustomizer extends FutureJVppCustomizer
@Nonnull final SubInterface dataBefore, @Nonnull final SubInterface dataAfter,
@Nonnull final WriteContext writeContext)
throws WriteFailedException {
- if (Objects.equals(dataBefore.isEnabled(), dataAfter.isEnabled())) {
- LOG.debug("No state update will be performed. Ignoring config");
- return; // TODO shouldn't we throw exception here (if there will be dedicated L2 customizer)?
- }
final String subIfaceName = getSubInterfaceName(id.firstKeyOf(Interface.class).getName(),
Math.toIntExact(dataAfter.getIdentifier()));
try {
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceL2Customizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceL2Customizer.java
index 085fa3685..cfb78499a 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceL2Customizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceL2Customizer.java
@@ -72,7 +72,7 @@ public class SubInterfaceL2Customizer extends FutureJVppCustomizer implements Wr
final String subInterfaceName = getSubInterfaceName(id);
final int subInterfaceIndex = interfaceContext.getIndex(subInterfaceName, writeContext.getMappingContext());
- // TODO handle update properly (if possible)
+ // Setting L2 to new values
setL2(id, subInterfaceIndex, subInterfaceName, dataAfter, writeContext);
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/VhostUserCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/VhostUserCustomizer.java
index 5d10b3730..d4e734da1 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/VhostUserCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/VhostUserCustomizer.java
@@ -90,8 +90,9 @@ public class VhostUserCustomizer extends AbstractInterfaceTypeCustomizer<VhostUs
CreateVhostUserIf request = new CreateVhostUserIf();
request.isServer = TranslateUtils.booleanToByte(VhostUserRole.Server.equals(vhostUser.getRole()));
request.sockFilename = vhostUser.getSocket().getBytes();
- request.renumber = 0; // TODO
- request.customDevInstance = 0; // TODO
+ // TODO HONEYCOMB-177 expose device instance attribute just like for TAP
+ request.renumber = 0;
+ request.customDevInstance = 0;
request.useCustomMac = 0;
request.macAddress = new byte[]{};
return request;
@@ -127,8 +128,9 @@ public class VhostUserCustomizer extends AbstractInterfaceTypeCustomizer<VhostUs
ModifyVhostUserIf request = new ModifyVhostUserIf();
request.isServer = TranslateUtils.booleanToByte(VhostUserRole.Server.equals(vhostUser.getRole()));
request.sockFilename = vhostUser.getSocket().getBytes();
- request.renumber = 0; // TODO
- request.customDevInstance = 0; // TODO
+ // TODO HONEYCOMB-177
+ request.renumber = 0;
+ request.customDevInstance = 0;
request.swIfIndex = swIfIndex;
return request;
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/VxlanCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/VxlanCustomizer.java
index efd670b38..294fdad65 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/VxlanCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/VxlanCustomizer.java
@@ -41,7 +41,6 @@ import org.openvpp.jvpp.core.future.FutureJVppCore;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-// TODO extract common code from all Interface type specific writer customizers into a superclass
public class VxlanCustomizer extends AbstractInterfaceTypeCustomizer<Vxlan> {
private static final Logger LOG = LoggerFactory.getLogger(VxlanCustomizer.class);
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/AbstractAceWriter.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/AbstractAceWriter.java
index eeabff4ce..97c1bc031 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/AbstractAceWriter.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/AbstractAceWriter.java
@@ -43,14 +43,14 @@ import org.openvpp.jvpp.core.future.FutureJVppCore;
/**
* Base writer for translation of ietf-acl model ACEs to VPP's classify tables and sessions.
- *
+ * <p/>
* Creates one classify table with single session per ACE.
*
* @param <T> type of access control list entry
*/
abstract class AbstractAceWriter<T extends AceType> implements AceWriter {
- // TODO: minimise memory used by classify tables (we create a lot of them to make ietf-acl model
+ // TODO: HONEYCOMB-181 minimise memory used by classify tables (we create a lot of them to make ietf-acl model
// mapping more convenient):
// according to https://wiki.fd.io/view/VPP/Introduction_To_N-tuple_Classifiers#Creating_a_classifier_table,
// classify table needs 16*(1 + match_n_vectors) bytes, but this does not quite work, so setting 8K for now
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/IetfAClWriter.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/IetfAClWriter.java
index a25ddac6c..9c1098286 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/IetfAClWriter.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/IetfAClWriter.java
@@ -132,9 +132,6 @@ public final class IetfAClWriter {
// filter ACE entries and group by AceType
final Map<AclType, List<Ace>> acesByType = acls.stream()
.flatMap(acl -> aclToAceStream(acl, writeContext))
- // TODO we should not tolerate nulls, but throw some meaningful exceptions instead
- .filter(ace -> ace != null && ace.getMatches() != null && ace.getMatches().getAceType() != null &&
- ace.getActions() != null && ace.getActions().getPacketHandling() != null)
.collect(Collectors.groupingBy(AclType::fromAce));
final InputAclSetInterface request = new InputAclSetInterface();
@@ -170,16 +167,21 @@ public final class IetfAClWriter {
@Nonnull
private static AclType fromAce(final Ace ace) {
AclType result = null;
- final AceType aceType = ace.getMatches().getAceType();
- if (aceType instanceof AceEth) {
- result = ETH;
- } else if (aceType instanceof AceIp) {
- final AceIpVersion aceIpVersion = ((AceIp) aceType).getAceIpVersion();
- if (aceIpVersion instanceof AceIpv4) {
- result = IP4;
- } else {
- result = IP6;
+ final AceType aceType;
+ try {
+ aceType = ace.getMatches().getAceType();
+ if (aceType instanceof AceEth) {
+ result = ETH;
+ } else if (aceType instanceof AceIp) {
+ final AceIpVersion aceIpVersion = ((AceIp) aceType).getAceIpVersion();
+ if (aceIpVersion instanceof AceIpv4) {
+ result = IP4;
+ } else {
+ result = IP6;
+ }
}
+ } catch (NullPointerException e) {
+ throw new IllegalArgumentException("Incomplete ACE: " + ace, e);
}
if (result == null) {
throw new IllegalArgumentException(String.format("Not supported ace type %s", aceType));
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4AddressCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4AddressCustomizer.java
index 4a9a14d09..e7b932ae0 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4AddressCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4AddressCustomizer.java
@@ -82,12 +82,6 @@ public class Ipv4AddressCustomizer extends FutureJVppCustomizer implements ListW
} else if (subnet instanceof Netmask) {
setNetmaskSubnet(add, id, interfaceName, interfaceIndex, address, (Netmask) subnet);
} else {
- // FIXME how does choice extensibility work
- // FIXME it is not even possible to create a dedicated
- // customizer for Interconnection, since it's not a DataObject
- // FIXME we might need a choice customizer
- // THis choice is already from augment, so its probably not
- // possible to augment augmented choice
LOG.error("Unable to handle subnet of type {}", subnet.getClass());
throw new WriteFailedException(id, "Unable to handle subnet of type " + subnet.getClass());
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4Customizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4Customizer.java
index d565e4e59..0e0bba3b0 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4Customizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4Customizer.java
@@ -54,14 +54,14 @@ public class Ipv4Customizer extends FutureJVppCustomizer implements WriterCustom
throws WriteFailedException {
final String ifcName = id.firstKeyOf(Interface.class).getName();
- // TODO handle update in a better way
+ // TODO HONEYCOMB-180 handle update in a better way
setIpv4(id, ifcName, dataAfter, writeContext);
}
@Override
public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Ipv4> id,
@Nonnull final Ipv4 dataBefore, @Nonnull final WriteContext writeContext) {
- // TODO implement delete
+ // TODO HONEYCOMB-180 implement delete
}
private void setIpv4(final InstanceIdentifier<Ipv4> id, final String name, final Ipv4 ipv4,
@@ -70,9 +70,10 @@ public class Ipv4Customizer extends FutureJVppCustomizer implements WriterCustom
final int swIfc = interfaceContext.getIndex(name, writeContext.getMappingContext());
LOG.warn("Ignoring Ipv4 leaf nodes (create/update is not supported)");
- // TODO add support for enabled leaf
- // TODO add support for forwarding leaf
- // TODO add support for mtu leaf
+ // TODO HONEYCOMB-180 add support for:
+ // enabled leaf
+ // forwarding leaf
+ // mtu leaf
}
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4NeighbourCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4NeighbourCustomizer.java
index b866842c1..72d8277fc 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4NeighbourCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4NeighbourCustomizer.java
@@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory;
/**
- * Customizer for writing {@link Neighbor} for {@link Ipv4}
+ * Customizer for writing {@link Neighbor} for {@link Ipv4}.
*/
public class Ipv4NeighbourCustomizer extends FutureJVppCustomizer
implements ListWriterCustomizer<Neighbor, NeighborKey> {
@@ -126,7 +126,7 @@ public class Ipv4NeighbourCustomizer extends FutureJVppCustomizer
request.macAddress = TranslateUtils.parseMac(data.getLinkLayerAddress().getValue());
request.swIfIndex = parentInterfaceIndex;
- //TODO if it is necessary for future use ,make adjustments to be able to set vrfid
+ //TODO HONEYCOMB-182 if it is necessary for future use ,make adjustments to be able to set vrfid
//request.vrfId
TranslateUtils.getReplyForWrite(getFutureJVpp().ipNeighborAddDel(request).toCompletableFuture(), id);
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4WriteUtils.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4WriteUtils.java
index f981d0db0..ab31debc9 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4WriteUtils.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4WriteUtils.java
@@ -34,7 +34,7 @@ import org.openvpp.jvpp.core.future.FutureJVppCore;
/**
* Utility class providing Ipv4 CUD support.
*/
-// TODO replace with interface with default methods or abstract class
+// TODO HONEYCOMB-175 replace with interface with default methods or abstract class
final class Ipv4WriteUtils {
private static final int DOTTED_QUAD_MASK_LENGTH = 4;
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv6Customizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv6Customizer.java
index 6ea30899a..192906854 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv6Customizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv6Customizer.java
@@ -37,7 +37,6 @@ public class Ipv6Customizer extends FutureJVppCustomizer implements WriterCustom
@Override
public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<Ipv6> id,
@Nonnull final Ipv6 dataAfter, @Nonnull final WriteContext writeContext) {
- // TODO
LOG.warn("Unsupported, ignoring configuration {}", dataAfter);
}
@@ -52,6 +51,5 @@ public class Ipv6Customizer extends FutureJVppCustomizer implements WriterCustom
public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Ipv6> id,
@Nonnull final Ipv6 dataBefore, @Nonnull final WriteContext writeContext) {
LOG.warn("Unsupported, ignoring configuration delete {}", id);
- // TODO
}
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/SubInterfaceIpv4AddressCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/SubInterfaceIpv4AddressCustomizer.java
index ab1978861..e0fa46335 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/SubInterfaceIpv4AddressCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/SubInterfaceIpv4AddressCustomizer.java
@@ -89,12 +89,6 @@ public class SubInterfaceIpv4AddressCustomizer extends FutureJVppCustomizer
} else if (subnet instanceof Netmask) {
setNetmaskSubnet(add, id, interfaceName, subInterfaceIndex, address, (Netmask) subnet);
} else {
- // FIXME how does choice extensibility work
- // FIXME it is not even possible to create a dedicated
- // customizer for Interconnection, since it's not a DataObject
- // FIXME we might need a choice customizer
- // THis choice is already from augment, so its probably not
- // possible to augment augmented choice
LOG.error("Unable to handle subnet of type {}", subnet.getClass());
throw new WriteFailedException(id, "Unable to handle subnet of type " + subnet.getClass());
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterconnectionReadUtils.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterconnectionReadUtils.java
index 19c89237c..5dec9b426 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterconnectionReadUtils.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterconnectionReadUtils.java
@@ -43,7 +43,6 @@ import org.slf4j.LoggerFactory;
/**
* Utility class providing Interconnection read support.
*/
-// FIXME this should be customizer, but it is not possible because Interconnection is not a DataObject
final class InterconnectionReadUtils {
private static final Logger LOG = LoggerFactory.getLogger(InterconnectionReadUtils.class);
@@ -93,7 +92,7 @@ final class InterconnectionReadUtils {
}
return bbBuilder.build();
}
- // TODO is there a way to check if interconnection is XconnectBased?
+ // TODO HONEYCOMB-190 is there a way to check if interconnection is XconnectBased?
return null;
}
@@ -116,8 +115,8 @@ final class InterconnectionReadUtils {
throws ReadFailedException {
try {
// We need to perform full bd dump, because there is no way
- // to ask VPP for BD details given interface id/name (TODO add it to vpp.api?)
- // TODO cache dump result
+ // to ask VPP for BD details given interface id/name (TODO HONEYCOMB-190 add it to vpp.api?)
+ // TODO HONEYCOMB-190 cache dump result
final BridgeDomainDump request = new BridgeDomainDump();
request.bdId = -1;
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceUtils.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceUtils.java
index e1f17431e..499f21dea 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceUtils.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceUtils.java
@@ -101,8 +101,6 @@ public final class InterfaceUtils {
sb.append(HEX_CHARS[v & 15]);
}
- // TODO rename and move to V3poUtils
-
/**
* Reads first 6 bytes of supplied byte array and converts to string as Yang dictates <p> Replace later with
* https://git.opendaylight.org/gerrit/#/c/34869/10/model/ietf/ietf-type- util/src/main/
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ProxyArpCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ProxyArpCustomizer.java
index 1deb816f6..2d4dbbe17 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ProxyArpCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ProxyArpCustomizer.java
@@ -35,8 +35,7 @@ import org.slf4j.LoggerFactory;
public class ProxyArpCustomizer extends FutureJVppCustomizer
implements ReaderCustomizer<ProxyArp,
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.
- state._interface.ProxyArpBuilder> {
+ org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.ProxyArpBuilder> {
private static final Logger LOG = LoggerFactory.getLogger(ProxyArpCustomizer.class);
private final NamingContext interfaceContext;
@@ -72,8 +71,7 @@ public class ProxyArpCustomizer extends FutureJVppCustomizer
.rev150105.interfaces.state._interface.ProxyArpBuilder builder,
@Nonnull ReadContext ctx) throws ReadFailedException {
- //TODO: Implement fully when VPP Proxy ARP read API is available
- // https://jira.fd.io/browse/VPP-225
+ //TODO: VPP-225 Implement fully when VPP Proxy ARP read API is available
final InterfaceKey key = id.firstKeyOf(Interface.class);
final int index = interfaceContext.getIndex(key.getName(), ctx.getMappingContext());
LOG.warn("Reading of ARP data not (yet) supported by VPP API");
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/SubInterfaceCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/SubInterfaceCustomizer.java
index 1ad1758b5..49b53235e 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/SubInterfaceCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/SubInterfaceCustomizer.java
@@ -96,7 +96,7 @@ public class SubInterfaceCustomizer extends FutureJVppCustomizer
final String ifaceName = key.getName();
final int ifaceId = interfaceContext.getIndex(ifaceName, context.getMappingContext());
- // TODO if we know that full dump was already performed we could use cache
+ // TODO HONEYCOMB-189 if we know that full dump was already performed we could use cache
// (checking if getCachedInterfaceDump() returns non empty map is not enough, because
// we could be part of particular iface state read
final SwInterfaceDump request = new SwInterfaceDump();
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4Customizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4Customizer.java
index 73e1c7047..77837fc99 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4Customizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4Customizer.java
@@ -53,7 +53,7 @@ public class Ipv4Customizer extends FutureJVppCustomizer implements ReaderCustom
@Override
public void readCurrentAttributes(@Nonnull final InstanceIdentifier<Ipv4> id, @Nonnull final Ipv4Builder builder,
@Nonnull final ReadContext ctx) throws ReadFailedException {
- //TODO add reading of isForwarding flag when there is dump for it
+ //TODO HONEYCOMB-180 add reading of isForwarding flag when there is dump for it
LOG.warn("Operation not supported");
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4ReadUtils.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4ReadUtils.java
index 1ccae0aed..c3c5616c9 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4ReadUtils.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4ReadUtils.java
@@ -55,7 +55,7 @@ final class Ipv4ReadUtils {
// Many VPP APIs do not provide get operation for single item. Dump requests for all items are used instead.
// To improve HC performance, caching dump requests is a common pattern.
- // TODO: use more generic caching implementation, once provided
+ // TODO: HONEYCOMB-102 use more generic caching implementation, once provided
static Optional<IpAddressDetailsReplyDump> dumpAddresses(@Nonnull final FutureJVppCore futureJVppCore,
@Nonnull final InstanceIdentifier<?> id,
@Nonnull final String interfaceName,
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv6Customizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv6Customizer.java
index 1bcc81517..634ae87d1 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv6Customizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv6Customizer.java
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package io.fd.honeycomb.translate.v3po.interfacesstate.ip;
import io.fd.honeycomb.translate.read.ReadContext;
@@ -52,12 +53,13 @@ public class Ipv6Customizer extends FutureJVppCustomizer implements ReaderCustom
@Override
public void readCurrentAttributes(@Nonnull final InstanceIdentifier<Ipv6> id, @Nonnull final Ipv6Builder builder,
@Nonnull final ReadContext ctx) throws ReadFailedException {
- // TODO implement
+ // TODO HONEYCOMB-102 implement
// final IpAddressDump dumpRequest = new IpAddressDump();
// dumpRequest.isIpv6 = 1;
-// dumpRequest.swIfIndex = interfaceContext.getIndex(id.firstKeyOf(Interface.class).getName(), ctx.getMappingContext());
-// final CompletionStage<IpAddressDetailsReplyDump> addressDumpFuture = getFutureJVpp().ipAddressDump(dumpRequest);
- // TODO consider extracting customizer for address
+// dumpRequest.swIfIndex = interfaceContext.getIndex(id.firstKeyOf(Interface.class).getName(),
+// ctx.getMappingContext());
+// final CompletionStage<IpAddressDetailsReplyDump> addressDumpFuture = getFutureJVpp().
+// ipAddressDump(dumpRequest);
// final IpAddressDetailsReplyDump reply = TranslateUtils.getReply(addressDumpFuture.toCompletableFuture());
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/notification/InterfaceChangeNotificationProducer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/notification/InterfaceChangeNotificationProducer.java
index 305148f47..481a2eac9 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/notification/InterfaceChangeNotificationProducer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/notification/InterfaceChangeNotificationProducer.java
@@ -78,7 +78,7 @@ public final class InterfaceChangeNotificationProducer implements ManagedNotific
notificationListenerReg = jvpp.getNotificationRegistry().registerSwInterfaceSetFlagsNotificationCallback(
swInterfaceSetFlagsNotification -> {
LOG.trace("Interface notification received: {}", swInterfaceSetFlagsNotification);
- // TODO this should be lazy
+ // TODO HONEYCOMB-166 this should be lazy
collector.onNotification(transformNotification(swInterfaceSetFlagsNotification));
}
);
@@ -101,7 +101,7 @@ public final class InterfaceChangeNotificationProducer implements ManagedNotific
* data tree (write transaction is still in progress and context changes have not been committed yet, or
* VPP sends the notification before it returns create request(that would store mapping)).
* <p/>
- * In case mapping is not available, index is used as name. TODO inconsistent behavior, maybe just use indices ?
+ * In case mapping is not available, index is used as name.
*/
private InterfaceNameOrIndex getIfcName(final SwInterfaceSetFlagsNotification swInterfaceSetFlagsNotification) {
final Optional<String> optionalName =
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vpp/ArpTerminationTableEntryCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vpp/ArpTerminationTableEntryCustomizer.java
index e1631695a..488c99bb0 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vpp/ArpTerminationTableEntryCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vpp/ArpTerminationTableEntryCustomizer.java
@@ -121,7 +121,7 @@ public class ArpTerminationTableEntryCustomizer extends FutureJVppCustomizer
final IpAddress ipAddress = entry.getIpAddress();
if (ipAddress.getIpv6Address() != null) {
- // FIXME: vpp does not support ipv6 in arp-termination table (based on analysis of l2_bd.c)
+ // FIXME: HONEYCOMB-187 vpp does not support ipv6 in arp-termination table (based on analysis of l2_bd.c)
throw new UnsupportedOperationException("IPv6 address for ARP termination table is not supported yet");
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vpp/BridgeDomainCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vpp/BridgeDomainCustomizer.java
index 3886d36f4..83be3c62c 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vpp/BridgeDomainCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vpp/BridgeDomainCustomizer.java
@@ -23,12 +23,13 @@ import static io.fd.honeycomb.translate.v3po.util.TranslateUtils.booleanToByte;
import com.google.common.base.Preconditions;
import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer;
import io.fd.honeycomb.translate.v3po.util.FutureJVppCustomizer;
-import io.fd.honeycomb.translate.v3po.util.WriteTimeoutException;
-import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.v3po.util.NamingContext;
import io.fd.honeycomb.translate.v3po.util.TranslateUtils;
+import io.fd.honeycomb.translate.v3po.util.WriteTimeoutException;
+import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
import javax.annotation.Nonnull;
+import javax.annotation.concurrent.GuardedBy;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.bridge.domains.BridgeDomain;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.bridge.domains.BridgeDomainKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@@ -47,6 +48,8 @@ public class BridgeDomainCustomizer
private static final byte ADD_OR_UPDATE_BD = (byte) 1;
private final NamingContext bdContext;
+ @GuardedBy("this")
+ private int bridgeDomainIndexCounter = 1;
public BridgeDomainCustomizer(@Nonnull final FutureJVppCore futureJVppCore, @Nonnull final NamingContext bdContext) {
super(futureJVppCore);
@@ -79,24 +82,30 @@ public class BridgeDomainCustomizer
LOG.debug("writeCurrentAttributes: id={}, current={}, ctx={}", id, dataBefore, ctx);
final String bdName = dataBefore.getName();
- try {
- int index;
- if (bdContext.containsIndex(bdName, ctx.getMappingContext())) {
- index = bdContext.getIndex(bdName, ctx.getMappingContext());
- } else {
- // FIXME we need the bd index to be returned by VPP or we should have a counter field
- // (maybe in context similar to artificial name)
- // Here we assign the next available ID from bdContext's perspective
- index = 1;
- while (bdContext.containsName(index, ctx.getMappingContext())) {
- index++;
+ // Invoke 1. check index, 2. increase index 3. create ND 4. store mapping in a synchronized block to prevent
+ // race conditions in case of concurrent invocation
+ synchronized (this) {
+ try {
+ int index;
+ if (bdContext.containsIndex(bdName, ctx.getMappingContext())) {
+ index = bdContext.getIndex(bdName, ctx.getMappingContext());
+ } else {
+ // Critical section due to bridgeDomainIndexCounter read and write access
+ // TODO HONEYCOMB-199 move this "get next available index" into naming context or an adapter
+ // or a dedicated object
+
+ // Use counter to assign bridge domain index, but still check naming context if it's not taken there
+ while (bdContext.containsName(bridgeDomainIndexCounter, ctx.getMappingContext())) {
+ bridgeDomainIndexCounter++;
+ }
+ index = bridgeDomainIndexCounter;
}
+ addOrUpdateBridgeDomain(id, index, dataBefore);
+ bdContext.addName(index, bdName, ctx.getMappingContext());
+ } catch (VppBaseCallException e) {
+ LOG.warn("Failed to create bridge domain", e);
+ throw new WriteFailedException.CreateFailedException(id, dataBefore, e);
}
- addOrUpdateBridgeDomain(id, index, dataBefore);
- bdContext.addName(index, bdName, ctx.getMappingContext());
- } catch (VppBaseCallException e) {
- LOG.warn("Failed to create bridge domain", e);
- throw new WriteFailedException.CreateFailedException(id, dataBefore, e);
}
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vppclassifier/ClassifySessionReader.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vppclassifier/ClassifySessionReader.java
index 590a502fd..f8e94d1e1 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vppclassifier/ClassifySessionReader.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vppclassifier/ClassifySessionReader.java
@@ -118,7 +118,7 @@ public class ClassifySessionReader extends FutureJVppCustomizer
private OpaqueIndex readOpaqueIndex(final int opaqueIndex) {
// We first try to map the value to a vpp node, if that fails, simply wrap the u32 value
- // FIXME: the approach might fail if the opaqueIndex contains small value that collides
+ // TODO: HONEYCOMB-118 the approach might fail if the opaqueIndex contains small value that collides
// with some of the adjacent nodes
final VppNode node = readVppNode(opaqueIndex, LOG);
if (node != null) {
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vppstate/BridgeDomainCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vppstate/BridgeDomainCustomizer.java
index 4a33e7cae..d254a7912 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vppstate/BridgeDomainCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vppstate/BridgeDomainCustomizer.java
@@ -112,7 +112,7 @@ public final class BridgeDomainCustomizer extends FutureJVppCustomizer
@Nonnull
@Override
public List<BridgeDomainKey> getAllIds(@Nonnull final InstanceIdentifier<BridgeDomain> id,
- @Nonnull final ReadContext context) {
+ @Nonnull final ReadContext context) throws ReadFailedException {
final BridgeDomainDump request = new BridgeDomainDump();
request.bdId = -1; // dump call
@@ -120,7 +120,7 @@ public final class BridgeDomainCustomizer extends FutureJVppCustomizer
try {
reply = getFutureJVpp().bridgeDomainDump(request).toCompletableFuture().get();
} catch (Exception e) {
- throw new IllegalStateException("Bridge domain dump failed", e); // TODO ReadFailedException?
+ throw new ReadFailedException(id, e);
}
if (reply == null || reply.bridgeDomainDetails == null) {
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vppstate/L2FibEntryCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vppstate/L2FibEntryCustomizer.java
index 94c3119ca..2de19a1c1 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vppstate/L2FibEntryCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vppstate/L2FibEntryCustomizer.java
@@ -84,7 +84,7 @@ public final class L2FibEntryCustomizer extends FutureJVppCustomizer
LOG.debug("Reading L2 FIB entry: key={}. bridgeDomainKey={}, bdId={}", key, bridgeDomainKey, bdId);
try {
- // TODO use cached l2FibTable
+ // TODO HONEYCOMB-186 use cached l2FibTable
final L2FibTableEntry entry = dumpL2Fibs(id, bdId).stream().filter(e -> key.getPhysAddress()
.equals(new PhysAddress(vppPhysAddrToYang(Longs.toByteArray(e.mac), 2))))
.collect(SINGLE_ITEM_COLLECTOR);
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/GreCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/GreCustomizerTest.java
index cfb7b3700..58a44d7cf 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/GreCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/GreCustomizerTest.java
@@ -89,7 +89,7 @@ public class GreCustomizerTest {
initMocks(this);
InterfaceTypeTestUtils.setupWriteContext(writeContext,
org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.GreTunnel.class);
- // TODO create base class for tests using vppApi
+ // TODO HONEYCOMB-116 create base class for tests using vppApi
NamingContext namingContext = new NamingContext("generateInterfaceNAme", "test-instance");
final ModificationCache toBeReturned = new ModificationCache();
doReturn(toBeReturned).when(writeContext).getModificationCache();
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceCustomizerTest.java
index 2aacc2521..507b43f9c 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceCustomizerTest.java
@@ -22,17 +22,16 @@ import static org.junit.Assert.fail;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.MockitoAnnotations.initMocks;
import com.google.common.base.Optional;
-import io.fd.honeycomb.translate.v3po.test.ContextTestUtils;
-import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.MappingContext;
+import io.fd.honeycomb.translate.v3po.test.ContextTestUtils;
import io.fd.honeycomb.translate.v3po.test.TestHelperUtils;
import io.fd.honeycomb.translate.v3po.util.NamingContext;
+import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
import java.util.Arrays;
import java.util.List;
@@ -109,7 +108,7 @@ public class SubInterfaceCustomizerTest {
initMocks(this);
namingContext = new NamingContext("generatedSubInterfaceName", "test-instance");
doReturn(mappingContext).when(writeContext).getMappingContext();
- // TODO create base class for tests using vppApi
+ // TODO HONEYCOMB-116 create base class for tests using vppApi
customizer = new SubInterfaceCustomizer(api, namingContext);
doReturn(ContextTestUtils.getMapping(SUPER_IF_NAME, SUPER_IF_ID)).when(mappingContext)
.read(ContextTestUtils.getMappingIid(SUPER_IF_NAME, "test-instance"));
@@ -302,16 +301,6 @@ public class SubInterfaceCustomizerTest {
verifySwInterfaceSetFlagsWasInvoked(generateSwInterfaceEnableRequest(SUBIF_INDEX));
}
- @Test
- public void testUpdateNoStateChange() throws Exception {
- final List<Tag> tags = Arrays.asList(STAG_100, CTAG_200);
- final SubInterface before = generateSubInterface(false, tags);
- final SubInterface after = generateSubInterface(false, tags);
- customizer.updateCurrentAttributes(null, before, after, writeContext);
-
- verify(api, never()).swInterfaceSetFlags(any());
- }
-
@Test(expected = UnsupportedOperationException.class)
public void testDelete() throws Exception {
final SubInterface subInterface = generateSubInterface(false, Arrays.asList(STAG_100, CTAG_200));
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/VhostUserCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/VhostUserCustomizerTest.java
index 1d5bcb11a..0bbf04fc0 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/VhostUserCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/VhostUserCustomizerTest.java
@@ -93,7 +93,7 @@ public class VhostUserCustomizerTest {
doReturn(toBeReturned).when(writeContext).getModificationCache();
doReturn(mappingContext).when(writeContext).getMappingContext();
- // TODO create base class for tests using vppApi
+ // TODO HONEYCOMB-116 create base class for tests using vppApi
customizer = new VhostUserCustomizer(api, namingContext);
}
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/VxlanCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/VxlanCustomizerTest.java
index b61514c13..40a6b53bd 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/VxlanCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/VxlanCustomizerTest.java
@@ -90,7 +90,7 @@ public class VxlanCustomizerTest {
initMocks(this);
InterfaceTypeTestUtils.setupWriteContext(writeContext,
org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VxlanTunnel.class);
- // TODO create base class for tests using vppApi
+ // TODO HONEYCOMB-116 create base class for tests using vppApi
NamingContext namingContext = new NamingContext("generateInterfaceNAme", "test-instance");
final ModificationCache toBeReturned = new ModificationCache();
doReturn(toBeReturned).when(writeContext).getModificationCache();
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/VxlanGpeCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/VxlanGpeCustomizerTest.java
index e545ef451..09e32ffe9 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/VxlanGpeCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/VxlanGpeCustomizerTest.java
@@ -90,7 +90,7 @@ public class VxlanGpeCustomizerTest {
initMocks(this);
InterfaceTypeTestUtils.setupWriteContext(writeContext,
org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VxlanGpeTunnel.class);
- // TODO create base class for tests using vppApi
+ // TODO HONEYCOMB-116 create base class for tests using vppApi
NamingContext namingContext = new NamingContext("generateInterfaceNAme", "test-instance");
final ModificationCache toBeReturned = new ModificationCache();
doReturn(toBeReturned).when(writeContext).getModificationCache();
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceCustomizerTest.java
index 4f9b99b6d..a9a2a3c74 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceCustomizerTest.java
@@ -92,7 +92,6 @@ public class InterfaceCustomizerTest extends
return new InterfaceCustomizer(api, interfacesContext);
}
- // TODO use reflexion and move to ListReaderCustomizerTest
@Test
public void testMerge() throws Exception {
final InterfacesStateBuilder builder = mock(InterfacesStateBuilder.class);
@@ -104,7 +103,7 @@ public class InterfaceCustomizerTest extends
private void verifySwInterfaceDumpWasInvoked(final int nameFilterValid, final String ifaceName,
final int dumpIfcsInvocationCount)
throws VppInvocationException {
- // TODO adding equals methods for jvpp DTOs would make ArgumentCaptor usage obsolete
+ // TODO HONEYCOMB-185 adding equals methods for jvpp DTOs would make ArgumentCaptor usage obsolete
ArgumentCaptor<SwInterfaceDump> argumentCaptor = ArgumentCaptor.forClass(SwInterfaceDump.class);
verify(api, times(dumpIfcsInvocationCount)).swInterfaceDump(argumentCaptor.capture());
final SwInterfaceDump actual = argumentCaptor.getValue();
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vpp/BridgeDomainCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vpp/BridgeDomainCustomizerTest.java
index 41b02371f..6851bce22 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vpp/BridgeDomainCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vpp/BridgeDomainCustomizerTest.java
@@ -67,7 +67,7 @@ public class BridgeDomainCustomizerTest {
@Before
public void setUp() throws Exception {
initMocks(this);
- // TODO create base class for tests using vppApi
+ // TODO HONEYCOMB-116 create base class for tests using vppApi
NamingContext namingContext = new NamingContext("generatedBDName", "test-instance");
final ModificationCache toBeReturned = new ModificationCache();
doReturn(toBeReturned).when(ctx).getModificationCache();
@@ -105,7 +105,7 @@ public class BridgeDomainCustomizerTest {
final byte learn = BridgeDomainTestUtils.booleanToByte(bd.isLearn());
final byte uuf = BridgeDomainTestUtils.booleanToByte(bd.isUnknownUnicastFlood());
- // TODO adding equals methods for jvpp DTOs would make ArgumentCaptor usage obsolete
+ // TODO HONEYCOMB-185 adding equals methods for jvpp DTOs would make ArgumentCaptor usage obsolete
ArgumentCaptor<BridgeDomainAddDel> argumentCaptor = ArgumentCaptor.forClass(BridgeDomainAddDel.class);
verify(api).bridgeDomainAddDel(argumentCaptor.capture());
final BridgeDomainAddDel actual = argumentCaptor.getValue();
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppstate/VppStateTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppstate/VppStateTest.java
index cd1384d4a..208fa2d8c 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppstate/VppStateTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppstate/VppStateTest.java
@@ -29,12 +29,13 @@ import static org.mockito.MockitoAnnotations.initMocks;
import com.google.common.base.Optional;
import com.google.common.collect.Iterables;
import com.google.common.collect.Multimap;
+import io.fd.honeycomb.translate.MappingContext;
import io.fd.honeycomb.translate.ModificationCache;
import io.fd.honeycomb.translate.impl.read.GenericListReader;
import io.fd.honeycomb.translate.read.ReadContext;
-import io.fd.honeycomb.translate.v3po.test.ContextTestUtils;
-import io.fd.honeycomb.translate.MappingContext;
+import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.read.registry.ReaderRegistry;
+import io.fd.honeycomb.translate.v3po.test.ContextTestUtils;
import io.fd.honeycomb.translate.v3po.util.NamingContext;
import java.util.Arrays;
import java.util.Collections;
@@ -283,7 +284,7 @@ public class VppStateTest {
read.get());
}
- @Test(expected = IllegalArgumentException.class)
+ @Test(expected = ReadFailedException.class)
public void testReadBridgeDomainNotExisting() throws Exception {
doReturn(Optional.absent()).when(mappingContext).read(
ContextTestUtils.getMappingIid("NOT EXISTING", "bd-test-instance"));
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppstate/VppStateTestUtils.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppstate/VppStateTestUtils.java
index 5ebc27e8a..d1aea6ef6 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppstate/VppStateTestUtils.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppstate/VppStateTestUtils.java
@@ -51,10 +51,6 @@ final class VppStateTestUtils {
final InstanceIdentifier<VppState> vppStateId = InstanceIdentifier.create(VppState.class);
registry.addStructuralReader(vppStateId, VppStateBuilder.class);
// Version
- // Wrap with keepalive reader to detect connection issues
- // TODO keepalive reader wrapper relies on VersionReaderCustomizer (to perform timeout on reads)
- // Once readers+customizers are asynchronous, pull the timeout to keepalive executor so that keepalive wrapper
- // is truly generic
registry.add(new GenericReader<>(vppStateId.child(Version.class), new VersionCustomizer(jVpp)));
// BridgeDomains(Structural)
bridgeDomainsId = vppStateId.child(BridgeDomains.class);
diff --git a/vpp-common/minimal-distribution/pom.xml b/vpp-common/minimal-distribution/pom.xml
index 557f4e962..c6bd0d2ff 100644
--- a/vpp-common/minimal-distribution/pom.xml
+++ b/vpp-common/minimal-distribution/pom.xml
@@ -30,6 +30,7 @@
<properties>
<main.class>io.fd.honeycomb.vpp.distro.Main</main.class>
<honeycomb.min.distro.version>1.16.12-SNAPSHOT</honeycomb.min.distro.version>
+ <jvpp.version>16.12-SNAPSHOT</jvpp.version>
</properties>
<build>
@@ -74,12 +75,12 @@
<dependency>
<groupId>io.fd.vpp</groupId>
<artifactId>jvpp-registry</artifactId>
- <version>16.12-SNAPSHOT</version>
+ <version>${jvpp.version}</version>
</dependency>
<dependency>
<groupId>io.fd.vpp</groupId>
<artifactId>jvpp-core</artifactId>
- <version>16.12-SNAPSHOT</version>
+ <version>${jvpp.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
diff --git a/vpp-common/naming-context-api/pom.xml b/vpp-common/naming-context-api/pom.xml
index 096c20b66..b652df219 100644
--- a/vpp-common/naming-context-api/pom.xml
+++ b/vpp-common/naming-context-api/pom.xml
@@ -27,16 +27,4 @@
<version>1.16.12-SNAPSHOT</version>
<packaging>bundle</packaging>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.mdsal.model</groupId>
- <artifactId>mdsal-model-artifacts</artifactId>
- <version>0.8.2-Beryllium-SR2</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
</project>
diff --git a/vpp-common/naming-context-impl/pom.xml b/vpp-common/naming-context-impl/pom.xml
index 0523435f7..e628dd1d8 100644
--- a/vpp-common/naming-context-impl/pom.xml
+++ b/vpp-common/naming-context-impl/pom.xml
@@ -27,6 +27,7 @@
<groupId>io.fd.honeycomb.vpp</groupId>
<artifactId>naming-context-impl</artifactId>
<version>1.16.12-SNAPSHOT</version>
+ <packaging>bundle</packaging>
<dependencies>
<dependency>
@@ -45,9 +46,4 @@
<version>${project.version}</version>
</dependency>
</dependencies>
-
- <packaging>bundle</packaging>
-
-
-
</project>
diff --git a/vpp-common/pom.xml b/vpp-common/pom.xml
index 41360c49a..e3caf387e 100644
--- a/vpp-common/pom.xml
+++ b/vpp-common/pom.xml
@@ -36,6 +36,7 @@
<module>naming-context-api</module>
<module>naming-context-impl</module>
<module>minimal-distribution</module>
+ <module>vpp-impl-parent</module>
</modules>
<!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
<build>
diff --git a/vpp-common/vpp-impl-parent/pom.xml b/vpp-common/vpp-impl-parent/pom.xml
new file mode 100644
index 000000000..0d688bac8
--- /dev/null
+++ b/vpp-common/vpp-impl-parent/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2015 Cisco and/or its affiliates.
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at:
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <parent>
+ <groupId>io.fd.honeycomb.common</groupId>
+ <artifactId>impl-parent</artifactId>
+ <version>1.16.12-SNAPSHOT</version>
+ <relativePath>../../common/impl-parent</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>io.fd.honeycomb.vpp</groupId>
+ <artifactId>vpp-impl-parent</artifactId>
+ <version>1.16.12-SNAPSHOT</version>
+ <properties>
+ <jvpp.version>16.12-SNAPSHOT</jvpp.version>
+ </properties>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>io.fd.vpp</groupId>
+ <artifactId>jvpp-core</artifactId>
+ <version>${jvpp.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.fd.vpp</groupId>
+ <artifactId>jvpp-registry</artifactId>
+ <version>${jvpp.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+</project>
diff --git a/vpp-common/vpp-translate-utils/pom.xml b/vpp-common/vpp-translate-utils/pom.xml
index c2d9ad82f..bb5568202 100644
--- a/vpp-common/vpp-translate-utils/pom.xml
+++ b/vpp-common/vpp-translate-utils/pom.xml
@@ -16,10 +16,10 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>io.fd.honeycomb.common</groupId>
- <artifactId>impl-parent</artifactId>
+ <groupId>io.fd.honeycomb.vpp</groupId>
+ <artifactId>vpp-impl-parent</artifactId>
<version>1.16.12-SNAPSHOT</version>
- <relativePath>../../common/impl-parent</relativePath>
+ <relativePath>../../vpp-common/vpp-impl-parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -28,17 +28,9 @@
<version>1.16.12-SNAPSHOT</version>
<packaging>bundle</packaging>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.mdsal.model</groupId>
- <artifactId>mdsal-model-artifacts</artifactId>
- <version>0.8.2-Beryllium-SR2</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
+ <properties>
+ <commons.codec.version>1.9</commons.codec.version>
+ </properties>
<dependencies>
<dependency>
@@ -54,12 +46,10 @@
<dependency>
<groupId>io.fd.vpp</groupId>
<artifactId>jvpp-registry</artifactId>
- <version>16.12-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.fd.vpp</groupId>
<artifactId>jvpp-core</artifactId>
- <version>16.12-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.opendaylight.mdsal.model</groupId>
@@ -77,10 +67,9 @@
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
- <version>1.9</version>
+ <version>${commons.codec.version}</version>
</dependency>
- <!-- Testing Dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -91,7 +80,5 @@
<artifactId>mockito-all</artifactId>
<scope>test</scope>
</dependency>
-
</dependencies>
-
</project>
diff --git a/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/AbstractInterfaceTypeCustomizer.java b/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/AbstractInterfaceTypeCustomizer.java
index cf6f29370..dd66f7225 100644
--- a/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/AbstractInterfaceTypeCustomizer.java
+++ b/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/AbstractInterfaceTypeCustomizer.java
@@ -33,9 +33,6 @@ import org.openvpp.jvpp.core.future.FutureJVppCore;
/**
* Validation WriteCustomizers for Interface subnodes.
* Validates the type of interface.
- *
- * TODO this should be validated on model/DataTree level. However DataTree does not enforce When conditions
- * Delete this class when DataTree handles when constraints properly
*/
public abstract class AbstractInterfaceTypeCustomizer<D extends DataObject>
extends FutureJVppCustomizer implements WriterCustomizer<D> {
diff --git a/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/TagRewriteOperation.java b/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/TagRewriteOperation.java
index 7958aff06..c403b7104 100644
--- a/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/TagRewriteOperation.java
+++ b/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/TagRewriteOperation.java
@@ -21,9 +21,9 @@ import javax.annotation.Nonnegative;
import javax.annotation.Nullable;
/**
- * Defines vlan tag rewrite config options for VPP
- *
- * TODO corresponding enum (defined in l2_vtr.h) should be defined in vpe.api
+ * Defines vlan tag rewrite config options for VPP.
+ * <p/>
+ * TODO HONEYCOMB-184 corresponding enum (defined in l2_vtr.h) should be defined in vpe.api
* (does vpp's IDL support enum type definition?)
* which would allow to generate this class in jvpp
*/
@@ -38,7 +38,7 @@ public enum TagRewriteOperation {
translate_2_to_1(2),
translate_2_to_2(2);
- private final static int MAX_INDEX = 3;
+ private static final int MAX_INDEX = 3;
private final int code;
private final byte popTags;
@@ -73,7 +73,7 @@ public enum TagRewriteOperation {
@Nullable
public static TagRewriteOperation get(@Nonnegative final int code) {
for (TagRewriteOperation operation : TagRewriteOperation.values()) {
- if (code == operation.code){
+ if (code == operation.code) {
return operation;
}
}
diff --git a/vpp-integration/pom.xml b/vpp-integration/pom.xml
index 01eb23573..00bce2592 100644
--- a/vpp-integration/pom.xml
+++ b/vpp-integration/pom.xml
@@ -30,9 +30,11 @@
<prerequisites>
<maven>3.1.1</maven>
</prerequisites>
+
<modules>
<module>minimal-distribution</module>
</modules>
+
<!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
<build>
<plugins>