Skip to content

Commit 2551679

Browse files
authored
feat(iaas): Region adjustment and v2 API migration for network-area commands (#1057)
* adjust network-area commands * onboard new network-area region commands (#1063) relates to STACKITCLI-227
1 parent 4b98335 commit 2551679

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3814
-385
lines changed

docs/stackit_network-area.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ stackit network-area [flags]
3535
* [stackit network-area describe](./stackit_network-area_describe.md) - Shows details of a STACKIT Network Area
3636
* [stackit network-area list](./stackit_network-area_list.md) - Lists all STACKIT Network Areas (SNA) of an organization
3737
* [stackit network-area network-range](./stackit_network-area_network-range.md) - Provides functionality for network ranges in STACKIT Network Areas
38+
* [stackit network-area region](./stackit_network-area_region.md) - Provides functionality for regional configuration of STACKIT Network Area (SNA)
3839
* [stackit network-area route](./stackit_network-area_route.md) - Provides functionality for static routes in STACKIT Network Areas
3940
* [stackit network-area update](./stackit_network-area_update.md) - Updates a STACKIT Network Area (SNA)
4041

docs/stackit_network-area_create.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,20 @@ stackit network-area create [flags]
1313
### Examples
1414

1515
```
16-
Create a network area with name "network-area-1" in organization with ID "xxx" with network ranges and a transfer network
17-
$ stackit network-area create --name network-area-1 --organization-id xxx --network-ranges "1.1.1.0/24,192.123.1.0/24" --transfer-network "192.160.0.0/24"
16+
Create a network area with name "network-area-1" in organization with ID "xxx"
17+
$ stackit network-area create --name network-area-1 --organization-id xxx"
1818
19-
Create a network area with name "network-area-2" in organization with ID "xxx" with network ranges, transfer network and DNS name server
20-
$ stackit network-area create --name network-area-2 --organization-id xxx --network-ranges "1.1.1.0/24,192.123.1.0/24" --transfer-network "192.160.0.0/24" --dns-name-servers "1.1.1.1"
21-
22-
Create a network area with name "network-area-3" in organization with ID "xxx" with network ranges, transfer network and additional options
23-
$ stackit network-area create --name network-area-3 --organization-id xxx --network-ranges "1.1.1.0/24,192.123.1.0/24" --transfer-network "192.160.0.0/24" --default-prefix-length 25 --max-prefix-length 29 --min-prefix-length 24
24-
25-
Create a network area with name "network-area-1" in organization with ID "xxx" with network ranges and a transfer network and labels "key=value,key1=value1"
26-
$ stackit network-area create --name network-area-1 --organization-id xxx --network-ranges "1.1.1.0/24,192.123.1.0/24" --transfer-network "192.160.0.0/24" --labels key=value,key1=value1
19+
Create a network area with name "network-area-1" in organization with ID "xxx" with labels "key=value,key1=value1"
20+
$ stackit network-area create --name network-area-1 --organization-id xxx --labels key=value,key1=value1
2721
```
2822

2923
### Options
3024

3125
```
32-
--default-prefix-length int The default prefix length for networks in the network area
33-
--dns-name-servers strings List of DNS name server IPs
34-
-h, --help Help for "stackit network-area create"
35-
--labels stringToString Labels are key-value string pairs which can be attached to a network-area. E.g. '--labels key1=value1,key2=value2,...' (default [])
36-
--max-prefix-length int The maximum prefix length for networks in the network area
37-
--min-prefix-length int The minimum prefix length for networks in the network area
38-
-n, --name string Network area name
39-
--network-ranges strings List of network ranges (default [])
40-
--organization-id string Organization ID
41-
--transfer-network string Transfer network in CIDR notation
26+
-h, --help Help for "stackit network-area create"
27+
--labels stringToString Labels are key-value string pairs which can be attached to a network-area. E.g. '--labels key1=value1,key2=value2,...' (default [])
28+
-n, --name string Network area name
29+
--organization-id string Organization ID
4230
```
4331

4432
### Options inherited from parent commands
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## stackit network-area region
2+
3+
Provides functionality for regional configuration of STACKIT Network Area (SNA)
4+
5+
### Synopsis
6+
7+
Provides functionality for regional configuration of STACKIT Network Area (SNA).
8+
9+
```
10+
stackit network-area region [flags]
11+
```
12+
13+
### Options
14+
15+
```
16+
-h, --help Help for "stackit network-area region"
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+
--region string Target region for region-specific requests
27+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
28+
```
29+
30+
### SEE ALSO
31+
32+
* [stackit network-area](./stackit_network-area.md) - Provides functionality for STACKIT Network Area (SNA)
33+
* [stackit network-area region create](./stackit_network-area_region_create.md) - Creates a new regional configuration for a STACKIT Network Area (SNA)
34+
* [stackit network-area region delete](./stackit_network-area_region_delete.md) - Deletes a regional configuration for a STACKIT Network Area (SNA)
35+
* [stackit network-area region describe](./stackit_network-area_region_describe.md) - Describes a regional configuration for a STACKIT Network Area (SNA)
36+
* [stackit network-area region list](./stackit_network-area_region_list.md) - Lists all configured regions for a STACKIT Network Area (SNA)
37+
* [stackit network-area region update](./stackit_network-area_region_update.md) - Updates a existing regional configuration for a STACKIT Network Area (SNA)
38+
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
## stackit network-area region create
2+
3+
Creates a new regional configuration for a STACKIT Network Area (SNA)
4+
5+
### Synopsis
6+
7+
Creates a new regional configuration for a STACKIT Network Area (SNA).
8+
9+
```
10+
stackit network-area region create [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Create a new regional configuration "eu02" for a STACKIT Network Area with ID "xxx" in organization with ID "yyy", ipv4 network range "192.168.0.0/24" and ipv4 transfer network "192.168.1.0/24"
17+
$ stackit network-area region create --network-area-id xxx --region eu02 --organization-id yyy --ipv4-network-ranges 192.168.0.0/24 --ipv4-transfer-network 192.168.1.0/24
18+
19+
Create a new regional configuration "eu02" for a STACKIT Network Area with ID "xxx" in organization with ID "yyy", using the set region config
20+
$ stackit config set --region eu02
21+
$ stackit network-area region create --network-area-id xxx --organization-id yyy --ipv4-network-ranges 192.168.0.0/24 --ipv4-transfer-network 192.168.1.0/24
22+
23+
Create a new regional configuration for a STACKIT Network Area with ID "xxx" in organization with ID "yyy", ipv4 network range "192.168.0.0/24", ipv4 transfer network "192.168.1.0/24", default prefix length "24", max prefix length "25" and min prefix length "20"
24+
$ stackit network-area region create --network-area-id xxx --organization-id yyy --ipv4-network-ranges 192.168.0.0/24 --ipv4-transfer-network 192.168.1.0/24 --region "eu02" --ipv4-default-prefix-length 24 --ipv4-max-prefix-length 25 --ipv4-min-prefix-length 20
25+
26+
Create a new regional configuration for a STACKIT Network Area with ID "xxx" in organization with ID "yyy", ipv4 network range "192.168.0.0/24", ipv4 transfer network "192.168.1.0/24", default prefix length "24", max prefix length "25" and min prefix length "20"
27+
$ stackit network-area region create --network-area-id xxx --organization-id yyy --ipv4-network-ranges 192.168.0.0/24 --ipv4-transfer-network 192.168.1.0/24 --region "eu02" --ipv4-default-prefix-length 24 --ipv4-max-prefix-length 25 --ipv4-min-prefix-length 20
28+
```
29+
30+
### Options
31+
32+
```
33+
-h, --help Help for "stackit network-area region create"
34+
--ipv4-default-nameservers strings List of default DNS name server IPs
35+
--ipv4-default-prefix-length int The default prefix length for networks in the network area
36+
--ipv4-max-prefix-length int The maximum prefix length for networks in the network area
37+
--ipv4-min-prefix-length int The minimum prefix length for networks in the network area
38+
--ipv4-network-ranges strings Network range to create in CIDR notation (default [])
39+
--ipv4-transfer-network string Transfer network in CIDR notation
40+
--network-area-id string STACKIT Network Area (SNA) ID
41+
--organization-id string Organization ID
42+
```
43+
44+
### Options inherited from parent commands
45+
46+
```
47+
-y, --assume-yes If set, skips all confirmation prompts
48+
--async If set, runs the command asynchronously
49+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
50+
-p, --project-id string Project ID
51+
--region string Target region for region-specific requests
52+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
53+
```
54+
55+
### SEE ALSO
56+
57+
* [stackit network-area region](./stackit_network-area_region.md) - Provides functionality for regional configuration of STACKIT Network Area (SNA)
58+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
## stackit network-area region delete
2+
3+
Deletes a regional configuration for a STACKIT Network Area (SNA)
4+
5+
### Synopsis
6+
7+
Deletes a regional configuration for a STACKIT Network Area (SNA).
8+
9+
```
10+
stackit network-area region delete [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Delete a regional configuration "eu02" for a STACKIT Network Area with ID "xxx" in organization with ID "yyy"
17+
$ stackit network-area region delete --network-area-id xxx --region eu02 --organization-id yyy
18+
19+
Delete a regional configuration "eu02" for a STACKIT Network Area with ID "xxx" in organization with ID "yyy", using the set region config
20+
$ stackit config set --region eu02
21+
$ stackit network-area region delete --network-area-id xxx --organization-id yyy
22+
```
23+
24+
### Options
25+
26+
```
27+
-h, --help Help for "stackit network-area region delete"
28+
--network-area-id string STACKIT Network Area (SNA) ID
29+
--organization-id string Organization ID
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+
--region string Target region for region-specific requests
40+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
41+
```
42+
43+
### SEE ALSO
44+
45+
* [stackit network-area region](./stackit_network-area_region.md) - Provides functionality for regional configuration of STACKIT Network Area (SNA)
46+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
## stackit network-area region describe
2+
3+
Describes a regional configuration for a STACKIT Network Area (SNA)
4+
5+
### Synopsis
6+
7+
Describes a regional configuration for a STACKIT Network Area (SNA).
8+
9+
```
10+
stackit network-area region describe [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Describe a regional configuration "eu02" for a STACKIT Network Area with ID "xxx" in organization with ID "yyy"
17+
$ stackit network-area region describe --network-area-id xxx --region eu02 --organization-id yyy
18+
19+
Describe a regional configuration "eu02" for a STACKIT Network Area with ID "xxx" in organization with ID "yyy", using the set region config
20+
$ stackit config set --region eu02
21+
$ stackit network-area region describe --network-area-id xxx --organization-id yyy
22+
```
23+
24+
### Options
25+
26+
```
27+
-h, --help Help for "stackit network-area region describe"
28+
--network-area-id string STACKIT Network Area (SNA) ID
29+
--organization-id string Organization ID
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+
--region string Target region for region-specific requests
40+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
41+
```
42+
43+
### SEE ALSO
44+
45+
* [stackit network-area region](./stackit_network-area_region.md) - Provides functionality for regional configuration of STACKIT Network Area (SNA)
46+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## stackit network-area region list
2+
3+
Lists all configured regions for a STACKIT Network Area (SNA)
4+
5+
### Synopsis
6+
7+
Lists all configured regions for a STACKIT Network Area (SNA).
8+
9+
```
10+
stackit network-area region list [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
List all configured region for a STACKIT Network Area with ID "xxx" in organization with ID "yyy"
17+
$ stackit network-area region list --network-area-id xxx --organization-id yyy
18+
```
19+
20+
### Options
21+
22+
```
23+
-h, --help Help for "stackit network-area region list"
24+
--network-area-id string STACKIT Network Area (SNA) ID
25+
--organization-id string Organization ID
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+
--region string Target region for region-specific requests
36+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
37+
```
38+
39+
### SEE ALSO
40+
41+
* [stackit network-area region](./stackit_network-area_region.md) - Provides functionality for regional configuration of STACKIT Network Area (SNA)
42+
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
## stackit network-area region update
2+
3+
Updates a existing regional configuration for a STACKIT Network Area (SNA)
4+
5+
### Synopsis
6+
7+
Updates a existing regional configuration for a STACKIT Network Area (SNA).
8+
9+
```
10+
stackit network-area region update [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Update a regional configuration "eu02" for a STACKIT Network Area with ID "xxx" in organization with ID "yyy" with new ipv4-default-nameservers "8.8.8.8"
17+
$ stackit network-area region update --network-area-id xxx --region eu02 --organization-id yyy --ipv4-default-nameservers 8.8.8.8
18+
19+
Update a regional configuration "eu02" for a STACKIT Network Area with ID "xxx" in organization with ID "yyy" with new ipv4-default-nameservers "8.8.8.8", using the set region config
20+
$ stackit config set --region eu02
21+
$ stackit network-area region update --network-area-id xxx --organization-id yyy --ipv4-default-nameservers 8.8.8.8
22+
23+
Update a new regional configuration for a STACKIT Network Area with ID "xxx" in organization with ID "yyy", ipv4 network range "192.168.0.0/24", ipv4 transfer network "192.168.1.0/24", default prefix length "24", max prefix length "25" and min prefix length "20"
24+
$ stackit network-area region update --network-area-id xxx --organization-id yyy --ipv4-network-ranges 192.168.0.0/24 --ipv4-transfer-network 192.168.1.0/24 --region "eu02" --ipv4-default-prefix-length 24 --ipv4-max-prefix-length 25 --ipv4-min-prefix-length 20
25+
26+
Update a new regional configuration for a STACKIT Network Area with ID "xxx" in organization with ID "yyy", ipv4 network range "192.168.0.0/24", ipv4 transfer network "192.168.1.0/24", default prefix length "24", max prefix length "25" and min prefix length "20"
27+
$ stackit network-area region update --network-area-id xxx --organization-id yyy --ipv4-network-ranges 192.168.0.0/24 --ipv4-transfer-network 192.168.1.0/24 --region "eu02" --ipv4-default-prefix-length 24 --ipv4-max-prefix-length 25 --ipv4-min-prefix-length 20
28+
```
29+
30+
### Options
31+
32+
```
33+
-h, --help Help for "stackit network-area region update"
34+
--ipv4-default-nameservers strings List of default DNS name server IPs
35+
--ipv4-default-prefix-length int The default prefix length for networks in the network area
36+
--ipv4-max-prefix-length int The maximum prefix length for networks in the network area
37+
--ipv4-min-prefix-length int The minimum prefix length for networks in the network area
38+
--network-area-id string STACKIT Network Area (SNA) ID
39+
--organization-id string Organization ID
40+
```
41+
42+
### Options inherited from parent commands
43+
44+
```
45+
-y, --assume-yes If set, skips all confirmation prompts
46+
--async If set, runs the command asynchronously
47+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
48+
-p, --project-id string Project ID
49+
--region string Target region for region-specific requests
50+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
51+
```
52+
53+
### SEE ALSO
54+
55+
* [stackit network-area region](./stackit_network-area_region.md) - Provides functionality for regional configuration of STACKIT Network Area (SNA)
56+

docs/stackit_network-area_route_create.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,25 @@ stackit network-area route create [flags]
1515
### Examples
1616

1717
```
18-
Create a static route with prefix "1.1.1.0/24" and next hop "1.1.1.1" in a STACKIT Network Area with ID "xxx" in organization with ID "yyy"
19-
$ stackit network-area route create --organization-id yyy --network-area-id xxx --prefix 1.1.1.0/24 --next-hop 1.1.1.1
18+
Create a static route with destination "1.1.1.0/24" and next hop "1.1.1.1" in a STACKIT Network Area with ID "xxx" in organization with ID "yyy"
19+
$ stackit network-area route create --organization-id yyy --network-area-id xxx --destination 1.1.1.0/24 --next-hop 1.1.1.1
2020
21-
Create a static route with labels "key:value" and "foo:bar" with prefix "1.1.1.0/24" and next hop "1.1.1.1" in a STACKIT Network Area with ID "xxx" in organization with ID "yyy"
22-
$ stackit network-area route create --labels key=value,foo=bar --organization-id yyy --network-area-id xxx --prefix 1.1.1.0/24 --next-hop 1.1.1.1
21+
Create a static route with labels "key:value" and "foo:bar" with destination "1.1.1.0/24" and next hop "1.1.1.1" in a STACKIT Network Area with ID "xxx" in organization with ID "yyy"
22+
$ stackit network-area route create --labels key=value,foo=bar --organization-id yyy --network-area-id xxx --destination 1.1.1.0/24 --next-hop 1.1.1.1
2323
```
2424

2525
### Options
2626

2727
```
28+
--destination string Destination route. Must be a valid IPv4 or IPv6 CIDR
2829
-h, --help Help for "stackit network-area route create"
2930
--labels stringToString Labels are key-value string pairs which can be attached to a route. 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 [])
3031
--network-area-id string STACKIT Network Area ID
31-
--next-hop string Next hop IP address. Must be a valid IPv4
32+
--next-hop-ipv4 string Next hop IPv4 address
33+
--next-hop-ipv6 string Next hop IPv6 address
34+
--nexthop-blackhole Sets next hop to black hole
35+
--nexthop-internet Sets next hop to internet
3236
--organization-id string Organization ID
33-
--prefix string Static route prefix
3437
```
3538

3639
### Options inherited from parent commands

0 commit comments

Comments
 (0)