pytest-testinfra icon indicating copy to clipboard operation
pytest-testinfra copied to clipboard

Add a firewalld module

Open BerkhanBerkdemir opened this issue 4 years ago • 3 comments

Hi @philpep,

We are extensively using TestInfra to test Ansible roles. However, we are using command to test firewalld rules/services running command("firewall-cmd ..."). So, I'd like to see a module that is just to read firewall-cmd. Do you this is feasible, or finding another way is to be the advice?

BerkhanBerkdemir avatar Apr 25 '20 21:04 BerkhanBerkdemir

Hi, sure, feel free to implement this. It might be better to write here what API interface you'd expect for such module before implementing it.

philpep avatar Apr 27 '20 01:04 philpep

Hi, sure, feel free to implement this. It might be better to write here what API interface you'd expect for such module before implementing it.

Hey, thanks @philpep. I don't have enough time for this feature right now--even in this pandemic... I can take a look at this later on.

Stay safe,

BerkhanBerkdemir avatar May 04 '20 21:05 BerkhanBerkdemir

I left a rather rudimentary start at https://github.com/atombrella/testinfra/pull/new/firewalld Feel free to give input to what data that could be nice to be able to extract. As firewalld is a wrapper for iptables, is there something that iptables.rules is unable to show?

atombrella avatar Jun 03 '20 13:06 atombrella