Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Use IP and MAC API types for neighbors
[vpp.git]
/
test
/
vpp_interface.py
diff --git
a/test/vpp_interface.py
b/test/vpp_interface.py
index
719f77b
..
58384d2
100644
(file)
--- a/
test/vpp_interface.py
+++ b/
test/vpp_interface.py
@@
-5,7
+5,7
@@
from abc import abstractmethod, ABCMeta
from six import moves
from util import Host, mk_ll_addr
from six import moves
from util import Host, mk_ll_addr
-from vpp_papi import mac_
pton, mac_
ntop
+from vpp_papi import mac_ntop
class VppInterface(object):
class VppInterface(object):
@@
-273,10
+273,9
@@
class VppInterface(object):
:param vrf_id: The FIB table / VRF ID. (Default value = 0)
"""
for host in self._remote_hosts:
:param vrf_id: The FIB table / VRF ID. (Default value = 0)
"""
for host in self._remote_hosts:
- macn = mac_pton(host.mac)
- ipn = host.ip4n
- self.test.vapi.ip_neighbor_add_del(
- self.sw_if_index, macn, ipn)
+ self.test.vapi.ip_neighbor_add_del(self.sw_if_index,
+ host.mac,
+ host.ip4)
def config_ip6(self):
"""Configure IPv6 address on the VPP interface."""
def config_ip6(self):
"""Configure IPv6 address on the VPP interface."""
@@
-304,10
+303,9
@@
class VppInterface(object):
:param vrf_id: The FIB table / VRF ID. (Default value = 0)
"""
for host in self._remote_hosts:
:param vrf_id: The FIB table / VRF ID. (Default value = 0)
"""
for host in self._remote_hosts:
- macn = mac_pton(host.mac)
- ipn = host.ip6n
- self.test.vapi.ip_neighbor_add_del(
- self.sw_if_index, macn, ipn, is_ipv6=1)
+ self.test.vapi.ip_neighbor_add_del(self.sw_if_index,
+ host.mac,
+ host.ip6)
def unconfig(self):
"""Unconfigure IPv6 and IPv4 address on the VPP interface."""
def unconfig(self):
"""Unconfigure IPv6 and IPv4 address on the VPP interface."""