Draft: steps: add tcpdump
Adds steps that run and stop tcpdump and a cleanup function that appends tshark-analyzed log to html report if scenario fails or with DEBUG set. The dump files are to be found in: /tmp/nmci-tcpdumps/{scenario_id}/{label}.pcap
--
Made for ease of debuggin of 8021x_hostapd_freeradius_doc_procedure failures on el8/c8s.
The run/stop functionality is done by spawning transient systemd service using 'systemd-run' and the cleanup is achieved by behave's probably recent context.add_cleanup() function. Wider use of this function would mean cleaner tags but if so, then we'd probably need a separate .py file for these cleanup functions so that nmci/lib.py doesn't get way too big.
Based on the resulting HTML report, it seems that:
- it runs after nmci's cleanup (it's embeds are the very last)
- it's run in reverse order than the steps (so most recent log is embedded first)