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

Move switch controller to different endpoint #53

Closed
domire8 opened this issue Oct 12, 2023 · 5 comments · Fixed by #58
Closed

Move switch controller to different endpoint #53

domire8 opened this issue Oct 12, 2023 · 5 comments · Fixed by #58
Assignees

Comments

@domire8
Copy link
Member

domire8 commented Oct 12, 2023

I've realized that the switch controller endpoint is under v1/application/hardware, so each time you call it, you also have to provide the interface name as part of the request. Why don't we put it under v1/application/hardware/{interface_name}?

@eeberhard @jjenscodee

@domire8 domire8 self-assigned this Oct 12, 2023
@eeberhard
Copy link
Member

Minor correction, it's currently a PUT request under v1/application/controllers and takes the payload {interface, start, stop}.

One problem is that v1/application/hardware/{interface_name} already has PUT and DELETE for load/unload hardware respectively, so the same endpoint for switching controllers would not work. Secondly, it would not be RESTful to manage controllers under a hardware endpoint.

Still, based on your idea, I would be happy with the following:

v1/application/controllers
-- change to -->
v1/application/hardware/{interface_name}/controllers

@domire8
Copy link
Member Author

domire8 commented Oct 17, 2023

Yes, indeed. I somehow already implemented it that way but it's true that I missed that detail in the issue description.

@eeberhard
Copy link
Member

Actually, I forgot to bring it up beforehand, but is this maybe a good time to also change start and stop to activate and deactivate respectively? That would also be a YAML syntax change. It's another small thing that would be breaking but could be nice to do it now

@domire8
Copy link
Member Author

domire8 commented Oct 18, 2023

Should we do a separate issue for this? It will come with PRs in DSE and backend-api and I find it easier to scope if we separate

@eeberhard
Copy link
Member

Yes please, add it to #110

@domire8 domire8 linked a pull request Oct 18, 2023 that will close this issue
1 task
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

Successfully merging a pull request may close this issue.

2 participants