Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
VPP-1508 python tests: unicode
[vpp.git]
/
test
/
vpp_neighbor.py
diff --git
a/test/vpp_neighbor.py
b/test/vpp_neighbor.py
index
7391447
..
b38aae8
100644
(file)
--- a/
test/vpp_neighbor.py
+++ b/
test/vpp_neighbor.py
@@
-7,10
+7,14
@@
from ipaddress import ip_address
from vpp_object import *
from vpp_papi import mac_pton, VppEnum
from ipaddress import ip_address
from vpp_object import *
from vpp_papi import mac_pton, VppEnum
+try:
+ text_type = unicode
+except NameError:
+ text_type = str
def find_nbr(test, sw_if_index, nbr_addr, is_static=0, mac=None):
def find_nbr(test, sw_if_index, nbr_addr, is_static=0, mac=None):
- ip_addr = ip_address(
unicod
e(nbr_addr))
+ ip_addr = ip_address(
text_typ
e(nbr_addr))
e = VppEnum.vl_api_ip_neighbor_flags_t
nbrs = test.vapi.ip_neighbor_dump(sw_if_index,
is_ipv6=(6 is ip_addr.version))
e = VppEnum.vl_api_ip_neighbor_flags_t
nbrs = test.vapi.ip_neighbor_dump(sw_if_index,
is_ipv6=(6 is ip_addr.version))