summaryrefslogtreecommitdiffstats
path: root/dhcp/dhcp-impl/src/main/java
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2017-02-22 08:18:19 +0100
committerMarek Gradzki <mgradzki@cisco.com>2017-02-22 08:18:21 +0100
commit10adb19d1ae404220424f1d53b7f42c5d8bc56e7 (patch)
tree3973ed07de2238c29c90e1f7279ded242451e247 /dhcp/dhcp-impl/src/main/java
parentf93fc373a265382b88673a3b8636714924e71a9e (diff)
Update dhcp translation after vpp api changes
Fixes hc2vpp build after https://gerrit.fd.io/r/#/c/5449/ was merged. Change-Id: I475a270c68d0071f9c2b9f298600160e56e873bc Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'dhcp/dhcp-impl/src/main/java')
-rw-r--r--dhcp/dhcp-impl/src/main/java/io/fd/hc2vpp/dhcp/write/DhcpRelayCustomizer.java10
1 files changed, 6 insertions, 4 deletions
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 2dc3ac96a..80e482dd4 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
@@ -24,7 +24,7 @@ import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer;
import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.core.dto.DhcpProxyConfig2;
+import io.fd.vpp.jvpp.core.dto.DhcpProxyConfig;
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.IpAddress;
@@ -67,16 +67,18 @@ final class DhcpRelayCustomizer extends FutureJVppCustomizer implements ListWrit
private void setRelay(final InstanceIdentifier<Relay> id, final Relay relay, final WriteContext writeContext,
final boolean isAdd) throws WriteFailedException {
- final DhcpProxyConfig2 request = new DhcpProxyConfig2();
+ final DhcpProxyConfig request = new DhcpProxyConfig();
request.rxVrfId = relay.getRxVrfId().byteValue();
final boolean isIpv6 = Ipv6.class == relay.getAddressType();
request.isIpv6 = booleanToByte(isIpv6);
request.serverVrfId = relay.getServerVrfId().intValue();
request.isAdd = booleanToByte(isAdd);
- request.insertCircuitId = booleanToByte(relay.isInsertCircuitId());
+ // TODO insertCircuitId is not configurable for DHCPv4,
+ // rethink how to handle the value for DHCPv6 (VSS?)
+ // request.insertCircuitId = booleanToByte(relay.isInsertCircuitId());
request.dhcpServer = parseAddress(relay.getServerAddress(), isIpv6);
request.dhcpSrcAddress = parseAddress(relay.getGatewayAddress(), isIpv6);
- getReplyForWrite(getFutureJVpp().dhcpProxyConfig2(request).toCompletableFuture(), id);
+ getReplyForWrite(getFutureJVpp().dhcpProxyConfig(request).toCompletableFuture(), id);
}
private byte[] parseAddress(@Nonnull final IpAddress address, final boolean isIpv6) {