Skip to content

Commit 77118eb

Browse files
feat(baremetal): enable private network and options management (#2656)
Co-authored-by: Rémy Léone <[email protected]>
1 parent 88bcc1c commit 77118eb

16 files changed

+489
-27
lines changed
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+
Add an option to a specific server.
4+
5+
USAGE:
6+
scw baremetal options add [arg=value ...]
7+
8+
EXAMPLES:
9+
Add a given option to a server
10+
scw baremetal options add server-id=11111111-1111-1111-1111-111111111111 option-id=11111111-1111-1111-1111-111111111111
11+
12+
ARGS:
13+
server-id ID of the server
14+
option-id ID of the option to add
15+
[expires-at] Auto expire the option after this date
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 | nl-ams-1)
17+
18+
FLAGS:
19+
-h, --help help for add
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: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Delete an option from a specific server.
4+
5+
USAGE:
6+
scw baremetal options delete [arg=value ...]
7+
8+
EXAMPLES:
9+
Delete a given option from a server
10+
scw baremetal options delete server-id=11111111-1111-1111-1111-111111111111 option-id=11111111-1111-1111-1111-111111111111
11+
12+
ARGS:
13+
server-id ID of the server
14+
option-id ID of the option to delete
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 | nl-ams-1)
16+
17+
FLAGS:
18+
-h, --help help for delete
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: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Return specific option for the given ID.
4+
5+
USAGE:
6+
scw baremetal options get [arg=value ...]
7+
8+
EXAMPLES:
9+
Get a server option with the given ID
10+
scw baremetal options get zone=fr-par-1 option-id=11111111-1111-1111-1111-111111111111
11+
12+
ARGS:
13+
option-id ID of the option
14+
[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)
15+
16+
FLAGS:
17+
-h, --help help for get
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
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
List all options matching with filters.
4+
5+
USAGE:
6+
scw baremetal options list [arg=value ...]
7+
8+
EXAMPLES:
9+
List all server options in the default zone
10+
scw baremetal options list
11+
12+
List all server options in fr-par-1 zone
13+
scw baremetal options list zone=fr-par-1
14+
15+
ARGS:
16+
[offer-id] Filter options by offer_id
17+
[name] Filter options by name
18+
[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)
19+
20+
FLAGS:
21+
-h, --help help for list
22+
23+
GLOBAL FLAGS:
24+
-c, --config string The path to the config file
25+
-D, --debug Enable debug mode
26+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
27+
-p, --profile string The config profile to use
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
A Server has additional options that let you personalize it to better fit your needs.
4+
5+
USAGE:
6+
scw baremetal options <command>
7+
8+
AVAILABLE COMMANDS:
9+
add Add server option
10+
delete Delete server option
11+
get Get option
12+
list List options
13+
14+
FLAGS:
15+
-h, --help help for options
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
22+
23+
Use "scw baremetal options [command] --help" for more information about a command.

cmd/scw/testdata/test-all-usage-baremetal-private-network-add-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ USAGE:
88
ARGS:
99
server-id The ID of the server
1010
private-network-id The ID of the private network
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 | nl-ams-1)
11+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2)
1212

1313
FLAGS:
1414
-h, --help help for add

cmd/scw/testdata/test-all-usage-baremetal-private-network-delete-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ USAGE:
88
ARGS:
99
server-id The ID of the server
1010
private-network-id The ID of the private network
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 | nl-ams-1)
11+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2)
1212

1313
FLAGS:
1414
-h, --help help for delete

cmd/scw/testdata/test-all-usage-baremetal-private-network-list-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ARGS:
1111
[private-network-id] Filter private networks by private network ID
1212
[project-id] Filter private networks by project ID
1313
[organization-id] Filter private networks by organization ID
14-
[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)
14+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2)
1515

1616
FLAGS:
1717
-h, --help help for list

cmd/scw/testdata/test-all-usage-baremetal-private-network-set-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ USAGE:
88
ARGS:
99
server-id The ID of the server
1010
private-network-ids.{index} The IDs of the private networks
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 | nl-ams-1)
11+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2)
1212

1313
FLAGS:
1414
-h, --help help for set

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ USAGE:
88
AVAILABLE COMMANDS:
99
bmc Baseboard Management Controller (BMC) management commands
1010
offer Server offer management commands
11+
options Server options management commands
1112
os Operating System (OS) management commands
1213
private-network Private network management command
1314
server Server management commands

0 commit comments

Comments
 (0)