all deleting routes from a device - #97
Conversation
Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c4021f49f4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Adds a new tscli delete device routes subcommand to clear a device’s enabled subnet routes (without changing what the device advertises), including the underlying API wiring, docs generation output, and CLI test coverage.
Changes:
- Introduces
delete device routesCLI command and wires it into thedelete devicecommand tree. - Adds
ClearDeviceRoutesJSONand adjusts routes update request marshaling to reliably send an emptyroutes: []payload. - Updates generated docs and CLI tests/testdata to include the new command and its output.
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/cli/testdata/leaf_commands.txt | Adds the new leaf command to the CLI command inventory used by tests. |
| test/cli/group_integration_test.go | Adds an integration test asserting an empty routes list is sent. |
| test/cli/example_output_test.go | Adds an example-output case for delete device routes. |
| pkg/tscli/audited_api.go | Adds ClearDeviceRoutesJSON; ensures routes is never marshaled as null. |
| pkg/apitype/models.go | Removes omitempty on routes so empty slices serialize as []. |
| docs/commands/tscli_delete_device.md | Links the new subcommand from the parent delete-device docs. |
| docs/commands/tscli_delete_device_routes.md | New generated docs page for tscli delete device routes. |
| docs/commands/README.md | Adds the new command to the docs index. |
| docs/commands/_sidebar.md | Adds the new command to the docs sidebar. |
| cmd/tscli/delete/device/routes/cli.go | Implements the new delete device routes command. |
| cmd/tscli/delete/device/cli.go | Registers the new routes subcommand under delete device. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
Signed-off-by: Lee Briggs lee@leebriggs.co.uk