Skip to content

Move sqlserverflex commands to beta command group #349

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 3 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ brews:
name: CLI Release Bot
email: [email protected]
homepage: "https://github.com/stackitcloud/stackit-cli"
description: "A command-line interface to manage STACKIT resources.\nThis CLI is in a BETA state. More services and functionality will be supported soon."
description: "A command-line interface to manage STACKIT resources.\nThis CLI is in a beta state. More services and functionality will be supported soon."
directory: Formula
license: "Apache-2.0"
# If set to auto, the release will not be uploaded to the homebrew tap repo
Expand All @@ -117,7 +117,7 @@ snapcrafts:
# centre graphical frontends
title: STACKIT CLI
summary: A command-line interface to manage STACKIT resources.
description: "A command-line interface to manage STACKIT resources.\nThis CLI is in a BETA state. More services and functionality will be supported soon."
description: "A command-line interface to manage STACKIT resources.\nThis CLI is in a beta state. More services and functionality will be supported soon."
license: Apache-2.0
confinement: classic
# Grade "devel" will only release to `edge` and `beta` channels
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ stackit [flags]

* [stackit argus](./stackit_argus.md) - Provides functionality for Argus
* [stackit auth](./stackit_auth.md) - Authenticates the STACKIT CLI
* [stackit beta](./stackit_beta.md) - Contains beta STACKIT CLI commands
* [stackit config](./stackit_config.md) - Provides functionality for CLI configuration options
* [stackit curl](./stackit_curl.md) - Executes an authenticated HTTP request to an endpoint
* [stackit dns](./stackit_dns.md) - Provides functionality for DNS
Expand All @@ -45,5 +46,4 @@ stackit [flags]
* [stackit secrets-manager](./stackit_secrets-manager.md) - Provides functionality for Secrets Manager
* [stackit service-account](./stackit_service-account.md) - Provides functionality for service accounts
* [stackit ske](./stackit_ske.md) - Provides functionality for SKE
* [stackit sqlserverflex](./stackit_sqlserverflex.md) - Provides functionality for SQLServer Flex

44 changes: 44 additions & 0 deletions docs/stackit_beta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## stackit beta

Contains beta STACKIT CLI commands

### Synopsis

Contains beta STACKIT CLI commands.
The commands under this group are still in a beta state, and functionality may be incomplete or have breaking changes.

```
stackit beta [flags]
```

### Examples

```
See the currently available beta commands
$ stackit beta --help

Execute a beta command
$ stackit beta MY_COMMAND
```

### Options

```
-h, --help Help for "stackit beta"
```

### 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
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```

### SEE ALSO

* [stackit](./stackit.md) - Manage STACKIT resources using the command line
* [stackit beta sqlserverflex](./stackit_beta_sqlserverflex.md) - Provides functionality for SQLServer Flex

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## stackit sqlserverflex
## stackit beta sqlserverflex

Provides functionality for SQLServer Flex

Expand All @@ -7,13 +7,13 @@ Provides functionality for SQLServer Flex
Provides functionality for SQLServer Flex.

```
stackit sqlserverflex [flags]
stackit beta sqlserverflex [flags]
```

### Options

```
-h, --help Help for "stackit sqlserverflex"
-h, --help Help for "stackit beta sqlserverflex"
```

### Options inherited from parent commands
Expand All @@ -28,6 +28,6 @@ stackit sqlserverflex [flags]

### SEE ALSO

* [stackit](./stackit.md) - Manage STACKIT resources using the command line
* [stackit sqlserverflex instance](./stackit_sqlserverflex_instance.md) - Provides functionality for SQLServer Flex instances
* [stackit beta](./stackit_beta.md) - Contains beta STACKIT CLI commands
* [stackit beta sqlserverflex instance](./stackit_beta_sqlserverflex_instance.md) - Provides functionality for SQLServer Flex instances

37 changes: 37 additions & 0 deletions docs/stackit_beta_sqlserverflex_instance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## stackit beta sqlserverflex instance

Provides functionality for SQLServer Flex instances

### Synopsis

Provides functionality for SQLServer Flex instances.

```
stackit beta sqlserverflex instance [flags]
```

### Options

```
-h, --help Help for "stackit beta sqlserverflex instance"
```

### 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
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```

### SEE ALSO

* [stackit beta sqlserverflex](./stackit_beta_sqlserverflex.md) - Provides functionality for SQLServer Flex
* [stackit beta sqlserverflex instance create](./stackit_beta_sqlserverflex_instance_create.md) - Creates an SQLServer Flex instance
* [stackit beta sqlserverflex instance delete](./stackit_beta_sqlserverflex_instance_delete.md) - Deletes an SQLServer Flex instance
* [stackit beta sqlserverflex instance describe](./stackit_beta_sqlserverflex_instance_describe.md) - Shows details of an SQLServer Flex instance
* [stackit beta sqlserverflex instance list](./stackit_beta_sqlserverflex_instance_list.md) - Lists all SQLServer Flex instances
* [stackit beta sqlserverflex instance update](./stackit_beta_sqlserverflex_instance_update.md) - Updates an SQLServer Flex instance

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## stackit sqlserverflex instance create
## stackit beta sqlserverflex instance create

Creates an SQLServer Flex instance

Expand All @@ -7,7 +7,7 @@ Creates an SQLServer Flex instance
Creates an SQLServer Flex instance.

```
stackit sqlserverflex instance create [flags]
stackit beta sqlserverflex instance create [flags]
```

### Examples
Expand All @@ -31,7 +31,7 @@ stackit sqlserverflex instance create [flags]
--cpu int Number of CPUs
--edition string Edition of the SQLServer instance
--flavor-id string ID of the flavor
-h, --help Help for "stackit sqlserverflex instance create"
-h, --help Help for "stackit beta sqlserverflex instance create"
-n, --name string Instance name
--ram int Amount of RAM (in GB)
--retention-days int The days for how long the backup files should be stored before being cleaned up
Expand All @@ -52,5 +52,5 @@ stackit sqlserverflex instance create [flags]

### SEE ALSO

* [stackit sqlserverflex instance](./stackit_sqlserverflex_instance.md) - Provides functionality for SQLServer Flex instances
* [stackit beta sqlserverflex instance](./stackit_beta_sqlserverflex_instance.md) - Provides functionality for SQLServer Flex instances

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## stackit sqlserverflex instance delete
## stackit beta sqlserverflex instance delete

Deletes an SQLServer Flex instance

Expand All @@ -7,7 +7,7 @@ Deletes an SQLServer Flex instance
Deletes an SQLServer Flex instance.

```
stackit sqlserverflex instance delete INSTANCE_ID [flags]
stackit beta sqlserverflex instance delete INSTANCE_ID [flags]
```

### Examples
Expand All @@ -20,7 +20,7 @@ stackit sqlserverflex instance delete INSTANCE_ID [flags]
### Options

```
-h, --help Help for "stackit sqlserverflex instance delete"
-h, --help Help for "stackit beta sqlserverflex instance delete"
```

### Options inherited from parent commands
Expand All @@ -35,5 +35,5 @@ stackit sqlserverflex instance delete INSTANCE_ID [flags]

### SEE ALSO

* [stackit sqlserverflex instance](./stackit_sqlserverflex_instance.md) - Provides functionality for SQLServer Flex instances
* [stackit beta sqlserverflex instance](./stackit_beta_sqlserverflex_instance.md) - Provides functionality for SQLServer Flex instances

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## stackit sqlserverflex instance describe
## stackit beta sqlserverflex instance describe

Shows details of an SQLServer Flex instance

Expand All @@ -7,7 +7,7 @@ Shows details of an SQLServer Flex instance
Shows details of an SQLServer Flex instance.

```
stackit sqlserverflex instance describe INSTANCE_ID [flags]
stackit beta sqlserverflex instance describe INSTANCE_ID [flags]
```

### Examples
Expand All @@ -23,7 +23,7 @@ stackit sqlserverflex instance describe INSTANCE_ID [flags]
### Options

```
-h, --help Help for "stackit sqlserverflex instance describe"
-h, --help Help for "stackit beta sqlserverflex instance describe"
```

### Options inherited from parent commands
Expand All @@ -38,5 +38,5 @@ stackit sqlserverflex instance describe INSTANCE_ID [flags]

### SEE ALSO

* [stackit sqlserverflex instance](./stackit_sqlserverflex_instance.md) - Provides functionality for SQLServer Flex instances
* [stackit beta sqlserverflex instance](./stackit_beta_sqlserverflex_instance.md) - Provides functionality for SQLServer Flex instances

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## stackit sqlserverflex instance list
## stackit beta sqlserverflex instance list

Lists all SQLServer Flex instances

Expand All @@ -7,7 +7,7 @@ Lists all SQLServer Flex instances
Lists all SQLServer Flex instances.

```
stackit sqlserverflex instance list [flags]
stackit beta sqlserverflex instance list [flags]
```

### Examples
Expand All @@ -26,7 +26,7 @@ stackit sqlserverflex instance list [flags]
### Options

```
-h, --help Help for "stackit sqlserverflex instance list"
-h, --help Help for "stackit beta sqlserverflex instance list"
--limit int Maximum number of entries to list
```

Expand All @@ -42,5 +42,5 @@ stackit sqlserverflex instance list [flags]

### SEE ALSO

* [stackit sqlserverflex instance](./stackit_sqlserverflex_instance.md) - Provides functionality for SQLServer Flex instances
* [stackit beta sqlserverflex instance](./stackit_beta_sqlserverflex_instance.md) - Provides functionality for SQLServer Flex instances

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## stackit sqlserverflex instance update
## stackit beta sqlserverflex instance update

Updates an SQLServer Flex instance

Expand All @@ -7,7 +7,7 @@ Updates an SQLServer Flex instance
Updates an SQLServer Flex instance.

```
stackit sqlserverflex instance update INSTANCE_ID [flags]
stackit beta sqlserverflex instance update INSTANCE_ID [flags]
```

### Examples
Expand All @@ -27,7 +27,7 @@ stackit sqlserverflex instance update INSTANCE_ID [flags]
--backup-schedule string Backup schedule
--cpu int Number of CPUs
--flavor-id string ID of the flavor
-h, --help Help for "stackit sqlserverflex instance update"
-h, --help Help for "stackit beta sqlserverflex instance update"
-n, --name string Instance name
--ram int Amount of RAM (in GB)
--version string Version
Expand All @@ -45,5 +45,5 @@ stackit sqlserverflex instance update INSTANCE_ID [flags]

### SEE ALSO

* [stackit sqlserverflex instance](./stackit_sqlserverflex_instance.md) - Provides functionality for SQLServer Flex instances
* [stackit beta sqlserverflex instance](./stackit_beta_sqlserverflex_instance.md) - Provides functionality for SQLServer Flex instances

37 changes: 0 additions & 37 deletions docs/stackit_sqlserverflex_instance.md

This file was deleted.

39 changes: 39 additions & 0 deletions internal/cmd/beta/beta.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package beta

import (
"fmt"

"github.com/stackitcloud/stackit-cli/internal/cmd/beta/sqlserverflex"
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
"github.com/stackitcloud/stackit-cli/internal/pkg/examples"
"github.com/stackitcloud/stackit-cli/internal/pkg/print"
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"

"github.com/spf13/cobra"
)

func NewCmd(p *print.Printer) *cobra.Command {
cmd := &cobra.Command{
Use: "beta",
Short: "Contains beta STACKIT CLI commands",
Long: fmt.Sprintf("%s\n%s",
"Contains beta STACKIT CLI commands.",
"The commands under this group are still in a beta state, and functionality may be incomplete or have breaking changes."),
Args: args.NoArgs,
Run: utils.CmdHelp,
Example: examples.Build(
examples.NewExample(
"See the currently available beta commands",
"$ stackit beta --help"),
examples.NewExample(
"Execute a beta command",
"$ stackit beta MY_COMMAND"),
),
}
addSubcommands(cmd, p)
return cmd
}

func addSubcommands(cmd *cobra.Command, p *print.Printer) {
cmd.AddCommand(sqlserverflex.NewCmd(p))
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package instance

import (
"github.com/stackitcloud/stackit-cli/internal/cmd/sqlserverflex/instance/create"
"github.com/stackitcloud/stackit-cli/internal/cmd/sqlserverflex/instance/delete"
"github.com/stackitcloud/stackit-cli/internal/cmd/sqlserverflex/instance/describe"
"github.com/stackitcloud/stackit-cli/internal/cmd/sqlserverflex/instance/list"
"github.com/stackitcloud/stackit-cli/internal/cmd/sqlserverflex/instance/update"
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/sqlserverflex/instance/create"
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/sqlserverflex/instance/delete"
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/sqlserverflex/instance/describe"
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/sqlserverflex/instance/list"
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/sqlserverflex/instance/update"
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
"github.com/stackitcloud/stackit-cli/internal/pkg/print"
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"
Expand Down
Loading