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
commit9cf136674a8003ed225803971903acdf203dd655 (patch)
tree954462afdf5cbaa2b1dfd059f0067d53929f2747 /v3po/v3po2vpp/src/main
parent11395c60f5c204a6c050c5d90c902c4fc5940537 (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()));