Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ USAGE:
scw vpc-gw gateway-network create [arg=value ...]

ARGS:
[gateway-id] Public Gateway to connect
[private-network-id] Private Network to connect
[enable-masquerade] Defines whether to enable masquerade (dynamic NAT) on this network
[dhcp-id] ID of an existing DHCP configuration object to use for this GatewayNetwork
[address] Static IP address in CIDR format to to use without DHCP
[enable-dhcp] Defines whether to enable DHCP on this Private Network. Defaults to `true` if either `dhcp_id` or `dhcp` are present. If set to `true`, either `dhcp_id` or `dhcp` must be present
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2)
[gateway-id] Public Gateway to connect
[private-network-id] Private Network to connect
[enable-masquerade] Defines whether to enable masquerade (dynamic NAT) on this network
[enable-dhcp] Defines whether to enable DHCP on this Private Network. Defaults to `true` if either `dhcp_id` or `dhcp` are present. If set to `true`, either `dhcp_id` or `dhcp` must be present
[dhcp-id] ID of an existing DHCP configuration object to use for this GatewayNetwork
[address] Static IP address in CIDR format to to use without DHCP
[ipam-config.push-default-route] Defines whether the default route is enabled on that Gateway Network.
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2)

FLAGS:
-h, --help help for create
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ USAGE:
scw vpc-gw gateway-network update <gateway-network-id ...> [arg=value ...]

ARGS:
gateway-network-id ID of the GatewayNetwork to update
[enable-masquerade] Defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork
[dhcp-id] ID of the new DHCP configuration object to use with this GatewayNetwork
[enable-dhcp] Defines whether to enable DHCP on the connected Private Network
[address] New static IP address
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2)
gateway-network-id ID of the GatewayNetwork to update
[enable-masquerade] Defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork
[enable-dhcp] Defines whether to enable DHCP on the connected Private Network
[dhcp-id] ID of the new DHCP configuration object to use with this GatewayNetwork
[address] New static IP address
[ipam-config.push-default-route] Defines whether the default route is enabled on that Gateway Network.
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2)

FLAGS:
-h, --help help for update
Expand Down
6 changes: 4 additions & 2 deletions docs/commands/vpc-gw.md
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,10 @@ scw vpc-gw gateway-network create [arg=value ...]
| gateway-id | | Public Gateway to connect |
| private-network-id | | Private Network to connect |
| enable-masquerade | | Defines whether to enable masquerade (dynamic NAT) on this network |
| enable-dhcp | | Defines whether to enable DHCP on this Private Network. Defaults to `true` if either `dhcp_id` or `dhcp` are present. If set to `true`, either `dhcp_id` or `dhcp` must be present |
| dhcp-id | | ID of an existing DHCP configuration object to use for this GatewayNetwork |
| address | | Static IP address in CIDR format to to use without DHCP |
| enable-dhcp | | Defines whether to enable DHCP on this Private Network. Defaults to `true` if either `dhcp_id` or `dhcp` are present. If set to `true`, either `dhcp_id` or `dhcp` must be present |
| ipam-config.push-default-route | | Defines whether the default route is enabled on that Gateway Network. |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config |


Expand Down Expand Up @@ -606,9 +607,10 @@ scw vpc-gw gateway-network update <gateway-network-id ...> [arg=value ...]
|------|---|-------------|
| gateway-network-id | Required | ID of the GatewayNetwork to update |
| enable-masquerade | | Defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork |
| dhcp-id | | ID of the new DHCP configuration object to use with this GatewayNetwork |
| enable-dhcp | | Defines whether to enable DHCP on the connected Private Network |
| dhcp-id | | ID of the new DHCP configuration object to use with this GatewayNetwork |
| address | | New static IP address |
| ipam-config.push-default-route | | Defines whether the default route is enabled on that Gateway Network. |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config |


Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/moby/buildkit v0.11.6
github.com/opencontainers/go-digest v1.0.0
github.com/pkg/errors v0.9.1
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20.0.20230901111648-9e540fe63734
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20.0.20230904085706-cf5147eb9745
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,8 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20.0.20230901111648-9e540fe63734 h1:KAxCqrhRP6DAclE0uzBcwUJtAfkdUfEA75rhUFKj4cU=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20.0.20230901111648-9e540fe63734/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20.0.20230904085706-cf5147eb9745 h1:Qtr7dGcH98TIeC0JmhHouNhU8/ExnvFZ9ZqEkYiqFhc=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20.0.20230904085706-cf5147eb9745/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
Expand Down
26 changes: 20 additions & 6 deletions internal/namespaces/vpcgw/v1/vpcgw_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,13 @@ func vpcGwGatewayNetworkCreate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "enable-dhcp",
Short: `Defines whether to enable DHCP on this Private Network. Defaults to ` + "`" + `true` + "`" + ` if either ` + "`" + `dhcp_id` + "`" + ` or ` + "`" + `dhcp` + "`" + ` are present. If set to ` + "`" + `true` + "`" + `, either ` + "`" + `dhcp_id` + "`" + ` or ` + "`" + `dhcp` + "`" + ` must be present`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "dhcp-id",
Short: `ID of an existing DHCP configuration object to use for this GatewayNetwork`,
Expand All @@ -711,8 +718,8 @@ func vpcGwGatewayNetworkCreate() *core.Command {
Positional: false,
},
{
Name: "enable-dhcp",
Short: `Defines whether to enable DHCP on this Private Network. Defaults to ` + "`" + `true` + "`" + ` if either ` + "`" + `dhcp_id` + "`" + ` or ` + "`" + `dhcp` + "`" + ` are present. If set to ` + "`" + `true` + "`" + `, either ` + "`" + `dhcp_id` + "`" + ` or ` + "`" + `dhcp` + "`" + ` must be present`,
Name: "ipam-config.push-default-route",
Short: `Defines whether the default route is enabled on that Gateway Network.`,
Required: false,
Deprecated: false,
Positional: false,
Expand Down Expand Up @@ -755,15 +762,15 @@ func vpcGwGatewayNetworkUpdate() *core.Command {
Positional: false,
},
{
Name: "dhcp-id",
Short: `ID of the new DHCP configuration object to use with this GatewayNetwork`,
Name: "enable-dhcp",
Short: `Defines whether to enable DHCP on the connected Private Network`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "enable-dhcp",
Short: `Defines whether to enable DHCP on the connected Private Network`,
Name: "dhcp-id",
Short: `ID of the new DHCP configuration object to use with this GatewayNetwork`,
Required: false,
Deprecated: false,
Positional: false,
Expand All @@ -775,6 +782,13 @@ func vpcGwGatewayNetworkUpdate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "ipam-config.push-default-route",
Short: `Defines whether the default route is enabled on that Gateway Network.`,
Required: false,
Deprecated: false,
Positional: false,
},
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZoneNlAms3, scw.ZonePlWaw1, scw.ZonePlWaw2),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down