Skip to content

Commit 30b2b87

Browse files
feat(interlink): add support for peer-asn (#4632)
Co-authored-by: Rémy Léone <[email protected]>
1 parent e5e9129 commit 30b2b87

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

cmd/scw/testdata/test-all-usage-interlink-link-create-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ ARGS:
1313
bandwidth-mbps Desired bandwidth for the link. Must be compatible with available link bandwidths and remaining bandwidth capacity of the connection
1414
[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.
1515
[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.
16+
[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.
1617
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1718

1819
FLAGS:

cmd/scw/testdata/test-all-usage-interlink-link-update-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ARGS:
99
link-id ID of the link to update
1010
[name] Name of the link
1111
[tags.{index}] List of tags to apply to the link
12+
[peer-asn] For self-hosted links, AS Number to establish BGP session.
1213
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1314

1415
FLAGS:

docs/commands/interlink.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ scw interlink link create [arg=value ...]
112112
| bandwidth-mbps | Required | Desired bandwidth for the link. Must be compatible with available link bandwidths and remaining bandwidth capacity of the connection |
113113
| 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. |
114114
| 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. |
115+
| 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. |
115116
| 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 |
116117

117118

@@ -289,6 +290,7 @@ scw interlink link update <link-id ...> [arg=value ...]
289290
| link-id | Required | ID of the link to update |
290291
| name | | Name of the link |
291292
| tags.{index} | | List of tags to apply to the link |
293+
| peer-asn | | For self-hosted links, AS Number to establish BGP session. |
292294
| 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 |
293295

294296

internal/namespaces/interlink/v1beta1/interlink_cli.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,13 @@ func interlinkLinkCreate() *core.Command {
508508
Deprecated: false,
509509
Positional: false,
510510
},
511+
{
512+
Name: "peer-asn",
513+
Short: `For self-hosted links we need the peer AS Number to establish BGP session. If not given, a default one will be assigned.`,
514+
Required: false,
515+
Deprecated: false,
516+
Positional: false,
517+
},
511518
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
512519
},
513520
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
@@ -551,6 +558,13 @@ func interlinkLinkUpdate() *core.Command {
551558
Deprecated: false,
552559
Positional: false,
553560
},
561+
{
562+
Name: "peer-asn",
563+
Short: `For self-hosted links, AS Number to establish BGP session.`,
564+
Required: false,
565+
Deprecated: false,
566+
Positional: false,
567+
},
554568
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
555569
},
556570
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {

0 commit comments

Comments
 (0)