summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ProxyArpCustomizer.java
diff options
context:
space:
mode:
authorJan Srnicek <jsrnicek@cisco.com>2016-09-23 16:39:09 +0200
committerJan Srnicek <jsrnicek@cisco.com>2016-09-23 16:41:57 +0200
commita7147d16c31d9028c6b5dc557264433de0f11c91 (patch)
tree15816600ab3dfa5eea706ef1b1910b2e13ae66d7 /v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ProxyArpCustomizer.java
parente7a0775b21c2ea6b7bb8efb63b5384df26e27fbb (diff)
HONEYCOMB-145 - Utility Class Refactoring
problematic mockito-all changed to mockito-core( https://github.com/mockito/mockito/issues/324) Translate Utils Splitted to multiple Trait Interfaces Ipv4Translator - Logic for translation of ipv4-based data Ipv6Translator - Logic for translation of ipv6-based data MacTranslator - Logic for translation of mac-based data AddressTranslator - Aggregation trait for Ipv4/Ipv6/Mac JvppReplyConsumer - Logic for extracting replies from jvpp calls ByteDataTranslator - any byte-based conversions Plus some existing utility classes changed to traits Change-Id: I342b625954223966802e65dca0fabf8456c89345 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ProxyArpCustomizer.java')
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ProxyArpCustomizer.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ProxyArpCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ProxyArpCustomizer.java
index 18100e218..002cc4c77 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ProxyArpCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/ProxyArpCustomizer.java
@@ -19,8 +19,8 @@ package io.fd.honeycomb.translate.v3po.interfaces;
import com.google.common.net.InetAddresses;
import io.fd.honeycomb.translate.spi.write.WriterCustomizer;
import io.fd.honeycomb.translate.v3po.util.FutureJVppCustomizer;
+import io.fd.honeycomb.translate.v3po.util.JvppReplyConsumer;
import io.fd.honeycomb.translate.v3po.util.NamingContext;
-import io.fd.honeycomb.translate.v3po.util.TranslateUtils;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
import java.net.InetAddress;
@@ -31,14 +31,14 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.ProxyArp;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.openvpp.jvpp.VppBaseCallException;
-import org.openvpp.jvpp.core.future.FutureJVppCore;
import org.openvpp.jvpp.core.dto.ProxyArpAddDel;
import org.openvpp.jvpp.core.dto.ProxyArpAddDelReply;
+import org.openvpp.jvpp.core.future.FutureJVppCore;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class ProxyArpCustomizer extends FutureJVppCustomizer implements WriterCustomizer<ProxyArp> {
+public class ProxyArpCustomizer extends FutureJVppCustomizer implements WriterCustomizer<ProxyArp>, JvppReplyConsumer {
private static final Logger LOG = LoggerFactory.getLogger(ProxyArpCustomizer.class);
private final NamingContext interfaceContext;
@@ -49,7 +49,8 @@ public class ProxyArpCustomizer extends FutureJVppCustomizer implements WriterCu
}
@Override
- public void writeCurrentAttributes(@Nonnull InstanceIdentifier<ProxyArp> id, @Nonnull ProxyArp dataAfter, @Nonnull WriteContext writeContext) throws WriteFailedException {
+ public void writeCurrentAttributes(@Nonnull InstanceIdentifier<ProxyArp> id, @Nonnull ProxyArp dataAfter,
+ @Nonnull WriteContext writeContext) throws WriteFailedException {
final String swIfName = id.firstKeyOf(Interface.class).getName();
try {
@@ -93,7 +94,7 @@ public class ProxyArpCustomizer extends FutureJVppCustomizer implements WriterCu
dstAddress.getAddress(), vrfId));
final ProxyArpAddDelReply reply =
- TranslateUtils.getReplyForWrite(proxyArpAddDelReplyCompletionStage.toCompletableFuture(), id);
+ getReplyForWrite(proxyArpAddDelReplyCompletionStage.toCompletableFuture(), id);
LOG.debug("Proxy ARP setting applied, with reply context:", reply.context);
}