@@ -6,8 +6,10 @@ import (
66 "github.com/UpCloudLtd/upcloud-cli/v3/internal/commands"
77 "github.com/UpCloudLtd/upcloud-cli/v3/internal/completion"
88 "github.com/UpCloudLtd/upcloud-cli/v3/internal/output"
9+ "github.com/UpCloudLtd/upcloud-cli/v3/internal/paging"
910 "github.com/UpCloudLtd/upcloud-cli/v3/internal/resolver"
1011 "github.com/UpCloudLtd/upcloud-go-api/v8/upcloud/request"
12+ "github.com/spf13/pflag"
1113)
1214
1315// ListCommand creates the 'objectstorage bucket list' command
@@ -26,13 +28,18 @@ type listCommand struct {
2628 * commands.BaseCommand
2729 completion.ObjectStorage
2830 resolver.CachingObjectStorage
31+ paging.PageParameters
2932}
3033
3134// InitCommand implements Command.InitCommand
3235func (s * listCommand ) InitCommand () {
3336 s .Cobra ().Long = commands .WrapLongDescription (`List buckets in a managed object storage service
3437
3538Lists all buckets in the specified managed object storage service, showing their names and total size in bytes.` )
39+
40+ fs := & pflag.FlagSet {}
41+ s .ConfigureFlags (fs )
42+ s .AddFlags (fs )
3643}
3744
3845// Execute implements commands.MultipleArgumentCommand
@@ -44,6 +51,7 @@ func (s *listCommand) Execute(exec commands.Executor, serviceUUID string) (outpu
4451
4552 req := & request.GetManagedObjectStorageBucketMetricsRequest {
4653 ServiceUUID : serviceUUID ,
54+ Page : s .Page (),
4755 }
4856
4957 res , err := svc .GetManagedObjectStorageBucketMetrics (exec .Context (), req )
0 commit comments