From ec743ac58ed8fbea5c5ea21b7015013afa1648e3 Mon Sep 17 00:00:00 2001 From: Yacine FODIL Date: Wed, 4 Feb 2026 16:25:13 +0100 Subject: [PATCH 1/3] feat(datalab): enable v1beta1 --- ...datalab-cluster-versions-list-usage.golden | 20 ++ ...sage-datalab-cluster-versions-usage.golden | 21 ++ ...-usage-datalab-datalab-create-usage.golden | 31 +++ ...-usage-datalab-datalab-delete-usage.golden | 20 ++ ...all-usage-datalab-datalab-get-usage.golden | 20 ++ ...ll-usage-datalab-datalab-list-usage.golden | 24 ++ ...-usage-datalab-datalab-update-usage.golden | 24 ++ ...est-all-usage-datalab-datalab-usage.golden | 25 ++ ...usage-datalab-node-types-list-usage.golden | 22 ++ ...-all-usage-datalab-node-types-usage.golden | 21 ++ ...atalab-notebook-versions-list-usage.golden | 20 ++ ...age-datalab-notebook-versions-usage.golden | 21 ++ .../test-all-usage-datalab-usage.golden | 24 ++ docs/commands/datalab.md | 219 ++++++++++++++++++ internal/namespaces/datalab/v1beta1/custom.go | 11 + 15 files changed, 523 insertions(+) create mode 100644 cmd/scw/testdata/test-all-usage-datalab-cluster-versions-list-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-datalab-cluster-versions-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-datalab-datalab-create-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-datalab-datalab-delete-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-datalab-datalab-get-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-datalab-datalab-list-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-datalab-datalab-update-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-datalab-datalab-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-datalab-node-types-list-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-datalab-node-types-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-datalab-notebook-versions-list-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-datalab-notebook-versions-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-datalab-usage.golden create mode 100644 docs/commands/datalab.md create mode 100644 internal/namespaces/datalab/v1beta1/custom.go diff --git a/cmd/scw/testdata/test-all-usage-datalab-cluster-versions-list-usage.golden b/cmd/scw/testdata/test-all-usage-datalab-cluster-versions-list-usage.golden new file mode 100644 index 0000000000..920829ccba --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-datalab-cluster-versions-list-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List datalab resources. + +USAGE: + scw datalab cluster-versions list [arg=value ...] + +ARGS: + [order-by] The order by field. (name_asc | name_desc) + [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | all) + +FLAGS: + -h, --help help for list + --list-sub-commands List all subcommands + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use diff --git a/cmd/scw/testdata/test-all-usage-datalab-cluster-versions-usage.golden b/cmd/scw/testdata/test-all-usage-datalab-cluster-versions-usage.golden new file mode 100644 index 0000000000..fbb3f76457 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-datalab-cluster-versions-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Lists the Spark versions available for Data Lab creation. + +USAGE: + scw datalab cluster-versions + +AVAILABLE COMMANDS: + list List datalab resources + +FLAGS: + -h, --help help for cluster-versions + --list-sub-commands List all subcommands + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use + +Use "scw datalab cluster-versions [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-datalab-datalab-create-usage.golden b/cmd/scw/testdata/test-all-usage-datalab-datalab-create-usage.golden new file mode 100644 index 0000000000..83053ac58f --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-datalab-datalab-create-usage.golden @@ -0,0 +1,31 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Create datalab resources. + +USAGE: + scw datalab datalab create [arg=value ...] + +ARGS: + [project-id] Project ID to use. If none is passed the default project ID will be used + [name] The name of the Data Lab. + [description] The description of the Data Lab. + [tags.{index}] The tags of the Data Lab. + [main.node-type] + [worker.node-type] + [worker.node-count] + [has-notebook] Whether a JupyterLab notebook shall be created with the Data Lab or not. + [spark-version] The version of Spark running inside the Data Lab, available options can be viewed at ListClusterVersions. + [total-storage.type] (unknown_type | sbs_5k) + [total-storage.size] + [private-network-id] The private network to which the Data Lab is connected. Important for accessing the Spark Master URL from a private cluster. + [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par) + +FLAGS: + -h, --help help for create + --list-sub-commands List all subcommands + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use diff --git a/cmd/scw/testdata/test-all-usage-datalab-datalab-delete-usage.golden b/cmd/scw/testdata/test-all-usage-datalab-datalab-delete-usage.golden new file mode 100644 index 0000000000..4d1df3c523 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-datalab-datalab-delete-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Delete datalab resources. + +USAGE: + scw datalab datalab delete [arg=value ...] + +ARGS: + datalab-id The unique identifier of the Data Lab. + [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par) + +FLAGS: + -h, --help help for delete + --list-sub-commands List all subcommands + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use diff --git a/cmd/scw/testdata/test-all-usage-datalab-datalab-get-usage.golden b/cmd/scw/testdata/test-all-usage-datalab-datalab-get-usage.golden new file mode 100644 index 0000000000..b4404e1c64 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-datalab-datalab-get-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Get datalab resources. + +USAGE: + scw datalab datalab get [arg=value ...] + +ARGS: + datalab-id The unique identifier of the Data Lab + [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par) + +FLAGS: + -h, --help help for get + --list-sub-commands List all subcommands + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use diff --git a/cmd/scw/testdata/test-all-usage-datalab-datalab-list-usage.golden b/cmd/scw/testdata/test-all-usage-datalab-datalab-list-usage.golden new file mode 100644 index 0000000000..866af7cc84 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-datalab-datalab-list-usage.golden @@ -0,0 +1,24 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List datalab resources. + +USAGE: + scw datalab datalab list [arg=value ...] + +ARGS: + [project-id] The unique identifier of the project whose Data Labs you want to list. + [name] The name of the Data Lab you want to list. + [tags.{index}] The tags associated with the Data Lab you want to list. + [order-by] The order by field, available options are `name_asc`, `name_desc`, `created_at_asc`, `created_at_desc`, `updated_at_asc`, `updated_at_desc`. (name_asc | name_desc | created_at_asc | created_at_desc | updated_at_asc | updated_at_desc) + [organization-id] The unique identifier of the organization whose Data Labs you want to list. + [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | all) + +FLAGS: + -h, --help help for list + --list-sub-commands List all subcommands + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use diff --git a/cmd/scw/testdata/test-all-usage-datalab-datalab-update-usage.golden b/cmd/scw/testdata/test-all-usage-datalab-datalab-update-usage.golden new file mode 100644 index 0000000000..ba7065b64f --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-datalab-datalab-update-usage.golden @@ -0,0 +1,24 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Update datalab resources. + +USAGE: + scw datalab datalab update [arg=value ...] + +ARGS: + datalab-id The unique identifier of the Data Lab. + [name] The updated name of the Data Lab. + [description] The updated description of the Data Lab. + [tags.{index}] The updated tags of the Data Lab + [node-count] The updated node count of the Data Lab. Scale up or down the number of worker nodes. + [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par) + +FLAGS: + -h, --help help for update + --list-sub-commands List all subcommands + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use diff --git a/cmd/scw/testdata/test-all-usage-datalab-datalab-usage.golden b/cmd/scw/testdata/test-all-usage-datalab-datalab-usage.golden new file mode 100644 index 0000000000..6a5e85700d --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-datalab-datalab-usage.golden @@ -0,0 +1,25 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Manage your Datalab. + +USAGE: + scw datalab datalab + +AVAILABLE COMMANDS: + create Create datalab resources + delete Delete datalab resources + get Get datalab resources + list List datalab resources + update Update datalab resources + +FLAGS: + -h, --help help for datalab + --list-sub-commands List all subcommands + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use + +Use "scw datalab datalab [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-datalab-node-types-list-usage.golden b/cmd/scw/testdata/test-all-usage-datalab-node-types-list-usage.golden new file mode 100644 index 0000000000..185c9f4c8e --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-datalab-node-types-list-usage.golden @@ -0,0 +1,22 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List datalab resources. + +USAGE: + scw datalab node-types list [arg=value ...] + +ARGS: + [order-by] The order by field. Available fields are `name_asc`, `name_desc`, `vcpus_asc`, `vcpus_desc`, `memory_gigabytes_asc`, `memory_gigabytes_desc`, `vram_bytes_asc`, `vram_bytes_desc`, `gpus_asc`, `gpus_desc`. (name_asc | name_desc | vcpus_asc | vcpus_desc | memory_gigabytes_asc | memory_gigabytes_desc | vram_bytes_asc | vram_bytes_desc | gpus_asc | gpus_desc) + [targets.{index}] Filter on the wanted targets, whether it's for main node or worker. (unknown_target | notebook | worker) + [resource-type] Filter based on node type ( `cpu`/`gpu`/`all` ). (all | gpu | cpu) + [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | all) + +FLAGS: + -h, --help help for list + --list-sub-commands List all subcommands + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use diff --git a/cmd/scw/testdata/test-all-usage-datalab-node-types-usage.golden b/cmd/scw/testdata/test-all-usage-datalab-node-types-usage.golden new file mode 100644 index 0000000000..251aa31bf9 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-datalab-node-types-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List available node types. These are the possible compute units that can host the Spark cluster. + +USAGE: + scw datalab node-types + +AVAILABLE COMMANDS: + list List datalab resources + +FLAGS: + -h, --help help for node-types + --list-sub-commands List all subcommands + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use + +Use "scw datalab node-types [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-datalab-notebook-versions-list-usage.golden b/cmd/scw/testdata/test-all-usage-datalab-notebook-versions-list-usage.golden new file mode 100644 index 0000000000..57cc957ccb --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-datalab-notebook-versions-list-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List datalab resources. + +USAGE: + scw datalab notebook-versions list [arg=value ...] + +ARGS: + [order-by] The order by field. Available options are `name_asc` and `name_desc`. (name_asc | name_desc) + [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | all) + +FLAGS: + -h, --help help for list + --list-sub-commands List all subcommands + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use diff --git a/cmd/scw/testdata/test-all-usage-datalab-notebook-versions-usage.golden b/cmd/scw/testdata/test-all-usage-datalab-notebook-versions-usage.golden new file mode 100644 index 0000000000..ef6758da0a --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-datalab-notebook-versions-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List available notebook versions. Currently it includes JupyterLab. + +USAGE: + scw datalab notebook-versions + +AVAILABLE COMMANDS: + list List datalab resources + +FLAGS: + -h, --help help for notebook-versions + --list-sub-commands List all subcommands + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use + +Use "scw datalab notebook-versions [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-datalab-usage.golden b/cmd/scw/testdata/test-all-usage-datalab-usage.golden new file mode 100644 index 0000000000..4ca35f331e --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-datalab-usage.golden @@ -0,0 +1,24 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Data Lab API. + +USAGE: + scw datalab + +AVAILABLE COMMANDS: + cluster-versions + datalab + node-types + notebook-versions + +FLAGS: + -h, --help help for datalab + --list-sub-commands List all subcommands + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use + +Use "scw datalab [command] --help" for more information about a command. diff --git a/docs/commands/datalab.md b/docs/commands/datalab.md new file mode 100644 index 0000000000..e2b44ef9f3 --- /dev/null +++ b/docs/commands/datalab.md @@ -0,0 +1,219 @@ + +# Documentation for `scw datalab` +Data Lab API. + +- [](#) + - [List datalab resources](#list-datalab-resources) +- [](#) + - [Create datalab resources](#create-datalab-resources) + - [Delete datalab resources](#delete-datalab-resources) + - [Get datalab resources](#get-datalab-resources) + - [List datalab resources](#list-datalab-resources) + - [Update datalab resources](#update-datalab-resources) +- [](#) + - [List datalab resources](#list-datalab-resources) +- [](#) + - [List datalab resources](#list-datalab-resources) + + +## + +Lists the Spark versions available for Data Lab creation. + + +### List datalab resources + +List datalab resources. + +**Usage:** + +``` +scw datalab cluster-versions list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| order-by | One of: `name_asc`, `name_desc` | The order by field. | +| region | Default: `fr-par`
One of: `fr-par`, `all` | Region to target. If none is passed will use default region from the config | + + + +## + +Manage your Datalab. + + +### Create datalab resources + +Create datalab resources. + +**Usage:** + +``` +scw datalab datalab create [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| project-id | | Project ID to use. If none is passed the default project ID will be used | +| name | | The name of the Data Lab. | +| description | | The description of the Data Lab. | +| tags.{index} | | The tags of the Data Lab. | +| main.node-type | | | +| worker.node-type | | | +| worker.node-count | | | +| has-notebook | | Whether a JupyterLab notebook shall be created with the Data Lab or not. | +| spark-version | | The version of Spark running inside the Data Lab, available options can be viewed at ListClusterVersions. | +| total-storage.type | One of: `unknown_type`, `sbs_5k` | | +| total-storage.size | | | +| private-network-id | | The private network to which the Data Lab is connected. Important for accessing the Spark Master URL from a private cluster. | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +### Delete datalab resources + +Delete datalab resources. + +**Usage:** + +``` +scw datalab datalab delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| datalab-id | Required | The unique identifier of the Data Lab. | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +### Get datalab resources + +Get datalab resources. + +**Usage:** + +``` +scw datalab datalab get [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| datalab-id | Required | The unique identifier of the Data Lab | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +### List datalab resources + +List datalab resources. + +**Usage:** + +``` +scw datalab datalab list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| project-id | | The unique identifier of the project whose Data Labs you want to list. | +| name | | The name of the Data Lab you want to list. | +| tags.{index} | | The tags associated with the Data Lab you want to list. | +| order-by | One of: `name_asc`, `name_desc`, `created_at_asc`, `created_at_desc`, `updated_at_asc`, `updated_at_desc` | The order by field, available options are `name_asc`, `name_desc`, `created_at_asc`, `created_at_desc`, `updated_at_asc`, `updated_at_desc`. | +| organization-id | | The unique identifier of the organization whose Data Labs you want to list. | +| region | Default: `fr-par`
One of: `fr-par`, `all` | Region to target. If none is passed will use default region from the config | + + + +### Update datalab resources + +Update datalab resources. + +**Usage:** + +``` +scw datalab datalab update [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| datalab-id | Required | The unique identifier of the Data Lab. | +| name | | The updated name of the Data Lab. | +| description | | The updated description of the Data Lab. | +| tags.{index} | | The updated tags of the Data Lab | +| node-count | | The updated node count of the Data Lab. Scale up or down the number of worker nodes. | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +## + +List available node types. These are the possible compute units that can host the Spark cluster. + + +### List datalab resources + +List datalab resources. + +**Usage:** + +``` +scw datalab node-types list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| order-by | One of: `name_asc`, `name_desc`, `vcpus_asc`, `vcpus_desc`, `memory_gigabytes_asc`, `memory_gigabytes_desc`, `vram_bytes_asc`, `vram_bytes_desc`, `gpus_asc`, `gpus_desc` | The order by field. Available fields are `name_asc`, `name_desc`, `vcpus_asc`, `vcpus_desc`, `memory_gigabytes_asc`, `memory_gigabytes_desc`, `vram_bytes_asc`, `vram_bytes_desc`, `gpus_asc`, `gpus_desc`. | +| targets.{index} | One of: `unknown_target`, `notebook`, `worker` | Filter on the wanted targets, whether it's for main node or worker. | +| resource-type | One of: `all`, `gpu`, `cpu` | Filter based on node type ( `cpu`/`gpu`/`all` ). | +| region | Default: `fr-par`
One of: `fr-par`, `all` | Region to target. If none is passed will use default region from the config | + + + +## + +List available notebook versions. Currently it includes JupyterLab. + + +### List datalab resources + +List datalab resources. + +**Usage:** + +``` +scw datalab notebook-versions list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| order-by | One of: `name_asc`, `name_desc` | The order by field. Available options are `name_asc` and `name_desc`. | +| region | Default: `fr-par`
One of: `fr-par`, `all` | Region to target. If none is passed will use default region from the config | + + + diff --git a/internal/namespaces/datalab/v1beta1/custom.go b/internal/namespaces/datalab/v1beta1/custom.go new file mode 100644 index 0000000000..254bd34c50 --- /dev/null +++ b/internal/namespaces/datalab/v1beta1/custom.go @@ -0,0 +1,11 @@ +gitpackage datalab + +import ( + "github.com/scaleway/scaleway-cli/v2/core" +) + +func GetCommands() *core.Commands { + cmds := GetGeneratedCommands() + + return cmds +} From a19dfd8826251bf50897fe3d82de71b5b02b6d48 Mon Sep 17 00:00:00 2001 From: Yacine FODIL Date: Wed, 4 Feb 2026 16:30:47 +0100 Subject: [PATCH 2/3] fix --- commands/commands.go | 2 ++ internal/namespaces/datalab/v1beta1/custom.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/commands/commands.go b/commands/commands.go index fce503dca7..8fd454b455 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -15,6 +15,7 @@ import ( "github.com/scaleway/scaleway-cli/v2/internal/namespaces/cockpit/v1" configNamespace "github.com/scaleway/scaleway-cli/v2/internal/namespaces/config" container "github.com/scaleway/scaleway-cli/v2/internal/namespaces/container/v1beta1" + datalab "github.com/scaleway/scaleway-cli/v2/internal/namespaces/datalab/v1beta1" datawarehouse "github.com/scaleway/scaleway-cli/v2/internal/namespaces/datawarehouse/v1beta1" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/dedibox/v1" domain "github.com/scaleway/scaleway-cli/v2/internal/namespaces/domain/v2beta1" @@ -117,6 +118,7 @@ func GetCommands() *core.Commands { interlink.GetCommands(), s2s_vpn.GetCommands(), searchdb.GetCommands(), + datalab.GetCommands(), datawarehouse.GetCommands(), ) diff --git a/internal/namespaces/datalab/v1beta1/custom.go b/internal/namespaces/datalab/v1beta1/custom.go index 254bd34c50..9c29dec541 100644 --- a/internal/namespaces/datalab/v1beta1/custom.go +++ b/internal/namespaces/datalab/v1beta1/custom.go @@ -1,4 +1,4 @@ -gitpackage datalab +package datalab import ( "github.com/scaleway/scaleway-cli/v2/core" From cdf6b33352c90f1f804c2daba84ee0dfb3ae2f53 Mon Sep 17 00:00:00 2001 From: Yacine FODIL Date: Wed, 4 Feb 2026 16:42:45 +0100 Subject: [PATCH 3/3] update golden --- cmd/scw/testdata/test-main-usage-usage.golden | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/scw/testdata/test-main-usage-usage.golden b/cmd/scw/testdata/test-main-usage-usage.golden index 1796bc5d2f..93553c55ed 100644 --- a/cmd/scw/testdata/test-main-usage-usage.golden +++ b/cmd/scw/testdata/test-main-usage-usage.golden @@ -6,6 +6,9 @@ USAGE: AI COMMANDS: inference This API allows you to handle your Managed Inference services +AVAILABLE COMMANDS: + datalab Data Lab API for Apache Sparkβ„’ + BAREMETAL COMMANDS: apple-silicon Apple silicon API baremetal Elastic Metal API