Skip to content

Commit 024610f

Browse files
authored
feat(iaas): onboard vpc routing table static route commands (#1656)
relates to STACKITCLI-466
1 parent d24f3d7 commit 024610f

22 files changed

Lines changed: 2925 additions & 0 deletions

‎docs/stackit_alpha_vpc_routing-table.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@ stackit alpha vpc routing-table [flags]
3434
* [stackit alpha vpc routing-table delete](./stackit_alpha_vpc_routing-table_delete.md) - Deletes a VPC routing-table
3535
* [stackit alpha vpc routing-table describe](./stackit_alpha_vpc_routing-table_describe.md) - Describes a VPC routing-table
3636
* [stackit alpha vpc routing-table list](./stackit_alpha_vpc_routing-table_list.md) - Lists VPC routing-tables
37+
* [stackit alpha vpc routing-table static-route](./stackit_alpha_vpc_routing-table_static-route.md) - Manages static routes of a VPC routing-table
3738
* [stackit alpha vpc routing-table update](./stackit_alpha_vpc_routing-table_update.md) - Updates a VPC routing-table
3839

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## stackit alpha vpc routing-table static-route
2+
3+
Manages static routes of a VPC routing-table
4+
5+
### Synopsis
6+
7+
Manages static routes of a VPC routing-table
8+
9+
```
10+
stackit alpha vpc routing-table static-route [flags]
11+
```
12+
13+
### Options
14+
15+
```
16+
-h, --help Help for "stackit alpha vpc routing-table static-route"
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 alpha vpc routing-table](./stackit_alpha_vpc_routing-table.md) - Manages VPC routing-tables
33+
* [stackit alpha vpc routing-table static-route create](./stackit_alpha_vpc_routing-table_static-route_create.md) - Creates a static-route in a routing-table
34+
* [stackit alpha vpc routing-table static-route delete](./stackit_alpha_vpc_routing-table_static-route_delete.md) - Deletes a static-route within a VPC routing-table
35+
* [stackit alpha vpc routing-table static-route describe](./stackit_alpha_vpc_routing-table_static-route_describe.md) - Describes a static-route within a VPC routing-table
36+
* [stackit alpha vpc routing-table static-route list](./stackit_alpha_vpc_routing-table_static-route_list.md) - Lists all static-routes within a VPC routing-table
37+
* [stackit alpha vpc routing-table static-route update](./stackit_alpha_vpc_routing-table_static-route_update.md) - Updates a static-route in a VPC routing-table
38+
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
## stackit alpha vpc routing-table static-route create
2+
3+
Creates a static-route in a routing-table
4+
5+
### Synopsis
6+
7+
Creates a static-route in a routing-table.
8+
9+
```
10+
stackit alpha vpc routing-table static-route create [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Create a static-route with CIDRv4 destination and IPv4 nexthop
17+
$ stackit alpha vpc routing-table static-route create --routing-table-id xxx --vpc-id yyy --destination-type cidrv4 --destination-value <ipv4-cidr> --nexthop-type ipv4 --nexthop-value <ipv4-address>
18+
19+
Create a route with CIDRv6 destination and IPv6 nexthop
20+
$ stackit alpha vpc routing-table static-route create --routing-table-id xxx --vpc-id yyy --destination-type cidrv6 --destination-value <ipv6-cidr> --nexthop-type ipv6 --nexthop-value <ipv6-address>
21+
22+
Create a route with CIDRv6 destination and nexthop Internet
23+
$ stackit alpha vpc routing-table static-route create --routing-table-id xxx --vpc-id yyy --destination-type cidrv6 --destination-value <ipv6-cidr> --nexthop-type internet
24+
```
25+
26+
### Options
27+
28+
```
29+
--destination-type string Destination type (one of: [cidrv4, cidrv6])
30+
--destination-value string Destination value
31+
-h, --help Help for "stackit alpha vpc routing-table static-route create"
32+
--labels stringToString Labels are key-value string pairs which can be attached to a static route. E.g. '--labels key1=value1,key2=value2,...' (default [])
33+
--nexthop-type string Next hop type (one of: [ipv4, ipv6, internet, blackhole])
34+
--nexthop-value string NextHop value
35+
--routing-table-id string Routing-Table ID
36+
--vpc-id string VPC ID
37+
```
38+
39+
### Options inherited from parent commands
40+
41+
```
42+
-y, --assume-yes If set, skips all confirmation prompts
43+
--async If set, runs the command asynchronously
44+
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
45+
-p, --project-id string Project ID
46+
--region string Target region for region-specific requests
47+
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
48+
```
49+
50+
### SEE ALSO
51+
52+
* [stackit alpha vpc routing-table static-route](./stackit_alpha_vpc_routing-table_static-route.md) - Manages static routes of a VPC routing-table
53+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## stackit alpha vpc routing-table static-route delete
2+
3+
Deletes a static-route within a VPC routing-table
4+
5+
### Synopsis
6+
7+
Deletes a static-route within a VPC routing-table.
8+
9+
```
10+
stackit alpha vpc routing-table static-route delete ROUTE_ID [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Deletes a static-route within a VPC routing-table
17+
$ stackit alpha vpc routing-table static-route delete xxx --routing-table-id yyy --vpc-id zzz
18+
```
19+
20+
### Options
21+
22+
```
23+
-h, --help Help for "stackit alpha vpc routing-table static-route delete"
24+
--routing-table-id string Routing-Table ID
25+
--vpc-id string VPC 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 alpha vpc routing-table static-route](./stackit_alpha_vpc_routing-table_static-route.md) - Manages static routes of a VPC routing-table
42+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## stackit alpha vpc routing-table static-route describe
2+
3+
Describes a static-route within a VPC routing-table
4+
5+
### Synopsis
6+
7+
Describes a static-route within a VPC routing-table.
8+
9+
```
10+
stackit alpha vpc routing-table static-route describe ROUTE_ID [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Describe a static-route within a VPC routing-table
17+
$ stackit alpha vpc routing-table static-route describe xxx --routing-table-id yyy --vpc-id zzz
18+
```
19+
20+
### Options
21+
22+
```
23+
-h, --help Help for "stackit alpha vpc routing-table static-route describe"
24+
--routing-table-id string Routing-Table ID
25+
--vpc-id string VPC 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 alpha vpc routing-table static-route](./stackit_alpha_vpc_routing-table_static-route.md) - Manages static routes of a VPC routing-table
42+
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
## stackit alpha vpc routing-table static-route list
2+
3+
Lists all static-routes within a VPC routing-table
4+
5+
### Synopsis
6+
7+
Lists all static-routes within a VPC routing-table.
8+
9+
```
10+
stackit alpha vpc routing-table static-route list [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
List all static-routes within a VPC routing-table
17+
$ stackit alpha vpc routing-table static-route list --routing-table-id xxx --vpc-id yyy
18+
19+
List all static-routes within a VPC routing-table with labels foo=bar,bar=baz
20+
$ stackit alpha vpc routing-table static-route list --routing-table-id xxx --vpc-id yyy --label-selector foo=bar,bar=baz
21+
22+
List up to 10 static-routes within a VPC routing-table
23+
$ stackit alpha vpc routing-table static-route list --routing-table-id xxx --vpc-id yyy --limit 10
24+
```
25+
26+
### Options
27+
28+
```
29+
-h, --help Help for "stackit alpha vpc routing-table static-route list"
30+
--label-selector string Filter by label
31+
--limit int Maximum number of entries to list
32+
--routing-table-id string Routing-Table ID
33+
--vpc-id string VPC ID
34+
```
35+
36+
### Options inherited from parent commands
37+
38+
```
39+
-y, --assume-yes If set, skips all confirmation prompts
40+
--async If set, runs the command asynchronously
41+
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
42+
-p, --project-id string Project ID
43+
--region string Target region for region-specific requests
44+
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
45+
```
46+
47+
### SEE ALSO
48+
49+
* [stackit alpha vpc routing-table static-route](./stackit_alpha_vpc_routing-table_static-route.md) - Manages static routes of a VPC routing-table
50+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
## stackit alpha vpc routing-table static-route update
2+
3+
Updates a static-route in a VPC routing-table
4+
5+
### Synopsis
6+
7+
Updates a static-route in a VPC routing-table.
8+
9+
```
10+
stackit alpha vpc routing-table static-route update ROUTE_ID [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Updates the label(s) of a static-route with ID "xxx" in a routing-table ID "yyy" in VPC "zzz"
17+
$ stackit alpha vpc routing-table static-route update xxx --routing-table-id yyy --vpc-id zzz --labels key=value,foo=bar
18+
```
19+
20+
### Options
21+
22+
```
23+
-h, --help Help for "stackit alpha vpc routing-table static-route update"
24+
--labels stringToString Labels are key-value string pairs which can be attached to a static route. E.g. '--labels key1=value1,key2=value2,...' (default [])
25+
--routing-table-id string Routing-Table ID
26+
--vpc-id string VPC ID
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+
--region string Target region for region-specific requests
37+
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
38+
```
39+
40+
### SEE ALSO
41+
42+
* [stackit alpha vpc routing-table static-route](./stackit_alpha_vpc_routing-table_static-route.md) - Manages static routes of a VPC routing-table
43+

‎internal/cmd/alpha/vpc/routingtable/routingtable.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"github.com/stackitcloud/stackit-cli/internal/cmd/alpha/vpc/routingtable/delete"
88
"github.com/stackitcloud/stackit-cli/internal/cmd/alpha/vpc/routingtable/describe"
99
"github.com/stackitcloud/stackit-cli/internal/cmd/alpha/vpc/routingtable/list"
10+
"github.com/stackitcloud/stackit-cli/internal/cmd/alpha/vpc/routingtable/staticroute"
1011
"github.com/stackitcloud/stackit-cli/internal/cmd/alpha/vpc/routingtable/update"
1112
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
1213
"github.com/stackitcloud/stackit-cli/internal/pkg/types"
@@ -32,4 +33,5 @@ func addSubcommands(cmd *cobra.Command, params *types.CmdParams) {
3233
cmd.AddCommand(update.NewCmd(params))
3334
cmd.AddCommand(list.NewCmd(params))
3435
cmd.AddCommand(delete.NewCmd(params))
36+
cmd.AddCommand(staticroute.NewCmd(params))
3537
}

0 commit comments

Comments
 (0)