-
Notifications
You must be signed in to change notification settings - Fork 25
feat(routing-table): provide rt and routes functionality #1023
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
base: main
Are you sure you want to change the base?
Conversation
5b9fe56
to
45f6702
Compare
cmd.Flags().Var(flags.CIDRFlag(), destinationValueFlag, "Destination value") | ||
cmd.Flags().String(nextHopValueFlag, "", "NextHop value") | ||
|
||
cmd.Flags().Var( |
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.
I introduced an enum flag here. I'm not certain if this matches our intended cli design, but I felt it would be beneficial to validate values early.
Labels: flags.FlagToStringToStringPointer(p, cmd, labelFlag), | ||
} | ||
|
||
// Next Hop validation logic |
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.
Also here I felt like it would be beneficial to validate values early. Can be tested with commands like:
bin/stackit beta routing-table route create --destination-type cidrv4 --destination-value 0.0.0.0/32 --nexthop-type internet --nexthop-value 1.1.1.1 --network-area-id xxx --organization-id yyy --routing-table-id zzz -o pretty
Expected: Error: --nexthop-value is not allowed when --nexthop-type is 'internet' or 'blackhole'
Short: "Manage routing-tables and its according routes", | ||
Long: `Manage routing tables and their associated routes. | ||
|
||
This functionality is currently in BETA. At this stage, only listing and describing |
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.
Added this to give the user a hint, that this is more used for debugging rather than being used for creating routing-tables and attaching them to networks.
Update waiting for go-sdk iaas api update ^ |
Description
This PR adds functionality to list and describe routing tables, as well as perform full CRUD operations on routes within those tables. It does not include support for creating or attaching routing tables, as those operations are currently intended to be managed exclusively through Terraform.
This implementation is primarily aimed at enabling users to inspect and debug routes created via Terraform. Once the routing table feature reaches GA, support for creating routing tables and attaching them to networks will be added to the CLI.
Checklist
make fmt
make generate-docs
(will be checked by CI)make test
(will be checked by CI)make lint
(will be checked by CI)