Skip to content

Commit a3054cf

Browse files
GokceGKjoaopalet
andauthored
Onboard IaaS network (#438)
* onboard iaas network commands * add unit tests * generate docs * fix linter issues * update iaas sdk version * Update internal/cmd/beta/network/update/update.go Co-authored-by: João Palet <[email protected]> * Update internal/cmd/beta/network/describe/describe.go Co-authored-by: João Palet <[email protected]> * Update internal/cmd/beta/network/describe/describe.go Co-authored-by: João Palet <[email protected]> * Update internal/cmd/beta/network/create/create.go Co-authored-by: João Palet <[email protected]> * rename dns servers as dns name servers * change description for prefix length * add ipv6 fields --------- Co-authored-by: João Palet <[email protected]>
1 parent d5aa4d3 commit a3054cf

21 files changed

+2331
-0
lines changed

docs/stackit_beta.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ stackit beta [flags]
4040
### SEE ALSO
4141

4242
* [stackit](./stackit.md) - Manage STACKIT resources using the command line
43+
* [stackit beta network](./stackit_beta_network.md) - Provides functionality for Network
4344
* [stackit beta network-area](./stackit_beta_network-area.md) - Provides functionality for STACKIT Network Area (SNA)
4445
* [stackit beta server](./stackit_beta_server.md) - Provides functionality for Server
4546
* [stackit beta sqlserverflex](./stackit_beta_sqlserverflex.md) - Provides functionality for SQLServer Flex

docs/stackit_beta_network.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
## stackit beta network
2+
3+
Provides functionality for Network
4+
5+
### Synopsis
6+
7+
Provides functionality for Network.
8+
9+
```
10+
stackit beta network [flags]
11+
```
12+
13+
### Options
14+
15+
```
16+
-h, --help Help for "stackit beta network"
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 network create](./stackit_beta_network_create.md) - Creates a network
33+
* [stackit beta network delete](./stackit_beta_network_delete.md) - Deletes a network
34+
* [stackit beta network describe](./stackit_beta_network_describe.md) - Shows details of a network
35+
* [stackit beta network list](./stackit_beta_network_list.md) - Lists all networks of a project
36+
* [stackit beta network update](./stackit_beta_network_update.md) - Updates a network
37+
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
## stackit beta network create
2+
3+
Creates a network
4+
5+
### Synopsis
6+
7+
Creates a network.
8+
9+
```
10+
stackit beta network create [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Create a network with name "network-1"
17+
$ stackit beta network create --name network-1
18+
19+
Create an IPv4 network with name "network-1" with DNS name servers and a prefix length
20+
$ stackit beta network create --name network-1 --ipv4-dns-name-servers "1.1.1.1,8.8.8.8,9.9.9.9" --ipv4-prefix-length 25
21+
22+
Create an IPv6 network with name "network-1" with DNS name servers and a prefix length
23+
$ stackit beta network create --name network-1 --ipv6-dns-name-servers "1.1.1.1,8.8.8.8,9.9.9.9" --ipv6-prefix-length 25
24+
```
25+
26+
### Options
27+
28+
```
29+
-h, --help Help for "stackit beta network create"
30+
--ipv4-dns-name-servers strings List of DNS name servers for IPv4
31+
--ipv4-prefix-length int The prefix length of the IPv4 network
32+
--ipv6-dns-name-servers strings List of DNS name servers for IPv6
33+
--ipv6-prefix-length int The prefix length of the IPv6 network
34+
-n, --name string Network name
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 network](./stackit_beta_network.md) - Provides functionality for Network
50+
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
## stackit beta network delete
2+
3+
Deletes a network
4+
5+
### Synopsis
6+
7+
Deletes a network.
8+
If the network is still in use, the deletion will fail
9+
10+
11+
```
12+
stackit beta network delete [flags]
13+
```
14+
15+
### Examples
16+
17+
```
18+
Delete network with ID "xxx"
19+
$ stackit beta network delete xxx
20+
```
21+
22+
### Options
23+
24+
```
25+
-h, --help Help for "stackit beta network 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 network](./stackit_beta_network.md) - Provides functionality for Network
41+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## stackit beta network describe
2+
3+
Shows details of a network
4+
5+
### Synopsis
6+
7+
Shows details of a network.
8+
9+
```
10+
stackit beta network describe [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Show details of a network with ID "xxx"
17+
$ stackit beta network describe xxx
18+
19+
Show details of a network with ID "xxx" in JSON format
20+
$ stackit beta network describe xxx --output-format json
21+
```
22+
23+
### Options
24+
25+
```
26+
-h, --help Help for "stackit beta network 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 network](./stackit_beta_network.md) - Provides functionality for Network
42+

docs/stackit_beta_network_list.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
## stackit beta network list
2+
3+
Lists all networks of a project
4+
5+
### Synopsis
6+
7+
Lists all network of a project.
8+
9+
```
10+
stackit beta network list [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Lists all networks
17+
$ stackit beta network list
18+
19+
Lists all networks in JSON format
20+
$ stackit beta network list --output-format json
21+
22+
Lists up to 10 networks
23+
$ stackit beta network list --limit 10
24+
```
25+
26+
### Options
27+
28+
```
29+
-h, --help Help for "stackit beta network list"
30+
--limit int Maximum number of entries to list
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 network](./stackit_beta_network.md) - Provides functionality for Network
46+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
## stackit beta network update
2+
3+
Updates a network
4+
5+
### Synopsis
6+
7+
Updates a network.
8+
9+
```
10+
stackit beta network update [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Update network with ID "xxx" with new name "network-1-new"
17+
$ stackit beta network update xxx --name network-1-new
18+
19+
Update IPv4 network with ID "xxx" with new name "network-1-new" and new DNS name servers
20+
$ stackit beta network update xxx --name network-1-new --ipv4-dns-name-servers "2.2.2.2"
21+
22+
Update IPv6 network with ID "xxx" with new name "network-1-new" and new DNS name servers
23+
$ stackit beta network update xxx --name network-1-new --ipv6-dns-name-servers "2.2.2.2"
24+
```
25+
26+
### Options
27+
28+
```
29+
-h, --help Help for "stackit beta network update"
30+
--ipv4-dns-name-servers strings List of DNS name servers IPv4
31+
--ipv6-dns-name-servers strings List of DNS name servers for IPv6
32+
-n, --name string Network name
33+
```
34+
35+
### Options inherited from parent commands
36+
37+
```
38+
-y, --assume-yes If set, skips all confirmation prompts
39+
--async If set, runs the command asynchronously
40+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
41+
-p, --project-id string Project ID
42+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
43+
```
44+
45+
### SEE ALSO
46+
47+
* [stackit beta network](./stackit_beta_network.md) - Provides functionality for Network
48+

internal/cmd/beta/beta.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package beta
33
import (
44
"fmt"
55

6+
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/network"
67
networkArea "github.com/stackitcloud/stackit-cli/internal/cmd/beta/network-area"
78
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/server"
89
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/sqlserverflex"
@@ -40,4 +41,5 @@ func addSubcommands(cmd *cobra.Command, p *print.Printer) {
4041
cmd.AddCommand(sqlserverflex.NewCmd(p))
4142
cmd.AddCommand(server.NewCmd(p))
4243
cmd.AddCommand(networkArea.NewCmd(p))
44+
cmd.AddCommand(network.NewCmd(p))
4345
}

0 commit comments

Comments
 (0)