import random
import socket
+import scapy.compat
from scapy.packet import Raw
from scapy.layers.l2 import Ether
from scapy.layers.inet import IP, UDP, ARP
super(TestIp4VrfMultiInst, cls).tearDownClass()
raise
+ @classmethod
+ def tearDownClass(cls):
+ super(TestIp4VrfMultiInst, cls).tearDownClass()
+
def setUp(self):
"""
Clear trace and packet infos before running each test.
Show various debug prints after each test.
"""
super(TestIp4VrfMultiInst, self).tearDown()
- if not self.vpp_dead:
- self.logger.info(self.vapi.ppcli("show ip fib"))
- self.logger.info(self.vapi.ppcli("show ip arp"))
+
+ def show_commands_at_teardown(self):
+ self.logger.info(self.vapi.ppcli("show ip fib"))
+ self.logger.info(self.vapi.ppcli("show ip arp"))
def create_vrf_and_assign_interfaces(self, count, start=1):
"""
if found:
break
for host in pg_if.remote_hosts:
- if str(addr) == str(host.ip4):
+ if scapy.compat.raw(addr) == \
+ scapy.compat.raw(host.ip4):
vrf_count += 1
found = True
break