pytest-testinfra
pytest-testinfra copied to clipboard
Socket integration with Process
I'd be nice to have bidirectionnal intégration between socket and process modules.
- which process opened this socket ?
- which sockets open this process ?
For instance:
>>> host.socket('tcp://22').process
<process sshd (pid=17542)>
>>> host.process.get(pid=17542).sockets()
[<socket tcp://22>] # this object does not exist yet, it has to be defined
@philpep do you mind if I give. this a try ?