-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add cmd line parser #219
Add cmd line parser #219
Conversation
e057db9
to
70fcfad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I really like this PR.
I had a number of comments, but only two actual concerns.
Address comments or ping me on slack and we can discuss.
NIce work :)
This is a good question. On thinking about it, I suggest that we convert the I am a big believer in thin applications and fat libraries. It makes testing easier, and who knows when we might want to recycle dataplane logic for some other purpose. |
Thanks ... Fine to discuss if you're around! |
70fcfad
to
1ffb54d
Compare
@daniel-noland I've pushed some changes and also renamed the crate to "gateway". |
1ffb54d
to
cd5313a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the motivation for renaming dataplane
to gateway
?
[EDIT: Sorry I had missed part of the conversation. I like Daniel's suggestion of a dataplane library + gateway binary, for what it's worth.]
.. so that the GW dataplane can accept also non-EAL related params. Signed-off-by: Fredi Raspall <fredi@githedgehog.com>
This commit is to be reverted, but allows starting the dataplane without any arg, as it was before. Also, printed the config, which should be replaced by logs. Signed-off-by: Fredi Raspall <fredi@githedgehog.com>
3955521
to
bd6b056
Compare
I like the suggestion as well, though this repo is really just the dataplane as the full gateway as FRR, the agent etc. I'm open to a better name for either the dataplane library or gateway binary. We can also have a binary called dataplane and library called dataplane built out of the same crate. |
I think dataplane is a bit unspecific. True, this repo does not contain the whole thing. Happy to rename it in any other way. Else, we can keep on having dataplane library and dataplane binary, altough a different name would make the distinction more explicit and keep generic stuff in the library and specifics in the binary. I can remove those commits from this PR since the original purpose of this PR was another. |
Signed-off-by: Fredi Raspall <fredi@githedgehog.com>
6adcc94
to
00990a1
Compare
@mvachhar I've removed the patches that do any rename. There is one outstanding comment from @daniel-noland regarding the logging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thank you
Seems good to merge as far as I can tell. The logging thing can be refined as a follow-up if necessary. |
Review's comments have been addressed. The remaining discussion about logging can be addressed as a follow-up, if need be.
I agree. Sorry I was out of action for a bit there. All ahead full! |
goal: allow dataplane process to get other params, non-EAL related.
The crate used, clap, allows deriving parser functions automatically and defining default values.
However, that does not seem to work for certain types. We should also decide which args we can default and which ones are mandatory. We could default ALL (and then it would behave as it was, with stuff hardcoded).
We should also decide if we want to call the main proces "dataplane" or gateway?