Skip to content

Commit

Permalink
feat(serverless): add support for domain commands (#2396)
Browse files Browse the repository at this point in the history
Co-authored-by: Rémy Léone <rleone@scaleway.com>
  • Loading branch information
scaleway-bot and remyleone authored Jul 5, 2022
1 parent 95f1c19 commit b2c2ceb
Show file tree
Hide file tree
Showing 18 changed files with 685 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create a domain name binding.

USAGE:
scw container domain create [arg=value ...]

ARGS:
[hostname]
[container-id]
[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

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,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Delete a domain name binding.

USAGE:
scw container domain delete <domain-id ...> [arg=value ...]

ARGS:
domain-id
[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

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
19 changes: 19 additions & 0 deletions cmd/scw/testdata/test-all-usage-container-domain-get-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Get a domain name binding.

USAGE:
scw container domain get <domain-id ...> [arg=value ...]

ARGS:
domain-id
[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

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
20 changes: 20 additions & 0 deletions cmd/scw/testdata/test-all-usage-container-domain-list-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List all domain name bindings.

USAGE:
scw container domain list [arg=value ...]

ARGS:
[order-by] (created_at_asc | created_at_desc | hostname_asc | hostname_desc)
[container-id]
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
-h, --help help for list

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
23 changes: 23 additions & 0 deletions cmd/scw/testdata/test-all-usage-container-domain-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Domain management commands.

USAGE:
scw container domain <command>

AVAILABLE COMMANDS:
create Create a domain name binding
delete Delete a domain name binding
get Get a domain name binding
list List all domain name bindings

FLAGS:
-h, --help help for domain

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 container domain [command] --help" for more information about a command.
1 change: 1 addition & 0 deletions cmd/scw/testdata/test-all-usage-container-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ USAGE:
AVAILABLE COMMANDS:
container Container management commands
cron Cron management commands
domain Domain management commands
namespace Namespace management commands

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create a domain name binding.

USAGE:
scw function domain create [arg=value ...]

ARGS:
[hostname]
[function-id]
[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

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,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Delete a domain name binding.

USAGE:
scw function domain delete <domain-id ...> [arg=value ...]

ARGS:
domain-id
[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

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
19 changes: 19 additions & 0 deletions cmd/scw/testdata/test-all-usage-function-domain-get-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Get a domain name binding.

USAGE:
scw function domain get <domain-id ...> [arg=value ...]

ARGS:
domain-id
[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

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
20 changes: 20 additions & 0 deletions cmd/scw/testdata/test-all-usage-function-domain-list-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List all domain name bindings.

USAGE:
scw function domain list [arg=value ...]

ARGS:
[order-by] (created_at_asc | created_at_desc | hostname_asc | hostname_desc)
[function-id]
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
-h, --help help for list

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
23 changes: 23 additions & 0 deletions cmd/scw/testdata/test-all-usage-function-domain-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Domain management commands.

USAGE:
scw function domain <command>

AVAILABLE COMMANDS:
create Create a domain name binding
delete Delete a domain name binding
get Get a domain name binding
list List all domain name bindings

FLAGS:
-h, --help help for domain

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 function domain [command] --help" for more information about a command.
1 change: 1 addition & 0 deletions cmd/scw/testdata/test-all-usage-function-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ USAGE:

AVAILABLE COMMANDS:
cron Cron management commands
domain Domain management commands
function Function management commands
logs Logs management commands
namespace Function namespace management commands
Expand Down
92 changes: 92 additions & 0 deletions docs/commands/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ Container as a Service API
- [Delete an existing cron](#delete-an-existing-cron)
- [Get a cron](#get-a-cron)
- [List all your crons](#list-all-your-crons)
- [Domain management commands](#domain-management-commands)
- [Create a domain name binding](#create-a-domain-name-binding)
- [Delete a domain name binding](#delete-a-domain-name-binding)
- [Get a domain name binding](#get-a-domain-name-binding)
- [List all domain name bindings](#list-all-domain-name-bindings)
- [Namespace management commands](#namespace-management-commands)
- [Create a new namespace](#create-a-new-namespace)
- [Delete an existing namespace](#delete-an-existing-namespace)
Expand Down Expand Up @@ -250,6 +255,93 @@ scw container cron list [arg=value ...]



## Domain management commands

Domain management commands.


### Create a domain name binding

Create a domain name binding.

**Usage:**

```
scw container domain create [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| hostname | | |
| container-id | | |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |



### Delete a domain name binding

Delete a domain name binding.

**Usage:**

```
scw container domain delete <domain-id ...> [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| domain-id | Required | |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |



### Get a domain name binding

Get a domain name binding.

**Usage:**

```
scw container domain get <domain-id ...> [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| domain-id | Required | |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |



### List all domain name bindings

List all domain name bindings.

**Usage:**

```
scw container domain list [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| order-by | One of: `created_at_asc`, `created_at_desc`, `hostname_asc`, `hostname_desc` | |
| container-id | | |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |



## Namespace management commands

Namespace management commands.
Expand Down
Loading

0 comments on commit b2c2ceb

Please sign in to comment.