Skip to content

feat: add volume performance classes to volume --type completion#680

Draft
mimihalescu wants to merge 2 commits into
masterfrom
feat/volume-performance-classes
Draft

feat: add volume performance classes to volume --type completion#680
mimihalescu wants to merge 2 commits into
masterfrom
feat/volume-performance-classes

Conversation

@mimihalescu

Copy link
Copy Markdown
Contributor

Adds the new volume performance classes ESSENTIAL, BALANCED and PERFORMANCE to the volume create --type shell completion. Also fixes a pre-existing bug where this completion was registered on --licence-type instead of --type, so --type had no completion at all.

Draft until the classes are live on the API.

Add ESSENTIAL, BALANCED and PERFORMANCE to the volume create --type
shell completion. Also fix the completion being registered on the wrong
flag (--licence-type) so it now completes on --type.
@sonarqubecloud

sonarqubecloud Bot commented Jul 1, 2026

Copy link
Copy Markdown

_ = cmd.Command.RegisterFlagCompletionFunc(cloudapiv6.ArgLicenceType, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
return []string{"HDD", "SSD", "SSD Standard", "SSD Premium"}, cobra.ShellCompDirectiveNoFileComp
_ = cmd.Command.RegisterFlagCompletionFunc(constants.FlagType, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
return []string{"HDD", "SSD", "SSD Standard", "SSD Premium", "ESSENTIAL", "BALANCED", "PERFORMANCE"}, cobra.ShellCompDirectiveNoFileComp

@avirtopeanu-ionos avirtopeanu-ionos Jul 6, 2026

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.

If the API team means to have most of the users use the new types, I would move them in front of the HDD / SSD choices, else 90+% of the users will use HDD / SSD

Suggested change
return []string{"HDD", "SSD", "SSD Standard", "SSD Premium", "ESSENTIAL", "BALANCED", "PERFORMANCE"}, cobra.ShellCompDirectiveNoFileComp
return []string{"ESSENTIAL", "BALANCED", "PERFORMANCE", "HDD", "SSD", "SSD Standard", "SSD Premium"}, cobra.ShellCompDirectiveNoFileComp

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants