Skip to content

feat(iaas): support description field for network and network area cmds - #1673

Open
cgoetz-inovex wants to merge 3 commits into
mainfrom
feat/STACKITCLI-476-network-descriptions
Open

cgoetz-inovex wants to merge 3 commits into
mainfrom
feat/STACKITCLI-476-network-descriptions

Conversation

@cgoetz-inovex

Copy link
Copy Markdown
Contributor

Description

relates to #1234

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see e.g. here)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

@cgoetz-inovex
cgoetz-inovex requested a review from a team as a code owner October 15, 2026 14:59
cmd.Flags().StringToString(labelFlag, nil, "Labels are key-value string pairs which can be attached to a network. E.g. '--labels key1=value1,key2=value2,...'")
}

func parseInput(p *print.Printer, cmd *cobra.Command, inputArgs []string) (*inputModel, error) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not directly related to your changes, but i noticed that you can invoke stackit network update without any flags and the cli will not reject it. might be worth fixing

Comment thread internal/cmd/network/list/list.go Outdated
table.AddRow(
network.Id,
network.Name,
utils.PtrString(network.Description),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: Large descriptions may make the table very wide. Maybe it is worth to limit the description for the list command? alb plans does something like this: utils.Truncate(item.Description, 70)

@github-actions

Copy link
Copy Markdown

Caution

No coverage for base commit f020712 was found, so this report compares against its ancestor 9821c0f (1 commit earlier)

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/stackitcloud/stackit-cli/internal/cmd/network-area/route/list 56.92% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/network-area/routingtable/route/create 64.38% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/network/create 68.81% (+0.29%) 👍
github.com/stackitcloud/stackit-cli/internal/cmd/network/describe 56.99% (+0.95%) 👍
github.com/stackitcloud/stackit-cli/internal/cmd/network/list 60.00% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/network/update 53.33% (+1.28%) 👍
github.com/stackitcloud/stackit-cli/internal/pkg/services/iaas/utils 85.45% (ø)
github.com/stackitcloud/stackit-cli/internal/pkg/services/network-area/routing-table/utils 100.00% (ø)
Coverage details

Compared to commit 9821c0f (run #38861132342)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/stackitcloud/stackit-cli/internal/cmd/network-area/route/list/list.go 56.92% (ø) 65 37 28
github.com/stackitcloud/stackit-cli/internal/cmd/network-area/routingtable/route/create/create.go 64.38% (ø) 73 47 26
github.com/stackitcloud/stackit-cli/internal/cmd/network/create/create.go 68.81% (+0.29%) 109 (+1) 75 (+1) 34 👍
github.com/stackitcloud/stackit-cli/internal/cmd/network/describe/describe.go 56.99% (+0.95%) 93 (+2) 53 (+2) 40 👍
github.com/stackitcloud/stackit-cli/internal/cmd/network/list/list.go 60.00% (ø) 55 33 22
github.com/stackitcloud/stackit-cli/internal/cmd/network/update/update.go 53.33% (+1.28%) 75 (+2) 40 (+2) 35 👍
github.com/stackitcloud/stackit-cli/internal/pkg/services/iaas/utils/utils.go 85.45% (ø) 110 94 16
github.com/stackitcloud/stackit-cli/internal/pkg/services/network-area/routing-table/utils/utils.go 100.00% (ø) 27 27 0

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files:

  • github.com/stackitcloud/stackit-cli/internal/cmd/network/create/create_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/network/update/update_test.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants