diff --git a/cmd/scw/testdata/test-all-usage-interlink-link-create-usage.golden b/cmd/scw/testdata/test-all-usage-interlink-link-create-usage.golden index e7dfbfd80a..062d77240e 100644 --- a/cmd/scw/testdata/test-all-usage-interlink-link-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-interlink-link-create-usage.golden @@ -6,16 +6,18 @@ USAGE: scw interlink link create [arg=value ...] ARGS: - [project-id] Project ID to use. If none is passed the default project ID will be used - name Name of the link - [tags.{index}] List of tags to apply to the link - pop-id PoP (location) where the link will be created - bandwidth-mbps Desired bandwidth for the link. Must be compatible with available link bandwidths and remaining bandwidth capacity of the connection - [connection-id] If set, creates a self-hosted link using this dedicated physical connection. As the customer, specify the ID of the physical connection you already have for this link. - [partner-id] If set, creates a hosted link on a partner's connection. Specify the ID of the chosen partner, who already has a shared connection with available bandwidth. - [peer-asn] For self-hosted links we need the peer AS Number to establish BGP session. If not given, a default one will be assigned. - [vlan] For self-hosted links only, it is possible to choose the VLAN ID. If the VLAN is not available (ie already taken or out of range), an error is returned. - [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw) + [project-id] Project ID to use. If none is passed the default project ID will be used + name Name of the link + [tags.{index}] List of tags to apply to the link + pop-id PoP (location) where the link will be created + bandwidth-mbps Desired bandwidth for the link. Must be compatible with available link bandwidths and remaining bandwidth capacity of the connection + [connection-id] If set, creates a self-hosted link using this dedicated physical connection. As the customer, specify the ID of the physical connection you already have for this link. + [partner-id] If set, creates a hosted link on a partner's connection. Specify the ID of the chosen partner, who already has a shared connection with available bandwidth. + [peer-asn] For self-hosted links we need the peer AS Number to establish BGP session. If not given, a default one will be assigned. + [vlan] For self-hosted links only, it is possible to choose the VLAN ID. If the VLAN is not available (ie already taken or out of range), an error is returned. + [routing-policy-v4-id] If set, attaches this routing policy containing IPv4 prefixes to the Link. Hence, a BGP IPv4 session will be created. + [routing-policy-v6-id] If set, attaches this routing policy containing IPv6 prefixes to the Link. Hence, a BGP IPv6 session will be created. + [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw) FLAGS: -h, --help help for create diff --git a/cmd/scw/testdata/test-all-usage-interlink-link-list-usage.golden b/cmd/scw/testdata/test-all-usage-interlink-link-list-usage.golden index 3066791845..6be5341f41 100644 --- a/cmd/scw/testdata/test-all-usage-interlink-link-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-interlink-link-list-usage.golden @@ -10,9 +10,9 @@ ARGS: [project-id] Project ID to filter for [name] Link name to filter for [tags.{index}] Tags to filter for - [status] Link status to filter for (unknown_link_status | configuring | failed | requested | refused | expired | provisioning | active | limited_connectivity | all_down | deprovisioning | deleted | locked) - [bgp-v4-status] BGP IPv4 status to filter for (unknown_bgp_status | up | down) - [bgp-v6-status] BGP IPv6 status to filter for (unknown_bgp_status | up | down) + [status] Link status to filter for (unknown_link_status | configuring | failed | requested | refused | expired | provisioning | active | limited_connectivity | all_down | deprovisioning | deleted | locked | ready) + [bgp-v4-status] BGP IPv4 status to filter for (unknown_bgp_status | up | down | disabled) + [bgp-v6-status] BGP IPv6 status to filter for (unknown_bgp_status | up | down | disabled) [pop-id] Filter for links attached to this PoP (via connections) [bandwidth-mbps] Filter for link bandwidth (in Mbps) [partner-id] Filter for links hosted by this partner diff --git a/docs/commands/interlink.md b/docs/commands/interlink.md index b012f6791b..69c8133b77 100644 --- a/docs/commands/interlink.md +++ b/docs/commands/interlink.md @@ -114,6 +114,8 @@ scw interlink link create [arg=value ...] | partner-id | | If set, creates a hosted link on a partner's connection. Specify the ID of the chosen partner, who already has a shared connection with available bandwidth. | | peer-asn | | For self-hosted links we need the peer AS Number to establish BGP session. If not given, a default one will be assigned. | | vlan | | For self-hosted links only, it is possible to choose the VLAN ID. If the VLAN is not available (ie already taken or out of range), an error is returned. | +| routing-policy-v4-id | | If set, attaches this routing policy containing IPv4 prefixes to the Link. Hence, a BGP IPv4 session will be created. | +| routing-policy-v6-id | | If set, attaches this routing policy containing IPv6 prefixes to the Link. Hence, a BGP IPv6 session will be created. | | region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | @@ -258,9 +260,9 @@ scw interlink link list [arg=value ...] | project-id | | Project ID to filter for | | name | | Link name to filter for | | tags.{index} | | Tags to filter for | -| status | One of: `unknown_link_status`, `configuring`, `failed`, `requested`, `refused`, `expired`, `provisioning`, `active`, `limited_connectivity`, `all_down`, `deprovisioning`, `deleted`, `locked` | Link status to filter for | -| bgp-v4-status | One of: `unknown_bgp_status`, `up`, `down` | BGP IPv4 status to filter for | -| bgp-v6-status | One of: `unknown_bgp_status`, `up`, `down` | BGP IPv6 status to filter for | +| status | One of: `unknown_link_status`, `configuring`, `failed`, `requested`, `refused`, `expired`, `provisioning`, `active`, `limited_connectivity`, `all_down`, `deprovisioning`, `deleted`, `locked`, `ready` | Link status to filter for | +| bgp-v4-status | One of: `unknown_bgp_status`, `up`, `down`, `disabled` | BGP IPv4 status to filter for | +| bgp-v6-status | One of: `unknown_bgp_status`, `up`, `down`, `disabled` | BGP IPv6 status to filter for | | pop-id | | Filter for links attached to this PoP (via connections) | | bandwidth-mbps | | Filter for link bandwidth (in Mbps) | | partner-id | | Filter for links hosted by this partner | diff --git a/go.mod b/go.mod index bf6ea7ad76..9c4c613159 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/mattn/go-isatty v0.0.20 github.com/moby/buildkit v0.24.0 github.com/opencontainers/go-digest v1.0.0 - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.34.0.20250911091431-3c6786e253d0 + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.34.0.20250912134829-9294f115f3d2 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/spf13/cobra v1.10.1 github.com/spf13/pflag v1.0.10 diff --git a/go.sum b/go.sum index 9795886135..0df5b37aaa 100644 --- a/go.sum +++ b/go.sum @@ -460,8 +460,8 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7 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.34.0.20250911091431-3c6786e253d0 h1:EOCbW0MnUjNKndDwoWiGwXix7no3Fe74sVDiXp8wMag= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.34.0.20250911091431-3c6786e253d0/go.mod h1:47B1d/YXmSAxlJxUJxClzHR6b3T4M1WyCvwENPQNBWc= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.34.0.20250912134829-9294f115f3d2 h1:WeANDlfGb3oFt08xg4TVd+zmVfif6/9uVXXMjg7Jgr4= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.34.0.20250912134829-9294f115f3d2/go.mod h1:47B1d/YXmSAxlJxUJxClzHR6b3T4M1WyCvwENPQNBWc= github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8= github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM= github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA= diff --git a/internal/namespaces/interlink/v1beta1/interlink_cli.go b/internal/namespaces/interlink/v1beta1/interlink_cli.go index d43876f30a..8075301485 100644 --- a/internal/namespaces/interlink/v1beta1/interlink_cli.go +++ b/internal/namespaces/interlink/v1beta1/interlink_cli.go @@ -373,6 +373,7 @@ func interlinkLinkList() *core.Command { "deprovisioning", "deleted", "locked", + "ready", }, }, { @@ -385,6 +386,7 @@ func interlinkLinkList() *core.Command { "unknown_bgp_status", "up", "down", + "disabled", }, }, { @@ -397,6 +399,7 @@ func interlinkLinkList() *core.Command { "unknown_bgp_status", "up", "down", + "disabled", }, }, { @@ -594,6 +597,20 @@ func interlinkLinkCreate() *core.Command { Deprecated: false, Positional: false, }, + { + Name: "routing-policy-v4-id", + Short: `If set, attaches this routing policy containing IPv4 prefixes to the Link. Hence, a BGP IPv4 session will be created.`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "routing-policy-v6-id", + Short: `If set, attaches this routing policy containing IPv6 prefixes to the Link. Hence, a BGP IPv6 session will be created.`, + Required: false, + Deprecated: false, + Positional: false, + }, core.RegionArgSpec( scw.RegionFrPar, scw.RegionNlAms,