-
Notifications
You must be signed in to change notification settings - Fork 0
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 POST /firewall/update/:id #30
Labels
Comments
This may be blocked by #35 since it requires special handling when updating a rule by something that does not concern to the same OSI Layer. |
Other thing to consider is that IDs will no longer be a direct index into the array. Hence rules may need to be compared by its fields, which is not great |
enriquegomeztagle
added a commit
that referenced
this issue
Nov 27, 2024
Related to #30 Add POST /firewall/update/:id endpoint to update firewall rules by ID. * Add a new request type `UpdateRule` to the `Request` and `Response` enums in `message/src/firewall.rs`. * Add a new route for `POST /firewall/update/:id` in the `rules` router in `controller/src/firewall/mod.rs`. * Add a new handler function `update_rule` for the `POST /firewall/update/:id` route in `controller/src/firewall/mod.rs`. * Implement the logic to update the rule in the `update_rule` function in `controller/src/firewall/mod.rs`. * Add a new match arm for `Request::UpdateRule` in the `handle_message` function in `firewall/src/main.rs`. * Implement the logic to update the rule in the `handle_message` function in `firewall/src/main.rs`. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/AOx0/adam/issues/30?shareId=XXXX-XXXX-XXXX-XXXX).
enriquegomeztagle
added a commit
that referenced
this issue
Nov 28, 2024
Related to #30 Add POST /firewall/update/:id endpoint to update firewall rules by ID. * Add a new request type `UpdateRule` to the `Request` and `Response` enums in `message/src/firewall.rs`. * Add a new route for `POST /firewall/update/:id` in the `rules` router in `controller/src/firewall/mod.rs`. * Add a new handler function `update_rule` for the `POST /firewall/update/:id` route in `controller/src/firewall/mod.rs`. * Implement the logic to update the rule in the `update_rule` function in `controller/src/firewall/mod.rs`. * Add a new match arm for `Request::UpdateRule` in the `handle_message` function in `firewall/src/main.rs`. * Implement the logic to update the rule in the `handle_message` function in `firewall/src/main.rs`. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/AOx0/adam/issues/30?shareId=XXXX-XXXX-XXXX-XXXX).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Allows to overwrite the value stored for the rule with id
:id
.Ideally this allows to update fields of the struct, but can be also used to completely replace the existing rule by another one.
The text was updated successfully, but these errors were encountered: