-
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): add support for private network in v1 (#2573)
- Loading branch information
1 parent
8561404
commit d3bf03d
Showing
8 changed files
with
425 additions
and
4 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
cmd/scw/testdata/test-all-usage-baremetal-private-network-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,20 @@ | ||
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 | ||
🟥🟥🟥 STDERR️️ 🟥🟥🟥️ | ||
Add a server to a private network. | ||
|
||
USAGE: | ||
scw baremetal private-network add [arg=value ...] | ||
|
||
ARGS: | ||
server-id The ID of the server | ||
private-network-id The ID of the private network | ||
[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 |
20 changes: 20 additions & 0 deletions
20
cmd/scw/testdata/test-all-usage-baremetal-private-network-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,20 @@ | ||
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 | ||
🟥🟥🟥 STDERR️️ 🟥🟥🟥️ | ||
Delete a private network. | ||
|
||
USAGE: | ||
scw baremetal private-network delete [arg=value ...] | ||
|
||
ARGS: | ||
server-id The ID of the server | ||
private-network-id The ID of the private network | ||
[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-private-network-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,23 @@ | ||
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 | ||
🟥🟥🟥 STDERR️️ 🟥🟥🟥️ | ||
List the private networks of a server. | ||
|
||
USAGE: | ||
scw baremetal private-network list [arg=value ...] | ||
|
||
ARGS: | ||
[order-by] The sort order for the returned private networks (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc) | ||
[server-id] Filter private networks by server ID | ||
[private-network-id] Filter private networks by private network ID | ||
[project-id] Filter private networks by project ID | ||
[organization-id] Filter private networks by organization ID | ||
[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 |
20 changes: 20 additions & 0 deletions
20
cmd/scw/testdata/test-all-usage-baremetal-private-network-set-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,20 @@ | ||
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 | ||
🟥🟥🟥 STDERR️️ 🟥🟥🟥️ | ||
Set multiple private networks on a server. | ||
|
||
USAGE: | ||
scw baremetal private-network set [arg=value ...] | ||
|
||
ARGS: | ||
server-id The ID of the server | ||
private-network-ids.{index} The IDs of the private networks | ||
[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 set | ||
|
||
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 |
30 changes: 30 additions & 0 deletions
30
cmd/scw/testdata/test-all-usage-baremetal-private-network-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,30 @@ | ||
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 | ||
🟥🟥🟥 STDERR️️ 🟥🟥🟥️ | ||
A private network allows interconnecting your resources | ||
(servers, instances, ...) in an isolated and private | ||
network. The network reachability is limited to the | ||
resources that are on the same private network. A VLAN | ||
interface is available on the server and can be freely | ||
managed (adding IP addresses, shutdown interface...). | ||
|
||
Note that a resource can be a part of multiple private networks. | ||
|
||
USAGE: | ||
scw baremetal private-network <command> | ||
|
||
AVAILABLE COMMANDS: | ||
add Add a server to a private network | ||
delete Delete a private network | ||
list List the private networks of a server | ||
set Set multiple private networks on a server | ||
|
||
FLAGS: | ||
-h, --help help for private-network | ||
|
||
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 private-network [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
Oops, something went wrong.