Skip to content

feat(interlink): add support for RoutingPolicyV4ID, RoutingPolicyV6ID and IsIPv6 #4787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 10, 2025
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,8 +6,9 @@ USAGE:
scw interlink link detach_policy <link-id ...> [arg=value ...]

ARGS:
link-id ID of the link to detach a routing policy from
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
link-id ID of the link to detach a routing policy from
routing-policy-id ID of the routing policy to be detached
[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 detach_policy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ARGS:
[tags.{index}] List of tags to apply to the routing policy
[prefix-filter-in.{index}] IP prefixes to accept from the peer (ranges of route announcements to accept)
[prefix-filter-out.{index}] IP prefix filters to advertise to the peer (ranges of routes to advertise)
[is-ipv6] IP prefixes version of the routing policy
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ARGS:
[project-id] Project ID to filter for
[name] Routing policy name to filter for
[tags.{index}] Tags to filter for
[ipv6] Filter for the routing policies based on IP prefixes version
[organization-id] Organization ID to filter for
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)

Expand Down
3 changes: 3 additions & 0 deletions docs/commands/interlink.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ scw interlink link detach_policy <link-id ...> [arg=value ...]
| Name | | Description |
|------|---|-------------|
| link-id | Required | ID of the link to detach a routing policy from |
| routing-policy-id | Required | ID of the routing policy to be detached |
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |


Expand Down Expand Up @@ -416,6 +417,7 @@ scw interlink routing-policy create [arg=value ...]
| tags.{index} | | List of tags to apply to the routing policy |
| prefix-filter-in.{index} | | IP prefixes to accept from the peer (ranges of route announcements to accept) |
| prefix-filter-out.{index} | | IP prefix filters to advertise to the peer (ranges of routes to advertise) |
| is-ipv6 | | IP prefixes version of the routing policy |
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |


Expand Down Expand Up @@ -479,6 +481,7 @@ scw interlink routing-policy list [arg=value ...]
| project-id | | Project ID to filter for |
| name | | Routing policy name to filter for |
| tags.{index} | | Tags to filter for |
| ipv6 | | Filter for the routing policies based on IP prefixes version |
| organization-id | | Organization ID to filter for |
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config |

Expand Down
23 changes: 22 additions & 1 deletion internal/namespaces/interlink/v1beta1/interlink_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"reflect"

"github.com/scaleway/scaleway-cli/v2/core"
interlink "github.com/scaleway/scaleway-sdk-go/api/interlink/v1beta1"
"github.com/scaleway/scaleway-sdk-go/api/interlink/v1beta1"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down Expand Up @@ -826,6 +826,13 @@ func interlinkLinkDetachPolicy() *core.Command {
Deprecated: false,
Positional: true,
},
{
Name: "routing-policy-id",
Short: `ID of the routing policy to be detached`,
Required: true,
Deprecated: false,
Positional: false,
},
core.RegionArgSpec(
scw.RegionFrPar,
scw.RegionNlAms,
Expand Down Expand Up @@ -955,6 +962,13 @@ func interlinkRoutingPolicyList() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "ipv6",
Short: `Filter for the routing policies based on IP prefixes version`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "organization-id",
Short: `Organization ID to filter for`,
Expand Down Expand Up @@ -1062,6 +1076,13 @@ func interlinkRoutingPolicyCreate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "is-ipv6",
Short: `IP prefixes version of the routing policy`,
Required: false,
Deprecated: false,
Positional: false,
},
core.RegionArgSpec(
scw.RegionFrPar,
scw.RegionNlAms,
Expand Down
Loading