Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create command ockam tcp-inlet list to list a nodes TCP Inlets #4229

Closed
caoakleyii opened this issue Feb 8, 2023 · 9 comments
Closed

Create command ockam tcp-inlet list to list a nodes TCP Inlets #4229

caoakleyii opened this issue Feb 8, 2023 · 9 comments

Comments

@caoakleyii
Copy link
Contributor

Summary

A node has set of TCP Inlets. This command should retrieve those inlets with information of:

  • Inlet Alias
  • TCP Address
  • To Outlet Address

The command should accept a --node flag, however default to the default node if one is not provided.

Code of where inlets are created and stored can be found here.

tcp-inlet commands are defined here.

Expected Behavior

ockam tcp-inlet create --at /node/n2 --from 127.0.0.1:6000 --to /node/n1/service/outlet --alias "My TCP Inlet"

ockam tcp-inlet list --node n2
Inlet:
  Alias: My TCP Inlet
  From TCP : 127.0.0.1:6000
  To Outlet: /node/n1/service/outlet 

We love helping new contributors!
If you have questions or need help as you work on your first Ockam contribution, please leave a comment on this discussion.
If you're looking for other issues to contribute to, checkout this discussion and labels - good first issue or help wanted

@caoakleyii caoakleyii changed the title Create command ockam tcp-inlet list to list a nodes TCP Inlets Create command ockam tcp-inlet list to list a nodes TCP Inlets Feb 8, 2023
@0xkelvin
Copy link
Contributor

0xkelvin commented Feb 9, 2023

hello, @caoakleyii please assign this issue to me

@caoakleyii caoakleyii assigned caoakleyii and 0xkelvin and unassigned caoakleyii Feb 10, 2023
@caoakleyii
Copy link
Contributor Author

hello, @caoakleyii please assign this issue to me

All yours @0xkelvin 👍

@0xkelvin
Copy link
Contributor

0xkelvin commented Feb 15, 2023

i got some promising result :
InletList { list: [InletStatus { bind_addr: CowStr("127.0.0.1:6000"), worker_addr: CowStr("0#925b5875dd5a8f5c933d5d4aca40a4df"), alias: CowStr("My TCP Inlet"), payload: None, outlet_route: CowStr("1#127.0.0.1:62020 => 0#outlet") }] }

image

@0xkelvin
Copy link
Contributor

hello @caoakleyii @mrinalwadhwa

from my raw result above, how to get to extract "/node/n1/service/outlet" as expected.

or i might wrong somewhere

@h20220145
Copy link
Contributor

hello @caoakleyii @mrinalwadhwa

from my raw result above, how to get to extract "/node/n1/service/outlet" as expected.

or i might wrong somewhere

+1 , have a similar question on #4228

@davide-baldo
Copy link
Member

You can take a look at how ockam node list was made, it should be close enough https://github.com/build-trust/ockam/blob/develop/implementations/rust/ockam/ockam_command/src/node/list.rs

@0xkelvin
Copy link
Contributor

Hello @davide-baldo
image

does it acceptable ?

@davide-baldo
Copy link
Member

Looks good! 👍

In the "Inlet Alias", you can omit the "Inlet" part since it's already implicit

@0xkelvin
Copy link
Contributor

@davide-baldo a PR here : #4304
please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants