-
Notifications
You must be signed in to change notification settings - Fork 29
feat: Onboard affinity-group command #594
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| ## stackit beta affinity-group | ||
|
|
||
| Manage server affinity groups | ||
|
|
||
| ### Synopsis | ||
|
|
||
| Manage the lifecycle of server affinity groups. | ||
|
|
||
| ``` | ||
| stackit beta affinity-group [flags] | ||
| ``` | ||
|
|
||
| ### Options | ||
|
|
||
| ``` | ||
| -h, --help Help for "stackit beta affinity-group" | ||
| ``` | ||
|
|
||
| ### Options inherited from parent commands | ||
|
|
||
| ``` | ||
| -y, --assume-yes If set, skips all confirmation prompts | ||
| --async If set, runs the command asynchronously | ||
| -o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"] | ||
| -p, --project-id string Project ID | ||
| --region string Target region for region-specific requests | ||
| --verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info") | ||
| ``` | ||
|
|
||
| ### SEE ALSO | ||
|
|
||
| * [stackit beta](./stackit_beta.md) - Contains beta STACKIT CLI commands | ||
| * [stackit beta affinity-group create](./stackit_beta_affinity-group_create.md) - Creates an affinity groups | ||
| * [stackit beta affinity-group delete](./stackit_beta_affinity-group_delete.md) - Deletes an affinity group | ||
| * [stackit beta affinity-group describe](./stackit_beta_affinity-group_describe.md) - Show details of an affinity group | ||
| * [stackit beta affinity-group list](./stackit_beta_affinity-group_list.md) - Lists affinity groups | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| ## stackit beta affinity-group create | ||
|
|
||
| Creates an affinity groups | ||
|
|
||
| ### Synopsis | ||
|
|
||
| Creates an affinity groups. | ||
|
|
||
| ``` | ||
| stackit beta affinity-group create [flags] | ||
| ``` | ||
|
|
||
| ### Examples | ||
|
|
||
| ``` | ||
| Create an affinity group with name "AFFINITY_GROUP_NAME" and policy "soft-affinity" | ||
| $ stackit beta affinity-group create --name AFFINITY_GROUP_NAME --policy soft-affinity | ||
| ``` | ||
|
|
||
| ### Options | ||
|
|
||
| ``` | ||
| -h, --help Help for "stackit beta affinity-group create" | ||
| --name string The name of the affinity group. | ||
| --policy string The policy for the affinity group. Valid values for the policy are: "hard-affinity", "hard-anti-affinity", "soft-affinity", "soft-anti-affinity" | ||
| ``` | ||
|
|
||
| ### Options inherited from parent commands | ||
|
|
||
| ``` | ||
| -y, --assume-yes If set, skips all confirmation prompts | ||
| --async If set, runs the command asynchronously | ||
| -o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"] | ||
| -p, --project-id string Project ID | ||
| --region string Target region for region-specific requests | ||
| --verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info") | ||
| ``` | ||
|
|
||
| ### SEE ALSO | ||
|
|
||
| * [stackit beta affinity-group](./stackit_beta_affinity-group.md) - Manage server affinity groups | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| ## stackit beta affinity-group delete | ||
|
|
||
| Deletes an affinity group | ||
|
|
||
| ### Synopsis | ||
|
|
||
| Deletes an affinity group. | ||
|
|
||
| ``` | ||
| stackit beta affinity-group delete AFFINITY_GROUP [flags] | ||
| ``` | ||
|
|
||
| ### Examples | ||
|
|
||
| ``` | ||
| Delete an affinity group with ID "xxx" | ||
| $ stackit beta affinity-group delete xxx | ||
| ``` | ||
|
|
||
| ### Options | ||
|
|
||
| ``` | ||
| -h, --help Help for "stackit beta affinity-group delete" | ||
| ``` | ||
|
|
||
| ### Options inherited from parent commands | ||
|
|
||
| ``` | ||
| -y, --assume-yes If set, skips all confirmation prompts | ||
| --async If set, runs the command asynchronously | ||
| -o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"] | ||
| -p, --project-id string Project ID | ||
| --region string Target region for region-specific requests | ||
| --verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info") | ||
| ``` | ||
|
|
||
| ### SEE ALSO | ||
|
|
||
| * [stackit beta affinity-group](./stackit_beta_affinity-group.md) - Manage server affinity groups | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| ## stackit beta affinity-group describe | ||
|
|
||
| Show details of an affinity group | ||
|
|
||
| ### Synopsis | ||
|
|
||
| Show details of an affinity group. | ||
|
|
||
| ``` | ||
| stackit beta affinity-group describe AFFINITY_GROUP_ID [flags] | ||
| ``` | ||
|
|
||
| ### Examples | ||
|
|
||
| ``` | ||
| Get details about an affinity group with the ID "xxx" | ||
| $ stackit beta affinity-group describe xxx | ||
| ``` | ||
|
|
||
| ### Options | ||
|
|
||
| ``` | ||
| -h, --help Help for "stackit beta affinity-group describe" | ||
| ``` | ||
|
|
||
| ### Options inherited from parent commands | ||
|
|
||
| ``` | ||
| -y, --assume-yes If set, skips all confirmation prompts | ||
| --async If set, runs the command asynchronously | ||
| -o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"] | ||
| -p, --project-id string Project ID | ||
| --region string Target region for region-specific requests | ||
| --verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info") | ||
| ``` | ||
|
|
||
| ### SEE ALSO | ||
|
|
||
| * [stackit beta affinity-group](./stackit_beta_affinity-group.md) - Manage server affinity groups | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| ## stackit beta affinity-group list | ||
|
|
||
| Lists affinity groups | ||
|
|
||
| ### Synopsis | ||
|
|
||
| Lists affinity groups. | ||
|
|
||
| ``` | ||
| stackit beta affinity-group list [flags] | ||
| ``` | ||
|
|
||
| ### Examples | ||
|
|
||
| ``` | ||
| Lists all affinity groups | ||
| $ stackit beta affinity-group list | ||
|
|
||
| Lists up to 10 affinity groups | ||
| $ stackit beta affinity-group list --limit=10 | ||
| ``` | ||
|
|
||
| ### Options | ||
|
|
||
| ``` | ||
| -h, --help Help for "stackit beta affinity-group list" | ||
| --limit int Limit the output to the first n elements | ||
| ``` | ||
|
|
||
| ### Options inherited from parent commands | ||
|
|
||
| ``` | ||
| -y, --assume-yes If set, skips all confirmation prompts | ||
| --async If set, runs the command asynchronously | ||
| -o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"] | ||
| -p, --project-id string Project ID | ||
| --region string Target region for region-specific requests | ||
| --verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info") | ||
| ``` | ||
|
|
||
| ### SEE ALSO | ||
|
|
||
| * [stackit beta affinity-group](./stackit_beta_affinity-group.md) - Manage server affinity groups | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
marceljk marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| package affinity_groups | ||
|
|
||
| import ( | ||
| "github.com/spf13/cobra" | ||
| "github.com/stackitcloud/stackit-cli/internal/cmd/beta/affinity-groups/create" | ||
| "github.com/stackitcloud/stackit-cli/internal/cmd/beta/affinity-groups/delete" | ||
| "github.com/stackitcloud/stackit-cli/internal/cmd/beta/affinity-groups/describe" | ||
| "github.com/stackitcloud/stackit-cli/internal/cmd/beta/affinity-groups/list" | ||
| "github.com/stackitcloud/stackit-cli/internal/pkg/args" | ||
| "github.com/stackitcloud/stackit-cli/internal/pkg/print" | ||
| "github.com/stackitcloud/stackit-cli/internal/pkg/utils" | ||
| ) | ||
|
|
||
| func NewCmd(p *print.Printer) *cobra.Command { | ||
| cmd := &cobra.Command{ | ||
| Use: "affinity-group", | ||
| Short: "Manage server affinity groups", | ||
| Long: "Manage the lifecycle of server affinity groups.", | ||
| Args: args.NoArgs, | ||
| Run: utils.CmdHelp, | ||
| } | ||
| addSubcommands(cmd, p) | ||
| return cmd | ||
| } | ||
|
|
||
| func addSubcommands(cmd *cobra.Command, p *print.Printer) { | ||
| cmd.AddCommand( | ||
| create.NewCmd(p), | ||
| delete.NewCmd(p), | ||
| describe.NewCmd(p), | ||
| list.NewCmd(p), | ||
| ) | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.