summaryrefslogtreecommitdiffstats
path: root/dhcp
diff options
context:
space:
mode:
Diffstat (limited to 'dhcp')
-rw-r--r--dhcp/dhcp-api/src/main/yang/dhcp.yang6
-rw-r--r--dhcp/dhcp-impl/src/main/java/io/fd/hc2vpp/dhcp/write/DhcpRelayCustomizer.java8
2 files changed, 8 insertions, 6 deletions
diff --git a/dhcp/dhcp-api/src/main/yang/dhcp.yang b/dhcp/dhcp-api/src/main/yang/dhcp.yang
index 281c5049a..ebfdbd830 100644
--- a/dhcp/dhcp-api/src/main/yang/dhcp.yang
+++ b/dhcp/dhcp-api/src/main/yang/dhcp.yang
@@ -43,7 +43,8 @@ module dhcp {
grouping relay-attributes {
leaf server-address {
- type inet:ip-address-no-zone;
+ // FIXME(HC2VPP-79): change to ip-address-no-zone after https://bugs.opendaylight.org/show_bug.cgi?id=6413 is resolved
+ type inet:ip-address;
mandatory true;
description
"IP address of the server DHCP packets will be forwarded to.";
@@ -55,7 +56,8 @@ module dhcp {
"Used to send DHCP messages to the server";
}
leaf gateway-address {
- type inet:ip-address-no-zone;
+ // FIXME(HC2VPP-79): change to ip-address-no-zone after https://bugs.opendaylight.org/show_bug.cgi?id=6413 is resolved
+ type inet:ip-address;
mandatory true;
description
"IP address of the relay agent.";
diff --git a/dhcp/dhcp-impl/src/main/java/io/fd/hc2vpp/dhcp/write/DhcpRelayCustomizer.java b/dhcp/dhcp-impl/src/main/java/io/fd/hc2vpp/dhcp/write/DhcpRelayCustomizer.java
index ca4e20b95..2dc3ac96a 100644
--- a/dhcp/dhcp-impl/src/main/java/io/fd/hc2vpp/dhcp/write/DhcpRelayCustomizer.java
+++ b/dhcp/dhcp-impl/src/main/java/io/fd/hc2vpp/dhcp/write/DhcpRelayCustomizer.java
@@ -27,7 +27,7 @@ import io.fd.honeycomb.translate.write.WriteFailedException;
import io.fd.vpp.jvpp.core.dto.DhcpProxyConfig2;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
-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.IpAddress;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.dhcp.rev170315.Ipv6;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.dhcp.rev170315.dhcp.attributes.relays.Relay;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.dhcp.rev170315.dhcp.attributes.relays.RelayKey;
@@ -79,11 +79,11 @@ final class DhcpRelayCustomizer extends FutureJVppCustomizer implements ListWrit
getReplyForWrite(getFutureJVpp().dhcpProxyConfig2(request).toCompletableFuture(), id);
}
- private byte[] parseAddress(@Nonnull final IpAddressNoZone address, final boolean isIpv6) {
+ private byte[] parseAddress(@Nonnull final IpAddress address, final boolean isIpv6) {
if (isIpv6) {
- return ipv6AddressNoZoneToArray(address.getIpv6AddressNoZone());
+ return ipv6AddressNoZoneToArray(address.getIpv6Address());
} else {
- return ipv4AddressNoZoneToArray(address.getIpv4AddressNoZone());
+ return ipv4AddressNoZoneToArray(address.getIpv4Address().getValue());
}
}
}