network-unit-testing-system / nuts

NUTS defines a desired network state and checks it against a real network using pytest and nornir.
https://nuts.readthedocs.io/
MIT License
106 stars 5 forks source link

Don't access private context when test data is needed in the Extractor #13

Open bytinbit opened 3 years ago

bytinbit commented 3 years ago

napalm_ping.py (and iperf too) needs to access a context's test_data from within the Extractor, which is not nice:

test_data: List[Dict[str, Any]] = self._nuts_ctx.nuts_parameters["test_data"].

Find a solution to pass the entry into single_transform instead, so it can be used there.