Skip to content

Commit 9adbcb1

Browse files
authored
Feat/670192 security groups (#531)
* feature: add command and sub-commands for security groups * feature: implement create command * feature: add list command * fixup: check name length * fixup: added placeholder for client invocation * feature: implement calling service and output of results * feature: implement calling service and output of results for list * feature: move command to beta package * feature: removed duplicate invocation of API * feature: completed delete command * feature: renamed package to conform to standards * feature: refactored tests to reused actual cobra command * feature: refactored flag initialization * feature: implemented update command * feature: implemented describe command * feature: fixed parsing of global flags * feature: fix list command * feature: fixed describe command * feature: fixed typo * feature: updated generated documentation * feature: fix review comments * feature: refresh documentation * feature: fix a regression in list command * feature: fix regressions * feature: implemented review suggestions * restructed security-group command * feature: updated documentation * feature: restructured sub commands to canonical structure
1 parent 49589d5 commit 9adbcb1

20 files changed

+2116
-8
lines changed

docs/stackit_beta.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ stackit beta [flags]
4545
* [stackit beta network-area](./stackit_beta_network-area.md) - Provides functionality for STACKIT Network Area (SNA)
4646
* [stackit beta network-interface](./stackit_beta_network-interface.md) - Provides functionality for network interfaces
4747
* [stackit beta public-ip](./stackit_beta_public-ip.md) - Provides functionality for public IPs
48-
* [stackit beta security-group](./stackit_beta_security-group.md) - Provides functionality for security groups
48+
* [stackit beta security-group](./stackit_beta_security-group.md) - Manage security groups
4949
* [stackit beta server](./stackit_beta_server.md) - Provides functionality for servers
5050
* [stackit beta sqlserverflex](./stackit_beta_sqlserverflex.md) - Provides functionality for SQLServer Flex
5151
* [stackit beta volume](./stackit_beta_volume.md) - Provides functionality for volumes

docs/stackit_beta_security-group.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## stackit beta security-group
22

3-
Provides functionality for security groups
3+
Manage security groups
44

55
### Synopsis
66

7-
Provides functionality for security groups.
7+
Manage the lifecycle of security groups and rules.
88

99
```
1010
stackit beta security-group [flags]
@@ -29,5 +29,10 @@ stackit beta security-group [flags]
2929
### SEE ALSO
3030

3131
* [stackit beta](./stackit_beta.md) - Contains beta STACKIT CLI commands
32+
* [stackit beta security-group create](./stackit_beta_security-group_create.md) - Creates security groups
33+
* [stackit beta security-group delete](./stackit_beta_security-group_delete.md) - Deletes a security group
34+
* [stackit beta security-group describe](./stackit_beta_security-group_describe.md) - Describes security groups
35+
* [stackit beta security-group list](./stackit_beta_security-group_list.md) - Lists security groups
3236
* [stackit beta security-group rule](./stackit_beta_security-group_rule.md) - Provides functionality for security group rules
37+
* [stackit beta security-group update](./stackit_beta_security-group_update.md) - Updates a security group
3338

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
## stackit beta security-group create
2+
3+
Creates security groups
4+
5+
### Synopsis
6+
7+
Creates security groups.
8+
9+
```
10+
stackit beta security-group create [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Create a named group
17+
$ stackit beta security-group create --name my-new-group
18+
19+
Create a named group with labels
20+
$ stackit beta security-group create --name my-new-group --labels label1=value1,label2=value2
21+
```
22+
23+
### Options
24+
25+
```
26+
--description string An optional description of the security group.
27+
-h, --help Help for "stackit beta security-group create"
28+
--labels stringToString Labels are key-value string pairs which can be attached to a network-interface. E.g. '--labels key1=value1,key2=value2,...' (default [])
29+
--name string The name of the security group.
30+
--stateful Create a stateful or a stateless security group
31+
```
32+
33+
### Options inherited from parent commands
34+
35+
```
36+
-y, --assume-yes If set, skips all confirmation prompts
37+
--async If set, runs the command asynchronously
38+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
39+
-p, --project-id string Project ID
40+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
41+
```
42+
43+
### SEE ALSO
44+
45+
* [stackit beta security-group](./stackit_beta_security-group.md) - Manage security groups
46+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## stackit beta security-group delete
2+
3+
Deletes a security group
4+
5+
### Synopsis
6+
7+
Deletes a security group by its internal ID.
8+
9+
```
10+
stackit beta security-group delete [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Delete a named group with ID "xxx"
17+
$ stackit beta security-group delete xxx
18+
```
19+
20+
### Options
21+
22+
```
23+
-h, --help Help for "stackit beta security-group delete"
24+
```
25+
26+
### Options inherited from parent commands
27+
28+
```
29+
-y, --assume-yes If set, skips all confirmation prompts
30+
--async If set, runs the command asynchronously
31+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
32+
-p, --project-id string Project ID
33+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
34+
```
35+
36+
### SEE ALSO
37+
38+
* [stackit beta security-group](./stackit_beta_security-group.md) - Manage security groups
39+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## stackit beta security-group describe
2+
3+
Describes security groups
4+
5+
### Synopsis
6+
7+
Describes security groups by its internal ID.
8+
9+
```
10+
stackit beta security-group describe [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Describe group "xxx"
17+
$ stackit beta security-group describe xxx
18+
```
19+
20+
### Options
21+
22+
```
23+
-h, --help Help for "stackit beta security-group describe"
24+
```
25+
26+
### Options inherited from parent commands
27+
28+
```
29+
-y, --assume-yes If set, skips all confirmation prompts
30+
--async If set, runs the command asynchronously
31+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
32+
-p, --project-id string Project ID
33+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
34+
```
35+
36+
### SEE ALSO
37+
38+
* [stackit beta security-group](./stackit_beta_security-group.md) - Manage security groups
39+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
## stackit beta security-group list
2+
3+
Lists security groups
4+
5+
### Synopsis
6+
7+
Lists security groups by its internal ID.
8+
9+
```
10+
stackit beta security-group list [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
List all groups
17+
$ stackit beta security-group list
18+
19+
List groups with labels
20+
$ stackit beta security-group list --label-selector label1=value1,label2=value2
21+
```
22+
23+
### Options
24+
25+
```
26+
-h, --help Help for "stackit beta security-group list"
27+
--label-selector string Filter by label
28+
```
29+
30+
### Options inherited from parent commands
31+
32+
```
33+
-y, --assume-yes If set, skips all confirmation prompts
34+
--async If set, runs the command asynchronously
35+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
36+
-p, --project-id string Project ID
37+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
38+
```
39+
40+
### SEE ALSO
41+
42+
* [stackit beta security-group](./stackit_beta_security-group.md) - Manage security groups
43+

docs/stackit_beta_security-group_rule.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ stackit beta security-group rule [flags]
2828

2929
### SEE ALSO
3030

31-
* [stackit beta security-group](./stackit_beta_security-group.md) - Provides functionality for security groups
31+
* [stackit beta security-group](./stackit_beta_security-group.md) - Manage security groups
3232
* [stackit beta security-group rule create](./stackit_beta_security-group_rule_create.md) - Creates a security group rule
3333
* [stackit beta security-group rule delete](./stackit_beta_security-group_rule_delete.md) - Deletes a security group rule
3434
* [stackit beta security-group rule describe](./stackit_beta_security-group_rule_describe.md) - Shows details of a security group rule
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
## stackit beta security-group update
2+
3+
Updates a security group
4+
5+
### Synopsis
6+
7+
Updates a named security group
8+
9+
```
10+
stackit beta security-group update [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Update the name of group "xxx"
17+
$ stackit beta security-group update xxx --name my-new-name
18+
19+
Update the labels of group "xxx"
20+
$ stackit beta security-group update xxx --labels label1=value1,label2=value2
21+
```
22+
23+
### Options
24+
25+
```
26+
--description string An optional description of the security group.
27+
-h, --help Help for "stackit beta security-group update"
28+
--labels stringToString Labels are key-value string pairs which can be attached to a network-interface. E.g. '--labels key1=value1,key2=value2,...' (default [])
29+
--name string The name of the security group.
30+
```
31+
32+
### Options inherited from parent commands
33+
34+
```
35+
-y, --assume-yes If set, skips all confirmation prompts
36+
--async If set, runs the command asynchronously
37+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
38+
-p, --project-id string Project ID
39+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
40+
```
41+
42+
### SEE ALSO
43+
44+
* [stackit beta security-group](./stackit_beta_security-group.md) - Manage security groups
45+

0 commit comments

Comments
 (0)