Conversation
d8f4c9f to
60fae5d
Compare
7a76aaa to
565f907
Compare
|
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it. |
| ).AddRoutingTableToAreaPayload(payload), nil | ||
| } | ||
|
|
||
| func outputResult(p *print.Printer, outputFormat string, routingTable *iaas.RoutingTable) error { |
There was a problem hiding this comment.
Recognized during testing: It would be new to me that we show tables for create commands. I would also like to stick to that, because I don't see any benefit for the user: He just entered all information when executing the create command, so why show it all again.
For create we usually just print something like `Created routing table with ID xxx in STACKIT Network Area xxx".
Could you elaborate why you've chosen to implement a table output here? 😅
There was a problem hiding this comment.
In fact the current approach with the table is already questionable for me since the ID of the routing table I just created isn't visible anymore after I exited the pager showing the table output.
| ), | ||
| examples.NewExample( | ||
| `Disables the dynamic routes of a routing-table with ID "xxx" in organization with ID "yyy" and network-area with ID "zzz"`, | ||
| "$ stackit routing-table update xxx --organization-id yyy --network-area-id zzz --disable-dynamic-routes", |
| } | ||
|
|
||
| if route.Labels != nil && len(*route.Labels) > 0 { | ||
| var labels []string |
There was a problem hiding this comment.
| var labels []string | |
| routeDetails.Labels = JoinStringMap(tt.input, ": ", "\n") |
This should do everything you need 😅
stackit-cli/internal/pkg/utils/strings_test.go
Lines 34 to 68 in 92c48cb

Description
reopened #1023
Checklist
make fmtmake generate-docs(will be checked by CI)make test(will be checked by CI)make lint(will be checked by CI)