Skip to content

Commit 039af75

Browse files
committed
feat: update generated APIs
1 parent d6920c5 commit 039af75

13 files changed

+317
-172
lines changed

cmd/scw/testdata/test-all-usage-baremetal-server-create-usage.golden

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,37 @@ EXAMPLES:
1010
scw baremetal server create
1111

1212
ARGS:
13-
[project-id] Project ID to use. If none is passed the default project ID will be used
14-
name=<generated> Name of the server (≠hostname)
15-
[description] Description associated with the server, max 255 characters
16-
[type] Server commercial type
17-
[tags.{index}] Tags to associate to the server
18-
[install.os-id] ID of the OS to installation on the server
19-
[install.hostname] Hostname of the server
20-
[install.ssh-key-ids.{index}] SSH key IDs authorized on the server
21-
[install.user] User for the installation
22-
[install.password] Password for the installation
23-
[install.service-user] Regular user that runs the service to be installed on the server
24-
[install.service-password] Password used for the service to install
25-
[install.partitioning-schema.disks.{index}.device]
26-
[install.partitioning-schema.disks.{index}.partitions.{index}.label] (unknown_partition_label | uefi | legacy | root | boot | swap | data | home | raid | zfs)
27-
[install.partitioning-schema.disks.{index}.partitions.{index}.number]
28-
[install.partitioning-schema.disks.{index}.partitions.{index}.size]
29-
[install.partitioning-schema.raids.{index}.name]
30-
[install.partitioning-schema.raids.{index}.level] (unknown_raid_level | raid_level_0 | raid_level_1 | raid_level_5 | raid_level_6 | raid_level_10)
31-
[install.partitioning-schema.raids.{index}.devices.{index}]
32-
[install.partitioning-schema.filesystems.{index}.device]
33-
[install.partitioning-schema.filesystems.{index}.format] (unknown_format | fat32 | ext4 | swap | zfs | xfs)
34-
[install.partitioning-schema.filesystems.{index}.mountpoint]
35-
[install.partitioning-schema.zfs.pools.{index}.name]
36-
[install.partitioning-schema.zfs.pools.{index}.type] (unknown_type | no_raid | mirror | raidz1 | raidz2)
37-
[install.partitioning-schema.zfs.pools.{index}.devices.{index}]
38-
[install.partitioning-schema.zfs.pools.{index}.options.{index}]
39-
[install.partitioning-schema.zfs.pools.{index}.filesystem-options.{index}]
40-
[option-ids.{index}] IDs of options to enable on server
41-
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
42-
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-2 | pl-waw-3)
13+
[project-id] Project ID to use. If none is passed the default project ID will be used
14+
name=<generated> Name of the server (≠hostname)
15+
[description] Description associated with the server, max 255 characters
16+
[type] Server commercial type
17+
[tags.{index}] Tags to associate to the server
18+
[install.os-id] ID of the OS to installation on the server
19+
[install.hostname] Hostname of the server
20+
[install.ssh-key-ids.{index}] SSH key IDs authorized on the server
21+
[install.user] User for the installation
22+
[install.password] Password for the installation
23+
[install.service-user] Regular user that runs the service to be installed on the server
24+
[install.service-password] Password used for the service to install
25+
[install.partitioning-schema.disks.{index}.device]
26+
[install.partitioning-schema.disks.{index}.partitions.{index}.label] (unknown_partition_label | uefi | legacy | root | boot | swap | data | home | raid | zfs)
27+
[install.partitioning-schema.disks.{index}.partitions.{index}.number]
28+
[install.partitioning-schema.disks.{index}.partitions.{index}.size]
29+
[install.partitioning-schema.disks.{index}.partitions.{index}.use-all-available-space]
30+
[install.partitioning-schema.raids.{index}.name]
31+
[install.partitioning-schema.raids.{index}.level] (unknown_raid_level | raid_level_0 | raid_level_1 | raid_level_5 | raid_level_6 | raid_level_10)
32+
[install.partitioning-schema.raids.{index}.devices.{index}]
33+
[install.partitioning-schema.filesystems.{index}.device]
34+
[install.partitioning-schema.filesystems.{index}.format] (unknown_format | fat32 | ext4 | swap | zfs | xfs)
35+
[install.partitioning-schema.filesystems.{index}.mountpoint]
36+
[install.partitioning-schema.zfs.pools.{index}.name]
37+
[install.partitioning-schema.zfs.pools.{index}.type] (unknown_type | no_raid | mirror | raidz1 | raidz2)
38+
[install.partitioning-schema.zfs.pools.{index}.devices.{index}]
39+
[install.partitioning-schema.zfs.pools.{index}.options.{index}]
40+
[install.partitioning-schema.zfs.pools.{index}.filesystem-options.{index}]
41+
[option-ids.{index}] IDs of options to enable on server
42+
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
43+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-2 | pl-waw-3)
4344

4445
FLAGS:
4546
-h, --help help for create

cmd/scw/testdata/test-all-usage-baremetal-server-install-usage.golden

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,29 @@ ARGS:
1414
os-id ID of the OS to installation on the server
1515
hostname Hostname of the server
1616
ssh (one of):
17-
[all-ssh-keys] Add all SSH keys on your baremetal instance (cannot be used with ssh-key-ids)
18-
ssh-key-ids.{index} SSH key IDs authorized on the server (cannot be used with all-ssh-keys)
19-
[user] User used for the installation
20-
[password] Password used for the installation
21-
[service-user] User used for the service to install
22-
[service-password] Password used for the service to install
23-
[partitioning-schema.disks.{index}.device]
24-
[partitioning-schema.disks.{index}.partitions.{index}.label] (unknown_partition_label | uefi | legacy | root | boot | swap | data | home | raid | zfs)
25-
[partitioning-schema.disks.{index}.partitions.{index}.number]
26-
[partitioning-schema.disks.{index}.partitions.{index}.size]
27-
[partitioning-schema.raids.{index}.name]
28-
[partitioning-schema.raids.{index}.level] (unknown_raid_level | raid_level_0 | raid_level_1 | raid_level_5 | raid_level_6 | raid_level_10)
29-
[partitioning-schema.raids.{index}.devices.{index}]
30-
[partitioning-schema.filesystems.{index}.device]
31-
[partitioning-schema.filesystems.{index}.format] (unknown_format | fat32 | ext4 | swap | zfs | xfs)
32-
[partitioning-schema.filesystems.{index}.mountpoint]
33-
[partitioning-schema.zfs.pools.{index}.name]
34-
[partitioning-schema.zfs.pools.{index}.type] (unknown_type | no_raid | mirror | raidz1 | raidz2)
35-
[partitioning-schema.zfs.pools.{index}.devices.{index}]
36-
[partitioning-schema.zfs.pools.{index}.options.{index}]
37-
[partitioning-schema.zfs.pools.{index}.filesystem-options.{index}]
38-
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-2 | pl-waw-3)
17+
[all-ssh-keys] Add all SSH keys on your baremetal instance (cannot be used with ssh-key-ids)
18+
ssh-key-ids.{index} SSH key IDs authorized on the server (cannot be used with all-ssh-keys)
19+
[user] User used for the installation
20+
[password] Password used for the installation
21+
[service-user] User used for the service to install
22+
[service-password] Password used for the service to install
23+
[partitioning-schema.disks.{index}.device]
24+
[partitioning-schema.disks.{index}.partitions.{index}.label] (unknown_partition_label | uefi | legacy | root | boot | swap | data | home | raid | zfs)
25+
[partitioning-schema.disks.{index}.partitions.{index}.number]
26+
[partitioning-schema.disks.{index}.partitions.{index}.size]
27+
[partitioning-schema.disks.{index}.partitions.{index}.use-all-available-space]
28+
[partitioning-schema.raids.{index}.name]
29+
[partitioning-schema.raids.{index}.level] (unknown_raid_level | raid_level_0 | raid_level_1 | raid_level_5 | raid_level_6 | raid_level_10)
30+
[partitioning-schema.raids.{index}.devices.{index}]
31+
[partitioning-schema.filesystems.{index}.device]
32+
[partitioning-schema.filesystems.{index}.format] (unknown_format | fat32 | ext4 | swap | zfs | xfs)
33+
[partitioning-schema.filesystems.{index}.mountpoint]
34+
[partitioning-schema.zfs.pools.{index}.name]
35+
[partitioning-schema.zfs.pools.{index}.type] (unknown_type | no_raid | mirror | raidz1 | raidz2)
36+
[partitioning-schema.zfs.pools.{index}.devices.{index}]
37+
[partitioning-schema.zfs.pools.{index}.options.{index}]
38+
[partitioning-schema.zfs.pools.{index}.filesystem-options.{index}]
39+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-2 | pl-waw-3)
3940

4041
FLAGS:
4142
-h, --help help for install
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Retrieve the list of the available and free-of-charge offers you can subscribe to.
4+
5+
USAGE:
6+
scw tem offers list [arg=value ...]
7+
8+
ARGS:
9+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
10+
11+
FLAGS:
12+
-h, --help help for list
13+
14+
GLOBAL FLAGS:
15+
-c, --config string The path to the config file
16+
-D, --debug Enable debug mode
17+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
18+
-p, --profile string The config profile to use
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Update a subscribed offer.
4+
5+
USAGE:
6+
scw tem offers update [arg=value ...]
7+
8+
ARGS:
9+
[project-id] Project ID to use. If none is passed the default project ID will be used
10+
[name] Name of the offer-subscription (unknown_name | essential | scale)
11+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
12+
13+
FLAGS:
14+
-h, --help help for update
15+
16+
GLOBAL FLAGS:
17+
-c, --config string The path to the config file
18+
-D, --debug Enable debug mode
19+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
20+
-p, --profile string The config profile to use

cmd/scw/testdata/test-all-usage-tem-offers-usage.golden

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
This section allows you to manage and get get subscribed information about your project email offer.
44

55
USAGE:
6-
scw tem offers
6+
scw tem offers <command>
7+
8+
AVAILABLE COMMANDS:
9+
list List the available offers.
10+
update Update a subscribed offer
711

812
FLAGS:
913
-h, --help help for offers
@@ -13,3 +17,5 @@ GLOBAL FLAGS:
1317
-D, --debug Enable debug mode
1418
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
1519
-p, --profile string The config profile to use
20+
21+
Use "scw tem offers [command] --help" for more information about a command.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Get project resource consumption.
4+
5+
USAGE:
6+
scw tem project-consumption get [arg=value ...]
7+
8+
ARGS:
9+
[project-id] Project ID to use. If none is passed the default project ID will be used
10+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
11+
12+
FLAGS:
13+
-h, --help help for get
14+
15+
GLOBAL FLAGS:
16+
-c, --config string The path to the config file
17+
-D, --debug Enable debug mode
18+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
19+
-p, --profile string The config profile to use

cmd/scw/testdata/test-all-usage-tem-project-consumption-usage.golden

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
Project consumption allow you to see your project consumption.
44

55
USAGE:
6-
scw tem project-consumption
6+
scw tem project-consumption <command>
7+
8+
AVAILABLE COMMANDS:
9+
get Get project resource consumption.
710

811
FLAGS:
912
-h, --help help for project-consumption
@@ -13,3 +16,5 @@ GLOBAL FLAGS:
1316
-D, --debug Enable debug mode
1417
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
1518
-p, --profile string The config profile to use
19+
20+
Use "scw tem project-consumption [command] --help" for more information about a command.

docs/commands/baremetal.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,7 @@ scw baremetal server create [arg=value ...]
549549
| install.partitioning-schema.disks.{index}.partitions.{index}.label | One of: `unknown_partition_label`, `uefi`, `legacy`, `root`, `boot`, `swap`, `data`, `home`, `raid`, `zfs` | |
550550
| install.partitioning-schema.disks.{index}.partitions.{index}.number | | |
551551
| install.partitioning-schema.disks.{index}.partitions.{index}.size | | |
552+
| install.partitioning-schema.disks.{index}.partitions.{index}.use-all-available-space | | |
552553
| install.partitioning-schema.raids.{index}.name | | |
553554
| install.partitioning-schema.raids.{index}.level | One of: `unknown_raid_level`, `raid_level_0`, `raid_level_1`, `raid_level_5`, `raid_level_6`, `raid_level_10` | |
554555
| install.partitioning-schema.raids.{index}.devices.{index} | | |
@@ -684,6 +685,7 @@ scw baremetal server install <server-id ...> [arg=value ...]
684685
| partitioning-schema.disks.{index}.partitions.{index}.label | One of: `unknown_partition_label`, `uefi`, `legacy`, `root`, `boot`, `swap`, `data`, `home`, `raid`, `zfs` | |
685686
| partitioning-schema.disks.{index}.partitions.{index}.number | | |
686687
| partitioning-schema.disks.{index}.partitions.{index}.size | | |
688+
| partitioning-schema.disks.{index}.partitions.{index}.use-all-available-space | | |
687689
| partitioning-schema.raids.{index}.name | | |
688690
| partitioning-schema.raids.{index}.level | One of: `unknown_raid_level`, `raid_level_0`, `raid_level_1`, `raid_level_5`, `raid_level_6`, `raid_level_10` | |
689691
| partitioning-schema.raids.{index}.devices.{index} | | |

docs/commands/tem.md

Lines changed: 49 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ This API allows you to manage your Transactional Email services.
2121
- [Email statuses](#email-statuses)
2222
- [List emails](#list-emails)
2323
- [Project offers management commands](#project-offers-management-commands)
24+
- [List the available offers.](#list-the-available-offers.)
25+
- [Update a subscribed offer](#update-a-subscribed-offer)
2426
- [Project consumption management commands](#project-consumption-management-commands)
27+
- [Get project resource consumption.](#get-project-resource-consumption.)
2528
- [Project settings management commands](#project-settings-management-commands)
2629
- [Webhook management commands](#webhook-management-commands)
2730
- [Create a Webhook](#create-a-webhook)
@@ -398,29 +401,71 @@ scw tem email list [arg=value ...]
398401

399402
This section allows you to manage and get get subscribed information about your project email offer.
400403

401-
This section allows you to manage and get get subscribed information about your project email offer.
404+
405+
### List the available offers.
406+
407+
Retrieve the list of the available and free-of-charge offers you can subscribe to.
408+
409+
**Usage:**
410+
411+
```
412+
scw tem offers list [arg=value ...]
413+
```
414+
415+
416+
**Args:**
417+
418+
| Name | | Description |
419+
|------|---|-------------|
420+
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |
421+
422+
423+
424+
### Update a subscribed offer
425+
426+
Update a subscribed offer.
402427

403428
**Usage:**
404429

405430
```
406-
scw tem offers
431+
scw tem offers update [arg=value ...]
407432
```
408433

409434

435+
**Args:**
436+
437+
| Name | | Description |
438+
|------|---|-------------|
439+
| project-id | | Project ID to use. If none is passed the default project ID will be used |
440+
| name | One of: `unknown_name`, `essential`, `scale` | Name of the offer-subscription |
441+
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |
442+
443+
410444

411445
## Project consumption management commands
412446

413447
Project consumption allow you to see your project consumption.
414448

415-
Project consumption allow you to see your project consumption.
449+
450+
### Get project resource consumption.
451+
452+
Get project resource consumption.
416453

417454
**Usage:**
418455

419456
```
420-
scw tem project-consumption
457+
scw tem project-consumption get [arg=value ...]
421458
```
422459

423460

461+
**Args:**
462+
463+
| Name | | Description |
464+
|------|---|-------------|
465+
| project-id | | Project ID to use. If none is passed the default project ID will be used |
466+
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |
467+
468+
424469

425470
## Project settings management commands
426471

0 commit comments

Comments
 (0)