Skip to content

Commit d8d91d9

Browse files
feat(instance): enable missing cli generation (#2913)
Co-authored-by: Rémy Léone <[email protected]>
1 parent b536284 commit d8d91d9

18 files changed

+1231
-11
lines changed
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 all servers belonging to the given placement group.
4+
5+
USAGE:
6+
scw instance placement-group get-servers [arg=value ...]
7+
8+
ARGS:
9+
placement-group-id
10+
[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 | pl-waw-1 | pl-waw-2)
11+
12+
FLAGS:
13+
-h, --help help for get-servers
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: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Set all servers belonging to the given placement group.
4+
5+
USAGE:
6+
scw instance placement-group set-servers [arg=value ...]
7+
8+
EXAMPLES:
9+
Update the complete set of instances in a given placement group. (All instances must be down)
10+
scw instance placement-group set-servers placement-group-id=ced0fd4d-bcf0-4479-85b6-7027e54456e6 servers.0=5a250608-24ec-4c31-9631-b3ded8c861cb servers.1=e54fd249-0787-4794-ab14-af6ee74df274
11+
12+
ARGS:
13+
placement-group-id
14+
[servers.{index}]
15+
[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 | pl-waw-1 | pl-waw-2)
16+
17+
FLAGS:
18+
-h, --help help for set-servers
19+
20+
GLOBAL FLAGS:
21+
-c, --config string The path to the config file
22+
-D, --debug Enable debug mode
23+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
24+
-p, --profile string The config profile to use
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Set all parameters of the given placement group.
4+
5+
USAGE:
6+
scw instance placement-group set [arg=value ...]
7+
8+
ARGS:
9+
placement-group-id
10+
[name]
11+
[policy-mode] (optional | enforced)
12+
[policy-type] (max_availability | low_latency)
13+
[project] Project ID to use. If none is passed the default project ID will be used
14+
[tags.{index}]
15+
[organization] Organization ID to use. If none is passed the default organization ID will be used
16+
[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 | pl-waw-1 | pl-waw-2)
17+
18+
FLAGS:
19+
-h, --help help for set
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
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 all servers belonging to the given placement group.
4+
5+
USAGE:
6+
scw instance placement-group update-servers [arg=value ...]
7+
8+
ARGS:
9+
placement-group-id UUID of the placement group
10+
servers.{index}
11+
[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 | pl-waw-1 | pl-waw-2)
12+
13+
FLAGS:
14+
-h, --help help for update-servers
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-instance-placement-group-usage.golden

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,15 @@ USAGE:
2323
scw instance placement-group <command>
2424

2525
AVAILABLE COMMANDS:
26-
create Create a placement group
27-
delete Delete the given placement group
28-
get Get a placement group
29-
list List placement groups
30-
update Update a placement group
26+
create Create a placement group
27+
delete Delete the given placement group
28+
get Get a placement group
29+
get-servers Get placement group servers
30+
list List placement groups
31+
set Set placement group
32+
set-servers Set placement group servers
33+
update Update a placement group
34+
update-servers Update placement group servers
3135

3236
FLAGS:
3337
-h, --help help for placement-group
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Create rule.
4+
5+
USAGE:
6+
scw instance security-group create-rule [arg=value ...]
7+
8+
EXAMPLES:
9+
Allow incoming SSH
10+
scw instance security-group create-rule security-group-id=1248283f-17de-464a-b03b-3f975ada3fa8 protocol=TCP direction=inbound action=accept ip-range=<nil> dest-port-from=22
11+
12+
Allow HTTP
13+
scw instance security-group create-rule security-group-id=e8ba77c1-9ccb-4c0c-b08d-555cfd7f57e4 protocol=TCP direction=inbound action=accept ip-range=<nil> dest-port-from=80
14+
15+
Allow HTTPS
16+
scw instance security-group create-rule security-group-id=e5906437-8650-4fe2-8ca7-32e1d7320c1b protocol=TCP direction=inbound action=accept ip-range=<nil> dest-port-from=443
17+
18+
Allow a specific IP range
19+
scw instance security-group create-rule security-group-id=b6a58155-a2f8-48bd-9da9-3ff9783fa0d4 protocol=ANY direction=inbound action=accept ip-range=10.0.0.0/16
20+
21+
Allow FTP
22+
scw instance security-group create-rule security-group-id=9c46df03-83c2-46fb-936c-16ecb44860e1 protocol=TCP direction=inbound action=accept ip-range=<nil> dest-port-from=20 dest-port-to=21
23+
24+
ARGS:
25+
security-group-id UUID of the security group
26+
protocol (TCP | UDP | ICMP | ANY)
27+
direction (inbound | outbound)
28+
action (accept | drop)
29+
ip-range=0.0.0.0/0
30+
[dest-port-from] The beginning of the range of ports to apply this rule to (inclusive)
31+
[dest-port-to] The end of the range of ports to apply this rule to (inclusive)
32+
[position] The position of this rule in the security group rules list
33+
[editable] Indicates if this rule is editable (will be ignored)
34+
[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 | pl-waw-1 | pl-waw-2)
35+
36+
FLAGS:
37+
-h, --help help for create-rule
38+
39+
GLOBAL FLAGS:
40+
-c, --config string The path to the config file
41+
-D, --debug Enable debug mode
42+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
43+
-p, --profile string The config profile to use
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Delete a security group rule with the given ID.
4+
5+
USAGE:
6+
scw instance security-group delete-rule [arg=value ...]
7+
8+
EXAMPLES:
9+
Delete a Security Group Rule with the given ID
10+
scw instance security-group delete-rule security-group-id=a01a36e5-5c0c-42c1-ae06-167e587b7ac4 security-group-rule-id=b8c773ef-a6ea-4b50-a7c1-737864290a3f
11+
12+
ARGS:
13+
security-group-id
14+
security-group-rule-id
15+
[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 | pl-waw-1 | pl-waw-2)
16+
17+
FLAGS:
18+
-h, --help help for delete-rule
19+
20+
GLOBAL FLAGS:
21+
-c, --config string The path to the config file
22+
-D, --debug Enable debug mode
23+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
24+
-p, --profile string The config profile to use
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Get details of a security group rule with the given ID.
4+
5+
USAGE:
6+
scw instance security-group get-rule [arg=value ...]
7+
8+
EXAMPLES:
9+
Get details of a security group rule with the given ID
10+
scw instance security-group get-rule security-group-id=d900fa38-2f0d-4b09-b6d7-f3e46a13f34c security-group-rule-id=1f9a16a5-7229-4c03-9327-253e257cf38a
11+
12+
ARGS:
13+
security-group-id
14+
security-group-rule-id
15+
[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 | pl-waw-1 | pl-waw-2)
16+
17+
FLAGS:
18+
-h, --help help for get-rule
19+
20+
GLOBAL FLAGS:
21+
-c, --config string The path to the config file
22+
-D, --debug Enable debug mode
23+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
24+
-p, --profile string The config profile to use
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+
Lists the default rules applied to all the security groups.
4+
5+
USAGE:
6+
scw instance security-group list-default-rules [arg=value ...]
7+
8+
ARGS:
9+
[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 | pl-waw-1 | pl-waw-2)
10+
11+
FLAGS:
12+
-h, --help help for list-default-rules
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 rules.
4+
5+
USAGE:
6+
scw instance security-group list-rules [arg=value ...]
7+
8+
ARGS:
9+
security-group-id UUID of the security group
10+
[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 | pl-waw-1 | pl-waw-2 | all)
11+
12+
FLAGS:
13+
-h, --help help for list-rules
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

0 commit comments

Comments
 (0)