Skip to content

Commit 4a36ac0

Browse files
GokceGKjoaopalet
andauthored
Onboard IaaS volume commands (#503)
* onboard IaaS volume commands * generate docs * fix nil pointer exceptions * add volume command to readme * fix linter issues * fix linter issues * Update internal/cmd/beta/volume/create/create.go Co-authored-by: João Palet <[email protected]> * Update internal/cmd/beta/volume/resize/resize.go Co-authored-by: João Palet <[email protected]> * make changes from review * Update internal/cmd/beta/volume/create/create.go Co-authored-by: João Palet <[email protected]> --------- Co-authored-by: João Palet <[email protected]>
1 parent b88ebfb commit 4a36ac0

35 files changed

+3723
-23
lines changed

README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -65,28 +65,28 @@ Help is available for any command by specifying the special flag `--help` (or si
6565

6666
Below you can find a list of the STACKIT services already available in the CLI (along with their respective command names) and the ones that are currently planned to be integrated.
6767

68-
| Service | CLI Commands | Status |
69-
| ---------------------------------- | ------------------------- | ------------------------- |
70-
| Observability | `observability` | :white_check_mark: |
71-
| Infrastructure as a Service (IaaS) | `beta network-area` | :white_check_mark: (beta) |
72-
| Authorization | `project`, `organization` | :white_check_mark: |
73-
| DNS | `dns` | :white_check_mark: |
74-
| Kubernetes Engine (SKE) | `ske` | :white_check_mark: |
75-
| Load Balancer | `load-balancer` | :white_check_mark: |
76-
| LogMe | `logme` | :white_check_mark: |
77-
| MariaDB | `mariadb` | :white_check_mark: |
78-
| MongoDB Flex | `mongodbflex` | :white_check_mark: |
79-
| Object Storage | `object-storage` | :white_check_mark: |
80-
| OpenSearch | `opensearch` | :white_check_mark: |
81-
| PostgreSQL Flex | `postgresflex` | :white_check_mark: |
82-
| RabbitMQ | `rabbitmq` | :white_check_mark: |
83-
| Redis | `redis` | :white_check_mark: |
84-
| Resource Manager | `project` | :white_check_mark: |
85-
| Secrets Manager | `secrets-manager` | :white_check_mark: |
86-
| Server Backup Management | `beta server backup` | :white_check_mark: (beta) |
87-
| Server Command (Run Command) | `beta server command` | :white_check_mark: (beta) |
88-
| Service Account | `service-account` | :white_check_mark: |
89-
| SQLServer Flex | `beta sqlserverflex` | :white_check_mark: (beta) |
68+
| Service | CLI Commands | Status |
69+
| ---------------------------------- |----------------------------------------------------------------| ------------------------- |
70+
| Observability | `observability` | :white_check_mark: |
71+
| Infrastructure as a Service (IaaS) | `beta network-area` <br/> `beta network` <br/> `beta volume` | :white_check_mark: (beta) |
72+
| Authorization | `project`, `organization` | :white_check_mark: |
73+
| DNS | `dns` | :white_check_mark: |
74+
| Kubernetes Engine (SKE) | `ske` | :white_check_mark: |
75+
| Load Balancer | `load-balancer` | :white_check_mark: |
76+
| LogMe | `logme` | :white_check_mark: |
77+
| MariaDB | `mariadb` | :white_check_mark: |
78+
| MongoDB Flex | `mongodbflex` | :white_check_mark: |
79+
| Object Storage | `object-storage` | :white_check_mark: |
80+
| OpenSearch | `opensearch` | :white_check_mark: |
81+
| PostgreSQL Flex | `postgresflex` | :white_check_mark: |
82+
| RabbitMQ | `rabbitmq` | :white_check_mark: |
83+
| Redis | `redis` | :white_check_mark: |
84+
| Resource Manager | `project` | :white_check_mark: |
85+
| Secrets Manager | `secrets-manager` | :white_check_mark: |
86+
| Server Backup Management | `beta server backup` | :white_check_mark: (beta) |
87+
| Server Command (Run Command) | `beta server command` | :white_check_mark: (beta) |
88+
| Service Account | `service-account` | :white_check_mark: |
89+
| SQLServer Flex | `beta sqlserverflex` | :white_check_mark: (beta) |
9090

9191
## Authentication
9292

docs/stackit_beta.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@ stackit beta [flags]
4444
* [stackit beta network-area](./stackit_beta_network-area.md) - Provides functionality for STACKIT Network Area (SNA)
4545
* [stackit beta server](./stackit_beta_server.md) - Provides functionality for Server
4646
* [stackit beta sqlserverflex](./stackit_beta_sqlserverflex.md) - Provides functionality for SQLServer Flex
47+
* [stackit beta volume](./stackit_beta_volume.md) - Provides functionality for Volume
4748

docs/stackit_beta_volume.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## stackit beta volume
2+
3+
Provides functionality for Volume
4+
5+
### Synopsis
6+
7+
Provides functionality for Volume.
8+
9+
```
10+
stackit beta volume [flags]
11+
```
12+
13+
### Options
14+
15+
```
16+
-h, --help Help for "stackit beta volume"
17+
```
18+
19+
### Options inherited from parent commands
20+
21+
```
22+
-y, --assume-yes If set, skips all confirmation prompts
23+
--async If set, runs the command asynchronously
24+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
25+
-p, --project-id string Project ID
26+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
27+
```
28+
29+
### SEE ALSO
30+
31+
* [stackit beta](./stackit_beta.md) - Contains beta STACKIT CLI commands
32+
* [stackit beta volume create](./stackit_beta_volume_create.md) - Creates a volume
33+
* [stackit beta volume delete](./stackit_beta_volume_delete.md) - Deletes a volume
34+
* [stackit beta volume describe](./stackit_beta_volume_describe.md) - Shows details of a volume
35+
* [stackit beta volume list](./stackit_beta_volume_list.md) - Lists all volumes of a project
36+
* [stackit beta volume performance-class](./stackit_beta_volume_performance-class.md) - Provides functionality for volume performance classes available inside a project
37+
* [stackit beta volume resize](./stackit_beta_volume_resize.md) - Resizes a volume
38+
* [stackit beta volume update](./stackit_beta_volume_update.md) - Updates a volume
39+

docs/stackit_beta_volume_create.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
## stackit beta volume create
2+
3+
Creates a volume
4+
5+
### Synopsis
6+
7+
Creates a volume.
8+
9+
```
10+
stackit beta volume create [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Create a volume with availability zone "eu01-1" and size 64 GB
17+
$ stackit beta volume create --availability-zone eu01-1 --size 64
18+
19+
Create a volume with name "volume-1", source id "xxx" and type "image"
20+
$ stackit beta volume create --availability-zone eu01-1 --name volume-1 --source-id xxx --source-type image
21+
22+
Create a volume with availability zone "eu01-1", performance class "storage_premium_perf1" and size 64 GB
23+
$ stackit beta volume create --availability-zone eu01-1 --performance-class storage_premium_perf1 --size 64
24+
```
25+
26+
### Options
27+
28+
```
29+
--availability-zone string Availability zone
30+
--description string Volume description
31+
-h, --help Help for "stackit beta volume create"
32+
--label stringToString Labels are key-value string pairs which can be attached to a volume. A label can be provided with the format key=value and the flag can be used multiple times to provide a list of labels (default [])
33+
-n, --name string Volume name
34+
--performance-class string Performance class
35+
--size int Volume size (GB). Either 'size' or the 'source-id' and 'source-type' flags must be given
36+
--source-id string ID of the source object of volume. Either 'size' or the 'source-id' and 'source-type' flags must be given
37+
--source-type string Type of the source object of volume. Either 'size' or the 'source-id' and 'source-type' flags must be given
38+
```
39+
40+
### Options inherited from parent commands
41+
42+
```
43+
-y, --assume-yes If set, skips all confirmation prompts
44+
--async If set, runs the command asynchronously
45+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
46+
-p, --project-id string Project ID
47+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
48+
```
49+
50+
### SEE ALSO
51+
52+
* [stackit beta volume](./stackit_beta_volume.md) - Provides functionality for Volume
53+

docs/stackit_beta_volume_delete.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
## stackit beta volume delete
2+
3+
Deletes a volume
4+
5+
### Synopsis
6+
7+
Deletes a volume.
8+
If the volume is still in use, the deletion will fail
9+
10+
11+
```
12+
stackit beta volume delete [flags]
13+
```
14+
15+
### Examples
16+
17+
```
18+
Delete volume with ID "xxx"
19+
$ stackit beta volume delete xxx
20+
```
21+
22+
### Options
23+
24+
```
25+
-h, --help Help for "stackit beta volume delete"
26+
```
27+
28+
### Options inherited from parent commands
29+
30+
```
31+
-y, --assume-yes If set, skips all confirmation prompts
32+
--async If set, runs the command asynchronously
33+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
34+
-p, --project-id string Project ID
35+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
36+
```
37+
38+
### SEE ALSO
39+
40+
* [stackit beta volume](./stackit_beta_volume.md) - Provides functionality for Volume
41+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## stackit beta volume describe
2+
3+
Shows details of a volume
4+
5+
### Synopsis
6+
7+
Shows details of a volume.
8+
9+
```
10+
stackit beta volume describe [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Show details of a volume with ID "xxx"
17+
$ stackit beta volume describe xxx
18+
19+
Show details of a volume with ID "xxx" in JSON format
20+
$ stackit beta volume describe xxx --output-format json
21+
```
22+
23+
### Options
24+
25+
```
26+
-h, --help Help for "stackit beta volume describe"
27+
```
28+
29+
### Options inherited from parent commands
30+
31+
```
32+
-y, --assume-yes If set, skips all confirmation prompts
33+
--async If set, runs the command asynchronously
34+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
35+
-p, --project-id string Project ID
36+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
37+
```
38+
39+
### SEE ALSO
40+
41+
* [stackit beta volume](./stackit_beta_volume.md) - Provides functionality for Volume
42+

docs/stackit_beta_volume_list.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
## stackit beta volume list
2+
3+
Lists all volumes of a project
4+
5+
### Synopsis
6+
7+
Lists all volumes of a project.
8+
9+
```
10+
stackit beta volume list [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Lists all volumes
17+
$ stackit beta volume list
18+
19+
Lists all volumes which contains the label xxx
20+
$ stackit beta volume list --label-selector xxx
21+
22+
Lists all volumes in JSON format
23+
$ stackit beta volume list --output-format json
24+
25+
Lists up to 10 volumes
26+
$ stackit beta volume list --limit 10
27+
```
28+
29+
### Options
30+
31+
```
32+
-h, --help Help for "stackit beta volume list"
33+
--label-selector string Filter by label
34+
--limit int Maximum number of entries to list
35+
```
36+
37+
### Options inherited from parent commands
38+
39+
```
40+
-y, --assume-yes If set, skips all confirmation prompts
41+
--async If set, runs the command asynchronously
42+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
43+
-p, --project-id string Project ID
44+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
45+
```
46+
47+
### SEE ALSO
48+
49+
* [stackit beta volume](./stackit_beta_volume.md) - Provides functionality for Volume
50+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## stackit beta volume performance-class
2+
3+
Provides functionality for volume performance classes available inside a project
4+
5+
### Synopsis
6+
7+
Provides functionality for volume performance classes available inside a project.
8+
9+
```
10+
stackit beta volume performance-class [flags]
11+
```
12+
13+
### Options
14+
15+
```
16+
-h, --help Help for "stackit beta volume performance-class"
17+
```
18+
19+
### Options inherited from parent commands
20+
21+
```
22+
-y, --assume-yes If set, skips all confirmation prompts
23+
--async If set, runs the command asynchronously
24+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
25+
-p, --project-id string Project ID
26+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
27+
```
28+
29+
### SEE ALSO
30+
31+
* [stackit beta volume](./stackit_beta_volume.md) - Provides functionality for Volume
32+
* [stackit beta volume performance-class describe](./stackit_beta_volume_performance-class_describe.md) - Shows details of a volume performance class
33+
* [stackit beta volume performance-class list](./stackit_beta_volume_performance-class_list.md) - Lists all volume performance classes for a project
34+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## stackit beta volume performance-class describe
2+
3+
Shows details of a volume performance class
4+
5+
### Synopsis
6+
7+
Shows details of a volume performance class.
8+
9+
```
10+
stackit beta volume performance-class describe [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Show details of a volume performance class with name "xxx"
17+
$ stackit beta volume performance-class describe xxx
18+
19+
Show details of a volume performance class with name "xxx" in JSON format
20+
$ stackit beta volume performance-class describe xxx --output-format json
21+
```
22+
23+
### Options
24+
25+
```
26+
-h, --help Help for "stackit beta volume performance-class describe"
27+
```
28+
29+
### Options inherited from parent commands
30+
31+
```
32+
-y, --assume-yes If set, skips all confirmation prompts
33+
--async If set, runs the command asynchronously
34+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
35+
-p, --project-id string Project ID
36+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
37+
```
38+
39+
### SEE ALSO
40+
41+
* [stackit beta volume performance-class](./stackit_beta_volume_performance-class.md) - Provides functionality for volume performance classes available inside a project
42+

0 commit comments

Comments
 (0)