ockam icon indicating copy to clipboard operation
ockam copied to clipboard

Show only listeners in output of `ockam tcp-listener list ...`

Open mrinalwadhwa opened this issue 3 years ago • 0 comments

Currently:

> ockam node create n1 --api-address "127.0.0.1:6001"
> ockam node create n2 --api-address "127.0.0.1:6002"
> ockam tcp-listener create "127.0.0.1:7001" --node n2
> ockam tcp-connection create "127.0.0.1:7001" --node n1

» ockam tcp-listener list --node n1
+----------------------------------+----------------+-------------------+----------------+
| Transport ID                     | Transport Type | Mode              | Address bind   |
+----------------------------------+----------------+-------------------+----------------+
| 4e45dcc06f776a851ef2b589b230aa30 | TCP            | Listening         | 127.0.0.1:6001 |
+----------------------------------+----------------+-------------------+----------------+
| 65c51c27d5bde0f2274d642f3e1e06a6 | TCP            | Remote connection | 127.0.0.1:7001 |
+----------------------------------+----------------+-------------------+----------------+

We want to change it to:

> ockam tcp-listener list --node n1
+----------------------------------+----------------+
| Transport ID                     | Listening On   |
+----------------------------------+----------------+
| 4e45dcc06f776a851ef2b589b230aa30 | 127.0.0.1:6001 |
+----------------------------------+----------------+

Connections should not be shown.

The code for this is here: https://github.com/build-trust/ockam/blob/develop/implementations/rust/ockam/ockam_command/src/tcp/listener/list.rs

Related #3145

mrinalwadhwa avatar Aug 07 '22 01:08 mrinalwadhwa