summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/main
diff options
context:
space:
mode:
authorMaros Marsalek <mmarsale@cisco.com>2016-05-11 14:29:27 +0200
committerMaros Marsalek <mmarsale@cisco.com>2016-05-13 06:59:38 +0000
commit7ebd4ac29fb72b80af0b481f8ea604085ded1bc8 (patch)
treed320d3f41668d42cbb9ee118952a21a802a19ca0 /v3po/v3po2vpp/src/main
parentc6e09d4309ede503d7947fb817691d9e391a8794 (diff)
HONEYCOMB-37: Add unit test for Vxlan tunnel state customizer
Change-Id: I8a3499233c2d200b0bb0c1e2534ea1dfdbb5f12c Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/main')
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VxlanCustomizer.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VxlanCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VxlanCustomizer.java
index 2034a0301..6244a20d3 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VxlanCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VxlanCustomizer.java
@@ -91,12 +91,15 @@ public class VxlanCustomizer extends FutureJVppCustomizer implements ChildWriter
try {
deleteVxlanTunnel(id.firstKeyOf(Interface.class).getName(), dataBefore);
} catch (VppApiInvocationException e) {
- LOG.warn("Delete of Vxlan failed", e);
+ LOG.warn("Delete of Vxlan tunnel failed", e);
throw new WriteFailedException.DeleteFailedException(id, e);
}
}
private void createVxlanTunnel(final String swIfName, final Vxlan vxlan) throws VppApiInvocationException {
+ // TODO check that the type of interface is vxlan-tunnel (it is expressed in YANG, but not validated on DataTree level)
+ // DO the same for other interface aguments/types
+
final byte isIpv6 = (byte) (isIpv6(vxlan) ? 1 : 0);
final InetAddress srcAddress = InetAddresses.forString(getAddressString(vxlan.getSrc()));
final InetAddress dstAddress = InetAddresses.forString(getAddressString(vxlan.getDst()));