Cleanup TODOs and FIXMEs
authorMaros Marsalek <[email protected]>
Mon, 5 Sep 2016 10:10:26 +0000 (12:10 +0200)
committerMarek Gradzki <[email protected]>
Wed, 7 Sep 2016 06:50:30 +0000 (06:50 +0000)
- 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 <[email protected]>
75 files changed:
lisp/api/pom.xml
lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv4Matcher.java [moved from lisp/api/src/main/java/lisp/Ipv4Matcher.java with 88% similarity]
lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv6Matcher.java [moved from lisp/api/src/main/java/lisp/Ipv6Matcher.java with 88% similarity]
lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/MacMatcher.java [moved from lisp/api/src/main/java/lisp/MacMatcher.java with 88% similarity]
lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/SimpleAddressBuilder.java
lisp/lisp2vpp/pom.xml
lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/cfgattrs/LispConfiguration.java
lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/AdjacencyCustomizer.java
lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/factory/LocatorSetsReaderFactory.java
lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/util/EidConverter.java
lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/write/LocatorSetCustomizer.java
lisp/lisp2vpp/src/test/java/io/fd/honeycomb/lisp/translate/util/EidConverterTest.java
lisp/pom.xml
nsh/api/pom.xml
nsh/impl/pom.xml
samples/interfaces/Readme.adoc
samples/interfaces/mapping/pom.xml
samples/interfaces/models/pom.xml
v3po/api/pom.xml
v3po/v3po2vpp/pom.xml
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/SubinterfaceAugmentationWriterFactory.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/V3poModule.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppStateHoneycombReaderFactory.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/InterfacesInitializer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/VppInitializer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/EthernetCustomizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/InterconnectionWriteUtils.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/InterfaceCustomizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/L2Customizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/RoutingCustomizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceCustomizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceL2Customizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/VhostUserCustomizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/VxlanCustomizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/AbstractAceWriter.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/IetfAClWriter.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4AddressCustomizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4Customizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4NeighbourCustomizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4WriteUtils.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv6Customizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ip/SubInterfaceIpv4AddressCustomizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterconnectionReadUtils.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceUtils.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ProxyArpCustomizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/SubInterfaceCustomizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4Customizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4ReadUtils.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv6Customizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/notification/InterfaceChangeNotificationProducer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vpp/ArpTerminationTableEntryCustomizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vpp/BridgeDomainCustomizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vppclassifier/ClassifySessionReader.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vppstate/BridgeDomainCustomizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/vppstate/L2FibEntryCustomizer.java
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/GreCustomizerTest.java
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceCustomizerTest.java
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/VhostUserCustomizerTest.java
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/VxlanCustomizerTest.java
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/VxlanGpeCustomizerTest.java
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/InterfaceCustomizerTest.java
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vpp/BridgeDomainCustomizerTest.java
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppstate/VppStateTest.java
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/vppstate/VppStateTestUtils.java
vpp-common/minimal-distribution/pom.xml
vpp-common/naming-context-api/pom.xml
vpp-common/naming-context-impl/pom.xml
vpp-common/pom.xml
vpp-common/vpp-impl-parent/pom.xml [new file with mode: 0644]
vpp-common/vpp-translate-utils/pom.xml
vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/AbstractInterfaceTypeCustomizer.java
vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/TagRewriteOperation.java
vpp-integration/pom.xml

index eb02e93..960f88b 100755 (executable)
         <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>
@@ -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 {
 
@@ -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;
@@ -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;
index 3d34085..681e872 100644 (file)
@@ -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");
         }
     }
index 920d33a..3a5942a 100755 (executable)
 <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>
         <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 -->
index c38ca60..dae41ce 100644 (file)
@@ -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-";
 }
index 1a9721c..50baf6b 100755 (executable)
@@ -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"));
     }
 }
index 3d08019..cc500e1 100755 (executable)
@@ -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;
index 39d0fe7..b0ca7fc 100755 (executable)
@@ -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");
         }
     }
index c2db3b8..d6eaf4f 100755 (executable)
@@ -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");
     }
 
index 15087ef..0f06d29 100755 (executable)
@@ -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
     }
 }
index a3cab03..2f06d65 100755 (executable)
@@ -32,6 +32,7 @@
     <prerequisites>
         <maven>3.1.1</maven>
     </prerequisites>
+
     <modules>
         <module>api</module>
         <module>lisp2vpp</module>
index 4eaedaf..94c6e77 100644 (file)
   <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>
index 21ff8f2..276f4f8 100644 (file)
 <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>
index 6d73df4..1ee4091 100644 (file)
@@ -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
index 49b0111..bd5eabf 100644 (file)
     <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>
index 3bb5060..712f82c 100644 (file)
   <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>-->
index 4687172..91102b8 100644 (file)
   <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>
index 5ab45c0..24619a2 100644 (file)
 <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>
         <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 -->
             <version>1.0.8</version>
             <scope>test</scope>
         </dependency>
-
     </dependencies>
 </project>
index 163457b..69ac8f9 100644 (file)
@@ -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)));
     }
index 6ffe3c3..bfef255 100644 (file)
@@ -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(
index 85c867e..4f47f49 100644 (file)
@@ -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),
index ada8f9d..8485519 100644 (file)
@@ -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"))
index ea6b2e4..75779d9 100644 (file)
@@ -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);
index e9beccf..d78f332 100644 (file)
@@ -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);
 
index b2fc436..1df162f 100644 (file)
@@ -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()");
index 2055e35..ebc6874 100644 (file)
@@ -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);
     }
 }
index 8ff0da0..64d262f 100644 (file)
@@ -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());
             }
index 082cf64..be0c4af 100644 (file)
@@ -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,
index 7c84186..c000f0a 100644 (file)
@@ -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);
     }
 
index 77037a1..51bf31d 100644 (file)
@@ -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,
index bfaa42e..10dd608 100644 (file)
@@ -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 {
index 085fa36..cfb7849 100644 (file)
@@ -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);
     }
 
index 5d10b37..d4e734d 100644 (file)
@@ -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;
     }
index efd670b..294fdad 100644 (file)
@@ -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);
index eeabff4..97c1bc0 100644 (file)
@@ -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
index a25ddac..9c10982 100644 (file)
@@ -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));
index 4a9a14d..e7b932a 100644 (file)
@@ -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());
         }
index d565e4e..0e0bba3 100644 (file)
@@ -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
     }
 
 }
index b866842..72d8277 100644 (file)
@@ -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);
     }
index f981d0d..ab31deb 100644 (file)
@@ -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;
index 6ea3089..1929068 100644 (file)
@@ -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
     }
 }
index ab19788..e0fa463 100644 (file)
@@ -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());
         }
index 19c8923..5dec9b4 100644 (file)
@@ -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;
 
index e1f1743..499f21d 100644 (file)
@@ -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/
index 1deb816..2d4dbbe 100644 (file)
@@ -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");
index 1ad1758..49b5323 100644 (file)
@@ -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();
index 73e1c70..77837fc 100644 (file)
@@ -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");
     }
 
index 1ccae0a..c3c5616 100644 (file)
@@ -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,
index 1bcc815..634ae87 100644 (file)
@@ -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());
     }
 
index 305148f..481a2ea 100644 (file)
@@ -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 =
index e163169..488c99b 100644 (file)
@@ -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");
         }
 
index 3886d36..83be3c6 100644 (file)
@@ -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);
         }
     }
 
index 590a502..f8e94d1 100644 (file)
@@ -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) {
index 4a33e7c..d254a79 100644 (file)
@@ -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) {
index 94c3119..2de19a1 100644 (file)
@@ -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);
index cfb7b37..58a44d7 100644 (file)
@@ -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();
index 2aacc25..507b43f 100644 (file)
@@ -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));
index 1d5bcb1..0bbf04f 100644 (file)
@@ -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);
     }
 
index b61514c..40a6b53 100644 (file)
@@ -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();
index e545ef4..09e32ff 100644 (file)
@@ -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();
index 4f9b99b..a9a2a3c 100644 (file)
@@ -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();
index 41b0237..6851bce 100644 (file)
@@ -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();
index cd1384d..208fa2d 100644 (file)
@@ -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"));
index 5ebc27e..d1aea6e 100644 (file)
@@ -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);
index 557f4e9..c6bd0d2 100644 (file)
@@ -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>
     <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>
index 096c20b..b652df2 100644 (file)
   <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>
index 0523435..e628dd1 100644 (file)
@@ -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>
index 41360c4..e3caf38 100644 (file)
@@ -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 (file)
index 0000000..0d688ba
--- /dev/null
@@ -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>
index c2d9ad8..bb55682 100644 (file)
 <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>
     <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>
         <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>
         <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>
index cf6f293..dd66f72 100644 (file)
@@ -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> {
index 7958aff..c403b71 100644 (file)
@@ -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;
             }
         }
index 01eb235..00bce25 100644 (file)
   <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>