Skip to content

Commit

Permalink
Merge branch 'master' into manual_purge
Browse files Browse the repository at this point in the history
  • Loading branch information
remyleone authored Feb 25, 2025
2 parents bb000db + 4a0f7f8 commit d354b27
Show file tree
Hide file tree
Showing 13 changed files with 80 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ARGS:
[project-id] Filter by Project ID
[volume-id] Filter snapshots by the ID of the original volume
[name] Filter snapshots by their names
[tags.{index}] Filter by tags. Only snapshots with one or more matching tags will be returned
[organization-id] Filter by Organization ID
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3 | all)

Expand Down
19 changes: 10 additions & 9 deletions cmd/scw/testdata/test-all-usage-secret-secret-list-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ USAGE:
scw secret secret list [arg=value ...]

ARGS:
[project-id] Filter by Project ID (optional)
[order-by] (name_asc | name_desc | created_at_asc | created_at_desc | updated_at_asc | updated_at_desc)
[tags.{index}] List of tags to filter on (optional)
[name] Filter by secret name (optional)
[path] Filter by exact path (optional)
[ephemeral] Filter by ephemeral / not ephemeral (optional)
[type] Filter by secret type (optional) (unknown_type | opaque | certificate | key_value | basic_credentials | database_credentials | ssh_key)
[organization-id] Filter by Organization ID (optional)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
[project-id] Filter by Project ID (optional)
[order-by] (name_asc | name_desc | created_at_asc | created_at_desc | updated_at_asc | updated_at_desc)
[tags.{index}] List of tags to filter on (optional)
[name] Filter by secret name (optional)
[path] Filter by exact path (optional)
[ephemeral] Filter by ephemeral / not ephemeral (optional)
[type] Filter by secret type (optional) (unknown_type | opaque | certificate | key_value | basic_credentials | database_credentials | ssh_key)
[scheduled-for-deletion] Filter by whether the secret was scheduled for deletion / not scheduled for deletion (optional)
[organization-id] Filter by Organization ID (optional)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)

FLAGS:
-h, --help help for list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

ARGS:
secret-id ID of the secret
[status.{index}] Filter results by status (unknown_status | enabled | disabled | deleted)
[status.{index}] Filter results by status (unknown_status | enabled | disabled | deleted | scheduled_for_deletion)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Project consumption allow you to see your project consumption.

USAGE:
scw tem project-consumption

FLAGS:
-h, --help help for project-consumption

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
13 changes: 7 additions & 6 deletions cmd/scw/testdata/test-all-usage-tem-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ USAGE:
scw tem <command>

AVAILABLE COMMANDS:
blocklists Blocklist
domain Domain management commands
email Email management commands
offers Project offers management commands
project-settings Project settings management commands
webhook Webhook management commands
blocklists Blocklist
domain Domain management commands
email Email management commands
offers Project offers management commands
project-consumption Project consumption management commands
project-settings Project settings management commands
webhook Webhook management commands

FLAGS:
-h, --help help for tem
Expand Down
1 change: 1 addition & 0 deletions docs/commands/block.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ scw block snapshot list [arg=value ...]
| project-id | | Filter by Project ID |
| volume-id | | Filter snapshots by the ID of the original volume |
| name | | Filter snapshots by their names |
| tags.{index} | | Filter by tags. Only snapshots with one or more matching tags will be returned |
| organization-id | | Filter by Organization ID |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `fr-par-3`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2`, `pl-waw-3`, `all` | Zone to target. If none is passed will use default zone from the config |

Expand Down
3 changes: 2 additions & 1 deletion docs/commands/secret.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ scw secret secret list [arg=value ...]
| path | | Filter by exact path (optional) |
| ephemeral | | Filter by ephemeral / not ephemeral (optional) |
| type | One of: `unknown_type`, `opaque`, `certificate`, `key_value`, `basic_credentials`, `database_credentials`, `ssh_key` | Filter by secret type (optional) |
| scheduled-for-deletion | | Filter by whether the secret was scheduled for deletion / not scheduled for deletion (optional) |
| organization-id | | Filter by Organization ID (optional) |
| 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 |

Expand Down Expand Up @@ -457,7 +458,7 @@ scw secret version list <secret-id ...> [arg=value ...]
| Name | | Description |
|------|---|-------------|
| secret-id | Required | ID of the secret |
| status.{index} | One of: `unknown_status`, `enabled`, `disabled`, `deleted` | Filter results by status |
| status.{index} | One of: `unknown_status`, `enabled`, `disabled`, `deleted`, `scheduled_for_deletion` | Filter results by status |
| 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 |


Expand Down
15 changes: 15 additions & 0 deletions docs/commands/tem.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ This API allows you to manage your Transactional Email services.
- [Email statuses](#email-statuses)
- [List emails](#list-emails)
- [Project offers management commands](#project-offers-management-commands)
- [Project consumption management commands](#project-consumption-management-commands)
- [Project settings management commands](#project-settings-management-commands)
- [Webhook management commands](#webhook-management-commands)
- [Create a Webhook](#create-a-webhook)
Expand Down Expand Up @@ -407,6 +408,20 @@ scw tem offers



## Project consumption management commands

Project consumption allow you to see your project consumption.

Project consumption allow you to see your project consumption.

**Usage:**

```
scw tem project-consumption
```



## Project settings management commands

Project settings allow you to manage the configuration of your projects.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require (
github.com/mattn/go-isatty v0.0.20
github.com/moby/buildkit v0.13.2
github.com/opencontainers/go-digest v1.0.0
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250218143128-3136832efdcc
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250221163117-f29ed0c43f0b
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/spf13/cobra v1.9.1
github.com/spf13/pflag v1.0.6
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250218143128-3136832efdcc h1:YfW5EvR+6f6pGAoAY3Yu2Li4dmLbRxz28S+Nwf+bS+s=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250218143128-3136832efdcc/go.mod h1:792k1RTU+5JeMXm35/e2Wgp71qPH/DmDoZrRc+EFZDk=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250221163117-f29ed0c43f0b h1:wH0oO5TxuNDylkJBIjB2Qm1puMkwpfHDnyEVVeJl/AM=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250221163117-f29ed0c43f0b/go.mod h1:792k1RTU+5JeMXm35/e2Wgp71qPH/DmDoZrRc+EFZDk=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=
Expand Down
7 changes: 7 additions & 0 deletions internal/namespaces/block/v1alpha1/block_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,13 @@ func blockSnapshotList() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "tags.{index}",
Short: `Filter by tags. Only snapshots with one or more matching tags will be returned`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "organization-id",
Short: `Filter by Organization ID`,
Expand Down
9 changes: 8 additions & 1 deletion internal/namespaces/secret/v1beta1/secret_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,13 @@ func secretSecretList() *core.Command {
Positional: false,
EnumValues: []string{"unknown_type", "opaque", "certificate", "key_value", "basic_credentials", "database_credentials", "ssh_key"},
},
{
Name: "scheduled-for-deletion",
Short: `Filter by whether the secret was scheduled for deletion / not scheduled for deletion (optional)`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "organization-id",
Short: `Filter by Organization ID (optional)`,
Expand Down Expand Up @@ -752,7 +759,7 @@ func secretVersionList() *core.Command {
Required: false,
Deprecated: false,
Positional: false,
EnumValues: []string{"unknown_status", "enabled", "disabled", "deleted"},
EnumValues: []string{"unknown_status", "enabled", "disabled", "deleted", "scheduled_for_deletion"},
},
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw, scw.Region(core.AllLocalities)),
},
Expand Down
10 changes: 10 additions & 0 deletions internal/namespaces/tem/v1alpha1/tem_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func GetGeneratedCommands() *core.Commands {
temProjectSettings(),
temBlocklists(),
temOffers(),
temProjectConsumption(),
temEmailCreate(),
temEmailGet(),
temEmailList(),
Expand Down Expand Up @@ -111,6 +112,15 @@ func temOffers() *core.Command {
}
}

func temProjectConsumption() *core.Command {
return &core.Command{
Short: `Project consumption management commands`,
Long: `Project consumption allow you to see your project consumption.`,
Namespace: "tem",
Resource: "project-consumption",
}
}

func temEmailCreate() *core.Command {
return &core.Command{
Short: `Send an email`,
Expand Down

0 comments on commit d354b27

Please sign in to comment.