Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
avf: update known issues section in README.md
[vpp.git]
/
test
/
test_l2_fib.py
diff --git
a/test/test_l2_fib.py
b/test/test_l2_fib.py
index
ac70c8a
..
4a5cb56
100644
(file)
--- a/
test/test_l2_fib.py
+++ b/
test/test_l2_fib.py
@@
-117,12
+117,12
@@
class TestL2fib(VppTestCase):
for bd_id in n_brs:
# Create BD with MAC learning and unknown unicast flooding
# disabled and put interfaces to this BD
for bd_id in n_brs:
# Create BD with MAC learning and unknown unicast flooding
# disabled and put interfaces to this BD
- cls.vapi.bridge_domain_add_del(
-
bd_id=bd_id, uu_flood=0,
learn=0)
+ cls.vapi.bridge_domain_add_del(
bd_id=bd_id, uu_flood=0,
+
learn=0)
ifs = [cls.pg_interfaces[i] for i in cls.bd_ifs(bd_id)]
for pg_if in ifs:
ifs = [cls.pg_interfaces[i] for i in cls.bd_ifs(bd_id)]
for pg_if in ifs:
- cls.vapi.sw_interface_set_l2_bridge(
pg_if.sw_if_index,
-
bd_id=bd_id)
+ cls.vapi.sw_interface_set_l2_bridge(
+
rx_sw_if_index=pg_if.sw_if_index,
bd_id=bd_id)
# Set up all interfaces
for i in cls.pg_interfaces:
# Set up all interfaces
for i in cls.pg_interfaces:
@@
-131,6
+131,10
@@
class TestL2fib(VppTestCase):
super(TestL2fib, cls).tearDownClass()
raise
super(TestL2fib, cls).tearDownClass()
raise
+ @classmethod
+ def tearDownClass(cls):
+ super(TestL2fib, cls).tearDownClass()
+
def setUp(self):
super(TestL2fib, self).setUp()
self.reset_packet_infos()
def setUp(self):
super(TestL2fib, self).setUp()
self.reset_packet_infos()
@@
-141,11
+145,13
@@
class TestL2fib(VppTestCase):
"""
super(TestL2fib, self).tearDown()
if not self.vpp_dead:
"""
super(TestL2fib, self).tearDown()
if not self.vpp_dead:
- self.logger.info(self.vapi.ppcli("show l2fib verbose"))
for bd_id in self.n_brs:
self.logger.info(self.vapi.ppcli("show bridge-domain %s detail"
% bd_id))
for bd_id in self.n_brs:
self.logger.info(self.vapi.ppcli("show bridge-domain %s detail"
% bd_id))
+ def show_commands_at_teardown(self):
+ self.logger.info(self.vapi.ppcli("show l2fib verbose"))
+
def create_hosts(self, n_hosts_per_if, subnet):
"""
Create required number of host MAC addresses and distribute them among
def create_hosts(self, n_hosts_per_if, subnet):
"""
Create required number of host MAC addresses and distribute them among
@@
-183,7
+189,7
@@
class TestL2fib(VppTestCase):
:param int bd_id: BD to teach
:param dict hosts: dict of hosts per interface
"""
:param int bd_id: BD to teach
:param dict hosts: dict of hosts per interface
"""
- self.vapi.bridge_flags(bd_id
, 1,
1)
+ self.vapi.bridge_flags(bd_id
=bd_id, is_set=1, flags=
1)
ifs = [self.pg_interfaces[i] for i in self.bd_ifs(bd_id)]
for pg_if in ifs:
swif = pg_if.sw_if_index
ifs = [self.pg_interfaces[i] for i in self.bd_ifs(bd_id)]
for pg_if in ifs:
swif = pg_if.sw_if_index
@@
-299,7
+305,7
@@
class TestL2fib(VppTestCase):
last_info[i.sw_if_index] = None
dst_sw_if_index = pg_if.sw_if_index
for packet in capture:
last_info[i.sw_if_index] = None
dst_sw_if_index = pg_if.sw_if_index
for packet in capture:
- payload_info = self.payload_to_info(
str(packet[Raw])
)
+ payload_info = self.payload_to_info(
packet[Raw]
)
try:
ip = packet[IP]
udp = packet[UDP]
try:
ip = packet[IP]
udp = packet[UDP]
@@
-343,7
+349,7
@@
class TestL2fib(VppTestCase):
if pkts:
i.add_stream(pkts)
if pkts:
i.add_stream(pkts)
- self.vapi.bridge_flags(bd_id
, 0,
1)
+ self.vapi.bridge_flags(bd_id
=bd_id, is_set=0, flags=
1)
# Enable packet capture and start packet sending
self.pg_enable_capture(ifs)
self.pg_start()
# Enable packet capture and start packet sending
self.pg_enable_capture(ifs)
self.pg_start()
@@
-371,7
+377,7
@@
class TestL2fib(VppTestCase):
if pkts:
i.add_stream(pkts)
if pkts:
i.add_stream(pkts)
- self.vapi.bridge_flags(bd_id
, 0,
1)
+ self.vapi.bridge_flags(bd_id
=bd_id, is_set=0, flags=
1)
# Enable packet capture and start packet sending
self.pg_enable_capture(ifs)
self.pg_start()
# Enable packet capture and start packet sending
self.pg_enable_capture(ifs)
self.pg_start()