Skip to content

Commit 7b8a365

Browse files
feat(iot): add generation for CLI commands (#1321)
Co-authored-by: Rémy Léone <[email protected]>
1 parent b6bff44 commit 7b8a365

29 files changed

+1449
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Add a device.
4+
5+
USAGE:
6+
scw iot device create [arg=value ...]
7+
8+
ARGS:
9+
name Device name
10+
hub-id ID of the device's hub
11+
[allow-insecure] Allow plain and server-authenticated SSL connections in addition to mutually-authenticated ones
12+
[message-filters.publish.policy] (unknown | accept | reject)
13+
[message-filters.publish.topics.{index}]
14+
[message-filters.subscribe.policy] (unknown | accept | reject)
15+
[message-filters.subscribe.topics.{index}]
16+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
17+
18+
FLAGS:
19+
-h, --help help for create
20+
21+
GLOBAL FLAGS:
22+
-c, --config string The path to the config file
23+
-D, --debug Enable debug mode
24+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
25+
-p, --profile string The config profile to use
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Remove a device.
4+
5+
USAGE:
6+
scw iot device delete <device-id ...> [arg=value ...]
7+
8+
ARGS:
9+
device-id Device ID
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 delete
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Disable a device.
4+
5+
USAGE:
6+
scw iot device disable <device-id ...> [arg=value ...]
7+
8+
ARGS:
9+
device-id Device ID
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 disable
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Enable a device.
4+
5+
USAGE:
6+
scw iot device enable <device-id ...> [arg=value ...]
7+
8+
ARGS:
9+
device-id Device ID
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 enable
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Get a device's metrics.
4+
5+
USAGE:
6+
scw iot device get-metrics <device-id ...> [arg=value ...]
7+
8+
ARGS:
9+
device-id Device ID
10+
period Period over which the metrics span (hour | day | week | month | year)
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 get-metrics
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Get a device.
4+
5+
USAGE:
6+
scw iot device get <device-id ...> [arg=value ...]
7+
8+
ARGS:
9+
device-id Device ID
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
List devices.
4+
5+
USAGE:
6+
scw iot device list [arg=value ...]
7+
8+
ARGS:
9+
[order-by] Ordering of requested devices (name_asc | name_desc | status_asc | status_desc | hub_id_asc | hub_id_desc | created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | enabled_asc | enabled_desc | allow_insecure_asc | allow_insecure_desc | last_seen_at_asc | last_seen_at_desc)
10+
[name] Filter on the name
11+
[hub-id] Filter on the hub
12+
[enabled] Filter on the enabled flag
13+
[allow-insecure] Filter on the allow_insecure flag
14+
[is-connected] Filter on the is_connected state
15+
[organization-id] Filter on the organization
16+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
17+
18+
FLAGS:
19+
-h, --help help for list
20+
21+
GLOBAL FLAGS:
22+
-c, --config string The path to the config file
23+
-D, --debug Enable debug mode
24+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
25+
-p, --profile string The config profile to use
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Update a device.
4+
5+
USAGE:
6+
scw iot device update <device-id ...> [arg=value ...]
7+
8+
ARGS:
9+
device-id Device ID
10+
[name] Device name
11+
[allow-insecure] Allow plain and server-authenticated SSL connections in addition to mutually-authenticated ones
12+
[message-filters.publish.policy] (unknown | accept | reject)
13+
[message-filters.publish.topics.{index}]
14+
[message-filters.subscribe.policy] (unknown | accept | reject)
15+
[message-filters.subscribe.topics.{index}]
16+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
17+
18+
FLAGS:
19+
-h, --help help for update
20+
21+
GLOBAL FLAGS:
22+
-c, --config string The path to the config file
23+
-D, --debug Enable debug mode
24+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
25+
-p, --profile string The config profile to use
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
IoT Device commands.
4+
5+
USAGE:
6+
scw iot device <command>
7+
8+
AVAILABLE COMMANDS:
9+
create Add a device
10+
delete Remove a device
11+
disable Disable a device
12+
enable Enable a device
13+
get Get a device
14+
get-metrics Get a device's metrics
15+
list List devices
16+
update Update a device
17+
18+
FLAGS:
19+
-h, --help help for device
20+
21+
GLOBAL FLAGS:
22+
-c, --config string The path to the config file
23+
-D, --debug Enable debug mode
24+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
25+
-p, --profile string The config profile to use
26+
27+
Use "scw iot device [command] --help" for more information about a command.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Create a hub.
4+
5+
USAGE:
6+
scw iot hub create [arg=value ...]
7+
8+
ARGS:
9+
name Hub name (up to 255 characters)
10+
product-plan Hub feature set (plan_unknown | plan_shared | plan_dedicated | plan_ha)
11+
[disable-events] Disable Hub events (default false)
12+
[events-topic-prefix] Hub events topic prefix (default '$SCW/events')
13+
[organization-id] Organization ID to use. If none is passed will use default organization ID from the config
14+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
15+
16+
FLAGS:
17+
-h, --help help for create
18+
19+
GLOBAL FLAGS:
20+
-c, --config string The path to the config file
21+
-D, --debug Enable debug mode
22+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
23+
-p, --profile string The config profile to use
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Delete a hub.
4+
5+
USAGE:
6+
scw iot hub delete <hub-id ...> [arg=value ...]
7+
8+
ARGS:
9+
hub-id Hub ID
10+
[delete-devices] Force deletion of devices added to this hub instead of rejecting operation
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 delete
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Disable a hub.
4+
5+
USAGE:
6+
scw iot hub disable <hub-id ...> [arg=value ...]
7+
8+
ARGS:
9+
hub-id Hub ID
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 disable
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Enable a hub.
4+
5+
USAGE:
6+
scw iot hub enable <hub-id ...> [arg=value ...]
7+
8+
ARGS:
9+
hub-id Hub ID
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 enable
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Get a hub's metrics.
4+
5+
USAGE:
6+
scw iot hub get-metrics <hub-id ...> [arg=value ...]
7+
8+
ARGS:
9+
hub-id Hub ID
10+
period Period over which the metrics span (hour | day | week | month | year)
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 get-metrics
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Get a hub.
4+
5+
USAGE:
6+
scw iot hub get <hub-id ...> [arg=value ...]
7+
8+
ARGS:
9+
hub-id Hub ID
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
List hubs.
4+
5+
USAGE:
6+
scw iot hub list [arg=value ...]
7+
8+
ARGS:
9+
[order-by] Ordering of requested hub (name_asc | name_desc | status_asc | status_desc | product_plan_asc | product_plan_desc | created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | enabled_asc | enabled_desc)
10+
[name] Filter on the name
11+
[organization-id] Filter on the organization
12+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
13+
14+
FLAGS:
15+
-h, --help help for list
16+
17+
GLOBAL FLAGS:
18+
-c, --config string The path to the config file
19+
-D, --debug Enable debug mode
20+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
21+
-p, --profile string The config profile to use
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Update a hub.
4+
5+
USAGE:
6+
scw iot hub update <hub-id ...> [arg=value ...]
7+
8+
ARGS:
9+
hub-id Hub ID
10+
[name] Hub name (up to 255 characters)
11+
[disable-events] Disable events
12+
[events-topic-prefix] Hub events topic prefix
13+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
14+
15+
FLAGS:
16+
-h, --help help for update
17+
18+
GLOBAL FLAGS:
19+
-c, --config string The path to the config file
20+
-D, --debug Enable debug mode
21+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
22+
-p, --profile string The config profile to use

0 commit comments

Comments
 (0)