HONEYCOMB-9: Split impl module into smaller parts
authorMaros Marsalek <[email protected]>
Tue, 12 Apr 2016 08:13:14 +0000 (10:13 +0200)
committerMaros Marsalek <[email protected]>
Tue, 12 Apr 2016 08:13:14 +0000 (10:13 +0200)
Change-Id: I9232e0adfe611cb97951080839b28a7b62ba5484
Signed-off-by: Maros Marsalek <[email protected]>
74 files changed:
v3po/artifacts/pom.xml
v3po/features/pom.xml
v3po/features/src/main/features/features.xml
v3po/impl/pom.xml
v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppConfigDataTree.java
v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppDataBrokerInitializationProvider.java
v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppDataTree.java
v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppOperationalDataTree.java
v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppReaderRegistry.java
v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppWriteTransaction.java
v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppWriterRegistry.java
v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VPPConfigDataTreeTest.java
v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppDataBrokerInitializationProviderTest.java
v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/data/VppOperationalDataTreeTest.java
v3po/pom.xml
v3po/v3po2vpp/pom.xml [new file with mode: 0644]
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vpp/BridgeDomainCustomizer.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/vpp/BridgeDomainCustomizer.java with 96% similarity]
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vppstate/BridgeDomainCustomizer.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/vppstate/BridgeDomainCustomizer.java with 96% similarity]
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vppstate/VersionCustomizer.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/vppstate/VersionCustomizer.java with 90% similarity]
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vpp/BridgeDomainCustomizerTest.java [moved from v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/vpp/BridgeDomainCustomizerTest.java with 94% similarity]
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vpp/BridgeDomainTestUtils.java [moved from v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/vpp/BridgeDomainTestUtils.java with 97% similarity]
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vpp/VppTest.java [moved from v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/vpp/VppTest.java with 94% similarity]
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vpp/VppUtils.java [moved from v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/vpp/VppUtils.java with 77% similarity]
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vppstate/VppStateTest.java [moved from v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/vppstate/VppStateTest.java with 96% similarity]
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vppstate/VppStateUtils.java [moved from v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/vppstate/VppStateUtils.java with 85% similarity]
v3po/vpp-facade-api/pom.xml [new file with mode: 0644]
v3po/vpp-facade-api/src/main/java/io/fd/honeycomb/v3po/vpp/facade/Context.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/util/Context.java with 96% similarity]
v3po/vpp-facade-api/src/main/java/io/fd/honeycomb/v3po/vpp/facade/SubtreeManager.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/SubtreeManager.java with 96% similarity]
v3po/vpp-facade-api/src/main/java/io/fd/honeycomb/v3po/vpp/facade/VppApiInvocationException.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/VppApiInvocationException.java with 98% similarity]
v3po/vpp-facade-api/src/main/java/io/fd/honeycomb/v3po/vpp/facade/VppException.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/VppException.java with 96% similarity]
v3po/vpp-facade-api/src/main/java/io/fd/honeycomb/v3po/vpp/facade/read/ChildVppReader.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/r/ChildVppReader.java with 95% similarity]
v3po/vpp-facade-api/src/main/java/io/fd/honeycomb/v3po/vpp/facade/read/ListVppReader.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/r/ListVppReader.java with 94% similarity]
v3po/vpp-facade-api/src/main/java/io/fd/honeycomb/v3po/vpp/facade/read/ReadContext.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/r/ReadContext.java with 90% similarity]
v3po/vpp-facade-api/src/main/java/io/fd/honeycomb/v3po/vpp/facade/read/ReadFailedException.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/ReadFailedException.java with 95% similarity]
v3po/vpp-facade-api/src/main/java/io/fd/honeycomb/v3po/vpp/facade/read/ReaderRegistry.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/r/ReaderRegistry.java with 94% similarity]
v3po/vpp-facade-api/src/main/java/io/fd/honeycomb/v3po/vpp/facade/read/VppReader.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/r/VppReader.java with 92% similarity]
v3po/vpp-facade-api/src/main/java/io/fd/honeycomb/v3po/vpp/facade/write/ChildVppWriter.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/w/ChildVppWriter.java with 98% similarity]
v3po/vpp-facade-api/src/main/java/io/fd/honeycomb/v3po/vpp/facade/write/VppWriter.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/w/VppWriter.java with 92% similarity]
v3po/vpp-facade-api/src/main/java/io/fd/honeycomb/v3po/vpp/facade/write/WriteContext.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/w/WriteContext.java with 94% similarity]
v3po/vpp-facade-api/src/main/java/io/fd/honeycomb/v3po/vpp/facade/write/WriterRegistry.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/w/WriterRegistry.java with 98% similarity]
v3po/vpp-facade-api/src/test/java/io/fd/honeycomb/v3po/vpp/facade/ReadFailedExceptionTest.java [moved from v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/trans/ReadFailedExceptionTest.java with 78% similarity]
v3po/vpp-facade-api/src/test/java/io/fd/honeycomb/v3po/vpp/facade/VppApiInvocationExceptionTest.java [moved from v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/trans/VppApiInvocationExceptionTest.java with 72% similarity]
v3po/vpp-facade-impl/pom.xml [new file with mode: 0644]
v3po/vpp-facade-impl/src/main/java/io/fd/honeycomb/v3po/vpp/facade/impl/read/AbstractCompositeVppReader.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/r/impl/AbstractCompositeVppReader.java with 95% similarity]
v3po/vpp-facade-impl/src/main/java/io/fd/honeycomb/v3po/vpp/facade/impl/read/CompositeChildVppReader.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/r/impl/CompositeChildVppReader.java with 92% similarity]
v3po/vpp-facade-impl/src/main/java/io/fd/honeycomb/v3po/vpp/facade/impl/read/CompositeListVppReader.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/r/impl/CompositeListVppReader.java with 91% similarity]
v3po/vpp-facade-impl/src/main/java/io/fd/honeycomb/v3po/vpp/facade/impl/read/CompositeRootVppReader.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/r/impl/CompositeRootVppReader.java with 86% similarity]
v3po/vpp-facade-impl/src/main/java/io/fd/honeycomb/v3po/vpp/facade/impl/write/AbstractCompositeVppWriter.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/w/impl/AbstractCompositeVppWriter.java with 97% similarity]
v3po/vpp-facade-impl/src/main/java/io/fd/honeycomb/v3po/vpp/facade/impl/write/CompositeChildVppWriter.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/w/impl/CompositeChildVppWriter.java with 94% similarity]
v3po/vpp-facade-impl/src/main/java/io/fd/honeycomb/v3po/vpp/facade/impl/write/CompositeListVppWriter.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/w/impl/CompositeListVppWriter.java with 96% similarity]
v3po/vpp-facade-impl/src/main/java/io/fd/honeycomb/v3po/vpp/facade/impl/write/CompositeRootVppWriter.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/w/impl/CompositeRootVppWriter.java with 91% similarity]
v3po/vpp-facade-impl/src/test/java/io/fd/honeycomb/v3po/vpp/facade/impl/write/util/DelegatingWriterRegistryTest.java [moved from v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/trans/w/util/DelegatingWriterRegistryTest.java with 95% similarity]
v3po/vpp-facade-impl/src/test/java/io/fd/honeycomb/v3po/vpp/facade/impl/write/util/TransactionWriteContextTest.java [moved from v3po/impl/src/test/java/io/fd/honeycomb/v3po/impl/trans/w/util/TransactionWriteContextTest.java with 88% similarity]
v3po/vpp-facade-spi/pom.xml [new file with mode: 0644]
v3po/vpp-facade-spi/src/main/java/io/fd/honeycomb/v3po/vpp/facade/spi/read/ChildVppReaderCustomizer.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/r/impl/spi/ChildVppReaderCustomizer.java with 90% similarity]
v3po/vpp-facade-spi/src/main/java/io/fd/honeycomb/v3po/vpp/facade/spi/read/ListVppReaderCustomizer.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/r/impl/spi/ListVppReaderCustomizer.java with 90% similarity]
v3po/vpp-facade-spi/src/main/java/io/fd/honeycomb/v3po/vpp/facade/spi/read/RootVppReaderCustomizer.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/r/impl/spi/RootVppReaderCustomizer.java with 86% similarity]
v3po/vpp-facade-spi/src/main/java/io/fd/honeycomb/v3po/vpp/facade/spi/write/ChildVppWriterCustomizer.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/w/impl/spi/ChildVppWriterCustomizer.java with 90% similarity]
v3po/vpp-facade-spi/src/main/java/io/fd/honeycomb/v3po/vpp/facade/spi/write/ListVppWriterCustomizer.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/w/impl/spi/ListVppWriterCustomizer.java with 91% similarity]
v3po/vpp-facade-spi/src/main/java/io/fd/honeycomb/v3po/vpp/facade/spi/write/RootVppWriterCustomizer.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/w/impl/spi/RootVppWriterCustomizer.java with 92% similarity]
v3po/vpp-facade-utils/pom.xml [new file with mode: 0644]
v3po/vpp-facade-utils/src/main/java/io/fd/honeycomb/v3po/vpp/facade/impl/read/util/DelegatingReaderRegistry.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/r/util/DelegatingReaderRegistry.java with 91% similarity]
v3po/vpp-facade-utils/src/main/java/io/fd/honeycomb/v3po/vpp/facade/impl/read/util/NoopReaderCustomizer.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/r/util/NoopReaderCustomizer.java with 80% similarity]
v3po/vpp-facade-utils/src/main/java/io/fd/honeycomb/v3po/vpp/facade/impl/read/util/ReflexiveChildReaderCustomizer.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/r/util/ReflexiveChildReaderCustomizer.java with 91% similarity]
v3po/vpp-facade-utils/src/main/java/io/fd/honeycomb/v3po/vpp/facade/impl/read/util/ReflexiveRootReaderCustomizer.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/r/util/ReflexiveRootReaderCustomizer.java with 96% similarity]
v3po/vpp-facade-utils/src/main/java/io/fd/honeycomb/v3po/vpp/facade/impl/util/ReflectionUtils.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/util/ReflectionUtils.java with 98% similarity]
v3po/vpp-facade-utils/src/main/java/io/fd/honeycomb/v3po/vpp/facade/impl/util/VppApiCustomizer.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/util/VppApiCustomizer.java with 95% similarity]
v3po/vpp-facade-utils/src/main/java/io/fd/honeycomb/v3po/vpp/facade/impl/util/VppRWUtils.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/util/VppRWUtils.java with 97% similarity]
v3po/vpp-facade-utils/src/main/java/io/fd/honeycomb/v3po/vpp/facade/impl/write/util/DelegatingWriterRegistry.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/w/util/DelegatingWriterRegistry.java with 95% similarity]
v3po/vpp-facade-utils/src/main/java/io/fd/honeycomb/v3po/vpp/facade/impl/write/util/NoopWriterCustomizer.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/w/util/NoopWriterCustomizer.java with 90% similarity]
v3po/vpp-facade-utils/src/main/java/io/fd/honeycomb/v3po/vpp/facade/impl/write/util/ReflexiveChildWriterCustomizer.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/w/util/ReflexiveChildWriterCustomizer.java with 92% similarity]
v3po/vpp-facade-utils/src/main/java/io/fd/honeycomb/v3po/vpp/facade/impl/write/util/TransactionWriteContext.java [moved from v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/trans/w/util/TransactionWriteContext.java with 95% similarity]
v3po/vpp-facade-utils/src/test/java/io/fd/honeycomb/v3po/vpp/facade/impl/write/util/DelegatingWriterRegistryTest.java [new file with mode: 0644]
v3po/vpp-facade-utils/src/test/java/io/fd/honeycomb/v3po/vpp/facade/impl/write/util/TransactionWriteContextTest.java [new file with mode: 0644]

index b4c2839..cdfb7c2 100644 (file)
         <artifactId>v3po-api</artifactId>
         <version>${project.version}</version>
       </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>vpp-facade-api</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>vpp-facade-spi</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>vpp-facade-impl</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>vpp-facade-utils</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>v3po2vpp</artifactId>
+        <version>${project.version}</version>
+      </dependency>
       <dependency>
         <groupId>${project.groupId}</groupId>
         <artifactId>v3po-impl</artifactId>
index 77473ca..142d803 100644 (file)
       <artifactId>v3po-api</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>vpp-facade-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>vpp-facade-spi</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>vpp-facade-impl</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>vpp-facade-utils</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>v3po2vpp</artifactId>
+      <version>${project.version}</version>
+    </dependency>
     <dependency>
       <groupId>io.fd.vpp</groupId>
       <artifactId>vppjapi</artifactId>
index 3d3ffdb..cea5999 100644 (file)
     <feature version='${netconf.version}'>odl-netconf-connector-ssh</feature>
     <feature version='${mdsal.version}'>odl-netconf-mdsal</feature>
     <bundle>mvn:io.fd.honeycomb.v3po/v3po-impl/${project.version}</bundle>
+    <bundle>mvn:io.fd.honeycomb.v3po/vpp-facade-api/${project.version}</bundle>
+    <bundle>mvn:io.fd.honeycomb.v3po/vpp-facade-spi/${project.version}</bundle>
+    <bundle>mvn:io.fd.honeycomb.v3po/vpp-facade-utils/${project.version}</bundle>
+    <bundle>mvn:io.fd.honeycomb.v3po/vpp-facade-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>
     <configfile finalname="${configfile.directory}/v3po.xml">mvn:io.fd.honeycomb.v3po/v3po-impl/${project.version}/xml/config</configfile>
     <configfile finalname="${configfile.directory}/v3po-netconf.xml">mvn:io.fd.honeycomb.v3po/v3po-impl/${project.version}/xml/netconf</configfile>
index a47b6a1..a8109a8 100644 (file)
       <artifactId>v3po-api</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>vpp-facade-impl</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>v3po2vpp</artifactId>
+      <version>${project.version}</version>
+    </dependency>
 
     <dependency>
       <groupId>io.fd.vpp</groupId>
index 1982bc7..72848ad 100644 (file)
@@ -21,10 +21,10 @@ import static com.google.common.base.Preconditions.checkNotNull;
 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.impl.trans.VppException;
-import io.fd.honeycomb.v3po.impl.trans.w.WriteContext;
-import io.fd.honeycomb.v3po.impl.trans.w.WriterRegistry;
-import io.fd.honeycomb.v3po.impl.trans.w.util.TransactionWriteContext;
+import io.fd.honeycomb.v3po.vpp.facade.VppException;
+import io.fd.honeycomb.v3po.vpp.facade.impl.write.util.TransactionWriteContext;
+import io.fd.honeycomb.v3po.vpp.facade.write.WriteContext;
+import io.fd.honeycomb.v3po.vpp.facade.write.WriterRegistry;
 import java.util.Collections;
 import java.util.Map;
 import javax.annotation.Nonnull;
index 2a14f48..d84f0b7 100644 (file)
@@ -24,7 +24,7 @@ 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.impl.trans.r.ReaderRegistry;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReaderRegistry;
 import java.util.Collection;
 import java.util.Collections;
 import javassist.ClassPool;
index 7fd9b2e..7e62b57 100644 (file)
@@ -17,7 +17,7 @@
 package io.fd.honeycomb.v3po.impl.data;
 
 import com.google.common.annotations.Beta;
-import io.fd.honeycomb.v3po.impl.trans.VppException;
+import io.fd.honeycomb.v3po.vpp.facade.VppException;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailedException;
 
@@ -33,8 +33,7 @@ public interface VppDataTree {
      * @throws DataValidationFailedException if modification data is not valid
      * @throws VppException if commit failed while updating VPP state
      */
-    void commit(final DataTreeModification modification) throws DataValidationFailedException,
-        VppException;
+    void commit(final DataTreeModification modification) throws DataValidationFailedException, VppException;
 
     /**
      * Creates read-only snapshot of a VppDataTree.
index d73c22a..12d2816 100644 (file)
@@ -26,10 +26,10 @@ 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.impl.trans.ReadFailedException;
-import io.fd.honeycomb.v3po.impl.trans.r.ReadContext;
-import io.fd.honeycomb.v3po.impl.trans.r.ReaderRegistry;
-import io.fd.honeycomb.v3po.impl.trans.util.Context;
+import io.fd.honeycomb.v3po.vpp.facade.Context;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReadContext;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReadFailedException;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReaderRegistry;
 import java.util.Collection;
 import java.util.Map;
 import javax.annotation.Nonnull;
index fc6a51a..ba18654 100644 (file)
@@ -18,20 +18,20 @@ package io.fd.honeycomb.v3po.impl.data;
 
 import com.google.common.base.Optional;
 import com.google.common.collect.Multimap;
-import io.fd.honeycomb.v3po.impl.trans.ReadFailedException;
-import io.fd.honeycomb.v3po.impl.trans.r.ChildVppReader;
-import io.fd.honeycomb.v3po.impl.trans.r.ReadContext;
-import io.fd.honeycomb.v3po.impl.trans.r.ReaderRegistry;
-import io.fd.honeycomb.v3po.impl.trans.r.VppReader;
-import io.fd.honeycomb.v3po.impl.trans.r.impl.CompositeChildVppReader;
-import io.fd.honeycomb.v3po.impl.trans.r.impl.CompositeListVppReader;
-import io.fd.honeycomb.v3po.impl.trans.r.impl.CompositeRootVppReader;
-import io.fd.honeycomb.v3po.impl.trans.r.util.DelegatingReaderRegistry;
-import io.fd.honeycomb.v3po.impl.trans.r.util.ReflexiveChildReaderCustomizer;
-import io.fd.honeycomb.v3po.impl.trans.r.util.ReflexiveRootReaderCustomizer;
-import io.fd.honeycomb.v3po.impl.trans.util.VppRWUtils;
-import io.fd.honeycomb.v3po.impl.vppstate.BridgeDomainCustomizer;
-import io.fd.honeycomb.v3po.impl.vppstate.VersionCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.impl.read.CompositeChildVppReader;
+import io.fd.honeycomb.v3po.vpp.facade.impl.read.CompositeListVppReader;
+import io.fd.honeycomb.v3po.vpp.facade.impl.read.CompositeRootVppReader;
+import io.fd.honeycomb.v3po.vpp.facade.impl.read.util.DelegatingReaderRegistry;
+import io.fd.honeycomb.v3po.vpp.facade.impl.read.util.ReflexiveChildReaderCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.impl.read.util.ReflexiveRootReaderCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.read.ChildVppReader;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReadContext;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReadFailedException;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReaderRegistry;
+import io.fd.honeycomb.v3po.vpp.facade.read.VppReader;
+import io.fd.honeycomb.v3po.vpp.facade.v3po.vppstate.BridgeDomainCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.v3po.vppstate.VersionCustomizer;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -98,7 +98,7 @@ public class VppReaderRegistry implements ReaderRegistry {
     @Nonnull
     @Override
     public Multimap<InstanceIdentifier<? extends DataObject>, ? extends DataObject> readAll(
-        @Nonnull final ReadContext ctx) throws io.fd.honeycomb.v3po.impl.trans.ReadFailedException {
+        @Nonnull final ReadContext ctx) throws ReadFailedException {
         return reader.readAll(ctx);
     }
 
index 299898b..1baa586 100644 (file)
@@ -26,7 +26,7 @@ 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.impl.trans.VppException;
+import io.fd.honeycomb.v3po.vpp.facade.VppException;
 import javax.annotation.Nonnull;
 import javax.annotation.concurrent.NotThreadSafe;
 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
index defcca4..04b4bd6 100644 (file)
 
 package io.fd.honeycomb.v3po.impl.data;
 
-import io.fd.honeycomb.v3po.impl.trans.VppException;
-import io.fd.honeycomb.v3po.impl.trans.util.VppRWUtils;
-import io.fd.honeycomb.v3po.impl.trans.w.ChildVppWriter;
-import io.fd.honeycomb.v3po.impl.trans.w.VppWriter;
-import io.fd.honeycomb.v3po.impl.trans.w.WriteContext;
-import io.fd.honeycomb.v3po.impl.trans.w.WriterRegistry;
-import io.fd.honeycomb.v3po.impl.trans.w.impl.CompositeChildVppWriter;
-import io.fd.honeycomb.v3po.impl.trans.w.impl.CompositeListVppWriter;
-import io.fd.honeycomb.v3po.impl.trans.w.impl.CompositeRootVppWriter;
-import io.fd.honeycomb.v3po.impl.trans.w.util.DelegatingWriterRegistry;
-import io.fd.honeycomb.v3po.impl.trans.w.util.NoopWriterCustomizer;
-import io.fd.honeycomb.v3po.impl.trans.w.util.ReflexiveChildWriterCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.VppException;
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.impl.write.CompositeChildVppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.impl.write.CompositeListVppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.impl.write.CompositeRootVppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.impl.write.util.DelegatingWriterRegistry;
+import io.fd.honeycomb.v3po.vpp.facade.impl.write.util.NoopWriterCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.impl.write.util.ReflexiveChildWriterCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.v3po.vpp.BridgeDomainCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.write.ChildVppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.write.VppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.write.WriteContext;
+import io.fd.honeycomb.v3po.vpp.facade.write.WriterRegistry;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -58,7 +59,7 @@ public class VppWriterRegistry implements WriterRegistry {
     private static CompositeRootVppWriter<Vpp> initVppStateWriter(@Nonnull final vppApi vppApi) {
         final CompositeListVppWriter<BridgeDomain, BridgeDomainKey> bridgeDomainWriter = new CompositeListVppWriter<>(
             BridgeDomain.class,
-            new io.fd.honeycomb.v3po.impl.vpp.BridgeDomainCustomizer(vppApi));
+            new BridgeDomainCustomizer(vppApi));
 
         final ChildVppWriter<BridgeDomains> bridgeDomainsWriter = new CompositeChildVppWriter<>(
             BridgeDomains.class,
index 8719a53..207a64a 100644 (file)
@@ -31,9 +31,9 @@ import static org.mockito.MockitoAnnotations.initMocks;
 
 import com.google.common.base.Optional;
 import com.google.common.util.concurrent.CheckedFuture;
-import io.fd.honeycomb.v3po.impl.trans.VppException;
-import io.fd.honeycomb.v3po.impl.trans.w.WriteContext;
-import io.fd.honeycomb.v3po.impl.trans.w.WriterRegistry;
+import io.fd.honeycomb.v3po.vpp.facade.VppException;
+import io.fd.honeycomb.v3po.vpp.facade.write.WriteContext;
+import io.fd.honeycomb.v3po.vpp.facade.write.WriterRegistry;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
index 30cebf2..2c50ec9 100644 (file)
@@ -26,7 +26,7 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.MockitoAnnotations.initMocks;
 
 import com.google.common.util.concurrent.CheckedFuture;
-import io.fd.honeycomb.v3po.impl.trans.r.ReaderRegistry;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReaderRegistry;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mock;
index 493a019..09e7094 100644 (file)
@@ -34,8 +34,8 @@ import com.google.common.collect.Iterables;
 import com.google.common.collect.LinkedListMultimap;
 import com.google.common.collect.Multimap;
 import com.google.common.util.concurrent.CheckedFuture;
-import io.fd.honeycomb.v3po.impl.trans.r.ReadContext;
-import io.fd.honeycomb.v3po.impl.trans.r.ReaderRegistry;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReadContext;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReaderRegistry;
 import java.util.Map;
 import org.junit.Before;
 import org.junit.Test;
@@ -121,7 +121,7 @@ public class VppOperationalDataTreeTest {
 
     @Test
     public void testReadFailed() throws Exception{
-        doThrow(io.fd.honeycomb.v3po.impl.trans.ReadFailedException.class).when(reader).readAll(any(ReadContext.class));
+        doThrow(io.fd.honeycomb.v3po.vpp.facade.read.ReadFailedException.class).when(reader).readAll(any(ReadContext.class));
 
         final CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> future =
                 operationalData.read( YangInstanceIdentifier.EMPTY);
@@ -129,7 +129,7 @@ public class VppOperationalDataTreeTest {
         try {
             future.checkedGet();
         } catch (ReadFailedException e) {
-            assertTrue(e.getCause() instanceof io.fd.honeycomb.v3po.impl.trans.ReadFailedException);
+            assertTrue(e.getCause() instanceof io.fd.honeycomb.v3po.vpp.facade.read.ReadFailedException);
             return;
         }
         fail("ReadFailedException was expected");
index ef72135..cb9073c 100644 (file)
   </prerequisites>
   <modules>
     <module>api</module>
+    <module>vpp-facade-spi</module>
+    <module>vpp-facade-api</module>
+    <module>vpp-facade-impl</module>
+    <module>vpp-facade-utils</module>
+    <module>v3po2vpp</module>
     <module>impl</module>
     <module>karaf</module>
     <module>features</module>
diff --git a/v3po/v3po2vpp/pom.xml b/v3po/v3po2vpp/pom.xml
new file mode 100644 (file)
index 0000000..eb4aca7
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2015 Cisco and/or its affiliates.
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at:
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <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>v3po2vpp</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>vpp-facade-spi</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>vpp-facade-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>v3po-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.fd.vpp</groupId>
+            <artifactId>vppjapi</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+
+        <!-- Testing Dependencies -->
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>vpp-facade-impl</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <!--Needed due to final vppAPI, TODO remove once vppAPi refactored-->
+        <dependency>
+            <groupId>org.powermock</groupId>
+            <artifactId>powermock-api-mockito</artifactId>
+            <version>1.5.6</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.powermock</groupId>
+            <artifactId>powermock-module-junit4</artifactId>
+            <version>1.5.6</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.skinny-framework</groupId>
+            <artifactId>skinny-logback</artifactId>
+            <version>1.0.8</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+</project>
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.vpp;
+package io.fd.honeycomb.v3po.vpp.facade.v3po.vpp;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
 import static com.google.common.base.Preconditions.checkState;
 
-import io.fd.honeycomb.v3po.impl.trans.util.Context;
-import io.fd.honeycomb.v3po.impl.trans.util.VppApiCustomizer;
-import io.fd.honeycomb.v3po.impl.trans.w.impl.spi.ListVppWriterCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.VppApiCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.Context;
+import io.fd.honeycomb.v3po.vpp.facade.spi.write.ListVppWriterCustomizer;
 import java.util.List;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.vppstate;
+package io.fd.honeycomb.v3po.vpp.facade.v3po.vppstate;
 
 import com.google.common.collect.Lists;
-import io.fd.honeycomb.v3po.impl.trans.r.impl.spi.ListVppReaderCustomizer;
-import io.fd.honeycomb.v3po.impl.trans.util.Context;
-import io.fd.honeycomb.v3po.impl.trans.util.VppApiCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.VppApiCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.Context;
+import io.fd.honeycomb.v3po.vpp.facade.spi.read.ListVppReaderCustomizer;
 import java.util.ArrayList;
 import java.util.List;
 import javax.annotation.Nonnull;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.vppstate;
+package io.fd.honeycomb.v3po.vpp.facade.v3po.vppstate;
 
-import io.fd.honeycomb.v3po.impl.trans.r.impl.spi.ChildVppReaderCustomizer;
-import io.fd.honeycomb.v3po.impl.trans.util.Context;
-import io.fd.honeycomb.v3po.impl.trans.util.VppApiCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.Context;
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.VppApiCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.spi.read.ChildVppReaderCustomizer;
 import javax.annotation.Nonnull;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppStateBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.state.Version;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.vpp;
+package io.fd.honeycomb.v3po.vpp.facade.v3po.vpp;
 
-import static io.fd.honeycomb.v3po.impl.vpp.BridgeDomainTestUtils.BD_NAME_TO_ID_ANSWER;
-import static io.fd.honeycomb.v3po.impl.vpp.BridgeDomainTestUtils.bdIdentifierForName;
-import static io.fd.honeycomb.v3po.impl.vpp.BridgeDomainTestUtils.bdNameToID;
-import static io.fd.honeycomb.v3po.impl.vpp.BridgeDomainTestUtils.booleanToByte;
-import static io.fd.honeycomb.v3po.impl.vpp.BridgeDomainTestUtils.intToBoolean;
+import static io.fd.honeycomb.v3po.vpp.facade.v3po.vpp.BridgeDomainTestUtils.BD_NAME_TO_ID_ANSWER;
+import static io.fd.honeycomb.v3po.vpp.facade.v3po.vpp.BridgeDomainTestUtils.bdIdentifierForName;
+import static io.fd.honeycomb.v3po.vpp.facade.v3po.vpp.BridgeDomainTestUtils.bdNameToID;
+import static io.fd.honeycomb.v3po.vpp.facade.v3po.vpp.BridgeDomainTestUtils.booleanToByte;
+import static io.fd.honeycomb.v3po.vpp.facade.v3po.vpp.BridgeDomainTestUtils.intToBoolean;
 import static org.junit.Assert.fail;
 import static org.mockito.Matchers.anyInt;
 import static org.mockito.Matchers.anyString;
@@ -28,7 +28,7 @@ import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
 import static org.mockito.MockitoAnnotations.initMocks;
 
-import io.fd.honeycomb.v3po.impl.trans.util.Context;
+import io.fd.honeycomb.v3po.vpp.facade.Context;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.vpp;
+package io.fd.honeycomb.v3po.vpp.facade.v3po.vpp;
 
-import static io.fd.honeycomb.v3po.impl.vpp.BridgeDomainTestUtils.BD_NAME_TO_ID_ANSWER;
+import static io.fd.honeycomb.v3po.vpp.facade.v3po.vpp.BridgeDomainTestUtils.BD_NAME_TO_ID_ANSWER;
 import static org.mockito.Matchers.anyInt;
 import static org.mockito.Matchers.anyString;
 import static org.mockito.Mockito.mock;
@@ -25,10 +25,10 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.verifyZeroInteractions;
 
 import com.google.common.collect.Lists;
-import io.fd.honeycomb.v3po.impl.trans.w.VppWriter;
-import io.fd.honeycomb.v3po.impl.trans.w.WriteContext;
-import io.fd.honeycomb.v3po.impl.trans.w.impl.CompositeRootVppWriter;
-import io.fd.honeycomb.v3po.impl.trans.w.util.DelegatingWriterRegistry;
+import io.fd.honeycomb.v3po.vpp.facade.impl.write.CompositeRootVppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.impl.write.util.DelegatingWriterRegistry;
+import io.fd.honeycomb.v3po.vpp.facade.write.VppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.write.WriteContext;
 import java.util.Collections;
 import java.util.List;
 import org.junit.Before;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.vpp;
-
-import io.fd.honeycomb.v3po.impl.trans.util.VppRWUtils;
-import io.fd.honeycomb.v3po.impl.trans.w.ChildVppWriter;
-import io.fd.honeycomb.v3po.impl.trans.w.impl.CompositeChildVppWriter;
-import io.fd.honeycomb.v3po.impl.trans.w.impl.CompositeListVppWriter;
-import io.fd.honeycomb.v3po.impl.trans.w.impl.CompositeRootVppWriter;
-import io.fd.honeycomb.v3po.impl.trans.w.util.NoopWriterCustomizer;
-import io.fd.honeycomb.v3po.impl.trans.w.util.ReflexiveChildWriterCustomizer;
+package io.fd.honeycomb.v3po.vpp.facade.v3po.vpp;
+
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.impl.write.CompositeChildVppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.impl.write.CompositeListVppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.impl.write.CompositeRootVppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.impl.write.util.NoopWriterCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.impl.write.util.ReflexiveChildWriterCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.write.ChildVppWriter;
 import java.util.ArrayList;
 import java.util.List;
 import javax.annotation.Nonnull;
@@ -44,7 +44,7 @@ final class VppUtils {
 
         final CompositeListVppWriter<BridgeDomain, BridgeDomainKey> bridgeDomainWriter = new CompositeListVppWriter<>(
             BridgeDomain.class,
-            new io.fd.honeycomb.v3po.impl.vpp.BridgeDomainCustomizer(vppApi));
+            new BridgeDomainCustomizer(vppApi));
 
         final ChildVppWriter<BridgeDomains> bridgeDomainsReader = new CompositeChildVppWriter<>(
             BridgeDomains.class,
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.vppstate;
+package io.fd.honeycomb.v3po.vpp.facade.v3po.vppstate;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -26,11 +26,11 @@ import com.google.common.base.Optional;
 import com.google.common.base.Predicate;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Multimap;
-import io.fd.honeycomb.v3po.impl.trans.r.ReadContext;
-import io.fd.honeycomb.v3po.impl.trans.r.VppReader;
-import io.fd.honeycomb.v3po.impl.trans.r.impl.CompositeListVppReader;
-import io.fd.honeycomb.v3po.impl.trans.r.impl.CompositeRootVppReader;
-import io.fd.honeycomb.v3po.impl.trans.r.util.DelegatingReaderRegistry;
+import io.fd.honeycomb.v3po.vpp.facade.impl.read.CompositeListVppReader;
+import io.fd.honeycomb.v3po.vpp.facade.impl.read.CompositeRootVppReader;
+import io.fd.honeycomb.v3po.vpp.facade.impl.read.util.DelegatingReaderRegistry;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReadContext;
+import io.fd.honeycomb.v3po.vpp.facade.read.VppReader;
 import java.util.Collections;
 import java.util.List;
 import org.junit.Before;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.vppstate;
+package io.fd.honeycomb.v3po.vpp.facade.v3po.vppstate;
 
-import io.fd.honeycomb.v3po.impl.trans.r.ChildVppReader;
-import io.fd.honeycomb.v3po.impl.trans.r.impl.CompositeChildVppReader;
-import io.fd.honeycomb.v3po.impl.trans.r.impl.CompositeListVppReader;
-import io.fd.honeycomb.v3po.impl.trans.r.impl.CompositeRootVppReader;
-import io.fd.honeycomb.v3po.impl.trans.r.util.ReflexiveChildReaderCustomizer;
-import io.fd.honeycomb.v3po.impl.trans.r.util.ReflexiveRootReaderCustomizer;
-import io.fd.honeycomb.v3po.impl.trans.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.impl.read.CompositeChildVppReader;
+import io.fd.honeycomb.v3po.vpp.facade.impl.read.CompositeListVppReader;
+import io.fd.honeycomb.v3po.vpp.facade.impl.read.CompositeRootVppReader;
+import io.fd.honeycomb.v3po.vpp.facade.impl.read.util.ReflexiveChildReaderCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.impl.read.util.ReflexiveRootReaderCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.read.ChildVppReader;
 import java.util.ArrayList;
 import java.util.List;
 import javax.annotation.Nonnull;
diff --git a/v3po/vpp-facade-api/pom.xml b/v3po/vpp-facade-api/pom.xml
new file mode 100644 (file)
index 0000000..0406f1e
--- /dev/null
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2015 Cisco and/or its affiliates.
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at:
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <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>vpp-facade-api</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.opendaylight.mdsal</groupId>
+                <artifactId>mdsal-artifacts</artifactId>
+                <version>2.0.0-Beryllium</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal</groupId>
+            <artifactId>mdsal-binding-api</artifactId>
+        </dependency>
+
+        <!-- Testing Dependencies -->
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>v3po-api</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+</project>
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.r;
+package io.fd.honeycomb.v3po.vpp.facade.read;
 
 import com.google.common.annotations.Beta;
-import io.fd.honeycomb.v3po.impl.trans.ReadFailedException;
 import javax.annotation.Nonnull;
 import org.opendaylight.yangtools.concepts.Builder;
 import org.opendaylight.yangtools.yang.binding.DataObject;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.r;
+package io.fd.honeycomb.v3po.vpp.facade.read;
 
 import com.google.common.annotations.Beta;
-import io.fd.honeycomb.v3po.impl.trans.ReadFailedException;
 import java.util.List;
 import javax.annotation.Nonnull;
 import org.opendaylight.yangtools.yang.binding.DataObject;
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.r;
+package io.fd.honeycomb.v3po.vpp.facade.read;
 
-import io.fd.honeycomb.v3po.impl.trans.util.Context;
+import io.fd.honeycomb.v3po.vpp.facade.Context;
 import javax.annotation.Nonnull;
 
 /**
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans;
+package io.fd.honeycomb.v3po.vpp.facade.read;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 
+import io.fd.honeycomb.v3po.vpp.facade.VppException;
 import javax.annotation.Nonnull;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.r;
+package io.fd.honeycomb.v3po.vpp.facade.read;
 
 import com.google.common.annotations.Beta;
 import com.google.common.collect.Multimap;
-import io.fd.honeycomb.v3po.impl.trans.ReadFailedException;
 import javax.annotation.Nonnull;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.r;
+package io.fd.honeycomb.v3po.vpp.facade.read;
 
 import com.google.common.annotations.Beta;
 import com.google.common.base.Optional;
-import io.fd.honeycomb.v3po.impl.trans.ReadFailedException;
-import io.fd.honeycomb.v3po.impl.trans.SubtreeManager;
+import io.fd.honeycomb.v3po.vpp.facade.SubtreeManager;
 import javax.annotation.Nonnull;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.w;
+package io.fd.honeycomb.v3po.vpp.facade.write;
 
 import com.google.common.annotations.Beta;
-import io.fd.honeycomb.v3po.impl.trans.SubtreeManager;
-import io.fd.honeycomb.v3po.impl.trans.VppException;
+import io.fd.honeycomb.v3po.vpp.facade.SubtreeManager;
+import io.fd.honeycomb.v3po.vpp.facade.VppException;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 import org.opendaylight.yangtools.yang.binding.DataObject;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.w;
+package io.fd.honeycomb.v3po.vpp.facade.write;
 
 import com.google.common.annotations.Beta;
 import com.google.common.base.Optional;
-import io.fd.honeycomb.v3po.impl.trans.util.Context;
+import io.fd.honeycomb.v3po.vpp.facade.Context;
 import javax.annotation.Nonnull;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.w;
+package io.fd.honeycomb.v3po.vpp.facade.write;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 
 import com.google.common.annotations.Beta;
 import com.google.common.collect.ImmutableList;
-import io.fd.honeycomb.v3po.impl.trans.VppException;
+import io.fd.honeycomb.v3po.vpp.facade.VppException;
 import java.util.List;
 import java.util.Map;
 import javax.annotation.Nonnull;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+package io.fd.honeycomb.v3po.vpp.facade;
 
+import io.fd.honeycomb.v3po.vpp.facade.read.ReadFailedException;
+import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.state.bridge.domains.BridgeDomain;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.state.bridge.domains.bridge.domain.Interface;
@@ -31,9 +29,9 @@ public class ReadFailedExceptionTest {
     public void testInstantiation() {
         final InstanceIdentifier<BridgeDomain> id = InstanceIdentifier.create(BridgeDomain.class);
         ReadFailedException e = new ReadFailedException(id);
-        assertEquals(id, e.getFailedId());
-        assertNull(e.getCause());
-        assertTrue(e.getMessage().contains(id.toString()));
+        Assert.assertEquals(id, e.getFailedId());
+        Assert.assertNull(e.getCause());
+        Assert.assertTrue(e.getMessage().contains(id.toString()));
     }
 
     @Test
@@ -41,9 +39,9 @@ public class ReadFailedExceptionTest {
         final InstanceIdentifier<Interface> id = InstanceIdentifier.create(Interface.class);
         final RuntimeException cause = new RuntimeException();
         ReadFailedException e = new ReadFailedException(id, cause);
-        assertEquals(id, e.getFailedId());
-        assertEquals(cause, e.getCause());
-        assertTrue(e.getMessage().contains(id.toString()));
+        Assert.assertEquals(id, e.getFailedId());
+        Assert.assertEquals(cause, e.getCause());
+        Assert.assertTrue(e.getMessage().contains(id.toString()));
     }
 
     @Test(expected = NullPointerException.class)
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+package io.fd.honeycomb.v3po.vpp.facade;
 
 import java.util.Random;
+import org.junit.Assert;
 import org.junit.Test;
 
 public class VppApiInvocationExceptionTest {
@@ -30,12 +28,12 @@ public class VppApiInvocationExceptionTest {
         final int ctxId = 1;
         final int code = -1;
         VppApiInvocationException e = new VppApiInvocationException(apiMethodName, ctxId, code);
-        assertEquals(apiMethodName, e.getMethodName());
-        assertEquals(ctxId, e.getCtxId());
-        assertEquals(code, e.getErrorCode());
-        assertTrue(e.getMessage().contains(apiMethodName));
-        assertTrue(e.getMessage().contains(String.valueOf(code)));
-        assertTrue(e.getMessage().contains(String.valueOf(ctxId)));
+        Assert.assertEquals(apiMethodName, e.getMethodName());
+        Assert.assertEquals(ctxId, e.getCtxId());
+        Assert.assertEquals(code, e.getErrorCode());
+        Assert.assertTrue(e.getMessage().contains(apiMethodName));
+        Assert.assertTrue(e.getMessage().contains(String.valueOf(code)));
+        Assert.assertTrue(e.getMessage().contains(String.valueOf(ctxId)));
     }
 
     @Test(expected = IllegalArgumentException.class)
diff --git a/v3po/vpp-facade-impl/pom.xml b/v3po/vpp-facade-impl/pom.xml
new file mode 100644 (file)
index 0000000..fff69c2
--- /dev/null
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2015 Cisco and/or its affiliates.
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at:
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <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>vpp-facade-impl</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>vpp-facade-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>vpp-facade-spi</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>vpp-facade-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <!-- Testing Dependencies -->
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>v3po-api</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <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.vpp.facade.impl.*
+                        </Export-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.r.impl;
+package io.fd.honeycomb.v3po.vpp.facade.impl.read;
 
 import static com.google.common.base.Preconditions.checkArgument;
 
@@ -22,12 +22,12 @@ import com.google.common.annotations.Beta;
 import com.google.common.base.Optional;
 import com.google.common.base.Predicate;
 import com.google.common.collect.Iterables;
-import io.fd.honeycomb.v3po.impl.trans.ReadFailedException;
-import io.fd.honeycomb.v3po.impl.trans.r.ChildVppReader;
-import io.fd.honeycomb.v3po.impl.trans.r.ReadContext;
-import io.fd.honeycomb.v3po.impl.trans.r.VppReader;
-import io.fd.honeycomb.v3po.impl.trans.util.ReflectionUtils;
-import io.fd.honeycomb.v3po.impl.trans.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.ReflectionUtils;
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.read.ChildVppReader;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReadContext;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReadFailedException;
+import io.fd.honeycomb.v3po.vpp.facade.read.VppReader;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.Collections;
@@ -72,8 +72,7 @@ abstract class AbstractCompositeVppReader<D extends DataObject, B extends Builde
      *
      */
     protected Optional<D> readCurrent(final InstanceIdentifier<D> id,
-                                      @Nonnull final ReadContext ctx) throws
-            ReadFailedException {
+                                      @Nonnull final ReadContext ctx) throws ReadFailedException {
         LOG.debug("{}: Reading current: {}", this, id);
         final B builder = getBuilder(id);
         // Cache empty value to determine if anything has changed later TODO cache in a field
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.r.impl;
+package io.fd.honeycomb.v3po.vpp.facade.impl.read;
 
 import com.google.common.annotations.Beta;
 import com.google.common.base.Optional;
-import io.fd.honeycomb.v3po.impl.trans.ReadFailedException;
-import io.fd.honeycomb.v3po.impl.trans.r.ChildVppReader;
-import io.fd.honeycomb.v3po.impl.trans.r.ReadContext;
-import io.fd.honeycomb.v3po.impl.trans.r.impl.spi.ChildVppReaderCustomizer;
-import io.fd.honeycomb.v3po.impl.trans.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.read.ChildVppReader;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReadContext;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReadFailedException;
+import io.fd.honeycomb.v3po.vpp.facade.spi.read.ChildVppReaderCustomizer;
 import java.util.List;
 import javax.annotation.Nonnull;
 import javax.annotation.concurrent.ThreadSafe;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.r.impl;
+package io.fd.honeycomb.v3po.vpp.facade.impl.read;
 
 import static com.google.common.base.Preconditions.checkArgument;
 
 import com.google.common.annotations.Beta;
 import com.google.common.base.Optional;
-import io.fd.honeycomb.v3po.impl.trans.ReadFailedException;
-import io.fd.honeycomb.v3po.impl.trans.r.ChildVppReader;
-import io.fd.honeycomb.v3po.impl.trans.r.ListVppReader;
-import io.fd.honeycomb.v3po.impl.trans.r.ReadContext;
-import io.fd.honeycomb.v3po.impl.trans.r.impl.spi.ListVppReaderCustomizer;
-import io.fd.honeycomb.v3po.impl.trans.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.read.ChildVppReader;
+import io.fd.honeycomb.v3po.vpp.facade.read.ListVppReader;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReadContext;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReadFailedException;
+import io.fd.honeycomb.v3po.vpp.facade.spi.read.ListVppReaderCustomizer;
 import java.util.ArrayList;
 import java.util.List;
 import javax.annotation.Nonnull;
@@ -41,7 +41,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Composite implementation of {@link ChildVppReader} able to place the read result into parent builder object intended
+ * Composite implementation of {@link io.fd.honeycomb.v3po.vpp.facade.read.ChildVppReader} able to place the read result into parent builder object intended
  * for list node type.
  *
  * This reader checks if the IDs are wildcarded in which case it performs read of all list entries. In case the ID has a
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.r.impl;
+package io.fd.honeycomb.v3po.vpp.facade.impl.read;
 
 import com.google.common.annotations.Beta;
-import io.fd.honeycomb.v3po.impl.trans.ReadFailedException;
-import io.fd.honeycomb.v3po.impl.trans.r.ChildVppReader;
-import io.fd.honeycomb.v3po.impl.trans.r.ReadContext;
-import io.fd.honeycomb.v3po.impl.trans.r.VppReader;
-import io.fd.honeycomb.v3po.impl.trans.r.impl.spi.RootVppReaderCustomizer;
-import io.fd.honeycomb.v3po.impl.trans.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.read.ChildVppReader;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReadContext;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReadFailedException;
+import io.fd.honeycomb.v3po.vpp.facade.read.VppReader;
+import io.fd.honeycomb.v3po.vpp.facade.spi.read.RootVppReaderCustomizer;
 import java.util.List;
 import javax.annotation.Nonnull;
 import javax.annotation.concurrent.ThreadSafe;
@@ -33,7 +33,7 @@ import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
- * Composite implementation of {@link VppReader}
+ * Composite implementation of {@link io.fd.honeycomb.v3po.vpp.facade.read.VppReader}
  */
 @Beta
 @ThreadSafe
@@ -79,8 +79,7 @@ public final class CompositeRootVppReader<C extends DataObject, B extends Builde
 
     @Override
     protected void readCurrentAttributes(@Nonnull final InstanceIdentifier<C> id, @Nonnull final B builder,
-                                         @Nonnull final ReadContext ctx)
-            throws ReadFailedException {
+                                         @Nonnull final ReadContext ctx) throws ReadFailedException {
         customizer.readCurrentAttributes(id, builder, ctx.getContext());
     }
 
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.w.impl;
+package io.fd.honeycomb.v3po.vpp.facade.impl.write;
 
 import static com.google.common.base.Preconditions.checkArgument;
 
 import com.google.common.base.Optional;
 import com.google.common.collect.Lists;
-import io.fd.honeycomb.v3po.impl.trans.VppException;
-import io.fd.honeycomb.v3po.impl.trans.util.VppRWUtils;
-import io.fd.honeycomb.v3po.impl.trans.w.ChildVppWriter;
-import io.fd.honeycomb.v3po.impl.trans.w.VppWriter;
-import io.fd.honeycomb.v3po.impl.trans.w.WriteContext;
+import io.fd.honeycomb.v3po.vpp.facade.VppException;
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.write.ChildVppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.write.VppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.write.WriteContext;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.w.impl;
+package io.fd.honeycomb.v3po.vpp.facade.impl.write;
 
 import com.google.common.base.Optional;
-import io.fd.honeycomb.v3po.impl.trans.util.VppRWUtils;
-import io.fd.honeycomb.v3po.impl.trans.w.ChildVppWriter;
-import io.fd.honeycomb.v3po.impl.trans.w.WriteContext;
-import io.fd.honeycomb.v3po.impl.trans.w.impl.spi.ChildVppWriterCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.spi.write.ChildVppWriterCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.write.ChildVppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.write.WriteContext;
 import java.util.List;
 import javax.annotation.Nonnull;
 import org.opendaylight.yangtools.yang.binding.Augmentation;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.w.impl;
+package io.fd.honeycomb.v3po.vpp.facade.impl.write;
 
 import com.google.common.base.Function;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
-import io.fd.honeycomb.v3po.impl.trans.util.VppRWUtils;
-import io.fd.honeycomb.v3po.impl.trans.w.ChildVppWriter;
-import io.fd.honeycomb.v3po.impl.trans.w.WriteContext;
-import io.fd.honeycomb.v3po.impl.trans.w.impl.spi.ListVppWriterCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.spi.write.ListVppWriterCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.write.ChildVppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.write.WriteContext;
 import java.util.List;
 import java.util.Map;
 import javax.annotation.Nonnull;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.w.impl;
+package io.fd.honeycomb.v3po.vpp.facade.impl.write;
 
-import io.fd.honeycomb.v3po.impl.trans.util.VppRWUtils;
-import io.fd.honeycomb.v3po.impl.trans.w.ChildVppWriter;
-import io.fd.honeycomb.v3po.impl.trans.w.WriteContext;
-import io.fd.honeycomb.v3po.impl.trans.w.impl.spi.RootVppWriterCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.spi.write.RootVppWriterCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.write.ChildVppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.write.WriteContext;
 import java.util.List;
 import javax.annotation.Nonnull;
 import org.opendaylight.yangtools.yang.binding.Augmentation;
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.w.util;
+package io.fd.honeycomb.v3po.vpp.facade.impl.write.util;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
@@ -24,11 +24,11 @@ import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
 
-import io.fd.honeycomb.v3po.impl.trans.VppException;
-import io.fd.honeycomb.v3po.impl.trans.w.VppWriter;
-import io.fd.honeycomb.v3po.impl.trans.w.WriteContext;
-import io.fd.honeycomb.v3po.impl.trans.w.WriterRegistry;
-import io.fd.honeycomb.v3po.impl.trans.w.impl.CompositeRootVppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.VppException;
+import io.fd.honeycomb.v3po.vpp.facade.impl.write.CompositeRootVppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.write.VppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.write.WriteContext;
+import io.fd.honeycomb.v3po.vpp.facade.write.WriterRegistry;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
@@ -1,4 +1,20 @@
-package io.fd.honeycomb.v3po.impl.trans.w.util;
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.v3po.vpp.facade.impl.write.util;
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -13,7 +29,7 @@ import static org.mockito.MockitoAnnotations.initMocks;
 
 import com.google.common.base.Optional;
 import com.google.common.util.concurrent.CheckedFuture;
-import io.fd.honeycomb.v3po.impl.trans.util.Context;
+import io.fd.honeycomb.v3po.vpp.facade.Context;
 import java.util.Map;
 import org.junit.Before;
 import org.junit.Test;
diff --git a/v3po/vpp-facade-spi/pom.xml b/v3po/vpp-facade-spi/pom.xml
new file mode 100644 (file)
index 0000000..87f9c28
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2015 Cisco and/or its affiliates.
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at:
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <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>vpp-facade-spi</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.opendaylight.mdsal</groupId>
+                <artifactId>mdsal-artifacts</artifactId>
+                <version>2.0.0-Beryllium</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>vpp-facade-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal</groupId>
+            <artifactId>mdsal-binding-api</artifactId>
+        </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>
+
+    </dependencies>
+
+</project>
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.r.impl.spi;
+package io.fd.honeycomb.v3po.vpp.facade.spi.read;
 
 import com.google.common.annotations.Beta;
 import javax.annotation.Nonnull;
@@ -22,7 +22,7 @@ import org.opendaylight.yangtools.concepts.Builder;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 
 /**
- * {@link io.fd.honeycomb.v3po.impl.trans.r.impl.CompositeChildVppReader} SPI to customize its behavior
+ * CompositeChildVppReader SPI to customize its behavior
  *
  * @param <C> Specific DataObject derived type (Identifiable), that is handled by this customizer
  * @param <B> Specific Builder for handled type (C)
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.r.impl.spi;
+package io.fd.honeycomb.v3po.vpp.facade.spi.read;
 
 import com.google.common.annotations.Beta;
-import io.fd.honeycomb.v3po.impl.trans.util.Context;
+import io.fd.honeycomb.v3po.vpp.facade.Context;
 import java.util.List;
 import javax.annotation.Nonnull;
 import org.opendaylight.yangtools.concepts.Builder;
@@ -27,7 +27,7 @@ import org.opendaylight.yangtools.yang.binding.Identifier;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
- * {@link io.fd.honeycomb.v3po.impl.trans.r.impl.CompositeListVppReader} SPI to customize its behavior
+ * CompositeListVppReader SPI to customize its behavior
  *
  * @param <C> Specific DataObject derived type (Identifiable), that is handled by this customizer
  * @param <K> Specific Identifier for handled type (C)
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.r.impl.spi;
+package io.fd.honeycomb.v3po.vpp.facade.spi.read;
 
 import com.google.common.annotations.Beta;
-import io.fd.honeycomb.v3po.impl.trans.ReadFailedException;
-import io.fd.honeycomb.v3po.impl.trans.util.Context;
+import io.fd.honeycomb.v3po.vpp.facade.Context;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReadFailedException;
 import javax.annotation.Nonnull;
 import org.opendaylight.yangtools.concepts.Builder;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
- * {@link io.fd.honeycomb.v3po.impl.trans.r.impl.CompositeRootVppReader} SPI to customize its behavior
+ * CompositeRootVppReader SPI to customize its behavior
  *
  * @param <C> Specific DataObject derived type, that is handled by this customizer
  * @param <B> Specific Builder for handled type (C)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.w.impl.spi;
+package io.fd.honeycomb.v3po.vpp.facade.spi.write;
 
 import com.google.common.annotations.Beta;
 import com.google.common.base.Optional;
@@ -23,7 +23,7 @@ import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
- * {@link io.fd.honeycomb.v3po.impl.trans.w.impl.CompositeChildVppWriter} SPI to customize its behavior
+ * CompositeChildVppWriter SPI to customize its behavior
  *
  * @param <D> Specific DataObject derived type (Identifiable), that is handled by this customizer
  */
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.w.impl.spi;
+package io.fd.honeycomb.v3po.vpp.facade.spi.write;
 
 import com.google.common.annotations.Beta;
 import java.util.List;
@@ -25,7 +25,7 @@ import org.opendaylight.yangtools.yang.binding.Identifier;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
- * {@link io.fd.honeycomb.v3po.impl.trans.w.impl.CompositeListVppWriter} SPI to customize its behavior
+ * CompositeListVppWriter SPI to customize its behavior
  *
  * @param <C> Specific DataObject derived type (Identifiable), that is handled by this customizer
  * @param <K> Specific Identifier for handled type (C)
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.w.impl.spi;
+package io.fd.honeycomb.v3po.vpp.facade.spi.write;
 
 import com.google.common.annotations.Beta;
-import io.fd.honeycomb.v3po.impl.trans.util.Context;
+import io.fd.honeycomb.v3po.vpp.facade.Context;
 import javax.annotation.Nonnull;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
- * {@link io.fd.honeycomb.v3po.impl.trans.w.impl.CompositeRootVppWriter} SPI to customize its behavior
+ * CompositeRootVppReader SPI to customize its behavior
  *
  * @param <D> Specific DataObject derived type, that is handled by this customizer
  */
diff --git a/v3po/vpp-facade-utils/pom.xml b/v3po/vpp-facade-utils/pom.xml
new file mode 100644 (file)
index 0000000..83c7d74
--- /dev/null
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2015 Cisco and/or its affiliates.
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at:
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <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>vpp-facade-utils</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.opendaylight.mdsal</groupId>
+                <artifactId>mdsal-artifacts</artifactId>
+                <version>2.0.0-Beryllium</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.controller</groupId>
+                <artifactId>mdsal-artifacts</artifactId>
+                <version>1.3.0-Beryllium</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>vpp-facade-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>vpp-facade-spi</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.fd.vpp</groupId>
+            <artifactId>vppjapi</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>sal-core-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal</groupId>
+            <artifactId>mdsal-binding-dom-codec</artifactId>
+        </dependency>
+
+        <!-- Testing Dependencies -->
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>v3po-api</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+</project>
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.r.util;
+package io.fd.honeycomb.v3po.vpp.facade.impl.read.util;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 
@@ -22,12 +22,12 @@ import com.google.common.base.Optional;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.LinkedListMultimap;
 import com.google.common.collect.Multimap;
-import io.fd.honeycomb.v3po.impl.trans.ReadFailedException;
-import io.fd.honeycomb.v3po.impl.trans.r.ListVppReader;
-import io.fd.honeycomb.v3po.impl.trans.r.ReadContext;
-import io.fd.honeycomb.v3po.impl.trans.r.ReaderRegistry;
-import io.fd.honeycomb.v3po.impl.trans.r.VppReader;
-import io.fd.honeycomb.v3po.impl.trans.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.read.ListVppReader;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReadContext;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReadFailedException;
+import io.fd.honeycomb.v3po.vpp.facade.read.ReaderRegistry;
+import io.fd.honeycomb.v3po.vpp.facade.read.VppReader;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.r.util;
+package io.fd.honeycomb.v3po.vpp.facade.impl.read.util;
 
-import io.fd.honeycomb.v3po.impl.trans.r.impl.spi.RootVppReaderCustomizer;
-import io.fd.honeycomb.v3po.impl.trans.util.Context;
+import io.fd.honeycomb.v3po.vpp.facade.Context;
+import io.fd.honeycomb.v3po.vpp.facade.spi.read.RootVppReaderCustomizer;
 import org.opendaylight.yangtools.concepts.Builder;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
-public abstract class NoopReaderCustomizer<C extends DataObject, B extends Builder<C>> implements RootVppReaderCustomizer<C, B> {
+public abstract class NoopReaderCustomizer<C extends DataObject, B extends Builder<C>> implements
+    RootVppReaderCustomizer<C, B> {
 
     @Override
     public void readCurrentAttributes(InstanceIdentifier<C> id, final B builder, final Context context) {
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.r.util;
+package io.fd.honeycomb.v3po.vpp.facade.impl.read.util;
 
 import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
-import io.fd.honeycomb.v3po.impl.trans.r.impl.spi.ChildVppReaderCustomizer;
-import io.fd.honeycomb.v3po.impl.trans.util.ReflectionUtils;
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.ReflectionUtils;
+import io.fd.honeycomb.v3po.vpp.facade.spi.read.ChildVppReaderCustomizer;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.Collections;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.util;
+package io.fd.honeycomb.v3po.vpp.facade.impl.util;
 
 import com.google.common.base.Function;
 import com.google.common.base.Preconditions;
 import com.google.common.base.Predicate;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Maps;
-import io.fd.honeycomb.v3po.impl.trans.SubtreeManager;
-import io.fd.honeycomb.v3po.impl.trans.r.ChildVppReader;
-import io.fd.honeycomb.v3po.impl.trans.w.ChildVppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.SubtreeManager;
+import io.fd.honeycomb.v3po.vpp.facade.read.ChildVppReader;
+import io.fd.honeycomb.v3po.vpp.facade.write.ChildVppWriter;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.w.util;
+package io.fd.honeycomb.v3po.vpp.facade.impl.write.util;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -24,11 +24,11 @@ import com.google.common.collect.Collections2;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
-import io.fd.honeycomb.v3po.impl.trans.VppException;
-import io.fd.honeycomb.v3po.impl.trans.util.VppRWUtils;
-import io.fd.honeycomb.v3po.impl.trans.w.VppWriter;
-import io.fd.honeycomb.v3po.impl.trans.w.WriteContext;
-import io.fd.honeycomb.v3po.impl.trans.w.WriterRegistry;
+import io.fd.honeycomb.v3po.vpp.facade.VppException;
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.VppRWUtils;
+import io.fd.honeycomb.v3po.vpp.facade.write.VppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.write.WriteContext;
+import io.fd.honeycomb.v3po.vpp.facade.write.WriterRegistry;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.w.util;
+package io.fd.honeycomb.v3po.vpp.facade.impl.write.util;
 
-import io.fd.honeycomb.v3po.impl.trans.util.Context;
-import io.fd.honeycomb.v3po.impl.trans.w.impl.spi.RootVppWriterCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.Context;
+import io.fd.honeycomb.v3po.vpp.facade.spi.write.RootVppWriterCustomizer;
 import javax.annotation.Nonnull;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.w.util;
+package io.fd.honeycomb.v3po.vpp.facade.impl.write.util;
 
 import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Iterables;
-import io.fd.honeycomb.v3po.impl.trans.util.ReflectionUtils;
-import io.fd.honeycomb.v3po.impl.trans.w.impl.spi.ChildVppWriterCustomizer;
+import io.fd.honeycomb.v3po.vpp.facade.impl.util.ReflectionUtils;
+import io.fd.honeycomb.v3po.vpp.facade.spi.write.ChildVppWriterCustomizer;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.Collections;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.v3po.impl.trans.w.util;
+package io.fd.honeycomb.v3po.vpp.facade.impl.write.util;
 
 import com.google.common.base.Optional;
 import com.google.common.util.concurrent.CheckedFuture;
-import io.fd.honeycomb.v3po.impl.trans.util.Context;
-import io.fd.honeycomb.v3po.impl.trans.w.WriteContext;
+import io.fd.honeycomb.v3po.vpp.facade.Context;
+import io.fd.honeycomb.v3po.vpp.facade.write.WriteContext;
 import java.util.Map;
 import javax.annotation.Nonnull;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
diff --git a/v3po/vpp-facade-utils/src/test/java/io/fd/honeycomb/v3po/vpp/facade/impl/write/util/DelegatingWriterRegistryTest.java b/v3po/vpp-facade-utils/src/test/java/io/fd/honeycomb/v3po/vpp/facade/impl/write/util/DelegatingWriterRegistryTest.java
new file mode 100644 (file)
index 0000000..774974d
--- /dev/null
@@ -0,0 +1,188 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.v3po.vpp.facade.impl.write.util;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+
+import io.fd.honeycomb.v3po.vpp.facade.VppException;
+import io.fd.honeycomb.v3po.vpp.facade.write.VppWriter;
+import io.fd.honeycomb.v3po.vpp.facade.write.WriteContext;
+import io.fd.honeycomb.v3po.vpp.facade.write.WriterRegistry;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.Vpp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppState;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+
+public class DelegatingWriterRegistryTest {
+
+    private final InstanceIdentifier<Vpp> vppId;
+    private final InstanceIdentifier<VppState> vppStateId;
+    private final InstanceIdentifier<Interfaces> interfaceId;
+
+    private WriteContext ctx;
+    private VppWriter<Vpp> vppWriter;
+    private VppWriter<VppState> vppStateWriter;
+    private VppWriter<Interfaces> interfacesWriter;
+
+    private DelegatingWriterRegistry registry;
+
+    public DelegatingWriterRegistryTest() {
+        vppId = InstanceIdentifier.create(Vpp.class);
+        vppStateId = InstanceIdentifier.create(VppState.class);
+        interfaceId = InstanceIdentifier.create(Interfaces.class);
+    }
+
+    @SuppressWarnings("unchecked")
+    private <D extends DataObject> VppWriter<D> mockWriter(Class<D> clazz) {
+        final VppWriter<D> mock = (VppWriter<D>) Mockito.mock(VppWriter.class);
+        doReturn(InstanceIdentifier.create(clazz)).when(mock).getManagedDataObjectType();
+        return mock;
+    }
+
+    private DataObject mockDataObject(final String name, final Class<? extends DataObject> classToMock) {
+        final DataObject dataBefore = mock(classToMock, name);
+        doReturn(classToMock).when(dataBefore).getImplementedInterface();
+        return dataBefore;
+    }
+
+    @SuppressWarnings("unchecked")
+    private static Map<InstanceIdentifier<?>, DataObject> asMap(DataObject... objects) {
+        final Map<InstanceIdentifier<?>, DataObject> map = new HashMap<>();
+        for (DataObject object : objects) {
+            final Class<? extends DataObject> implementedInterface =
+                    (Class<? extends DataObject>) object.getImplementedInterface();
+            final InstanceIdentifier<?> id = InstanceIdentifier.create(implementedInterface);
+            map.put(id, object);
+        }
+        return map;
+    }
+
+    @Before
+    public void setUp() {
+        ctx = mock(WriteContext.class);
+        vppWriter = mockWriter(Vpp.class);
+        vppStateWriter = mockWriter(VppState.class);
+        interfacesWriter = mockWriter(Interfaces.class);
+
+        final List<VppWriter<? extends DataObject>> writers = new ArrayList<>();
+        writers.add(vppWriter);
+        writers.add(vppStateWriter);
+        writers.add(interfacesWriter);
+
+        registry = new DelegatingWriterRegistry(writers);
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testGetManagedDataObjectType() {
+        registry.getManagedDataObjectType();
+    }
+
+    @Test
+    public void testBulkUpdateRevert() throws Exception {
+        // Prepare data changes:
+        final DataObject dataBefore1 = mockDataObject("Vpp before", Vpp.class);
+        final DataObject dataAfter1 = mockDataObject("Vpp after", Vpp.class);
+
+        final DataObject dataBefore2 = mockDataObject("VppState before", VppState.class);
+        final DataObject dataAfter2 = mockDataObject("VppState after", VppState.class);
+
+        // Fail on update
+        doThrow(new VppException("vpp failed")).when(vppStateWriter)
+                .update(vppStateId, dataBefore2, dataAfter2, ctx);
+
+        // Run the test
+        try {
+            registry.update(asMap(dataBefore1, dataBefore2), asMap(dataAfter1, dataAfter2), ctx);
+        } catch (WriterRegistry.BulkUpdateException e) {
+            // Check second update failed
+            assertEquals(vppStateId, e.getFailedId());
+            verify(vppWriter).update(vppId, dataBefore1, dataAfter1, ctx);
+            verify(vppStateWriter).update(vppStateId, dataBefore2, dataAfter2, ctx);
+
+            // Try to revert changes
+            e.revertChanges();
+
+            // Check revert was successful
+            verify(vppWriter).update(vppId, dataAfter1, dataBefore1, ctx);
+            verify(vppStateWriter, never()).update(vppStateId, dataAfter2, dataBefore2, ctx);
+
+            return;
+        }
+        fail("BulkUpdateException expected");
+    }
+
+    @Test
+    public void testBulkUpdateRevertFail() throws Exception {
+        // Prepare data changes:
+        final DataObject dataBefore1 = mockDataObject("Vpp before", Vpp.class);
+        final DataObject dataAfter1 = mockDataObject("Vpp after", Vpp.class);
+
+        final DataObject dataBefore2 = mockDataObject("VppState before", VppState.class);
+        final DataObject dataAfter2 = mockDataObject("VppState after", VppState.class);
+
+        final DataObject dataBefore3 = mockDataObject("Interfaces before", Interfaces.class);
+        final DataObject dataAfter3 = mockDataObject("Interfaces after", Interfaces.class);
+
+        // Fail on the third update
+        doThrow(new VppException("vpp failed")).when(interfacesWriter)
+                .update(interfaceId, dataBefore3, dataAfter3, ctx);
+
+        // Fail on the second revert
+        doThrow(new VppException("vpp failed again")).when(vppWriter)
+                .update(vppId, dataAfter1, dataBefore1, ctx);
+
+        // Run the test
+        try {
+            registry.update(asMap(dataBefore1, dataBefore2, dataBefore3), asMap(dataAfter1, dataAfter2, dataAfter3), ctx);
+        } catch (WriterRegistry.BulkUpdateException e) {
+            // Check third update failed
+            assertEquals(interfaceId, e.getFailedId());
+            verify(vppWriter).update(vppId, dataBefore1, dataAfter1, ctx);
+            verify(vppStateWriter).update(vppStateId, dataBefore2, dataAfter2, ctx);
+            verify(interfacesWriter).update(interfaceId, dataBefore3, dataAfter3, ctx);
+
+            // Try to revert changes
+            try {
+                e.revertChanges();
+            } catch (WriterRegistry.Reverter.RevertFailedException e2) {
+                // Check second revert failed
+                assertEquals(Collections.singletonList(vppId), e2.getNotRevertedChanges());
+                verify(vppWriter).update(vppId, dataAfter1, dataBefore1, ctx);
+                verify(vppStateWriter).update(vppStateId, dataAfter2, dataBefore2, ctx);
+                verify(interfacesWriter, never()).update(interfaceId, dataAfter3, dataBefore3, ctx);
+                return;
+            }
+            fail("WriterRegistry.Revert.RevertFailedException expected");
+        }
+        fail("BulkUpdateException expected");
+    }
+}
\ No newline at end of file
diff --git a/v3po/vpp-facade-utils/src/test/java/io/fd/honeycomb/v3po/vpp/facade/impl/write/util/TransactionWriteContextTest.java b/v3po/vpp-facade-utils/src/test/java/io/fd/honeycomb/v3po/vpp/facade/impl/write/util/TransactionWriteContextTest.java
new file mode 100644 (file)
index 0000000..0e46e2f
--- /dev/null
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.v3po.vpp.facade.impl.write.util;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import static org.mockito.MockitoAnnotations.initMocks;
+
+import com.google.common.base.Optional;
+import com.google.common.util.concurrent.CheckedFuture;
+import io.fd.honeycomb.v3po.vpp.facade.Context;
+import java.util.Map;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
+import org.opendaylight.controller.md.sal.dom.api.DOMDataReadOnlyTransaction;
+import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.Vpp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppState;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.BridgeDomains;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.bridge.domains.BridgeDomain;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+
+public class TransactionWriteContextTest {
+
+    @Mock
+    private BindingNormalizedNodeSerializer serializer;
+    @Mock
+    private DOMDataReadOnlyTransaction beforeTx;
+    @Mock
+    private DOMDataReadOnlyTransaction afterTx;
+    @Mock
+    private CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> future;
+    @Mock
+    private Optional<org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?, ?>> optional;
+    @Mock
+    private Map.Entry entry;
+
+    private TransactionWriteContext transactionWriteContext;
+
+    @Before
+    public void setUp() {
+        initMocks(this);
+        transactionWriteContext = new TransactionWriteContext(serializer, beforeTx, afterTx);
+    }
+
+    @Test
+    public void testReadBeforeNoData() throws Exception {
+        when(beforeTx.read(eq(LogicalDatastoreType.CONFIGURATION), any(YangInstanceIdentifier.class))).thenReturn(future);
+        when(future.checkedGet()).thenReturn(optional);
+        when(optional.isPresent()).thenReturn(false);
+
+        final InstanceIdentifier<BridgeDomain> instanceId =
+                InstanceIdentifier.create(Vpp.class).child(BridgeDomains.class).child(BridgeDomain.class);
+
+        final Optional<DataObject> dataObjects = transactionWriteContext.readBefore(instanceId);
+        assertNotNull(dataObjects);
+        assertFalse(dataObjects.isPresent());
+
+        verify(serializer).toYangInstanceIdentifier(instanceId);
+        verify(serializer, never()).fromNormalizedNode(any(YangInstanceIdentifier.class), any(NormalizedNode.class));
+    }
+
+
+    @Test
+    public void testReadBefore() throws Exception {
+        when(beforeTx.read(eq(LogicalDatastoreType.CONFIGURATION), any(YangInstanceIdentifier.class))).thenReturn(future);
+        when(future.checkedGet()).thenReturn(optional);
+        when(optional.isPresent()).thenReturn(true);
+
+        final InstanceIdentifier<BridgeDomain> instanceId =
+                InstanceIdentifier.create(Vpp.class).child(BridgeDomains.class).child(BridgeDomain.class);
+        final YangInstanceIdentifier yangId = YangInstanceIdentifier.builder().node(VppState.QNAME).node(
+                BridgeDomains.QNAME).node(BridgeDomain.QNAME).build();
+        when(serializer.toYangInstanceIdentifier(any(InstanceIdentifier.class))).thenReturn(yangId);
+        when(serializer.fromNormalizedNode(eq(yangId), any(NormalizedNode.class))).thenReturn(entry);
+        when(entry.getValue()).thenReturn(mock(DataObject.class));
+
+        final Optional<DataObject> dataObjects = transactionWriteContext.readBefore(instanceId);
+        assertNotNull(dataObjects);
+        assertTrue(dataObjects.isPresent());
+
+        verify(serializer).toYangInstanceIdentifier(instanceId);
+        verify(serializer).fromNormalizedNode(eq(yangId), any(NormalizedNode.class));
+    }
+
+    @Test(expected = IllegalStateException.class)
+    public void testReadBeforeFailed() throws Exception {
+        when(beforeTx.read(eq(LogicalDatastoreType.CONFIGURATION), any(YangInstanceIdentifier.class))).thenReturn(future);
+        when(future.checkedGet()).thenThrow(ReadFailedException.class);
+        transactionWriteContext.readBefore(mock(InstanceIdentifier.class));
+    }
+
+    @Test(expected = IllegalStateException.class)
+    public void testReadAfterFailed() throws Exception {
+        when(afterTx.read(eq(LogicalDatastoreType.CONFIGURATION), any(YangInstanceIdentifier.class))).thenReturn(future);
+        when(future.checkedGet()).thenThrow(ReadFailedException.class);
+        transactionWriteContext.readAfter(mock(InstanceIdentifier.class));
+    }
+
+    @Test
+    public void testGetContext() throws Exception {
+        assertNotNull(transactionWriteContext.getContext());
+    }
+
+    @Test
+    public void testClose() throws Exception {
+        final Context context = transactionWriteContext.getContext();
+        transactionWriteContext.close();
+        // TODO verify context was closed
+    }
+}
\ No newline at end of file