Skip to content

Commit baaa760

Browse files
authored
Merge branch 'scaleway:master' into master
2 parents 4436fa3 + 2cb1dc8 commit baaa760

18 files changed

+5677
-1973
lines changed

cmd/scw/testdata/test-all-usage-instance-image-list-usage.golden

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ EXAMPLES:
1111

1212
ARGS:
1313
[name]
14-
[public]
1514
[arch]
1615
[project-id]
1716
[tags]

cmd/scw/testdata/test-all-usage-rdb-database-list-usage.golden

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ USAGE:
66
scw rdb database list [arg=value ...]
77

88
ARGS:
9-
[name] Name of the database
10-
[managed] Defines whether or not the database is managed
11-
[owner] User that owns this database
12-
[order-by] Criteria to use when ordering database listing (name_asc | name_desc | size_asc | size_desc)
13-
instance-id UUID of the Database Instance to list the databases of
14-
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
9+
[name] Name of the database
10+
[managed] Defines whether or not the database is managed
11+
[owner] User that owns this database
12+
[order-by] Criteria to use when ordering database listing (name_asc | name_desc | size_asc | size_desc)
13+
instance-id UUID of the Database Instance to list the databases of
14+
[skip-size-retrieval] Whether to skip the retrieval of each database size. If true, the size of each returned database will be set to 0
15+
[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

1617
FLAGS:
1718
-h, --help help for list

docs/commands/instance.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ scw instance image list [arg=value ...]
249249
| Name | | Description |
250250
|------|---|-------------|
251251
| name | | |
252-
| public | | |
253252
| arch | | |
254253
| project-id | | |
255254
| tags | | |

docs/commands/rdb.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ scw rdb database list [arg=value ...]
501501
| owner | | User that owns this database |
502502
| order-by | One of: `name_asc`, `name_desc`, `size_asc`, `size_desc` | Criteria to use when ordering database listing |
503503
| instance-id | Required | UUID of the Database Instance to list the databases of |
504+
| skip-size-retrieval | | Whether to skip the retrieval of each database size. If true, the size of each returned database will be set to 0 |
504505
| 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 |
505506

506507

go.mod

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/scaleway/scaleway-cli/v2
22

3-
go 1.24.6
3+
go 1.25.0
44

55
require (
66
github.com/aws/aws-sdk-go-v2 v1.39.2
@@ -11,7 +11,7 @@ require (
1111
github.com/chzyer/readline v1.5.1
1212
github.com/containerd/console v1.0.5
1313
github.com/dnaeon/go-vcr v1.2.0
14-
github.com/docker/docker v28.4.0+incompatible
14+
github.com/docker/docker v28.5.0+incompatible
1515
github.com/dustin/go-humanize v1.0.1
1616
github.com/fatih/color v1.18.0
1717
github.com/getsentry/sentry-go v0.35.3
@@ -23,7 +23,7 @@ require (
2323
github.com/mattn/go-isatty v0.0.20
2424
github.com/moby/buildkit v0.25.0
2525
github.com/opencontainers/go-digest v1.0.0
26-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251002152609-65aa212380b7
26+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251002202252-ab1363c81acf
2727
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2828
github.com/spf13/cobra v1.10.1
2929
github.com/spf13/pflag v1.0.10
@@ -213,3 +213,9 @@ require (
213213
)
214214

215215
tool gotest.tools/gotestsum
216+
217+
ignore (
218+
./docs
219+
./scripts
220+
./wasm
221+
)

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ github.com/docker/cli v28.4.0+incompatible h1:RBcf3Kjw2pMtwui5V0DIMdyeab8glEw5QY
199199
github.com/docker/cli v28.4.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
200200
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
201201
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
202-
github.com/docker/docker v28.4.0+incompatible h1:KVC7bz5zJY/4AZe/78BIvCnPsLaC9T/zh72xnlrTTOk=
203-
github.com/docker/docker v28.4.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
202+
github.com/docker/docker v28.5.0+incompatible h1:ZdSQoRUE9XxhFI/B8YLvhnEFMmYN9Pp8Egd2qcaFk1E=
203+
github.com/docker/docker v28.5.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
204204
github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8=
205205
github.com/docker/docker-credential-helpers v0.9.3/go.mod h1:x+4Gbw9aGmChi3qTLZj8Dfn0TD20M/fuWy0E5+WDeCo=
206206
github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94=
@@ -462,8 +462,8 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7
462462
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
463463
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
464464
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
465-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251002152609-65aa212380b7 h1:K7bf9NGVVEFqEUn7QEmHNUN0MGz+W4aAi4OSsXj7boE=
466-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251002152609-65aa212380b7/go.mod h1:DVB9HV7nK7TdTRqlpdxw6T0Wxg+aB9xPBEpO3aM2iqQ=
465+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251002202252-ab1363c81acf h1:mz7af7+CKpRvbZMilDwowLtNOQ0sZOYdTAjdkG9lRho=
466+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251002202252-ab1363c81acf/go.mod h1:DVB9HV7nK7TdTRqlpdxw6T0Wxg+aB9xPBEpO3aM2iqQ=
467467
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
468468
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
469469
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/instance/v1/custom_image.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ func imagesMarshalerFunc(i any, _ *human.MarshalOpt) (string, error) {
3737
ID string
3838
Name string
3939
State instance.ImageState
40-
Public bool
4140
Zone scw.Zone
4241
Volumes []scw.Size
4342
ServerName string
@@ -72,7 +71,6 @@ func imagesMarshalerFunc(i any, _ *human.MarshalOpt) (string, error) {
7271
ID: image.ID,
7372
Name: image.Name,
7473
State: image.State,
75-
Public: image.Public,
7674
Zone: image.Zone,
7775
Volumes: volumes,
7876
ServerName: image.ServerName,
@@ -167,25 +165,27 @@ type imageListItem struct {
167165
// A call to GetServer(..) with the ID contained in Image.FromServer retrieves more information about the server.
168166
func imageListBuilder(c *core.Command) *core.Command {
169167
type customListImageRequest struct {
170-
*instance.ListImagesRequest
168+
Zone scw.Zone `json:"-"`
169+
PerPage *uint32 `json:"-"`
170+
Page *int32 `json:"-"`
171+
Name *string `json:"-"`
172+
Arch *string `json:"-"`
173+
Tags *string `json:"-"`
171174
OrganizationID *string
172175
ProjectID *string
173176
}
174177

175178
renameOrganizationIDArgSpec(c.ArgSpecs)
176179
renameProjectIDArgSpec(c.ArgSpecs)
180+
c.ArgSpecs.DeleteByName("public")
177181

178182
c.ArgsType = reflect.TypeOf(customListImageRequest{})
179183

180184
c.Run = func(ctx context.Context, argsI any) (i any, e error) {
181185
// Get images
182186
args := argsI.(*customListImageRequest)
183187

184-
if args.ListImagesRequest == nil {
185-
args.ListImagesRequest = &instance.ListImagesRequest{}
186-
}
187-
188-
req := args.ListImagesRequest
188+
req := &instance.ListImagesRequest{}
189189
req.Organization = args.OrganizationID
190190
req.Project = args.ProjectID
191191
req.Public = scw.BoolPtr(false)

0 commit comments

Comments
 (0)