summaryrefslogtreecommitdiffstats
path: root/test/test_acl_plugin_macip.py
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2018-11-25 10:35:29 -0800
committerOle Trøan <otroan@employees.org>2018-11-27 09:01:27 +0000
commit6e4c6ad92e59045f0babf5af5093cb8402ec37fb (patch)
tree59edf45a2f162be15a7603540b399cefa8990670 /test/test_acl_plugin_macip.py
parent6c746172ef2a8ab7b6a267a889fedd1336f00371 (diff)
VPP-1508 python3 tests: .encode('hex')
Change to binascii.hexlify() for consistent bahavior. Change-Id: Ie430cdd1ffeb6510db4aa037546e42d85992093b Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/test_acl_plugin_macip.py')
-rw-r--r--test/test_acl_plugin_macip.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/test_acl_plugin_macip.py b/test/test_acl_plugin_macip.py
index 224bc31c0b2..951e86af474 100644
--- a/test/test_acl_plugin_macip.py
+++ b/test/test_acl_plugin_macip.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
"""ACL plugin - MACIP tests
"""
+import binascii
import random
import re
import unittest
@@ -185,8 +186,8 @@ class MethodHolder(VppTestCase):
rule = "DENY "
print " IP6" if r.is_ipv6 else " IP4", \
rule, \
- r.src_mac.encode('hex'), \
- r.src_mac_mask.encode('hex'),\
+ binascii.hexlify(r.src_mac), \
+ binascii.hexlify(r.src_mac_mask),\
unpack('<16B', r.src_ip_addr), \
r.src_ip_prefix_len
return acls
@@ -575,8 +576,8 @@ class MethodHolder(VppTestCase):
# TODO : verify
# for acl in acls:
# for r in acl.r:
- # print r.src_mac.encode('hex'), \
- # r.src_mac_mask.encode('hex'),\
+ # print binascii.hexlify(r.src_mac), \
+ # binascii.hexlify(r.src_mac_mask),\
# unpack('<16B', r.src_ip_addr), \
# r.src_ip_prefix_len
#