Skip to content

Commit 0179070

Browse files
feat(marketplace): enable cli generation for categories, local-image and versions (#2916)
Co-authored-by: Rémy Léone <[email protected]>
1 parent 572ca85 commit 0179070

13 files changed

+417
-3
lines changed
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+
Get marketplace resources.
4+
5+
USAGE:
6+
scw marketplace category get [arg=value ...]
7+
8+
ARGS:
9+
category-id
10+
11+
FLAGS:
12+
-h, --help help for get
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: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
List marketplace resources.
4+
5+
USAGE:
6+
scw marketplace category list
7+
8+
FLAGS:
9+
-h, --help help for list
10+
11+
GLOBAL FLAGS:
12+
-c, --config string The path to the config file
13+
-D, --debug Enable debug mode
14+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
15+
-p, --profile string The config profile to use
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Marketplace category management commands.
4+
5+
USAGE:
6+
scw marketplace category <command>
7+
8+
AVAILABLE COMMANDS:
9+
get Get marketplace resources
10+
list List marketplace resources
11+
12+
FLAGS:
13+
-h, --help help for category
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
20+
21+
Use "scw marketplace category [command] --help" for more information about a command.
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+
Get marketplace resources.
4+
5+
USAGE:
6+
scw marketplace local-image get [arg=value ...]
7+
8+
ARGS:
9+
local-image-id
10+
11+
FLAGS:
12+
-h, --help help for get
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

cmd/scw/testdata/test-all-usage-marketplace-local-image-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ USAGE:
66
scw marketplace local-image <command>
77

88
AVAILABLE COMMANDS:
9+
get Get marketplace resources
910
list List local images from a specific image or version
1011

1112
FLAGS:

cmd/scw/testdata/test-all-usage-marketplace-usage.golden

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ USAGE:
66
scw marketplace <command>
77

88
AVAILABLE COMMANDS:
9+
category Marketplace category management commands
910
image Marketplace images management commands
1011
local-image Marketplace Local Images management commands
12+
version Marketplace version management commands
1113

1214
FLAGS:
1315
-h, --help help for marketplace
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+
Get marketplace resources.
4+
5+
USAGE:
6+
scw marketplace version get [arg=value ...]
7+
8+
ARGS:
9+
version-id
10+
11+
FLAGS:
12+
-h, --help help for get
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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
List marketplace resources.
4+
5+
USAGE:
6+
scw marketplace version list [arg=value ...]
7+
8+
ARGS:
9+
[image-id]
10+
[order-by] (created_at_asc | created_at_desc)
11+
12+
FLAGS:
13+
-h, --help help for list
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
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Marketplace version management commands.
4+
5+
USAGE:
6+
scw marketplace version <command>
7+
8+
AVAILABLE COMMANDS:
9+
get Get marketplace resources
10+
list List marketplace resources
11+
12+
FLAGS:
13+
-h, --help help for version
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
20+
21+
Use "scw marketplace version [command] --help" for more information about a command.

docs/commands/marketplace.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,56 @@
22
# Documentation for `scw marketplace`
33
Marketplace API.
44

5+
- [Marketplace category management commands](#marketplace-category-management-commands)
6+
- [Get marketplace resources](#get-marketplace-resources)
7+
- [List marketplace resources](#list-marketplace-resources)
58
- [Marketplace images management commands](#marketplace-images-management-commands)
69
- [Get a specific marketplace image](#get-a-specific-marketplace-image)
710
- [List marketplace images](#list-marketplace-images)
811
- [Marketplace Local Images management commands](#marketplace-local-images-management-commands)
12+
- [Get marketplace resources](#get-marketplace-resources)
913
- [List local images from a specific image or version](#list-local-images-from-a-specific-image-or-version)
14+
- [Marketplace version management commands](#marketplace-version-management-commands)
15+
- [Get marketplace resources](#get-marketplace-resources)
16+
- [List marketplace resources](#list-marketplace-resources)
1017

1118

19+
## Marketplace category management commands
20+
21+
Marketplace category management commands.
22+
23+
24+
### Get marketplace resources
25+
26+
Get marketplace resources.
27+
28+
**Usage:**
29+
30+
```
31+
scw marketplace category get [arg=value ...]
32+
```
33+
34+
35+
**Args:**
36+
37+
| Name | | Description |
38+
|------|---|-------------|
39+
| category-id | Required | |
40+
41+
42+
43+
### List marketplace resources
44+
45+
List marketplace resources.
46+
47+
**Usage:**
48+
49+
```
50+
scw marketplace category list
51+
```
52+
53+
54+
1255
## Marketplace images management commands
1356

1457
Marketplace images management commands.
@@ -60,6 +103,25 @@ scw marketplace image list [arg=value ...]
60103
Marketplace Local Images management commands.
61104

62105

106+
### Get marketplace resources
107+
108+
Get marketplace resources.
109+
110+
**Usage:**
111+
112+
```
113+
scw marketplace local-image get [arg=value ...]
114+
```
115+
116+
117+
**Args:**
118+
119+
| Name | | Description |
120+
|------|---|-------------|
121+
| local-image-id | Required | |
122+
123+
124+
63125
### List local images from a specific image or version
64126

65127
List local images from a specific image or version.
@@ -83,3 +145,47 @@ scw marketplace local-image list [arg=value ...]
83145

84146

85147

148+
## Marketplace version management commands
149+
150+
Marketplace version management commands.
151+
152+
153+
### Get marketplace resources
154+
155+
Get marketplace resources.
156+
157+
**Usage:**
158+
159+
```
160+
scw marketplace version get [arg=value ...]
161+
```
162+
163+
164+
**Args:**
165+
166+
| Name | | Description |
167+
|------|---|-------------|
168+
| version-id | Required | |
169+
170+
171+
172+
### List marketplace resources
173+
174+
List marketplace resources.
175+
176+
**Usage:**
177+
178+
```
179+
scw marketplace version list [arg=value ...]
180+
```
181+
182+
183+
**Args:**
184+
185+
| Name | | Description |
186+
|------|---|-------------|
187+
| image-id | | |
188+
| order-by | One of: `created_at_asc`, `created_at_desc` | |
189+
190+
191+

0 commit comments

Comments
 (0)