summaryrefslogtreecommitdiffstats
path: root/src/plugins/dhcp/test/vpp_dhcp.py
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-10-18 14:33:54 +0200
committerNeale Ranns <nranns@cisco.com>2019-10-21 10:02:01 +0000
commit12966a7a0acb41270c88903ee5360fef7ae09706 (patch)
tree537a074a53cb75bcaa92b9a245ff5c4cbf40b15f /src/plugins/dhcp/test/vpp_dhcp.py
parent45495480c8165090722389b08075df06ccfcd7ef (diff)
dhcp: python3 support in tests
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Ie136c1e94e5c25f9547fc2d6d45ce8e1630a035c
Diffstat (limited to 'src/plugins/dhcp/test/vpp_dhcp.py')
-rw-r--r--src/plugins/dhcp/test/vpp_dhcp.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/dhcp/test/vpp_dhcp.py b/src/plugins/dhcp/test/vpp_dhcp.py
index 56ec8caa7df..f8265a26252 100644
--- a/src/plugins/dhcp/test/vpp_dhcp.py
+++ b/src/plugins/dhcp/test/vpp_dhcp.py
@@ -102,8 +102,10 @@ class VppDHCPClient(VppObject):
self._pid = pid
def add_vpp_config(self):
+ id = self._id.encode('ascii') if self._id else None
client = {'sw_if_index': self._sw_if_index, 'hostname': self._hostname,
- 'id': self._id, 'want_dhcp_event': self._want_dhcp_event,
+ 'id': id,
+ 'want_dhcp_event': self._want_dhcp_event,
'set_broadcast_flag': self._set_broadcast_flag,
'dscp': self._dscp, 'pid': self._pid}
self._test.vapi.dhcp_client_config(is_add=1, client=client)