HC2VPP-63 28/5528/5
authorSrihari Raghavan <[email protected]>
Sun, 26 Feb 2017 15:45:32 +0000 (21:15 +0530)
committerSrihari Raghavan <[email protected]>
Sun, 5 Mar 2017 06:29:14 +0000 (11:59 +0530)
Fix mistakenly used addStructuralReader. Thanks Jan Srnicek.

Change-Id: I2b3eb827ebd98a9260a514041489c602e2d409e4
Signed-off-by: Srihari Raghavan <[email protected]>
ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/VppIoamModule.java
ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/config/IoamExportWriterCustomizer.java
ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/config/IoamPotWriterCustomizer.java
ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/config/IoamTraceWriterCustomizer.java
ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/config/VppIoamWriterFactory.java
ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/oper/PotProfileReaderCustomizer.java
ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/oper/TraceProfileReaderCustomizer.java
ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/oper/VppIoamReaderFactory.java
ioam/impl/src/test/java/io/fd/hc2vpp/vppioam/impl/config/IoamPotWriterCustomizerTest.java
ioam/impl/src/test/java/io/fd/hc2vpp/vppioam/impl/oper/PotProfileReaderCustomizerTest.java
pom.xml

index 228653c..4c14313 100755 (executable)
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package io.fd.hc2vpp.vppioam.impl;
 
 import com.google.common.annotations.VisibleForTesting;
@@ -36,7 +37,7 @@ import io.fd.vpp.jvpp.ioamtrace.future.FutureJVppIoamtraceFacade;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/**
+/*
  * Glue code necessary for Honeycomb distribution to pick up the plugin classes
  */
 public final class VppIoamModule extends AbstractModule {
index 2172750..1d90b0e 100644 (file)
@@ -36,8 +36,8 @@ public class IoamExportWriterCustomizer extends FutureJVppIoamexportCustomizer
 
     private static final Logger LOG = LoggerFactory.getLogger(IoamExportWriterCustomizer.class);
 
-    public IoamExportWriterCustomizer(FutureJVppIoamexport jVppIoamexport){
-        super(jVppIoamexport);
+    public IoamExportWriterCustomizer(FutureJVppIoamexport jVppIoamExport){
+        super(jVppIoamExport);
     }
 
     @Override
@@ -67,10 +67,11 @@ public class IoamExportWriterCustomizer extends FutureJVppIoamexportCustomizer
     private IoamExportIp6EnableDisableReply addExportProfile(IoamExport ioamExport, InstanceIdentifier<IoamExport> id)
             throws WriteFailedException {
         IoamExportIp6EnableDisable request = new IoamExportIp6EnableDisable();
-        if (ioamExport.isDisable()==null)
+        if (ioamExport.isDisable() == null) {
             request.isDisable = 1;
-        else
-            request.isDisable = (byte)(ioamExport.isDisable()?1:0);
+        } else {
+            request.isDisable = (byte)(ioamExport.isDisable() ? 1 : 0);
+        }
         request.srcAddress = ipv4AddressNoZoneToArray(ioamExport.getSourceAddress().getValue());
         request.collectorAddress = ipv4AddressNoZoneToArray(ioamExport.getCollectorAddress().getValue());
         return getReplyForCreate(getFutureJVppIoamexport()
index 7df956e..19b1069 100644 (file)
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package io.fd.hc2vpp.vppioam.impl.config;
 
 
@@ -114,8 +115,9 @@ public class IoamPotWriterCustomizer extends FutureJVppIoampotCustomizer impleme
         LOG.info("POT profile deleted iid={}, added {}", id, dataBefore);
     }
 
-    private void addPotProfile(PotProfileSet potProfileSet, InstanceIdentifier<PotProfileSet> id) throws WriteFailedException{
-        for(PotProfileList potProfileList:potProfileSet.getPotProfileList()) {
+    private void addPotProfile(PotProfileSet potProfileSet,
+            InstanceIdentifier<PotProfileSet> id) throws WriteFailedException {
+        for ( PotProfileList potProfileList : potProfileSet.getPotProfileList()) {
             writePotProfileList(potProfileList,potProfileSet.getName(),id);
         }
     }
@@ -123,18 +125,18 @@ public class IoamPotWriterCustomizer extends FutureJVppIoampotCustomizer impleme
     private PotProfileAddReply writePotProfileList(PotProfileList potProfileList, String name,
                                                    InstanceIdentifier<PotProfileSet> id) throws WriteFailedException{
         PotProfileAdd request = new PotProfileAdd();
-            request.id = potProfileList.getIndex().getValue().byteValue();
-            request.validator = (byte) (potProfileList.isValidator() ? 1 : 0);
-            request.secretShare = potProfileList.getSecretShare().longValue();
-            request.prime = potProfileList.getPrimeNumber().longValue();
-            request.secretKey = potProfileList.isValidator() ? potProfileList.getValidatorKey().longValue() : 0;
-            request.maxBits = potProfileList.getNumberOfBits().byteValue();
-            request.lpc = potProfileList.getLpc().longValue();
-            request.polynomialPublic = potProfileList.getPublicPolynomial().longValue();
-            request.listNameLen = (byte) name.getBytes(StandardCharsets.UTF_8).length;
-            request.listName = name.getBytes(StandardCharsets.UTF_8);
-
-            return getReplyForWrite(getFutureJVppIoampot().potProfileAdd(request).toCompletableFuture(), id);
+        request.id = potProfileList.getIndex().getValue().byteValue();
+        request.validator = (byte) (potProfileList.isValidator() ? 1 : 0);
+        request.secretShare = potProfileList.getSecretShare().longValue();
+        request.prime = potProfileList.getPrimeNumber().longValue();
+        request.secretKey = potProfileList.isValidator() ? potProfileList.getValidatorKey().longValue() : 0;
+        request.maxBits = potProfileList.getNumberOfBits().byteValue();
+        request.lpc = potProfileList.getLpc().longValue();
+        request.polynomialPublic = potProfileList.getPublicPolynomial().longValue();
+        request.listNameLen = (byte) name.getBytes(StandardCharsets.UTF_8).length;
+        request.listName = name.getBytes(StandardCharsets.UTF_8);
+
+        return getReplyForWrite(getFutureJVppIoampot().potProfileAdd(request).toCompletableFuture(), id);
     }
 
     private PotProfileDelReply delPotProfile(PotProfileSet potProfileSet, InstanceIdentifier<PotProfileSet> id)
index 1234794..a8478b9 100755 (executable)
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package io.fd.hc2vpp.vppioam.impl.config;
 
 import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
@@ -92,7 +93,7 @@ public class IoamTraceWriterCustomizer extends FutureJVppIoamtraceCustomizer
     }
 
     public TraceProfileAddReply addTraceConfig(TraceConfig traceConfig,
-                                               final InstanceIdentifier<TraceConfig> id) throws Exception {
+            final InstanceIdentifier<TraceConfig> id) throws Exception {
 
         TraceProfileAdd traceProfileAdd = new TraceProfileAdd();
         traceProfileAdd.traceType = traceConfig.getTraceType().byteValue(); //trace type
@@ -102,9 +103,9 @@ public class IoamTraceWriterCustomizer extends FutureJVppIoamtraceCustomizer
         traceProfileAdd.nodeId = traceConfig.getNodeId().intValue(); // nodeid
 
         /* Write to VPP */
-        final TraceProfileAddReply reply = getReplyForWrite((getFutureJVppIoamtrace().
-                                                            traceProfileAdd(traceProfileAdd).
-                                                            toCompletableFuture()), id);
+        final TraceProfileAddReply reply = getReplyForWrite((getFutureJVppIoamtrace()
+                                                            .traceProfileAdd(traceProfileAdd)
+                                                            .toCompletableFuture()), id);
         return reply;
     }
 
index ba105eb..5728327 100755 (executable)
@@ -38,19 +38,19 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 public class VppIoamWriterFactory implements WriterFactory {
 
     @Nonnull
-    private final FutureJVppIoamtrace jVppIoamtrace;
+    private final FutureJVppIoamtrace jVppIoamTrace;
     @Nonnull
-    private final FutureJVppIoampot jVppIoampot;
+    private final FutureJVppIoampot jVppIoamPot;
     @Nonnull
-    private final FutureJVppIoamexport jVppIoamexport;
+    private final FutureJVppIoamexport jVppIoamExport;
 
     @Inject
-    public VppIoamWriterFactory(@Nonnull final FutureJVppIoamtrace jVppIoamtrace,
-                                @Nonnull final FutureJVppIoampot jVppIoampot,
-                                @Nonnull final FutureJVppIoamexport jVppIoamexport) {
-        this.jVppIoamtrace = jVppIoamtrace;
-        this.jVppIoampot = jVppIoampot;
-        this.jVppIoamexport = jVppIoamexport;
+    public VppIoamWriterFactory(@Nonnull final FutureJVppIoamtrace jVppIoamTrace,
+                                @Nonnull final FutureJVppIoampot jVppIoamPot,
+                                @Nonnull final FutureJVppIoamexport jVppIoamExport) {
+        this.jVppIoamTrace = jVppIoamTrace;
+        this.jVppIoamPot = jVppIoamPot;
+        this.jVppIoamExport = jVppIoamExport;
     }
 
     @Override
@@ -60,17 +60,17 @@ public class VppIoamWriterFactory implements WriterFactory {
                 InstanceIdentifier.create(IoamTraceConfig.class).child(TraceConfig.class);
         registry.subtreeAdd(Sets.newHashSet(InstanceIdentifier.create(TraceConfig.class)
                         .child(NodeInterfaces.class)),
-                new GenericListWriter<>(trId, new IoamTraceWriterCustomizer(jVppIoamtrace)));
+                new GenericListWriter<>(trId, new IoamTraceWriterCustomizer(jVppIoamTrace)));
         // POT Config
         final InstanceIdentifier<PotProfileSet> potId =
                 InstanceIdentifier.create(PotProfiles.class).child(PotProfileSet.class);
         registry.subtreeAdd(Sets.newHashSet(InstanceIdentifier.create(PotProfileSet.class)
                         .child(PotProfileList.class)),
-                new GenericListWriter<>(potId, new IoamPotWriterCustomizer(jVppIoampot)));
+                new GenericListWriter<>(potId, new IoamPotWriterCustomizer(jVppIoamPot)));
         //Export Config
         final InstanceIdentifier<IoamExport> exportId =
                 InstanceIdentifier.create(IoamExport.class);
-        registry.add(new GenericWriter<>(exportId,new IoamExportWriterCustomizer(jVppIoamexport)));
+        registry.add(new GenericWriter<>(exportId,new IoamExportWriterCustomizer(jVppIoamExport)));
 
     }
 }
index 860fc07..f9d229a 100644 (file)
@@ -46,8 +46,8 @@ public class PotProfileReaderCustomizer extends FutureJVppIoampotCustomizer impl
 
     private static final Logger LOG = LoggerFactory.getLogger(PotProfileReaderCustomizer.class);
 
-    public PotProfileReaderCustomizer(FutureJVppIoampot futureJVppIoampot){
-        super(futureJVppIoampot);
+    public PotProfileReaderCustomizer(FutureJVppIoampot futureJVppIoamPot) {
+        super(futureJVppIoamPot);
     }
 
     @Nonnull
@@ -101,7 +101,7 @@ public class PotProfileReaderCustomizer extends FutureJVppIoampotCustomizer impl
 
         final PotProfileShowConfigDetails details = reply.potProfileShowConfigDetails.get(0);
 
-        builder.setValidator(details.validator==1);
+        builder.setValidator(details.validator == 1);
         builder.setValidatorKey(BigInteger.valueOf(details.secretKey));
         builder.setSecretShare(BigInteger.valueOf(details.secretShare));
         builder.setPrimeNumber(BigInteger.valueOf(details.prime));
@@ -110,13 +110,13 @@ public class PotProfileReaderCustomizer extends FutureJVppIoampotCustomizer impl
         builder.setLpc(BigInteger.valueOf(details.lpc));
         builder.setNumberOfBits(getMaxBitsfromBitmask(BigInteger.valueOf(details.bitMask)));
 
-        LOG.info("Item {} successfully read: {}",instanceIdentifier,builder.build());
+        LOG.info("Item {} successfully read: {}",instanceIdentifier, builder.build());
     }
 
-    private static short getMaxBitsfromBitmask (BigInteger bitmask){
+    private static short getMaxBitsfromBitmask (BigInteger bitmask) {
         short numOfBits = 0;
-        while ((bitmask.and(BigInteger.ONE)).equals(BigInteger.ONE)){
-            bitmask=bitmask.shiftRight(1);
+        while ((bitmask.and(BigInteger.ONE)).equals(BigInteger.ONE)) {
+            bitmask = bitmask.shiftRight(1);
             numOfBits++;
         }
         return numOfBits;
index dee207b..a6bb1ff 100644 (file)
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package io.fd.hc2vpp.vppioam.impl.oper;
 
 import com.google.common.collect.Lists;
@@ -50,7 +51,7 @@ public class TraceProfileReaderCustomizer extends FutureJVppIoamtraceCustomizer
     /**
      * Creates new builder that will be used to build read value.
      *
-     * @param id
+     * @param id Identifier
      */
     @Nonnull
     @Override
@@ -89,17 +90,18 @@ public class TraceProfileReaderCustomizer extends FutureJVppIoamtraceCustomizer
 
         LOG.debug("reading attribute for trace config {}",id);
         final TraceProfileShowConfig request = new TraceProfileShowConfig();
-        TraceProfileShowConfigReply reply = getReplyForRead(getFutureJVppIoamtrace().traceProfileShowConfig(request)
+        TraceProfileShowConfigReply reply = getReplyForRead (getFutureJVppIoamtrace().traceProfileShowConfig(request)
                 .toCompletableFuture(),id);
-        if(reply == null) {
+        if (reply == null) {
             LOG.debug("{} returned null as reply from vpp",id);
             return;
         }
 
-        if(reply.traceType == 0){
+        if (reply.traceType == 0) {
             LOG.debug("{} no configured trace config found",id);
             return;
         }
+
         builder.setNodeId((long) reply.nodeId);
         builder.setTraceAppData((long) reply.appData);
         builder.setTraceNumElt((short) reply.numElts);
@@ -112,8 +114,8 @@ public class TraceProfileReaderCustomizer extends FutureJVppIoamtraceCustomizer
     /**
      * Merge read data into provided parent builder.
      *
-     * @param parentBuilder
-     * @param readValue
+     * @param parentBuilder Parent Builder
+     * @param readValue Read Value
      */
     @Override
     public void merge(@Nonnull Builder<? extends DataObject> parentBuilder, @Nonnull TraceConfig readValue) {
@@ -123,6 +125,11 @@ public class TraceProfileReaderCustomizer extends FutureJVppIoamtraceCustomizer
         builder.setTraceConfig(traceConfigs);
     }
 
+    @Override
+    public void merge(@Nonnull final Builder<? extends DataObject> builder, @Nonnull final List<TraceConfig> list) {
+        ((IoamTraceConfigBuilder) builder).setTraceConfig(list);
+    }
+
     @Nonnull
     @Override
     public List<TraceConfigKey> getAllIds(@Nonnull final InstanceIdentifier<TraceConfig> instanceIdentifier,
@@ -133,9 +140,4 @@ public class TraceProfileReaderCustomizer extends FutureJVppIoamtraceCustomizer
 
         return Lists.newArrayList(new TraceConfigKey("trace config"));
     }
-
-    @Override
-    public void merge(@Nonnull final Builder<? extends DataObject> builder, @Nonnull final List<TraceConfig> list) {
-        ((IoamTraceConfigBuilder) builder).setTraceConfig(list);
-    }
 }
index ece73fa..1f6250f 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package io.fd.hc2vpp.vppioam.impl.oper;
 
 import io.fd.honeycomb.translate.impl.read.GenericInitListReader;
+import io.fd.honeycomb.translate.impl.read.GenericListReader;
 import io.fd.honeycomb.translate.read.ReaderFactory;
 import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
 import io.fd.vpp.jvpp.ioampot.future.FutureJVppIoampot;
@@ -27,33 +29,41 @@ import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.ioam.sb.pot
 import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.ioam.sb.pot.rev170112.PotProfilesBuilder;
 import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.ioam.sb.pot.rev170112.pot.profile.PotProfileList;
 import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.ioam.sb.pot.rev170112.pot.profiles.PotProfileSet;
+import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.ioam.sb.pot.rev170112.pot.profiles.PotProfileSetBuilder;
+import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.ioam.sb.pot.rev170112.pot.profiles.PotProfileSetKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 import javax.annotation.Nonnull;
 import javax.inject.Inject;
 
+import java.util.Arrays;
+import java.util.List;
+
 public class VppIoamReaderFactory implements ReaderFactory {
 
     @Nonnull
-    FutureJVppIoamtrace jVppIoamtrace;
+    FutureJVppIoamtrace jVppIoamTrace;
     @Nonnull
-    FutureJVppIoampot jVppIoampot;
+    FutureJVppIoampot jVppIoamPot;
 
     @Inject
-    VppIoamReaderFactory(FutureJVppIoamtrace jVppIoamtrace, FutureJVppIoampot jVppIoampot){
+    VppIoamReaderFactory(FutureJVppIoamtrace jVppIoamTrace, FutureJVppIoampot jVppIoamPot){
 
-        this.jVppIoamtrace = jVppIoamtrace;
-        this.jVppIoampot = jVppIoampot;
+        this.jVppIoamTrace = jVppIoamTrace;
+        this.jVppIoamPot = jVppIoamPot;
     }
 
     /**
      * Initialize 1 or more readers and add them to provided registry.
      *
-     * @param registry
+     * @param registry Registry
      */
     @Override
     public void init(@Nonnull ModifiableReaderRegistryBuilder registry) {
 
+        final PotProfileSetKey STATIC_INSTANCE_KEY = new PotProfileSetKey("static-pot-profile-instance");
+        final List<PotProfileSetKey> staticKeys = Arrays.asList(STATIC_INSTANCE_KEY);
+
         //IoamTraceConfig (Structural)
         final InstanceIdentifier<IoamTraceConfig> ioamTraceConfigId = InstanceIdentifier.create(IoamTraceConfig.class);
         registry.addStructuralReader(ioamTraceConfigId, IoamTraceConfigBuilder.class);
@@ -61,20 +71,23 @@ public class VppIoamReaderFactory implements ReaderFactory {
         //TraceConfig
         final InstanceIdentifier<TraceConfig> traceConfigId = ioamTraceConfigId.child(TraceConfig.class);
         registry.add(new GenericInitListReader<>(traceConfigId,
-                new TraceProfileReaderCustomizer(jVppIoamtrace)));
+                new TraceProfileReaderCustomizer(jVppIoamTrace)));
 
         //PotProfiles (Structural)
         final InstanceIdentifier<PotProfiles> potProfilesInstanceIdentifier = InstanceIdentifier.create(PotProfiles.class);
         registry.addStructuralReader(potProfilesInstanceIdentifier, PotProfilesBuilder.class);
+
         //PotProfileSet (Structural)
-         final InstanceIdentifier<PotProfileSet> potProfileSetInstanceIdentifier =
+        final InstanceIdentifier<PotProfileSet> potProfileSetInstanceIdentifier =
                 potProfilesInstanceIdentifier.child(PotProfileSet.class);
-        //TODO - temporary disabled till HC2VPP-63 is resolved
-        //registry.addStructuralReader(potProfileSetInstanceIdentifier, PotProfileSetBuilder.class);
+
+        registry.addStructuralListReader(potProfileSetInstanceIdentifier, PotProfileSetBuilder.class, staticKeys);
+
         //PotProfileList
-        final InstanceIdentifier<PotProfileList> potProfileListInstanceIdentifier= potProfileSetInstanceIdentifier.child(PotProfileList.class);
-        registry.add(new GenericInitListReader<>(potProfileListInstanceIdentifier,
-                new PotProfileReaderCustomizer(jVppIoampot)));
+        final InstanceIdentifier<PotProfileList> potProfileListInstanceIdentifier =
+                potProfileSetInstanceIdentifier.child(PotProfileList.class);
 
+        registry.add(new GenericInitListReader<>(potProfileListInstanceIdentifier,
+                new PotProfileReaderCustomizer(jVppIoamPot)));
     }
 }
index 65727a5..fa4c959 100644 (file)
@@ -47,7 +47,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 public class IoamPotWriterCustomizerTest extends WriterCustomizerTest {
 
     @Mock
-    protected FutureJVppIoampot jVppIoampot;
+    protected FutureJVppIoampot jVppIoamPot;
 
     private IoamPotWriterCustomizer customizer;
 
@@ -55,7 +55,7 @@ public class IoamPotWriterCustomizerTest extends WriterCustomizerTest {
 
     @Override
     public void setUpTest() throws Exception {
-        customizer = new IoamPotWriterCustomizer(jVppIoampot);
+        customizer = new IoamPotWriterCustomizer(jVppIoamPot);
     }
 
     private static PotProfileList generatePotProfileList() {
@@ -91,21 +91,21 @@ public class IoamPotWriterCustomizerTest extends WriterCustomizerTest {
     private void whenPotAddThenSuccess() {
         final PotProfileAddReply reply = new PotProfileAddReply();
         reply.context = 1;
-        doReturn(future(reply)).when(jVppIoampot).potProfileAdd(any(PotProfileAdd.class));
+        doReturn(future(reply)).when(jVppIoamPot).potProfileAdd(any(PotProfileAdd.class));
     }
 
     private void whenPotAddThenFailure() {
-        doReturn(failedFuture()).when(jVppIoampot).potProfileAdd(any(PotProfileAdd.class));
+        doReturn(failedFuture()).when(jVppIoamPot).potProfileAdd(any(PotProfileAdd.class));
     }
 
     private void whenPotDelThenSuccess() {
         final PotProfileDelReply reply = new PotProfileDelReply();
         reply.context = 1;
-        doReturn(future(reply)).when(jVppIoampot).potProfileDel(any(PotProfileDel.class));
+        doReturn(future(reply)).when(jVppIoamPot).potProfileDel(any(PotProfileDel.class));
     }
 
     private void whenPotDelThenFailure() {
-        doReturn(failedFuture()).when(jVppIoampot).potProfileDel(any(PotProfileDel.class));
+        doReturn(failedFuture()).when(jVppIoamPot).potProfileDel(any(PotProfileDel.class));
     }
 
     private static PotProfileAdd generatePotProfileAdd() {
@@ -141,7 +141,7 @@ public class IoamPotWriterCustomizerTest extends WriterCustomizerTest {
 
         customizer.writeCurrentAttributes(id, potProfileSet, writeContext);
 
-        verify(jVppIoampot).potProfileAdd(generatePotProfileAdd());
+        verify(jVppIoamPot).potProfileAdd(generatePotProfileAdd());
     }
 
     @Test
@@ -154,7 +154,7 @@ public class IoamPotWriterCustomizerTest extends WriterCustomizerTest {
         try {
             customizer.writeCurrentAttributes(id, potProfileSet, writeContext);
         } catch (WriteFailedException e) {
-            verify(jVppIoampot).potProfileAdd(generatePotProfileAdd());
+            verify(jVppIoamPot).potProfileAdd(generatePotProfileAdd());
 
             return;
         }
@@ -170,7 +170,7 @@ public class IoamPotWriterCustomizerTest extends WriterCustomizerTest {
 
         customizer.deleteCurrentAttributes(id, potProfileSet, writeContext);
 
-        verify(jVppIoampot).potProfileDel(generatePotProfileDel(POT_TEST_NAME));
+        verify(jVppIoamPot).potProfileDel(generatePotProfileDel(POT_TEST_NAME));
     }
 
     @Test
@@ -183,7 +183,7 @@ public class IoamPotWriterCustomizerTest extends WriterCustomizerTest {
         try {
             customizer.deleteCurrentAttributes(id, potProfileSet, writeContext);
         } catch (WriteFailedException e) {
-            verify(jVppIoampot).potProfileDel(generatePotProfileDel(POT_TEST_NAME));
+            verify(jVppIoamPot).potProfileDel(generatePotProfileDel(POT_TEST_NAME));
             return;
         }
         fail("WriteFailedException.DeleteFailedException was expected");
index 779ec19..80e71f6 100644 (file)
@@ -45,19 +45,19 @@ public class PotProfileReaderCustomizerTest extends ListReaderCustomizerTest<Pot
         PotProfileListBuilder>{
 
     @Mock
-    FutureJVppIoampot jVppIoampot;
+    FutureJVppIoampot jVppIoamPot;
 
-    public PotProfileReaderCustomizerTest(){
+    public PotProfileReaderCustomizerTest() {
         super(PotProfileList.class, PotProfileSetBuilder.class);
     }
 
     @Override
     protected ReaderCustomizer<PotProfileList, PotProfileListBuilder> initCustomizer() {
-        return new PotProfileReaderCustomizer(jVppIoampot);
+        return new PotProfileReaderCustomizer(jVppIoamPot);
     }
 
     @Override
-    public void setUp(){
+    public void setUp() {
         final PotProfileShowConfigDetailsReplyDump replyDump = new PotProfileShowConfigDetailsReplyDump();
         final PotProfileShowConfigDetails replyDetails = new PotProfileShowConfigDetails();
         replyDetails.bitMask = (long)0xF;
@@ -69,7 +69,7 @@ public class PotProfileReaderCustomizerTest extends ListReaderCustomizerTest<Pot
         replyDetails.secretShare = 1234;
         replyDetails.validator = 1;
         replyDump.potProfileShowConfigDetails = Lists.newArrayList(replyDetails);
-        doReturn(future(replyDump)).when(jVppIoampot).potProfileShowConfigDump(any(PotProfileShowConfigDump.class));
+        doReturn(future(replyDump)).when(jVppIoamPot).potProfileShowConfigDump(any(PotProfileShowConfigDump.class));
     }
 
     private InstanceIdentifier<PotProfileList> getPotProfileListId(int id){
diff --git a/pom.xml b/pom.xml
index 6b4443a..940257b 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -36,8 +36,7 @@
   <modules>
     <module>vpp-common</module>
     <module>v3po</module>
-    <!-- TODO temporary disabled till HC2VPP-63 is resolved -->
-    <!--<module>ioam</module>-->
+    <module>ioam</module>
     <module>nsh</module>
     <module>routing</module>
     <module>nat</module>
@@ -48,4 +47,4 @@
     <module>dhcp</module>
     <module>samples</module>
   </modules>
-</project>
\ No newline at end of file
+</project>