summaryrefslogtreecommitdiffstats
path: root/v3po
diff options
context:
space:
mode:
Diffstat (limited to 'v3po')
-rw-r--r--v3po/artifacts/pom.xml15
-rw-r--r--v3po/config/pom.xml31
-rw-r--r--v3po/config/src/main/java/io/fd/honeycomb/v3po/config/ReaderRegistry.java (renamed from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/ReaderRegistry.java)2
-rw-r--r--v3po/config/src/main/java/io/fd/honeycomb/v3po/config/WriterRegistry.java (renamed from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/WriterRegistry.java)2
-rw-r--r--v3po/data-api/pom.xml40
-rw-r--r--v3po/data-api/src/main/java/io/fd/honeycomb/v3po/data/ReadableVppDataTree.java (renamed from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/ReadableVppDataTree.java)2
-rw-r--r--v3po/data-api/src/main/java/io/fd/honeycomb/v3po/data/VppDataTree.java (renamed from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppDataTree.java)2
-rw-r--r--v3po/data-api/src/main/java/io/fd/honeycomb/v3po/data/VppDataTreeSnapshot.java (renamed from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppDataTreeSnapshot.java)2
-rw-r--r--v3po/data-impl/pom.xml86
-rw-r--r--v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/DataTreeUtils.java (renamed from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/DataTreeUtils.java)2
-rw-r--r--v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/ReadWriteTransaction.java (renamed from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/ReadWriteTransaction.java)2
-rw-r--r--v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/VppConfigDataTree.java (renamed from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppConfigDataTree.java)9
-rw-r--r--v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/VppDataBroker.java (renamed from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppDataBroker.java)5
-rw-r--r--v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/VppOperationalDataTree.java (renamed from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppOperationalDataTree.java)3
-rw-r--r--v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/VppReadOnlyTransaction.java (renamed from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppReadOnlyTransaction.java)4
-rw-r--r--v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/VppWriteTransaction.java (renamed from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppWriteTransaction.java)4
-rw-r--r--v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/DataTreeUtilsTest.java (renamed from v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/DataTreeUtilsTest.java)34
-rw-r--r--v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/ReadWriteTransactionTest.java (renamed from v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/ReadWriteTransactionTest.java)2
-rw-r--r--v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/VPPConfigDataTreeTest.java (renamed from v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VPPConfigDataTreeTest.java)4
-rw-r--r--v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/VppDataBrokerTest.java (renamed from v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppDataBrokerTest.java)5
-rw-r--r--v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/VppOperationalDataTreeTest.java (renamed from v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppOperationalDataTreeTest.java)2
-rw-r--r--v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/VppReadOnlyTransactionTest.java (renamed from v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppReadOnlyTransactionTest.java)4
-rw-r--r--v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/VppWriteTransactionTest.java (renamed from v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppWriteTransactionTest.java)4
-rw-r--r--v3po/features/pom.xml15
-rw-r--r--v3po/features/src/main/features/features.xml3
-rw-r--r--v3po/impl/pom.xml10
-rw-r--r--v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/V3poProvider.java5
-rw-r--r--v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/VppDataBrokerInitializationProvider.java (renamed from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppDataBrokerInitializationProvider.java)9
-rw-r--r--v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppDataBrokerInitializationProviderTest.java2
-rw-r--r--v3po/pom.xml3
30 files changed, 270 insertions, 43 deletions
diff --git a/v3po/artifacts/pom.xml b/v3po/artifacts/pom.xml
index 1764b675f..9240da571 100644
--- a/v3po/artifacts/pom.xml
+++ b/v3po/artifacts/pom.xml
@@ -31,6 +31,21 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
+ <artifactId>data-api</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>
diff --git a/v3po/config/pom.xml b/v3po/config/pom.xml
new file mode 100644
index 000000000..910fc7daa
--- /dev/null
+++ b/v3po/config/pom.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>api-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../common/api-parent</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>io.fd.honeycomb.v3po</groupId>
+ <artifactId>config</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>io.fd.honeycomb.v3po</groupId>
+ <artifactId>translate-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.fd.honeycomb.v3po</groupId>
+ <artifactId>v3po2vpp</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/ReaderRegistry.java b/v3po/config/src/main/java/io/fd/honeycomb/v3po/config/ReaderRegistry.java
index 5e547094f..7ab2dd430 100644
--- a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/ReaderRegistry.java
+++ b/v3po/config/src/main/java/io/fd/honeycomb/v3po/config/ReaderRegistry.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.config;
import com.google.common.base.Optional;
import com.google.common.collect.Multimap;
diff --git a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/WriterRegistry.java b/v3po/config/src/main/java/io/fd/honeycomb/v3po/config/WriterRegistry.java
index 00dc22520..2d579c449 100644
--- a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/WriterRegistry.java
+++ b/v3po/config/src/main/java/io/fd/honeycomb/v3po/config/WriterRegistry.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.config;
import io.fd.honeycomb.v3po.translate.TranslationException;
import io.fd.honeycomb.v3po.translate.util.RWUtils;
diff --git a/v3po/data-api/pom.xml b/v3po/data-api/pom.xml
new file mode 100644
index 000000000..88be38d9f
--- /dev/null
+++ b/v3po/data-api/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>api-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../common/api-parent</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>io.fd.honeycomb.v3po</groupId>
+ <artifactId>data-api</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>io.fd.honeycomb.v3po</groupId>
+ <artifactId>translate-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-data-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>sal-common-api</artifactId>
+ <version>1.3.0-Beryllium</version>
+ </dependency>
+
+ </dependencies>
+
+</project> \ No newline at end of file
diff --git a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/ReadableVppDataTree.java b/v3po/data-api/src/main/java/io/fd/honeycomb/v3po/data/ReadableVppDataTree.java
index 19248ddf0..22a52aa41 100644
--- a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/ReadableVppDataTree.java
+++ b/v3po/data-api/src/main/java/io/fd/honeycomb/v3po/data/ReadableVppDataTree.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.data;
import com.google.common.annotations.Beta;
import com.google.common.base.Optional;
diff --git a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppDataTree.java b/v3po/data-api/src/main/java/io/fd/honeycomb/v3po/data/VppDataTree.java
index aba8ab133..dffd22d3a 100644
--- a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppDataTree.java
+++ b/v3po/data-api/src/main/java/io/fd/honeycomb/v3po/data/VppDataTree.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.data;
import com.google.common.annotations.Beta;
import io.fd.honeycomb.v3po.translate.TranslationException;
diff --git a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppDataTreeSnapshot.java b/v3po/data-api/src/main/java/io/fd/honeycomb/v3po/data/VppDataTreeSnapshot.java
index f4d68306f..665a2e0ae 100644
--- a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppDataTreeSnapshot.java
+++ b/v3po/data-api/src/main/java/io/fd/honeycomb/v3po/data/VppDataTreeSnapshot.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.data;
import com.google.common.annotations.Beta;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification;
diff --git a/v3po/data-impl/pom.xml b/v3po/data-impl/pom.xml
new file mode 100644
index 000000000..59a5834ac
--- /dev/null
+++ b/v3po/data-impl/pom.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+ <artifactId>api-parent</artifactId>
+ <groupId>io.fd.honeycomb.common</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../common/api-parent</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>io.fd.honeycomb.v3po</groupId>
+ <artifactId>data-impl</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>io.fd.honeycomb.v3po</groupId>
+ <artifactId>data-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.fd.honeycomb.v3po</groupId>
+ <artifactId>translate-utils</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>mdsal-binding-dom-codec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>sal-core-api</artifactId>
+ <version>1.3.0-Beryllium</version> <!-- FIXME use dependency management -->
+ </dependency>
+
+ <!-- Testing Dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- FIXME test should not be dependent on particular models -->
+ <dependency>
+ <groupId>io.fd.honeycomb.v3po</groupId>
+ <artifactId>v3po-api</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
+ <Export-Package>
+ io.fd.honeycomb.v3po.data.impl.*
+ </Export-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project> \ No newline at end of file
diff --git a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/DataTreeUtils.java b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/DataTreeUtils.java
index bb9da5695..83ed0f263 100644
--- a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/DataTreeUtils.java
+++ b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/DataTreeUtils.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.data.impl;
import com.google.common.base.Preconditions;
import java.util.Collection;
diff --git a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/ReadWriteTransaction.java b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/ReadWriteTransaction.java
index 7faeba54a..88b46437e 100644
--- a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/ReadWriteTransaction.java
+++ b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/ReadWriteTransaction.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.data.impl;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
diff --git a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppConfigDataTree.java b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/VppConfigDataTree.java
index 1a631fc2e..6e01306b0 100644
--- a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppConfigDataTree.java
+++ b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/VppConfigDataTree.java
@@ -14,16 +14,21 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.data.impl;
import static com.google.common.base.Preconditions.checkNotNull;
+import static io.fd.honeycomb.v3po.data.impl.DataTreeUtils.childrenFromNormalized;
import com.google.common.base.Optional;
import com.google.common.util.concurrent.CheckedFuture;
import com.google.common.util.concurrent.Futures;
+import io.fd.honeycomb.v3po.data.ReadableVppDataTree;
+import io.fd.honeycomb.v3po.data.VppDataTree;
+import io.fd.honeycomb.v3po.data.VppDataTreeSnapshot;
import io.fd.honeycomb.v3po.translate.TranslationException;
import io.fd.honeycomb.v3po.translate.util.write.TransactionWriteContext;
import io.fd.honeycomb.v3po.translate.write.WriteContext;
+import io.fd.honeycomb.v3po.translate.write.WriterRegistry;
import java.util.Collections;
import java.util.Map;
import javax.annotation.Nonnull;
@@ -134,7 +139,7 @@ public final class VppConfigDataTree implements VppDataTree {
final Optional<NormalizedNode<?, ?>> parentOptional) {
if (parentOptional.isPresent()) {
final DataContainerNode parent = (DataContainerNode) parentOptional.get();
- return DataTreeUtils.childrenFromNormalized(parent, serializer);
+ return childrenFromNormalized(parent, serializer);
}
return Collections.emptyMap();
}
diff --git a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppDataBroker.java b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/VppDataBroker.java
index 97697da65..5c5248cea 100644
--- a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppDataBroker.java
+++ b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/VppDataBroker.java
@@ -14,9 +14,12 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.data.impl;
import com.google.common.base.Preconditions;
+import io.fd.honeycomb.v3po.data.ReadableVppDataTree;
+import io.fd.honeycomb.v3po.data.VppDataTree;
+import io.fd.honeycomb.v3po.data.VppDataTreeSnapshot;
import java.util.Collections;
import java.util.Map;
import javax.annotation.Nonnull;
diff --git a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppOperationalDataTree.java b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/VppOperationalDataTree.java
index 8f606fdbf..fc13606e6 100644
--- a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppOperationalDataTree.java
+++ b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/VppOperationalDataTree.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.data.impl;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.collect.Iterables.getOnlyElement;
@@ -26,6 +26,7 @@ import com.google.common.collect.Collections2;
import com.google.common.collect.Multimap;
import com.google.common.util.concurrent.CheckedFuture;
import com.google.common.util.concurrent.Futures;
+import io.fd.honeycomb.v3po.data.ReadableVppDataTree;
import io.fd.honeycomb.v3po.translate.Context;
import io.fd.honeycomb.v3po.translate.read.ReadContext;
import io.fd.honeycomb.v3po.translate.read.ReadFailedException;
diff --git a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppReadOnlyTransaction.java b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/VppReadOnlyTransaction.java
index 94cef679f..db01591b9 100644
--- a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppReadOnlyTransaction.java
+++ b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/VppReadOnlyTransaction.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.data.impl;
import com.google.common.base.Function;
import com.google.common.base.Optional;
@@ -22,6 +22,8 @@ import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.CheckedFuture;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
+import io.fd.honeycomb.v3po.data.ReadableVppDataTree;
+import io.fd.honeycomb.v3po.data.VppDataTreeSnapshot;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
diff --git a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppWriteTransaction.java b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/VppWriteTransaction.java
index b33fffa68..c9766eb21 100644
--- a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppWriteTransaction.java
+++ b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/VppWriteTransaction.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.data.impl;
import static org.opendaylight.controller.md.sal.common.api.TransactionStatus.CANCELED;
import static org.opendaylight.controller.md.sal.common.api.TransactionStatus.COMMITED;
@@ -26,6 +26,8 @@ import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.CheckedFuture;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
+import io.fd.honeycomb.v3po.data.VppDataTree;
+import io.fd.honeycomb.v3po.data.VppDataTreeSnapshot;
import io.fd.honeycomb.v3po.translate.TranslationException;
import javax.annotation.Nonnull;
import javax.annotation.concurrent.NotThreadSafe;
diff --git a/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/DataTreeUtilsTest.java b/v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/DataTreeUtilsTest.java
index 7f1db5118..40792a135 100644
--- a/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/DataTreeUtilsTest.java
+++ b/v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/DataTreeUtilsTest.java
@@ -14,19 +14,15 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.data.impl;
import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
import org.junit.Test;
+import org.mockito.Matchers;
import org.mockito.Mockito;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
import org.opendaylight.yangtools.yang.binding.DataObject;
@@ -39,28 +35,28 @@ public class DataTreeUtilsTest {
@Test
public void testChildrenFromNormalized() throws Exception {
- final ContainerNode parent = mock(ContainerNode.class);
- final BindingNormalizedNodeSerializer serializer = mock(BindingNormalizedNodeSerializer.class);
+ final ContainerNode parent = Mockito.mock(ContainerNode.class);
+ final BindingNormalizedNodeSerializer serializer = Mockito.mock(BindingNormalizedNodeSerializer.class);
final Collection<DataContainerChild> list = new ArrayList<>();
- doReturn(list).when(parent).getValue();
+ Mockito.doReturn(list).when(parent).getValue();
// init child1 (will not be serialized)
final DataContainerChild child1 = Mockito.mock(DataContainerChild.class);
- when(child1.getIdentifier()).thenReturn(mock(YangInstanceIdentifier.PathArgument.class));
- when(serializer.fromNormalizedNode(any(YangInstanceIdentifier.class), eq(child1))).thenReturn(null);
+ Mockito.when(child1.getIdentifier()).thenReturn(Mockito.mock(YangInstanceIdentifier.PathArgument.class));
+ Mockito.when(serializer.fromNormalizedNode(Matchers.any(YangInstanceIdentifier.class), Matchers.eq(child1))).thenReturn(null);
list.add(child1);
// init child 2 (will be serialized)
- final DataContainerChild child2 = mock(DataContainerChild.class);
- when(child2.getIdentifier()).thenReturn(mock(YangInstanceIdentifier.PathArgument.class));
+ final DataContainerChild child2 = Mockito.mock(DataContainerChild.class);
+ Mockito.when(child2.getIdentifier()).thenReturn(Mockito.mock(YangInstanceIdentifier.PathArgument.class));
- final Map.Entry entry = mock(Map.Entry.class);
- final InstanceIdentifier<?> id = mock(InstanceIdentifier.class);
- doReturn(id).when(entry).getKey();
- final DataObject data = mock(DataObject.class);
- doReturn(data).when(entry).getValue();
- when(serializer.fromNormalizedNode(any(YangInstanceIdentifier.class), eq(child2))).thenReturn(entry);
+ final Map.Entry entry = Mockito.mock(Map.Entry.class);
+ final InstanceIdentifier<?> id = Mockito.mock(InstanceIdentifier.class);
+ Mockito.doReturn(id).when(entry).getKey();
+ final DataObject data = Mockito.mock(DataObject.class);
+ Mockito.doReturn(data).when(entry).getValue();
+ Mockito.when(serializer.fromNormalizedNode(Matchers.any(YangInstanceIdentifier.class), Matchers.eq(child2))).thenReturn(entry);
list.add(child2);
diff --git a/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/ReadWriteTransactionTest.java b/v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/ReadWriteTransactionTest.java
index f0fd66de5..1b67cd967 100644
--- a/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/ReadWriteTransactionTest.java
+++ b/v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/ReadWriteTransactionTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.data.impl;
import static org.junit.Assert.assertNotNull;
import static org.mockito.Mockito.verify;
diff --git a/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VPPConfigDataTreeTest.java b/v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/VPPConfigDataTreeTest.java
index c4315cd38..ecb9ac4ab 100644
--- a/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VPPConfigDataTreeTest.java
+++ b/v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/VPPConfigDataTreeTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.data.impl;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -31,8 +31,10 @@ import static org.mockito.MockitoAnnotations.initMocks;
import com.google.common.base.Optional;
import com.google.common.util.concurrent.CheckedFuture;
+import io.fd.honeycomb.v3po.data.VppDataTreeSnapshot;
import io.fd.honeycomb.v3po.translate.TranslationException;
import io.fd.honeycomb.v3po.translate.write.WriteContext;
+import io.fd.honeycomb.v3po.translate.write.WriterRegistry;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
diff --git a/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppDataBrokerTest.java b/v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/VppDataBrokerTest.java
index 2550f458b..0a7cd80ae 100644
--- a/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppDataBrokerTest.java
+++ b/v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/VppDataBrokerTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.data.impl;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
@@ -22,6 +22,9 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
+import io.fd.honeycomb.v3po.data.ReadableVppDataTree;
+import io.fd.honeycomb.v3po.data.VppDataTree;
+import io.fd.honeycomb.v3po.data.VppDataTreeSnapshot;
import java.util.Map;
import org.junit.Before;
import org.junit.Test;
diff --git a/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppOperationalDataTreeTest.java b/v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/VppOperationalDataTreeTest.java
index 049c2a0c8..d0b45fa65 100644
--- a/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppOperationalDataTreeTest.java
+++ b/v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/VppOperationalDataTreeTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.data.impl;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
diff --git a/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppReadOnlyTransactionTest.java b/v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/VppReadOnlyTransactionTest.java
index 5a8a1f72b..b0c64bbdf 100644
--- a/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppReadOnlyTransactionTest.java
+++ b/v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/VppReadOnlyTransactionTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.data.impl;
import static org.junit.Assert.assertNotNull;
import static org.mockito.Mockito.mock;
@@ -24,6 +24,8 @@ import static org.mockito.MockitoAnnotations.initMocks;
import com.google.common.base.Optional;
import com.google.common.util.concurrent.CheckedFuture;
+import io.fd.honeycomb.v3po.data.ReadableVppDataTree;
+import io.fd.honeycomb.v3po.data.VppDataTreeSnapshot;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
diff --git a/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppWriteTransactionTest.java b/v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/VppWriteTransactionTest.java
index 905224216..ad93b148a 100644
--- a/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppWriteTransactionTest.java
+++ b/v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/VppWriteTransactionTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.data.impl;
import static junit.framework.TestCase.assertTrue;
import static org.junit.Assert.assertFalse;
@@ -27,6 +27,8 @@ import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
import com.google.common.util.concurrent.CheckedFuture;
+import io.fd.honeycomb.v3po.data.VppDataTree;
+import io.fd.honeycomb.v3po.data.VppDataTreeSnapshot;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
diff --git a/v3po/features/pom.xml b/v3po/features/pom.xml
index 810cec5e0..ce4132552 100644
--- a/v3po/features/pom.xml
+++ b/v3po/features/pom.xml
@@ -135,6 +135,21 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
+ <artifactId>config</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>data-api</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>
diff --git a/v3po/features/src/main/features/features.xml b/v3po/features/src/main/features/features.xml
index 1f5237876..e6a8a64f3 100644
--- a/v3po/features/src/main/features/features.xml
+++ b/v3po/features/src/main/features/features.xml
@@ -39,6 +39,9 @@
<bundle>mvn:io.fd.honeycomb.v3po/translate-spi/${project.version}</bundle>
<bundle>mvn:io.fd.honeycomb.v3po/translate-utils/${project.version}</bundle>
<bundle>mvn:io.fd.honeycomb.v3po/vpp-translate-utils/${project.version}</bundle>
+ <bundle>mvn:io.fd.honeycomb.v3po/config/${project.version}</bundle>
+ <bundle>mvn:io.fd.honeycomb.v3po/data-api/${project.version}</bundle>
+ <bundle>mvn:io.fd.honeycomb.v3po/data-impl/${project.version}</bundle>
<bundle>mvn:io.fd.honeycomb.v3po/translate-impl/${project.version}</bundle>
<bundle>mvn:io.fd.honeycomb.v3po/v3po2vpp/${project.version}</bundle>
<bundle>wrap:mvn:io.fd.vpp/vppjapi/1.0.0-SNAPSHOT</bundle>
diff --git a/v3po/impl/pom.xml b/v3po/impl/pom.xml
index 56dcf8555..be824ca79 100644
--- a/v3po/impl/pom.xml
+++ b/v3po/impl/pom.xml
@@ -44,6 +44,16 @@
<artifactId>v3po2vpp</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>config</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>data-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>io.fd.vpp</groupId>
diff --git a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/V3poProvider.java b/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/V3poProvider.java
index 0ea4525f0..a97909190 100644
--- a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/V3poProvider.java
+++ b/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/V3poProvider.java
@@ -20,9 +20,8 @@ import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
import com.google.common.util.concurrent.CheckedFuture;
import com.google.common.util.concurrent.Futures;
-import io.fd.honeycomb.v3po.impl.data.VppDataBrokerInitializationProvider;
-import io.fd.honeycomb.v3po.impl.data.ReaderRegistry;
-import io.fd.honeycomb.v3po.impl.data.WriterRegistry;
+import io.fd.honeycomb.v3po.config.ReaderRegistry;
+import io.fd.honeycomb.v3po.config.WriterRegistry;
import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
diff --git a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppDataBrokerInitializationProvider.java b/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/VppDataBrokerInitializationProvider.java
index bdfc89079..288463f74 100644
--- a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppDataBrokerInitializationProvider.java
+++ b/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/VppDataBrokerInitializationProvider.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.fd.honeycomb.v3po.impl.data;
+package io.fd.honeycomb.v3po.impl;
import static com.google.common.base.Preconditions.checkNotNull;
@@ -23,7 +23,12 @@ import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.AsyncFunction;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
-import io.fd.honeycomb.v3po.impl.LoggingFuturesCallBack;
+import io.fd.honeycomb.v3po.config.WriterRegistry;
+import io.fd.honeycomb.v3po.data.ReadableVppDataTree;
+import io.fd.honeycomb.v3po.data.VppDataTree;
+import io.fd.honeycomb.v3po.data.impl.VppConfigDataTree;
+import io.fd.honeycomb.v3po.data.impl.VppDataBroker;
+import io.fd.honeycomb.v3po.data.impl.VppOperationalDataTree;
import io.fd.honeycomb.v3po.translate.read.ReaderRegistry;
import java.util.Collection;
import java.util.Collections;
diff --git a/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppDataBrokerInitializationProviderTest.java b/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppDataBrokerInitializationProviderTest.java
index 51f57a252..770ca7068 100644
--- a/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppDataBrokerInitializationProviderTest.java
+++ b/v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppDataBrokerInitializationProviderTest.java
@@ -26,6 +26,8 @@ import static org.mockito.Mockito.verify;
import static org.mockito.MockitoAnnotations.initMocks;
import com.google.common.util.concurrent.CheckedFuture;
+import io.fd.honeycomb.v3po.config.WriterRegistry;
+import io.fd.honeycomb.v3po.impl.VppDataBrokerInitializationProvider;
import io.fd.honeycomb.v3po.translate.read.ReaderRegistry;
import org.junit.Before;
import org.junit.Test;
diff --git a/v3po/pom.xml b/v3po/pom.xml
index 7fdf97b44..7ec5d708a 100644
--- a/v3po/pom.xml
+++ b/v3po/pom.xml
@@ -33,6 +33,9 @@
</prerequisites>
<modules>
<module>api</module>
+ <module>config</module>
+ <module>data-api</module>
+ <module>data-impl</module>
<module>translate-spi</module>
<module>translate-api</module>
<module>translate-impl</module>