(self, src_if, dst_if, count)
| 35 | |
| 36 | # https://fd.io/docs/vpp/master/developer/tests/overview.html#example-how-to-add-a-new-test |
| 37 | def create_stream(self, src_if, dst_if, count): |
| 38 | packets = [] |
| 39 | for i in range(count): |
| 40 | info = self.create_packet_info(src_if, dst_if) |
| 41 | payload = self.info_to_payload(info) |
| 42 | |
| 43 | p = ( |
| 44 | Ether(dst=src_if.local_mac, src=src_if.remote_mac) |
| 45 | / IP(src=src_if.remote_ip4, dst=dst_if.remote_ip4) |
| 46 | / UDP(sport=randint(49152, 65535), dport=5678) |
| 47 | / Raw(payload) |
| 48 | ) |
| 49 | |
| 50 | info.data = p.copy() |
| 51 | packets.append(p) |
| 52 | |
| 53 | return packets |
| 54 | |
| 55 | def verify_capture(self, src_if, dst_if, capture): |
| 56 | packet_info = None |
no test coverage detected