Skip to content

Commit 0121b5f

Browse files
authored
Merge branch 'scaleway:master' into master
2 parents fc02314 + 51f8e6e commit 0121b5f

17 files changed

+240
-6
lines changed

cmd/scw/testdata/test-all-usage-function-function-create-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ ARGS:
2222
[http-option=enabled] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected)
2323
[sandbox] Execution environment of the function (unknown_sandbox | v1 | v2)
2424
[tags.{index}] Tags of the Serverless Function
25+
[private-network-id] ID of the Private Network the function is connected to.
2526
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
2627

2728
FLAGS:

cmd/scw/testdata/test-all-usage-function-function-update-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ ARGS:
2222
[http-option] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected)
2323
[sandbox] Execution environment of the function (unknown_sandbox | v1 | v2)
2424
[tags.{index}] Tags of the Serverless Function
25+
[private-network-id] ID of the Private Network the function is connected to.
2526
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
2627

2728
FLAGS:

cmd/scw/testdata/test-all-usage-function-namespace-create-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ ARGS:
1313
[secret-environment-variables.{index}.key]
1414
[secret-environment-variables.{index}.value]
1515
[tags.{index}] Tags of the Serverless Function Namespace
16+
[activate-vpc-integration] Activate VPC integration for the namespace.
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:
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Attach a filesystem volume to an Instance.
4+
5+
USAGE:
6+
scw instance server attach-filesystem [arg=value ...]
7+
8+
ARGS:
9+
server-id
10+
[filesystem-id]
11+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)
12+
13+
FLAGS:
14+
-h, --help help for attach-filesystem
15+
16+
GLOBAL FLAGS:
17+
-c, --config string The path to the config file
18+
-D, --debug Enable debug mode
19+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
20+
-p, --profile string The config profile to use
21+
--web open console page for the current ressource
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Detach a filesystem volume to an Instance.
4+
5+
USAGE:
6+
scw instance server detach-filesystem [arg=value ...]
7+
8+
ARGS:
9+
server-id
10+
[filesystem-id]
11+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)
12+
13+
FLAGS:
14+
-h, --help help for detach-filesystem
15+
16+
GLOBAL FLAGS:
17+
-c, --config string The path to the config file
18+
-D, --debug Enable debug mode
19+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
20+
-p, --profile string The config profile to use
21+
--web open console page for the current ressource

cmd/scw/testdata/test-all-usage-instance-server-usage.golden

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ USAGE:
99

1010
AVAILABLE COMMANDS:
1111
action Perform a raw API action on a server
12+
attach-filesystem Attach a filesystem volume to an Instance
1213
attach-ip Attach an IP to a server
1314
attach-volume Attach a volume to a server
1415
backup Backup server
1516
console Connect to the serial console of an instance
1617
create Create server
1718
delete Delete server
19+
detach-filesystem Detach a filesystem volume to an Instance
1820
detach-ip Detach an IP from a server
1921
detach-volume Detach a volume from its server
2022
enable-routed-ip Migrate server to IP mobility

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ USAGE:
66
scw interlink link detach_policy <link-id ...> [arg=value ...]
77

88
ARGS:
9-
link-id ID of the link to detach a routing policy from
10-
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
9+
link-id ID of the link to detach a routing policy from
10+
routing-policy-id ID of the routing policy to be detached
11+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1112

1213
FLAGS:
1314
-h, --help help for detach_policy

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ARGS:
1111
[tags.{index}] List of tags to apply to the routing policy
1212
[prefix-filter-in.{index}] IP prefixes to accept from the peer (ranges of route announcements to accept)
1313
[prefix-filter-out.{index}] IP prefix filters to advertise to the peer (ranges of routes to advertise)
14+
[is-ipv6] IP prefixes version of the routing policy
1415
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1516

1617
FLAGS:

cmd/scw/testdata/test-all-usage-interlink-routing-policy-list-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ARGS:
1010
[project-id] Project ID to filter for
1111
[name] Routing policy name to filter for
1212
[tags.{index}] Tags to filter for
13+
[ipv6] Filter for the routing policies based on IP prefixes version
1314
[organization-id] Organization ID to filter for
1415
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
1516

docs/commands/function.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ scw function function create [arg=value ...]
305305
| http-option | Default: `enabled`<br />One of: `unknown_http_option`, `enabled`, `redirected` | Configure how HTTP and HTTPS requests are handled |
306306
| sandbox | One of: `unknown_sandbox`, `v1`, `v2` | Execution environment of the function |
307307
| tags.{index} | | Tags of the Serverless Function |
308+
| private-network-id | | ID of the Private Network the function is connected to. |
308309
| 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 |
309310

310311

@@ -465,6 +466,7 @@ scw function function update <function-id ...> [arg=value ...]
465466
| http-option | One of: `unknown_http_option`, `enabled`, `redirected` | Configure how HTTP and HTTPS requests are handled |
466467
| sandbox | One of: `unknown_sandbox`, `v1`, `v2` | Execution environment of the function |
467468
| tags.{index} | | Tags of the Serverless Function |
469+
| private-network-id | | ID of the Private Network the function is connected to. |
468470
| 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 |
469471

470472

@@ -496,6 +498,7 @@ scw function namespace create [arg=value ...]
496498
| secret-environment-variables.{index}.key | | |
497499
| secret-environment-variables.{index}.value | | |
498500
| tags.{index} | | Tags of the Serverless Function Namespace |
501+
| activate-vpc-integration | | Activate VPC integration for the namespace. |
499502
| 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 |
500503

501504

docs/commands/instance.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,14 @@ This API allows you to manage your CPU and GPU Instances.
5050
- [Update security group rule](#update-security-group-rule)
5151
- [Instance management commands](#instance-management-commands)
5252
- [Perform a raw API action on a server](#perform-a-raw-api-action-on-a-server)
53+
- [Attach a filesystem volume to an Instance](#attach-a-filesystem-volume-to-an-instance)
5354
- [Attach an IP to a server](#attach-an-ip-to-a-server)
5455
- [Attach a volume to a server](#attach-a-volume-to-a-server)
5556
- [Backup server](#backup-server)
5657
- [Connect to the serial console of an instance](#connect-to-the-serial-console-of-an-instance)
5758
- [Create server](#create-server)
5859
- [Delete server](#delete-server)
60+
- [Detach a filesystem volume to an Instance](#detach-a-filesystem-volume-to-an-instance)
5961
- [Detach an IP from a server](#detach-an-ip-from-a-server)
6062
- [Detach a volume from its server](#detach-a-volume-from-its-server)
6163
- [Migrate server to IP mobility](#migrate-server-to-ip-mobility)
@@ -1569,6 +1571,27 @@ scw instance server action 11111111-1111-1111-1111-111111111111 action=poweron
15691571

15701572

15711573

1574+
### Attach a filesystem volume to an Instance
1575+
1576+
Attach a filesystem volume to an Instance.
1577+
1578+
**Usage:**
1579+
1580+
```
1581+
scw instance server attach-filesystem [arg=value ...]
1582+
```
1583+
1584+
1585+
**Args:**
1586+
1587+
| Name | | Description |
1588+
|------|---|-------------|
1589+
| server-id | Required | |
1590+
| filesystem-id | | |
1591+
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `fr-par-3`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2`, `pl-waw-3` | Zone to target. If none is passed will use default zone from the config |
1592+
1593+
1594+
15721595
### Attach an IP to a server
15731596

15741597

@@ -1820,6 +1843,27 @@ scw instance server delete 11111111-1111-1111-1111-111111111111 zone=fr-par-1
18201843

18211844

18221845

1846+
### Detach a filesystem volume to an Instance
1847+
1848+
Detach a filesystem volume to an Instance.
1849+
1850+
**Usage:**
1851+
1852+
```
1853+
scw instance server detach-filesystem [arg=value ...]
1854+
```
1855+
1856+
1857+
**Args:**
1858+
1859+
| Name | | Description |
1860+
|------|---|-------------|
1861+
| server-id | Required | |
1862+
| filesystem-id | | |
1863+
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `fr-par-3`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2`, `pl-waw-3` | Zone to target. If none is passed will use default zone from the config |
1864+
1865+
1866+
18231867
### Detach an IP from a server
18241868

18251869

docs/commands/interlink.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ scw interlink link detach_policy <link-id ...> [arg=value ...]
153153
| Name | | Description |
154154
|------|---|-------------|
155155
| link-id | Required | ID of the link to detach a routing policy from |
156+
| routing-policy-id | Required | ID of the routing policy to be detached |
156157
| 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 |
157158

158159

@@ -416,6 +417,7 @@ scw interlink routing-policy create [arg=value ...]
416417
| tags.{index} | | List of tags to apply to the routing policy |
417418
| prefix-filter-in.{index} | | IP prefixes to accept from the peer (ranges of route announcements to accept) |
418419
| prefix-filter-out.{index} | | IP prefix filters to advertise to the peer (ranges of routes to advertise) |
420+
| is-ipv6 | | IP prefixes version of the routing policy |
419421
| 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 |
420422

421423

@@ -479,6 +481,7 @@ scw interlink routing-policy list [arg=value ...]
479481
| project-id | | Project ID to filter for |
480482
| name | | Routing policy name to filter for |
481483
| tags.{index} | | Tags to filter for |
484+
| ipv6 | | Filter for the routing policies based on IP prefixes version |
482485
| organization-id | | Organization ID to filter for |
483486
| 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 |
484487

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.24.0
44

55
require (
66
github.com/aws/aws-sdk-go-v2 v1.36.3
7-
github.com/aws/aws-sdk-go-v2/service/s3 v1.80.0
7+
github.com/aws/aws-sdk-go-v2/service/s3 v1.80.1
88
github.com/buildpacks/pack v0.34.2
99
github.com/c-bata/go-prompt v0.2.6
1010
github.com/charmbracelet/bubbletea v1.3.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 h1:dM9/92u2
9090
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15/go.mod h1:SwFBy2vjtA0vZbjjaFtfN045boopadnoVPhu4Fv66vY=
9191
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15 h1:moLQUoVq91LiqT1nbvzDukyqAlCv89ZmwaHw/ZFlFZg=
9292
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15/go.mod h1:ZH34PJUc8ApjBIfgQCFvkWcUDBtl/WTD+uiYHjd8igA=
93-
github.com/aws/aws-sdk-go-v2/service/s3 v1.80.0 h1:fV4XIU5sn/x8gjRouoJpDVHj+ExJaUk4prYF+eb6qTs=
94-
github.com/aws/aws-sdk-go-v2/service/s3 v1.80.0/go.mod h1:qbn305Je/IofWBJ4bJz/Q7pDEtnnoInw/dGt71v6rHE=
93+
github.com/aws/aws-sdk-go-v2/service/s3 v1.80.1 h1:xYEAf/6QHiTZDccKnPMbsMwlau13GsDsTgdue3wmHGw=
94+
github.com/aws/aws-sdk-go-v2/service/s3 v1.80.1/go.mod h1:qbn305Je/IofWBJ4bJz/Q7pDEtnnoInw/dGt71v6rHE=
9595
github.com/aws/aws-sdk-go-v2/service/sso v1.20.2 h1:XOPfar83RIRPEzfihnp+U6udOveKZJvPQ76SKWrLRHc=
9696
github.com/aws/aws-sdk-go-v2/service/sso v1.20.2/go.mod h1:Vv9Xyk1KMHXrR3vNQe8W5LMFdTjSeWk0gBZBzvf3Qa0=
9797
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2 h1:pi0Skl6mNl2w8qWZXcdOyg197Zsf4G97U7Sso9JXGZE=

internal/namespaces/function/v1beta1/function_cli.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,13 @@ func functionNamespaceCreate() *core.Command {
324324
Deprecated: false,
325325
Positional: false,
326326
},
327+
{
328+
Name: "activate-vpc-integration",
329+
Short: `Activate VPC integration for the namespace.`,
330+
Required: false,
331+
Deprecated: false,
332+
Positional: false,
333+
},
327334
core.RegionArgSpec(
328335
scw.RegionFrPar,
329336
scw.RegionNlAms,
@@ -728,6 +735,13 @@ func functionFunctionCreate() *core.Command {
728735
Deprecated: false,
729736
Positional: false,
730737
},
738+
{
739+
Name: "private-network-id",
740+
Short: `ID of the Private Network the function is connected to.`,
741+
Required: false,
742+
Deprecated: false,
743+
Positional: false,
744+
},
731745
core.RegionArgSpec(
732746
scw.RegionFrPar,
733747
scw.RegionNlAms,
@@ -917,6 +931,13 @@ func functionFunctionUpdate() *core.Command {
917931
Deprecated: false,
918932
Positional: false,
919933
},
934+
{
935+
Name: "private-network-id",
936+
Short: `ID of the Private Network the function is connected to.`,
937+
Required: false,
938+
Deprecated: false,
939+
Positional: false,
940+
},
920941
core.RegionArgSpec(
921942
scw.RegionFrPar,
922943
scw.RegionNlAms,

internal/namespaces/instance/v1/instance_cli.go

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ func GetGeneratedCommands() *core.Commands {
4343
instanceUserDataSet(),
4444
instanceUserDataGet(),
4545
instanceServerGetCompatibleTypes(),
46+
instanceServerAttachFilesystem(),
47+
instanceServerDetachFilesystem(),
4648
instanceImageList(),
4749
instanceImageGet(),
4850
instanceImageCreate(),
@@ -1142,6 +1144,96 @@ If the specified Instance offer is flagged as end of service, the best compatibl
11421144
}
11431145
}
11441146

1147+
func instanceServerAttachFilesystem() *core.Command {
1148+
return &core.Command{
1149+
Short: `Attach a filesystem volume to an Instance`,
1150+
Long: `Attach a filesystem volume to an Instance.`,
1151+
Namespace: "instance",
1152+
Resource: "server",
1153+
Verb: "attach-filesystem",
1154+
// Deprecated: false,
1155+
ArgsType: reflect.TypeOf(instance.AttachServerFileSystemRequest{}),
1156+
ArgSpecs: core.ArgSpecs{
1157+
{
1158+
Name: "server-id",
1159+
Required: true,
1160+
Deprecated: false,
1161+
Positional: false,
1162+
},
1163+
{
1164+
Name: "filesystem-id",
1165+
Required: false,
1166+
Deprecated: false,
1167+
Positional: false,
1168+
},
1169+
core.ZoneArgSpec(
1170+
scw.ZoneFrPar1,
1171+
scw.ZoneFrPar2,
1172+
scw.ZoneFrPar3,
1173+
scw.ZoneNlAms1,
1174+
scw.ZoneNlAms2,
1175+
scw.ZoneNlAms3,
1176+
scw.ZonePlWaw1,
1177+
scw.ZonePlWaw2,
1178+
scw.ZonePlWaw3,
1179+
),
1180+
},
1181+
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
1182+
request := args.(*instance.AttachServerFileSystemRequest)
1183+
1184+
client := core.ExtractClient(ctx)
1185+
api := instance.NewAPI(client)
1186+
1187+
return api.AttachServerFileSystem(request)
1188+
},
1189+
}
1190+
}
1191+
1192+
func instanceServerDetachFilesystem() *core.Command {
1193+
return &core.Command{
1194+
Short: `Detach a filesystem volume to an Instance`,
1195+
Long: `Detach a filesystem volume to an Instance.`,
1196+
Namespace: "instance",
1197+
Resource: "server",
1198+
Verb: "detach-filesystem",
1199+
// Deprecated: false,
1200+
ArgsType: reflect.TypeOf(instance.DetachServerFileSystemRequest{}),
1201+
ArgSpecs: core.ArgSpecs{
1202+
{
1203+
Name: "server-id",
1204+
Required: true,
1205+
Deprecated: false,
1206+
Positional: false,
1207+
},
1208+
{
1209+
Name: "filesystem-id",
1210+
Required: false,
1211+
Deprecated: false,
1212+
Positional: false,
1213+
},
1214+
core.ZoneArgSpec(
1215+
scw.ZoneFrPar1,
1216+
scw.ZoneFrPar2,
1217+
scw.ZoneFrPar3,
1218+
scw.ZoneNlAms1,
1219+
scw.ZoneNlAms2,
1220+
scw.ZoneNlAms3,
1221+
scw.ZonePlWaw1,
1222+
scw.ZonePlWaw2,
1223+
scw.ZonePlWaw3,
1224+
),
1225+
},
1226+
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
1227+
request := args.(*instance.DetachServerFileSystemRequest)
1228+
1229+
client := core.ExtractClient(ctx)
1230+
api := instance.NewAPI(client)
1231+
1232+
return api.DetachServerFileSystem(request)
1233+
},
1234+
}
1235+
}
1236+
11451237
func instanceImageList() *core.Command {
11461238
return &core.Command{
11471239
Short: `List Instance images`,

0 commit comments

Comments
 (0)