"""L2XC Multi-instance Test Case HLD:
**NOTES:**
- - higher number (more than 15) of pg-l2 interfaces causes problems => only \
- 14 pg-l2 interfaces and 10 cross-connects are tested
- - jumbo packets in configuration with 14 l2-pg interfaces leads to \
- problems too
+ - higher number (more than 15) of pg-l2 interfaces causes problems => only
+ 14 pg-l2 interfaces and 10 cross-connects are tested
+ - jumbo packets in configuration with 14 l2-pg interfaces leads to
+ problems too
**config 1**
- add 14 pg-l2 interfaces
- send L2 MAC frames between all pairs of pg-l2 interfaces
**verify 1**
- - all packets received correctly in case of cross-connected l2-pg interfaces
+ - all packets received correctly in case of cross-connected l2-pg
+ interfaces
- no packet received in case of not cross-connected l2-pg interfaces
**config 2**
- send L2 MAC frames between all pairs of pg-l2 interfaces
**verify 2**
- - all packets received correctly in case of cross-connected l2-pg interfaces
+ - all packets received correctly in case of cross-connected l2-pg
+ interfaces
- no packet received in case of not cross-connected l2-pg interfaces
**config 3**
- send L2 MAC frames between all pairs of pg-l2 interfaces
**verify 3**
- - all packets received correctly in case of cross-connected l2-pg interfaces
+ - all packets received correctly in case of cross-connected l2-pg
+ interfaces
- no packet received in case of not cross-connected l2-pg interfaces
**config 4**
cls.flows = dict()
for i in range(len(cls.pg_interfaces)):
delta = 1 if i % 2 == 0 else -1
- cls.flows[cls.pg_interfaces[i]] = [cls.pg_interfaces[i + delta]]
+ cls.flows[cls.pg_interfaces[i]] =\
+ [cls.pg_interfaces[i + delta]]
# Mapping between packet-generator index and lists of test hosts
cls.hosts_by_pg_idx = dict()
Clear trace and packet infos before running each test.
"""
super(TestL2xcMultiInst, self).setUp()
- self.packet_infos = {}
+ self.reset_packet_infos()
def tearDown(self):
"""
for i in range(0, n_int):
dst_host = dst_hosts[i]
src_host = random.choice(src_hosts)
- pkt_info = self.create_packet_info(
- src_if.sw_if_index, dst_if.sw_if_index)
+ pkt_info = self.create_packet_info(src_if, dst_if)
payload = self.info_to_payload(pkt_info)
p = (Ether(dst=dst_host.mac, src=src_host.mac) /
IP(src=src_host.ip4, dst=dst_host.ip4) /