ockam
ockam copied to clipboard
Show only connections in output of `ockam tcp-connection list`
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-connection 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-connection list --node n1
+----------------------------------+----------------+
| Transport ID | Connected To |
+----------------------------------+----------------+
| 65c51c27d5bde0f2274d642f3e1e06a6 | 127.0.0.1:7001 |
+----------------------------------+----------------+
Listeners 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/connection/list.rs
Can I take this?
Also, cam fixing get_transports to return ResponseBuilder
be part of this PR, if I'm able to fix it?
@anuvratsingh of course, yes and yes.