-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(baremetal): enable private network and options management (#2656)
Co-authored-by: Rémy Léone <rleone@scaleway.com>
- Loading branch information
1 parent
88bcc1c
commit 77118eb
Showing
16 changed files
with
489 additions
and
27 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
cmd/scw/testdata/test-all-usage-baremetal-options-add-usage.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 | ||
🟥🟥🟥 STDERR️️ 🟥🟥🟥️ | ||
Add an option to a specific server. | ||
|
||
USAGE: | ||
scw baremetal options add [arg=value ...] | ||
|
||
EXAMPLES: | ||
Add a given option to a server | ||
scw baremetal options add server-id=11111111-1111-1111-1111-111111111111 option-id=11111111-1111-1111-1111-111111111111 | ||
|
||
ARGS: | ||
server-id ID of the server | ||
option-id ID of the option to add | ||
[expires-at] Auto expire the option after this date | ||
[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) | ||
|
||
FLAGS: | ||
-h, --help help for add | ||
|
||
GLOBAL FLAGS: | ||
-c, --config string The path to the config file | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human") | ||
-p, --profile string The config profile to use |
24 changes: 24 additions & 0 deletions
24
cmd/scw/testdata/test-all-usage-baremetal-options-delete-usage.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 | ||
🟥🟥🟥 STDERR️️ 🟥🟥🟥️ | ||
Delete an option from a specific server. | ||
|
||
USAGE: | ||
scw baremetal options delete [arg=value ...] | ||
|
||
EXAMPLES: | ||
Delete a given option from a server | ||
scw baremetal options delete server-id=11111111-1111-1111-1111-111111111111 option-id=11111111-1111-1111-1111-111111111111 | ||
|
||
ARGS: | ||
server-id ID of the server | ||
option-id ID of the option to delete | ||
[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) | ||
|
||
FLAGS: | ||
-h, --help help for delete | ||
|
||
GLOBAL FLAGS: | ||
-c, --config string The path to the config file | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human") | ||
-p, --profile string The config profile to use |
23 changes: 23 additions & 0 deletions
23
cmd/scw/testdata/test-all-usage-baremetal-options-get-usage.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 | ||
🟥🟥🟥 STDERR️️ 🟥🟥🟥️ | ||
Return specific option for the given ID. | ||
|
||
USAGE: | ||
scw baremetal options get [arg=value ...] | ||
|
||
EXAMPLES: | ||
Get a server option with the given ID | ||
scw baremetal options get zone=fr-par-1 option-id=11111111-1111-1111-1111-111111111111 | ||
|
||
ARGS: | ||
option-id ID of the option | ||
[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) | ||
|
||
FLAGS: | ||
-h, --help help for get | ||
|
||
GLOBAL FLAGS: | ||
-c, --config string The path to the config file | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human") | ||
-p, --profile string The config profile to use |
27 changes: 27 additions & 0 deletions
27
cmd/scw/testdata/test-all-usage-baremetal-options-list-usage.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 | ||
🟥🟥🟥 STDERR️️ 🟥🟥🟥️ | ||
List all options matching with filters. | ||
|
||
USAGE: | ||
scw baremetal options list [arg=value ...] | ||
|
||
EXAMPLES: | ||
List all server options in the default zone | ||
scw baremetal options list | ||
|
||
List all server options in fr-par-1 zone | ||
scw baremetal options list zone=fr-par-1 | ||
|
||
ARGS: | ||
[offer-id] Filter options by offer_id | ||
[name] Filter options by name | ||
[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) | ||
|
||
FLAGS: | ||
-h, --help help for list | ||
|
||
GLOBAL FLAGS: | ||
-c, --config string The path to the config file | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human") | ||
-p, --profile string The config profile to use |
23 changes: 23 additions & 0 deletions
23
cmd/scw/testdata/test-all-usage-baremetal-options-usage.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 | ||
🟥🟥🟥 STDERR️️ 🟥🟥🟥️ | ||
A Server has additional options that let you personalize it to better fit your needs. | ||
|
||
USAGE: | ||
scw baremetal options <command> | ||
|
||
AVAILABLE COMMANDS: | ||
add Add server option | ||
delete Delete server option | ||
get Get option | ||
list List options | ||
|
||
FLAGS: | ||
-h, --help help for options | ||
|
||
GLOBAL FLAGS: | ||
-c, --config string The path to the config file | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human") | ||
-p, --profile string The config profile to use | ||
|
||
Use "scw baremetal options [command] --help" for more information about a command. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.