Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Lists the Spark versions available for Data Lab creation.

USAGE:
scw datalab cluster-versions <command>

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.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
25 changes: 25 additions & 0 deletions cmd/scw/testdata/test-all-usage-datalab-datalab-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Manage your Datalab.

USAGE:
scw datalab datalab <command>

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.
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions cmd/scw/testdata/test-all-usage-datalab-node-types-usage.golden
Original file line number Diff line number Diff line change
@@ -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 <command>

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.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List available notebook versions. Currently it includes JupyterLab.

USAGE:
scw datalab notebook-versions <command>

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.
24 changes: 24 additions & 0 deletions cmd/scw/testdata/test-all-usage-datalab-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Data Lab API.

USAGE:
scw datalab <command>

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.
3 changes: 3 additions & 0 deletions cmd/scw/testdata/test-main-usage-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -117,6 +118,7 @@ func GetCommands() *core.Commands {
interlink.GetCommands(),
s2s_vpn.GetCommands(),
searchdb.GetCommands(),
datalab.GetCommands(),
datawarehouse.GetCommands(),
)

Expand Down
Loading
Loading