Skip to content

Commit 9859f26

Browse files
GokceGKFyusel
andauthored
Onboard IaaS Public IP commands (#513)
* onboard public ip commands * changes in commands to edit descriptions and avoid nil pointer exceptions * fix utils * add public ip to read me * Update internal/cmd/beta/public-ip/create/create.go Co-authored-by: Alexander Dahmen <[email protected]> * update examples * remove associated resource id from update command * Update internal/cmd/beta/public-ip/associate/associate.go Co-authored-by: Alexander Dahmen <[email protected]> * Update internal/cmd/beta/public-ip/delete/delete.go Co-authored-by: Alexander Dahmen <[email protected]> * add associated resource id information in the disassociate command * fix linter issues * remove obsolete unit tests * add empty update check * change public ip util to avoid NPE * adapt documentation --------- Co-authored-by: Alexander Dahmen <[email protected]>
1 parent d01bfef commit 9859f26

26 files changed

+2969
-22
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` <br/> `beta network` <br/> `beta volume` <br/> `beta network-interface` <br/> `beta server` | :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` <br/> `beta network-interface` <br/> `beta public-ip` | :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
@@ -43,6 +43,7 @@ stackit beta [flags]
4343
* [stackit beta network](./stackit_beta_network.md) - Provides functionality for networks
4444
* [stackit beta network-area](./stackit_beta_network-area.md) - Provides functionality for STACKIT Network Area (SNA)
4545
* [stackit beta network-interface](./stackit_beta_network-interface.md) - Provides functionality for network interfaces
46+
* [stackit beta public-ip](./stackit_beta_public-ip.md) - Provides functionality for public IPs
4647
* [stackit beta server](./stackit_beta_server.md) - Provides functionality for servers
4748
* [stackit beta sqlserverflex](./stackit_beta_sqlserverflex.md) - Provides functionality for SQLServer Flex
4849
* [stackit beta volume](./stackit_beta_volume.md) - Provides functionality for volumes

docs/stackit_beta_public-ip.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## stackit beta public-ip
2+
3+
Provides functionality for public IPs
4+
5+
### Synopsis
6+
7+
Provides functionality for public IPs.
8+
9+
```
10+
stackit beta public-ip [flags]
11+
```
12+
13+
### Options
14+
15+
```
16+
-h, --help Help for "stackit beta public-ip"
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 public-ip associate](./stackit_beta_public-ip_associate.md) - Associates a Public IP with a network interface or a virtual IP
33+
* [stackit beta public-ip create](./stackit_beta_public-ip_create.md) - Creates a Public IP
34+
* [stackit beta public-ip delete](./stackit_beta_public-ip_delete.md) - Deletes a Public IP
35+
* [stackit beta public-ip describe](./stackit_beta_public-ip_describe.md) - Shows details of a Public IP
36+
* [stackit beta public-ip disassociate](./stackit_beta_public-ip_disassociate.md) - Disassociates a Public IP from a network interface or a virtual IP
37+
* [stackit beta public-ip list](./stackit_beta_public-ip_list.md) - Lists all Public IPs of a project
38+
* [stackit beta public-ip update](./stackit_beta_public-ip_update.md) - Updates a Public IP
39+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
## stackit beta public-ip associate
2+
3+
Associates a Public IP with a network interface or a virtual IP
4+
5+
### Synopsis
6+
7+
Associates a Public IP with a network interface or a virtual IP.
8+
9+
```
10+
stackit beta public-ip associate [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Associate public IP with ID "xxx" to a resource (network interface or virtual IP) with ID "yyy"
17+
$ stackit beta public-ip associate xxx --associated-resource-id yyy
18+
```
19+
20+
### Options
21+
22+
```
23+
--associated-resource-id string Associates the public IP with a network interface or virtual IP (ID)
24+
-h, --help Help for "stackit beta public-ip associate"
25+
```
26+
27+
### Options inherited from parent commands
28+
29+
```
30+
-y, --assume-yes If set, skips all confirmation prompts
31+
--async If set, runs the command asynchronously
32+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
33+
-p, --project-id string Project ID
34+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
35+
```
36+
37+
### SEE ALSO
38+
39+
* [stackit beta public-ip](./stackit_beta_public-ip.md) - Provides functionality for public IPs
40+
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## stackit beta public-ip create
2+
3+
Creates a Public IP
4+
5+
### Synopsis
6+
7+
Creates a Public IP.
8+
9+
```
10+
stackit beta public-ip create [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Create a public IP
17+
$ stackit beta public-ip create
18+
19+
Create a public IP with associated resource ID "xxx"
20+
$ stackit beta public-ip create --associated-resource-id xxx
21+
22+
Create a public IP with associated resource ID "xxx" and labels
23+
$ stackit beta public-ip create --associated-resource-id xxx --labels key=value,foo=bar
24+
```
25+
26+
### Options
27+
28+
```
29+
--associated-resource-id string Associates the public IP with a network interface or virtual IP (ID)
30+
-h, --help Help for "stackit beta public-ip create"
31+
--labels stringToString Labels are key-value string pairs which can be attached to a public IP. E.g. '--labels key1=value1,key2=value2,...' (default [])
32+
```
33+
34+
### Options inherited from parent commands
35+
36+
```
37+
-y, --assume-yes If set, skips all confirmation prompts
38+
--async If set, runs the command asynchronously
39+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
40+
-p, --project-id string Project ID
41+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
42+
```
43+
44+
### SEE ALSO
45+
46+
* [stackit beta public-ip](./stackit_beta_public-ip.md) - Provides functionality for public IPs
47+
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
## stackit beta public-ip delete
2+
3+
Deletes a Public IP
4+
5+
### Synopsis
6+
7+
Deletes a Public IP.
8+
If the public IP is still in use, the deletion will fail
9+
10+
11+
```
12+
stackit beta public-ip delete [flags]
13+
```
14+
15+
### Examples
16+
17+
```
18+
Delete public IP with ID "xxx"
19+
$ stackit beta public-ip delete xxx
20+
```
21+
22+
### Options
23+
24+
```
25+
-h, --help Help for "stackit beta public-ip 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 public-ip](./stackit_beta_public-ip.md) - Provides functionality for public IPs
41+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## stackit beta public-ip describe
2+
3+
Shows details of a Public IP
4+
5+
### Synopsis
6+
7+
Shows details of a Public IP.
8+
9+
```
10+
stackit beta public-ip describe [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Show details of a public IP with ID "xxx"
17+
$ stackit beta public-ip describe xxx
18+
19+
Show details of a public IP with ID "xxx" in JSON format
20+
$ stackit beta public-ip describe xxx --output-format json
21+
```
22+
23+
### Options
24+
25+
```
26+
-h, --help Help for "stackit beta public-ip 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 public-ip](./stackit_beta_public-ip.md) - Provides functionality for public IPs
42+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## stackit beta public-ip disassociate
2+
3+
Disassociates a Public IP from a network interface or a virtual IP
4+
5+
### Synopsis
6+
7+
Disassociates a Public IP from a network interface or a virtual IP.
8+
9+
```
10+
stackit beta public-ip disassociate [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Disassociate public IP with ID "xxx" from a resource (network interface or virtual IP)
17+
$ stackit beta public-ip disassociate xxx
18+
```
19+
20+
### Options
21+
22+
```
23+
-h, --help Help for "stackit beta public-ip disassociate"
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 public-ip](./stackit_beta_public-ip.md) - Provides functionality for public IPs
39+
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
## stackit beta public-ip list
2+
3+
Lists all Public IPs of a project
4+
5+
### Synopsis
6+
7+
Lists all Public IPs of a project.
8+
9+
```
10+
stackit beta public-ip list [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Lists all public IPs
17+
$ stackit beta public-ip list
18+
19+
Lists all public IPs which contains the label xxx
20+
$ stackit beta public-ip list --label-selector xxx
21+
22+
Lists all public IPs in JSON format
23+
$ stackit beta public-ip list --output-format json
24+
25+
Lists up to 10 public IPs
26+
$ stackit beta public-ip list --limit 10
27+
```
28+
29+
### Options
30+
31+
```
32+
-h, --help Help for "stackit beta public-ip 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 public-ip](./stackit_beta_public-ip.md) - Provides functionality for public IPs
50+

0 commit comments

Comments
 (0)