summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2018-07-03 12:44:55 +0200
committerMarek Gradzki <mgradzki@cisco.com>2018-07-04 10:57:08 +0000
commitb6ead1d5525b5b1500729959acbce905bbcbf04a (patch)
treec951b431c5d2ddaf4f6965e54560645b3dd6d63d
parent0461747b7d4e2c395a04501cddfa492c4f75ef7c (diff)
HC2VPP-275: use ip-address-no-zone in v3po YANG model
The inet:ip-address type was used in HC models due to ODL bug: https://bugs.opendaylight.org/show_bug.cgi?id=6413 which was fixed long time ago... Change-Id: Icaa8ac1269c730243afba53bc663f39f7c90f36c Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
-rw-r--r--v3po/api/src/main/yang/v3po@2018-07-03.yang22
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizer.java16
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizer.java16
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizer.java16
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/GreCustomizer.java10
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanCustomizer.java10
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanGpeCustomizer.java10
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizer.java4
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizerTest.java12
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizerTest.java12
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizerTest.java12
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/GreCustomizerTest.java12
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanCustomizerTest.java12
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanGpeCustomizerTest.java12
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizerTest.java14
15 files changed, 95 insertions, 95 deletions
diff --git a/v3po/api/src/main/yang/v3po@2018-07-03.yang b/v3po/api/src/main/yang/v3po@2018-07-03.yang
index 38b6c9656..bee9384cd 100644
--- a/v3po/api/src/main/yang/v3po@2018-07-03.yang
+++ b/v3po/api/src/main/yang/v3po@2018-07-03.yang
@@ -51,9 +51,10 @@ module v3po {
revision "2018-07-03" {
description
"Revision changes:
- - support for af-packet interface
- - uses references to fib-management module insted of uint32 identifiers
- - various fixes";
+ - adds support for af-packet interface
+ - uses references to fib-management module instead of uint32 identifiers
+ - changes type of IP addresses from inet:ip-address to inet:ip-address-no-zone
+ - fixes some minor issues";
}
revision "2017-06-07" {
@@ -253,8 +254,7 @@ module v3po {
list arp-termination-table-entry {
key "ip-address phys-address";
leaf ip-address {
- // FIXME: change to ip-address-no-zone after https://bugs.opendaylight.org/show_bug.cgi?id=6413 is resolved
- type inet:ip-address;
+ type inet:ip-address-no-zone;
}
leaf phys-address {
type yang:phys-address;
@@ -452,11 +452,11 @@ module v3po {
// FIXME: this should be in an vxlan-specific extension
leaf src {
/*mandatory true;*/
- type inet:ip-address;
+ type inet:ip-address-no-zone;
}
leaf dst {
/*mandatory true;*/
- type inet:ip-address;
+ type inet:ip-address-no-zone;
}
leaf vni {
/*mandatory true;*/
@@ -475,11 +475,11 @@ module v3po {
grouping gre-base-attributes {
leaf src {
/*mandatory true;*/
- type inet:ip-address;
+ type inet:ip-address-no-zone;
}
leaf dst {
/*mandatory true;*/
- type inet:ip-address;
+ type inet:ip-address-no-zone;
}
leaf outer-fib-id {
type uint32;
@@ -489,11 +489,11 @@ module v3po {
grouping vxlan-gpe-base-attributes {
leaf local {
/*mandatory true;*/
- type inet:ip-address;
+ type inet:ip-address-no-zone;
}
leaf remote {
/*mandatory true;*/
- type inet:ip-address;
+ type inet:ip-address-no-zone;
}
leaf vni {
/*mandatory true;*/
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizer.java
index 75df9a1b4..2f6d4a51c 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizer.java
@@ -30,7 +30,7 @@ import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.net.InetAddress;
import java.util.concurrent.CompletionStage;
import javax.annotation.Nonnull;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfaceType;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev180703.GreTunnel;
@@ -118,21 +118,21 @@ public class GreCustomizer extends AbstractInterfaceTypeCustomizer<Gre> implemen
}
private boolean isIpv6(final Gre gre) {
- if (gre.getSrc().getIpv4Address() == null) {
- checkArgument(gre.getDst().getIpv4Address() == null, "Inconsistent ip addresses: %s, %s", gre.getSrc(),
+ if (gre.getSrc().getIpv4AddressNoZone() == null) {
+ checkArgument(gre.getDst().getIpv4AddressNoZone() == null, "Inconsistent ip addresses: %s, %s", gre.getSrc(),
gre.getDst());
return true;
} else {
- checkArgument(gre.getDst().getIpv6Address() == null, "Inconsistent ip addresses: %s, %s", gre.getSrc(),
+ checkArgument(gre.getDst().getIpv6AddressNoZone() == null, "Inconsistent ip addresses: %s, %s", gre.getSrc(),
gre.getDst());
return false;
}
}
- private String getAddressString(final IpAddress addr) {
- return addr.getIpv4Address() == null
- ? addr.getIpv6Address().getValue()
- : addr.getIpv4Address().getValue();
+ private String getAddressString(final IpAddressNoZone addr) {
+ return addr.getIpv4AddressNoZone() == null
+ ? addr.getIpv6AddressNoZone().getValue()
+ : addr.getIpv4AddressNoZone().getValue();
}
private void deleteGreTunnel(final InstanceIdentifier<Gre> id, final String swIfName, final Gre gre,
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizer.java
index 98b5250e7..b0387d1b6 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizer.java
@@ -31,7 +31,7 @@ import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.net.InetAddress;
import java.util.concurrent.CompletionStage;
import javax.annotation.Nonnull;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfaceType;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev180703.L2Input;
@@ -134,21 +134,21 @@ public class VxlanCustomizer extends AbstractInterfaceTypeCustomizer<Vxlan> impl
}
private boolean isIpv6(final Vxlan vxlan) {
- if (vxlan.getSrc().getIpv4Address() == null) {
- checkArgument(vxlan.getDst().getIpv4Address() == null, "Inconsistent ip addresses: %s, %s", vxlan.getSrc(),
+ if (vxlan.getSrc().getIpv4AddressNoZone() == null) {
+ checkArgument(vxlan.getDst().getIpv4AddressNoZone() == null, "Inconsistent ip addresses: %s, %s", vxlan.getSrc(),
vxlan.getDst());
return true;
} else {
- checkArgument(vxlan.getDst().getIpv6Address() == null, "Inconsistent ip addresses: %s, %s", vxlan.getSrc(),
+ checkArgument(vxlan.getDst().getIpv6AddressNoZone() == null, "Inconsistent ip addresses: %s, %s", vxlan.getSrc(),
vxlan.getDst());
return false;
}
}
- private String getAddressString(final IpAddress addr) {
- return addr.getIpv4Address() == null
- ? addr.getIpv6Address().getValue()
- : addr.getIpv4Address().getValue();
+ private String getAddressString(final IpAddressNoZone addr) {
+ return addr.getIpv4AddressNoZone() == null
+ ? addr.getIpv6AddressNoZone().getValue()
+ : addr.getIpv4AddressNoZone().getValue();
}
private void deleteVxlanTunnel(final InstanceIdentifier<Vxlan> id, final String swIfName, final Vxlan vxlan,
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizer.java
index fb9b50abc..ac21c4dbd 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizer.java
@@ -31,7 +31,7 @@ import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.net.InetAddress;
import java.util.concurrent.CompletionStage;
import javax.annotation.Nonnull;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfaceType;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev180703.VxlanGpeTunnel;
@@ -118,23 +118,23 @@ public class VxlanGpeCustomizer extends AbstractInterfaceTypeCustomizer<VxlanGpe
}
private boolean isIpv6(final VxlanGpe vxlanGpe) {
- if (vxlanGpe.getLocal().getIpv4Address() == null) {
- checkArgument(vxlanGpe.getRemote().getIpv4Address() == null, "Inconsistent ip addresses: %s, %s",
+ if (vxlanGpe.getLocal().getIpv4AddressNoZone() == null) {
+ checkArgument(vxlanGpe.getRemote().getIpv4AddressNoZone() == null, "Inconsistent ip addresses: %s, %s",
vxlanGpe.getLocal(),
vxlanGpe.getRemote());
return true;
} else {
- checkArgument(vxlanGpe.getRemote().getIpv6Address() == null, "Inconsistent ip addresses: %s, %s",
+ checkArgument(vxlanGpe.getRemote().getIpv6AddressNoZone() == null, "Inconsistent ip addresses: %s, %s",
vxlanGpe.getLocal(),
vxlanGpe.getRemote());
return false;
}
}
- private String getAddressString(final IpAddress addr) {
- return addr.getIpv4Address() == null
- ? addr.getIpv6Address().getValue()
- : addr.getIpv4Address().getValue();
+ private String getAddressString(final IpAddressNoZone addr) {
+ return addr.getIpv4AddressNoZone() == null
+ ? addr.getIpv6AddressNoZone().getValue()
+ : addr.getIpv4AddressNoZone().getValue();
}
private void deleteVxlanGpeTunnel(final InstanceIdentifier<VxlanGpe> id, final String swIfName,
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/GreCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/GreCustomizer.java
index 9da185b3f..737b4c5db 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/GreCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/GreCustomizer.java
@@ -34,7 +34,7 @@ import io.fd.vpp.jvpp.core.dto.GreTunnelDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.util.concurrent.CompletionStage;
import javax.annotation.Nonnull;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev180703.GreTunnel;
@@ -113,11 +113,11 @@ public class GreCustomizer extends FutureJVppCustomizer
final GreTunnelDetails swInterfaceGreDetails = reply.greTunnelDetails.get(0);
if (swInterfaceGreDetails.isIpv6 == 1) {
- builder.setDst(new IpAddress(arrayToIpv6AddressNoZone(swInterfaceGreDetails.dstAddress)));
- builder.setSrc(new IpAddress(arrayToIpv6AddressNoZone(swInterfaceGreDetails.srcAddress)));
+ builder.setDst(new IpAddressNoZone(arrayToIpv6AddressNoZone(swInterfaceGreDetails.dstAddress)));
+ builder.setSrc(new IpAddressNoZone(arrayToIpv6AddressNoZone(swInterfaceGreDetails.srcAddress)));
} else {
- builder.setDst(new IpAddress(arrayToIpv4AddressNoZone(swInterfaceGreDetails.dstAddress)));
- builder.setSrc(new IpAddress(arrayToIpv4AddressNoZone(swInterfaceGreDetails.srcAddress)));
+ builder.setDst(new IpAddressNoZone(arrayToIpv4AddressNoZone(swInterfaceGreDetails.dstAddress)));
+ builder.setSrc(new IpAddressNoZone(arrayToIpv4AddressNoZone(swInterfaceGreDetails.srcAddress)));
}
builder.setOuterFibId((long) swInterfaceGreDetails.outerFibId);
LOG.debug("Gre tunnel: {}, id: {} attributes read as: {}", key.getName(), index, builder);
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanCustomizer.java
index 38497a122..22448ac41 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanCustomizer.java
@@ -36,7 +36,7 @@ import io.fd.vpp.jvpp.core.dto.VxlanTunnelDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.util.concurrent.CompletionStage;
import javax.annotation.Nonnull;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev180703.L2Input;
@@ -119,11 +119,11 @@ public class VxlanCustomizer extends FutureJVppCustomizer
final VxlanTunnelDetails swInterfaceVxlanDetails = reply.vxlanTunnelDetails.get(0);
if (swInterfaceVxlanDetails.isIpv6 == 1) {
- builder.setDst(new IpAddress(arrayToIpv6AddressNoZone(swInterfaceVxlanDetails.dstAddress)));
- builder.setSrc(new IpAddress(arrayToIpv6AddressNoZone(swInterfaceVxlanDetails.srcAddress)));
+ builder.setDst(new IpAddressNoZone(arrayToIpv6AddressNoZone(swInterfaceVxlanDetails.dstAddress)));
+ builder.setSrc(new IpAddressNoZone(arrayToIpv6AddressNoZone(swInterfaceVxlanDetails.srcAddress)));
} else {
- builder.setDst(new IpAddress(arrayToIpv4AddressNoZone(swInterfaceVxlanDetails.dstAddress)));
- builder.setSrc(new IpAddress(arrayToIpv4AddressNoZone(swInterfaceVxlanDetails.srcAddress)));
+ builder.setDst(new IpAddressNoZone(arrayToIpv4AddressNoZone(swInterfaceVxlanDetails.dstAddress)));
+ builder.setSrc(new IpAddressNoZone(arrayToIpv4AddressNoZone(swInterfaceVxlanDetails.srcAddress)));
}
builder.setEncapVrfId(new VniReference(UnsignedInts.toLong(swInterfaceVxlanDetails.encapVrfId)));
builder.setVni(new VxlanVni(UnsignedInts.toLong(swInterfaceVxlanDetails.vni)));
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanGpeCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanGpeCustomizer.java
index 3bdfc87b3..448087fa2 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanGpeCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanGpeCustomizer.java
@@ -35,7 +35,7 @@ import io.fd.vpp.jvpp.core.dto.VxlanGpeTunnelDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.util.concurrent.CompletionStage;
import javax.annotation.Nonnull;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev180703.VppInterfaceAugmentation;
@@ -118,11 +118,11 @@ public class VxlanGpeCustomizer extends FutureJVppCustomizer
final VxlanGpeTunnelDetails swInterfaceVxlanGpeDetails = reply.vxlanGpeTunnelDetails.get(0);
if (swInterfaceVxlanGpeDetails.isIpv6 == 1) {
- builder.setRemote(new IpAddress(arrayToIpv6AddressNoZone(swInterfaceVxlanGpeDetails.remote)));
- builder.setLocal(new IpAddress(arrayToIpv6AddressNoZone(swInterfaceVxlanGpeDetails.local)));
+ builder.setRemote(new IpAddressNoZone(arrayToIpv6AddressNoZone(swInterfaceVxlanGpeDetails.remote)));
+ builder.setLocal(new IpAddressNoZone(arrayToIpv6AddressNoZone(swInterfaceVxlanGpeDetails.local)));
} else {
- builder.setRemote(new IpAddress(arrayToIpv4AddressNoZone(swInterfaceVxlanGpeDetails.remote)));
- builder.setLocal(new IpAddress(arrayToIpv4AddressNoZone(swInterfaceVxlanGpeDetails.local)));
+ builder.setRemote(new IpAddressNoZone(arrayToIpv4AddressNoZone(swInterfaceVxlanGpeDetails.remote)));
+ builder.setLocal(new IpAddressNoZone(arrayToIpv4AddressNoZone(swInterfaceVxlanGpeDetails.local)));
}
builder.setVni(new VxlanGpeVni((long) swInterfaceVxlanGpeDetails.vni));
builder.setNextProtocol(VxlanGpeNextProtocol.forValue(swInterfaceVxlanGpeDetails.protocol));
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizer.java
index 4dc31335b..930fe3ec9 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizer.java
@@ -30,7 +30,7 @@ import io.fd.vpp.jvpp.core.dto.BdIpMacAddDelReply;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import java.util.concurrent.CompletionStage;
import javax.annotation.Nonnull;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev180703.bridge.domain.attributes.arp.termination.table.ArpTerminationTableEntry;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev180703.bridge.domain.attributes.arp.termination.table.ArpTerminationTableEntryKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev180703.bridge.domains.BridgeDomain;
@@ -96,7 +96,7 @@ public class ArpTerminationTableEntryCustomizer extends FutureJVppCustomizer
request.isAdd = booleanToByte(isAdd);
request.macAddress = parseMac(entry.getPhysAddress().getValue());
- final IpAddress ipAddress = entry.getIpAddress();
+ final IpAddressNoZone ipAddress = entry.getIpAddress();
request.ipAddress = ipAddressToArray(ipAddress);
request.isIpv6 = booleanToByte(isIpv6(ipAddress));
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizerTest.java
index 824f32392..68f266d52 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizerTest.java
@@ -36,8 +36,8 @@ import io.fd.vpp.jvpp.core.dto.GreAddDelTunnel;
import io.fd.vpp.jvpp.core.dto.GreAddDelTunnelReply;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey;
@@ -59,8 +59,8 @@ public class GreCustomizerTest extends WriterCustomizerTest {
private static Gre generateGre() {
final GreBuilder builder = new GreBuilder();
- builder.setSrc(new IpAddress(new Ipv4Address("192.168.20.10")));
- builder.setDst(new IpAddress(new Ipv4Address("192.168.20.11")));
+ builder.setSrc(new IpAddressNoZone(new Ipv4AddressNoZone("192.168.20.10")));
+ builder.setDst(new IpAddressNoZone(new Ipv4AddressNoZone("192.168.20.11")));
builder.setOuterFibId(Long.valueOf(123));
return builder.build();
}
@@ -87,9 +87,9 @@ public class GreCustomizerTest extends WriterCustomizerTest {
verify(api).greAddDelTunnel(argumentCaptor.capture());
final GreAddDelTunnel actual = argumentCaptor.getValue();
assertEquals(0, actual.isIpv6);
- assertArrayEquals(InetAddresses.forString(gre.getSrc().getIpv4Address().getValue()).getAddress(),
+ assertArrayEquals(InetAddresses.forString(gre.getSrc().getIpv4AddressNoZone().getValue()).getAddress(),
actual.srcAddress);
- assertArrayEquals(InetAddresses.forString(gre.getDst().getIpv4Address().getValue()).getAddress(),
+ assertArrayEquals(InetAddresses.forString(gre.getDst().getIpv4AddressNoZone().getValue()).getAddress(),
actual.dstAddress);
assertEquals(gre.getOuterFibId().intValue(), actual.outerFibId);
return actual;
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizerTest.java
index 404f25e02..5e758c4d4 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizerTest.java
@@ -39,8 +39,8 @@ import io.fd.vpp.jvpp.core.dto.VxlanAddDelTunnelReply;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey;
@@ -66,8 +66,8 @@ public class VxlanCustomizerTest extends WriterCustomizerTest {
private static Vxlan generateVxlan(long vni) {
final VxlanBuilder builder = new VxlanBuilder();
- builder.setSrc(new IpAddress(new Ipv4Address("192.168.20.10")));
- builder.setDst(new IpAddress(new Ipv4Address("192.168.20.11")));
+ builder.setSrc(new IpAddressNoZone(new Ipv4AddressNoZone("192.168.20.10")));
+ builder.setDst(new IpAddressNoZone(new Ipv4AddressNoZone("192.168.20.11")));
builder.setEncapVrfId(new VniReference(123L));
builder.setVni(new VxlanVni(Long.valueOf(vni)));
builder.setDecapNext(L2Input.class);
@@ -105,9 +105,9 @@ public class VxlanCustomizerTest extends WriterCustomizerTest {
final VxlanAddDelTunnel actual = argumentCaptor.getValue();
assertEquals(0, actual.isIpv6);
assertEquals(1, actual.decapNextIndex);
- assertArrayEquals(InetAddresses.forString(vxlan.getSrc().getIpv4Address().getValue()).getAddress(),
+ assertArrayEquals(InetAddresses.forString(vxlan.getSrc().getIpv4AddressNoZone().getValue()).getAddress(),
actual.srcAddress);
- assertArrayEquals(InetAddresses.forString(vxlan.getDst().getIpv4Address().getValue()).getAddress(),
+ assertArrayEquals(InetAddresses.forString(vxlan.getDst().getIpv4AddressNoZone().getValue()).getAddress(),
actual.dstAddress);
assertEquals(vxlan.getEncapVrfId().getValue().intValue(), actual.encapVrfId);
assertEquals(vxlan.getVni().getValue().intValue(), actual.vni);
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizerTest.java
index bca838f2e..7d282c09c 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizerTest.java
@@ -38,8 +38,8 @@ import io.fd.vpp.jvpp.core.dto.VxlanGpeAddDelTunnelReply;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey;
@@ -64,8 +64,8 @@ public class VxlanGpeCustomizerTest extends WriterCustomizerTest {
private static VxlanGpe generateVxlanGpe(long vni) {
final VxlanGpeBuilder builder = new VxlanGpeBuilder();
- builder.setLocal(new IpAddress(new Ipv4Address("192.168.20.10")));
- builder.setRemote(new IpAddress(new Ipv4Address("192.168.20.11")));
+ builder.setLocal(new IpAddressNoZone(new Ipv4AddressNoZone("192.168.20.10")));
+ builder.setRemote(new IpAddressNoZone(new Ipv4AddressNoZone("192.168.20.11")));
builder.setVni(new VxlanGpeVni(Long.valueOf(vni)));
builder.setNextProtocol(VxlanGpeNextProtocol.forValue(1));
builder.setEncapVrfId(Long.valueOf(123));
@@ -104,9 +104,9 @@ public class VxlanGpeCustomizerTest extends WriterCustomizerTest {
verify(api).vxlanGpeAddDelTunnel(argumentCaptor.capture());
final VxlanGpeAddDelTunnel actual = argumentCaptor.getValue();
assertEquals(0, actual.isIpv6);
- assertArrayEquals(InetAddresses.forString(vxlanGpe.getLocal().getIpv4Address().getValue()).getAddress(),
+ assertArrayEquals(InetAddresses.forString(vxlanGpe.getLocal().getIpv4AddressNoZone().getValue()).getAddress(),
actual.local);
- assertArrayEquals(InetAddresses.forString(vxlanGpe.getRemote().getIpv4Address().getValue()).getAddress(),
+ assertArrayEquals(InetAddresses.forString(vxlanGpe.getRemote().getIpv4AddressNoZone().getValue()).getAddress(),
actual.remote);
assertEquals(vxlanGpe.getVni().getValue().intValue(), actual.vni);
assertEquals(vxlanGpe.getNextProtocol().getIntValue(), actual.protocol);
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/GreCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/GreCustomizerTest.java
index 266e0c6af..686126247 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/GreCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/GreCustomizerTest.java
@@ -95,13 +95,13 @@ public class GreCustomizerTest extends ReaderCustomizerTest<Gre, GreBuilder> {
assertEquals(55, builder.getOuterFibId().intValue());
- assertNull(builder.getSrc().getIpv6Address());
- assertNotNull(builder.getSrc().getIpv4Address());
- assertEquals("1.2.3.5", builder.getSrc().getIpv4Address().getValue());
+ assertNull(builder.getSrc().getIpv6AddressNoZone());
+ assertNotNull(builder.getSrc().getIpv4AddressNoZone());
+ assertEquals("1.2.3.5", builder.getSrc().getIpv4AddressNoZone().getValue());
- assertNull(builder.getDst().getIpv6Address());
- assertNotNull(builder.getDst().getIpv4Address());
- assertEquals("1.2.3.4", builder.getDst().getIpv4Address().getValue());
+ assertNull(builder.getDst().getIpv6AddressNoZone());
+ assertNotNull(builder.getDst().getIpv4AddressNoZone());
+ assertEquals("1.2.3.4", builder.getDst().getIpv4AddressNoZone().getValue());
verify(api).greTunnelDump(any(GreTunnelDump.class));
}
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanCustomizerTest.java
index 273fa3298..6ce09132b 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanCustomizerTest.java
@@ -88,13 +88,13 @@ public class VxlanCustomizerTest extends ReaderCustomizerTest<Vxlan, VxlanBuilde
assertEquals(55, builder.getEncapVrfId().getValue().intValue());
assertEquals(L2Input.class, builder.getDecapNext());
- assertNull(builder.getSrc().getIpv6Address());
- assertNotNull(builder.getSrc().getIpv4Address());
- assertEquals("1.2.3.5", builder.getSrc().getIpv4Address().getValue());
+ assertNull(builder.getSrc().getIpv6AddressNoZone());
+ assertNotNull(builder.getSrc().getIpv4AddressNoZone());
+ assertEquals("1.2.3.5", builder.getSrc().getIpv4AddressNoZone().getValue());
- assertNull(builder.getDst().getIpv6Address());
- assertNotNull(builder.getDst().getIpv4Address());
- assertEquals("1.2.3.4", builder.getDst().getIpv4Address().getValue());
+ assertNull(builder.getDst().getIpv6AddressNoZone());
+ assertNotNull(builder.getDst().getIpv4AddressNoZone());
+ assertEquals("1.2.3.4", builder.getDst().getIpv4AddressNoZone().getValue());
verify(api).vxlanTunnelDump(any(VxlanTunnelDump.class));
}
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanGpeCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanGpeCustomizerTest.java
index 7b1881bf9..319ef93e1 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanGpeCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanGpeCustomizerTest.java
@@ -96,13 +96,13 @@ public class VxlanGpeCustomizerTest extends ReaderCustomizerTest<VxlanGpe, Vxlan
final VxlanGpeBuilder builder = getCustomizer().getBuilder(VXLAN_GPE_ID);
getCustomizer().readCurrentAttributes(VXLAN_GPE_ID, builder, ctx);
- assertNull(builder.getLocal().getIpv6Address());
- assertNotNull(builder.getLocal().getIpv4Address());
- assertEquals("1.2.3.4", builder.getLocal().getIpv4Address().getValue());
+ assertNull(builder.getLocal().getIpv6AddressNoZone());
+ assertNotNull(builder.getLocal().getIpv4AddressNoZone());
+ assertEquals("1.2.3.4", builder.getLocal().getIpv4AddressNoZone().getValue());
- assertNull(builder.getRemote().getIpv6Address());
- assertNotNull(builder.getRemote().getIpv4Address());
- assertEquals("1.2.3.5", builder.getRemote().getIpv4Address().getValue());
+ assertNull(builder.getRemote().getIpv6AddressNoZone());
+ assertNotNull(builder.getRemote().getIpv4AddressNoZone());
+ assertEquals("1.2.3.5", builder.getRemote().getIpv4AddressNoZone().getValue());
assertEquals(9, builder.getVni().getValue().intValue());
assertEquals(1, builder.getNextProtocol().getIntValue());
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizerTest.java
index 091b2422c..b785142b0 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizerTest.java
@@ -34,7 +34,7 @@ import io.fd.vpp.jvpp.core.dto.BdIpMacAddDel;
import io.fd.vpp.jvpp.core.dto.BdIpMacAddDelReply;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6AddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress;
@@ -60,13 +60,13 @@ public class ArpTerminationTableEntryCustomizerTest extends WriterCustomizerTest
private byte[] ip6AddressRaw;
private byte[] physAddressRaw;
private PhysAddress physAddress;
- private IpAddress ipAddress;
- private IpAddress ip6Address;
+ private IpAddressNoZone ipAddress;
+ private IpAddressNoZone ip6Address;
private ArpTerminationTableEntry entry;
private ArpTerminationTableEntry ip6entry;
private InstanceIdentifier<ArpTerminationTableEntry> id;
- private static InstanceIdentifier<ArpTerminationTableEntry> getArpEntryId(final IpAddress ipAddress,
+ private static InstanceIdentifier<ArpTerminationTableEntry> getArpEntryId(final IpAddressNoZone ipAddress,
final PhysAddress physAddress) {
return InstanceIdentifier.create(BridgeDomains.class).child(BridgeDomain.class, new BridgeDomainKey(BD_NAME))
.child(ArpTerminationTable.class)
@@ -82,8 +82,8 @@ public class ArpTerminationTableEntryCustomizerTest extends WriterCustomizerTest
physAddressRaw = new byte[]{1, 2, 3, 4, 5, 6};
physAddress = new PhysAddress("01:02:03:04:05:06");
- ipAddress = new IpAddress(Ipv4AddressNoZone.getDefaultInstance("1.2.3.4"));
- ip6Address = new IpAddress(Ipv6AddressNoZone.getDefaultInstance("2001:0db8:0a0b:12f0:0000:0000:0000:0001"));
+ ipAddress = new IpAddressNoZone(Ipv4AddressNoZone.getDefaultInstance("1.2.3.4"));
+ ip6Address = new IpAddressNoZone(Ipv6AddressNoZone.getDefaultInstance("2001:0db8:0a0b:12f0:0000:0000:0000:0001"));
entry = generateArpEntry(ipAddress, physAddress);
ip6entry = generateArpEntry(ip6Address, physAddress);
id = getArpEntryId(ipAddress, physAddress);
@@ -110,7 +110,7 @@ public class ArpTerminationTableEntryCustomizerTest extends WriterCustomizerTest
return request;
}
- private ArpTerminationTableEntry generateArpEntry(final IpAddress ipAddress, final PhysAddress physAddress) {
+ private ArpTerminationTableEntry generateArpEntry(final IpAddressNoZone ipAddress, final PhysAddress physAddress) {
final ArpTerminationTableEntryBuilder entry = new ArpTerminationTableEntryBuilder();
entry.setKey(new ArpTerminationTableEntryKey(ipAddress, physAddress));
entry.setPhysAddress(physAddress);