Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/stackit_beta.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ stackit beta [flags]
### SEE ALSO

* [stackit](./stackit.md) - Manage STACKIT resources using the command line
* [stackit beta affinity-group](./stackit_beta_affinity-group.md) - Manage server affinity groups
* [stackit beta image](./stackit_beta_image.md) - Manage server images
* [stackit beta key-pair](./stackit_beta_key-pair.md) - Provides functionality for SSH key pairs
* [stackit beta network](./stackit_beta_network.md) - Provides functionality for networks
Expand Down
37 changes: 37 additions & 0 deletions docs/stackit_beta_affinity-group.md
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

42 changes: 42 additions & 0 deletions docs/stackit_beta_affinity-group_create.md
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

40 changes: 40 additions & 0 deletions docs/stackit_beta_affinity-group_delete.md
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

40 changes: 40 additions & 0 deletions docs/stackit_beta_affinity-group_describe.md
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

44 changes: 44 additions & 0 deletions docs/stackit_beta_affinity-group_list.md
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

41 changes: 20 additions & 21 deletions docs/stackit_beta_image_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,26 @@ stackit beta image update IMAGE_ID [flags]
### Options

```
--boot-menu Enables the BIOS bootmenu.
--cdrom-bus string Sets CDROM bus controller type.
--disk-bus string Sets Disk bus controller type.
--disk-format string The disk format of the image.
-h, --help Help for "stackit beta image update"
--labels stringToString Labels are key-value string pairs which can be attached to a network-interface. E.g. '--labels key1=value1,key2=value2,...' (default [])
--local-file-path string The path to the local disk image file.
--min-disk-size int Size in Gigabyte.
--min-ram int Size in Megabyte.
--name string The name of the image.
--nic-model string Sets virtual nic model.
--os string Enables OS specific optimizations.
--os-distro string Operating System Distribution.
--os-version string Version of the OS.
--protected Protected VM.
--rescue-bus string Sets the device bus when the image is used as a rescue image.
--rescue-device string Sets the device when the image is used as a rescue image.
--secure-boot Enables Secure Boot.
--uefi Enables UEFI boot.
--video-model string Sets Graphic device model.
--virtio-scsi Enables the use of VirtIO SCSI to provide block device access. By default instances use VirtIO Block.
--boot-menu Enables the BIOS bootmenu.
--cdrom-bus string Sets CDROM bus controller type.
--disk-bus string Sets Disk bus controller type.
--disk-format string The disk format of the image.
-h, --help Help for "stackit beta image update"
--labels stringToString Labels are key-value string pairs which can be attached to a network-interface. E.g. '--labels key1=value1,key2=value2,...' (default [])
--min-disk-size int Size in Gigabyte.
--min-ram int Size in Megabyte.
--name string The name of the image.
--nic-model string Sets virtual nic model.
--os string Enables OS specific optimizations.
--os-distro string Operating System Distribution.
--os-version string Version of the OS.
--protected Protected VM.
--rescue-bus string Sets the device bus when the image is used as a rescue image.
--rescue-device string Sets the device when the image is used as a rescue image.
--secure-boot Enables Secure Boot.
--uefi Enables UEFI boot.
--video-model string Sets Graphic device model.
--virtio-scsi Enables the use of VirtIO SCSI to provide block device access. By default instances use VirtIO Block.
```

### Options inherited from parent commands
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_beta_quota_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Lists quotas

### Synopsis

Lists server quotas.
Lists project quotas.

```
stackit beta quota list [flags]
Expand Down
33 changes: 33 additions & 0 deletions internal/cmd/beta/affinity-groups/affinity-groups.go
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),
)
}
Loading