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

Support for non-global clients #48

Open
davidgengenbach opened this issue Nov 3, 2020 · 2 comments
Open

Support for non-global clients #48

davidgengenbach opened this issue Nov 3, 2020 · 2 comments

Comments

@davidgengenbach
Copy link
Contributor

davidgengenbach commented Nov 3, 2020

As mentioned in the README, p4runtime-shell does not support controlling multiple switches at the same time.
Is there any work planned or interest to change that?

As far as I can see, the main change would be removing the dependence on the "singleton" instances: p4runtime_sh.shell.Client and p4runtime_sh.context.Context.

Since there is a lot of meta-programming involved (i.e., passing constructors around, creating class instances dynamically), this is not as straightforward as anticipated.

Apart from that: thanks for the library! Easy to use and apart from the single-switch limitation very useful.

@antoninbas
Copy link
Member

@davidgengenbach thanks for the feedback. This was mostly used to be meant as an interactive shell, thus the single switch limitation. I agree that it would be nice to be able to support multiple devices when writing scripts, as the syntax for p4runtime-shell is pretty intuitive and concise. Especially if you need to program multiple switches with static entries in a symmetric fashion.

Another key item which is missing from p4runtime-shell is some form of support for P4Runtime stream messages. These days however I mostly dedicate my spare time to https://github.com/antoninbas/p4runtime-go-client.

If someone wants to pick up these work items, I am happy to review PRs.

@davidgengenbach
Copy link
Contributor Author

davidgengenbach commented Nov 8, 2020

@antoninbas Thanks for the fast answer!

I created a PR with my proposed changes: #50

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

No branches or pull requests

2 participants