Add a stream of packets to this packet-generator :param pkts: iterable packets
(self, pkts, nb_replays=None, worker=None)
| 246 | self.test.vapi.pg_interface_enable_disable_coalesce(self.sw_if_index, 0) |
| 247 | |
| 248 | def add_stream(self, pkts, nb_replays=None, worker=None): |
| 249 | """ |
| 250 | Add a stream of packets to this packet-generator |
| 251 | |
| 252 | :param pkts: iterable packets |
| 253 | |
| 254 | """ |
| 255 | in_pcap = self.get_in_path(worker) |
| 256 | if os.path.isfile(in_pcap): |
| 257 | self.remove_old_pcap_file(in_pcap) |
| 258 | wrpcap(in_pcap, pkts) |
| 259 | self.test.register_pcap(self, worker) |
| 260 | # FIXME this should be an API, but no such exists atm |
| 261 | self.test.vapi.cli(self.get_input_cli(nb_replays, worker)) |
| 262 | self.link_pcap_file(self.get_in_path(worker), "inp", self.in_history_counter) |
| 263 | |
| 264 | def generate_debug_aid(self, kind): |
| 265 | """Create a hardlink to the out file with a counter and a file |