Skip to content

Commit

Permalink
feat(baremetal): add ip and os commands (#790)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Mar 19, 2020
1 parent 5af2272 commit 5c611b1
Show file tree
Hide file tree
Showing 13 changed files with 520 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Attach IP failovers to the given server ID.

USAGE:
scw baremetal ip attach [arg=value ...]

ARGS:
[ip-failover-ids.{index}] IP failover IDs to attach to the server
[server-id] ID of the server to attach to the IP failovers
[zone] Zone to target. If none is passed will use default zone from the config (fr-par-2)

FLAGS:
-h, --help help for attach

GLOBAL FLAGS:
-D, --debug Enable debug mode
-o, --output string Output format: json or human
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Create an IP failover. Once the IP failover is created, you probably want to attach it to a server.

USAGE:
scw baremetal ip create [arg=value ...]

ARGS:
[description] Description to associate to the IP failover, max 255 characters
[tags.{index}] Tags to associate to the IP failover
[mac-type] MAC type to use for the IP failover (unknown_mac_type | none | duplicate | vmware | xen | kvm)
[duplicate-mac-from] ID of the IP failover which must be duplicate
[organization-id] Organization ID to use. If none is passed will use default organization ID from the config
[zone] Zone to target. If none is passed will use default zone from the config (fr-par-2)

FLAGS:
-h, --help help for create

GLOBAL FLAGS:
-D, --debug Enable debug mode
-o, --output string Output format: json or human
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Delete the IP failover associated with the given IP.

USAGE:
scw baremetal ip delete [arg=value ...]

ARGS:
ip-failover-id ID of the IP failover to delete
[zone] Zone to target. If none is passed will use default zone from the config (fr-par-2)

FLAGS:
-h, --help help for delete

GLOBAL FLAGS:
-D, --debug Enable debug mode
-o, --output string Output format: json or human
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Detach IP failovers to the given server ID.

USAGE:
scw baremetal ip detach [arg=value ...]

ARGS:
[ip-failover-ids.{index}] IP failover IDs to detach to the server
[zone] Zone to target. If none is passed will use default zone from the config (fr-par-2)

FLAGS:
-h, --help help for detach

GLOBAL FLAGS:
-D, --debug Enable debug mode
-o, --output string Output format: json or human
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Get the IP failover associated with the given ID.

USAGE:
scw baremetal ip get [arg=value ...]

ARGS:
ip-failover-id ID of the IP failover
[zone] Zone to target. If none is passed will use default zone from the config (fr-par-2)

FLAGS:
-h, --help help for get

GLOBAL FLAGS:
-D, --debug Enable debug mode
-o, --output string Output format: json or human
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
List all created IP failovers.

USAGE:
scw baremetal ip list [arg=value ...]

ARGS:
[order-by] Order of the IP failovers (created_at_asc | created_at_desc)
[tags.{index}] Filter IP failovers by tags
[status.{index}] Filter IP failovers by status
[server-ids.{index}] Filter IP failovers by server IDs
[organization-id] Filter servers by organization ID
[zone] Zone to target. If none is passed will use default zone from the config (fr-par-2)

FLAGS:
-h, --help help for list

GLOBAL FLAGS:
-D, --debug Enable debug mode
-o, --output string Output format: json or human
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Update the IP failover associated with the given IP.

USAGE:
scw baremetal ip update [arg=value ...]

ARGS:
ip-failover-id ID of the IP failover to update
[description] Description to associate to the IP failover, max 255 characters, not updated if null
[tags] Tags to associate to the IP failover, not updated if null
[mac-type] MAC type to use for the IP failover, not updated if null (unknown_mac_type | none | duplicate | vmware | xen | kvm)
[duplicate-mac-from] ID of the IP failover which must be duplicate, not updated if null
[reverse] New reverse IP to update, not updated if null
[zone] Zone to target. If none is passed will use default zone from the config (fr-par-2)

FLAGS:
-h, --help help for update

GLOBAL FLAGS:
-D, --debug Enable debug mode
-o, --output string Output format: json or human
-p, --profile string The config profile to use
21 changes: 21 additions & 0 deletions cmd/scw/testdata/test-all-usage-baremetal-ip-usage.stderr.golden
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
IP fail-over management.

USAGE:
scw baremetal ip <command>

AVAILABLE COMMANDS:
create Create IP failover
get Get IP failover
list List IP failovers
delete Delete IP failover
update Update IP failover
attach Attach IP failovers
detach Detach IP failovers

FLAGS:
-h, --help help for ip

GLOBAL FLAGS:
-D, --debug Enable debug mode
-o, --output string Output format: json or human
-p, --profile string The config profile to use

Use "scw baremetal ip [command] --help" for more information about a command.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Return specific OS for the given ID.

USAGE:
scw baremetal os get [arg=value ...]

ARGS:
os-id ID of the researched OS
[zone] Zone to target. If none is passed will use default zone from the config (fr-par-2)

FLAGS:
-h, --help help for get

GLOBAL FLAGS:
-D, --debug Enable debug mode
-o, --output string Output format: json or human
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
List all available OS that can be install on a baremetal server.

USAGE:
scw baremetal os list [arg=value ...]

ARGS:
[zone] Zone to target. If none is passed will use default zone from the config (fr-par-2)

FLAGS:
-h, --help help for list

GLOBAL FLAGS:
-D, --debug Enable debug mode
-o, --output string Output format: json or human
-p, --profile string The config profile to use
16 changes: 16 additions & 0 deletions cmd/scw/testdata/test-all-usage-baremetal-os-usage.stderr.golden
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
An Operating System (OS) is the underlying software installed on your server.

USAGE:
scw baremetal os <command>

AVAILABLE COMMANDS:
list List OS
get Get OS

FLAGS:
-h, --help help for os

GLOBAL FLAGS:
-D, --debug Enable debug mode
-o, --output string Output format: json or human
-p, --profile string The config profile to use

Use "scw baremetal os [command] --help" for more information about a command.
4 changes: 2 additions & 2 deletions cmd/scw/testdata/test-all-usage-baremetal-usage.stderr.golden
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ USAGE:

AVAILABLE COMMANDS:
server A server is a denomination of a type of instances provided by Scaleway
os An Operating System (OS) is the underlying software installed on your server
ip IP fail-over management

FLAGS:
-h, --help help for baremetal
Expand All @@ -15,8 +17,6 @@ GLOBAL FLAGS:
-p, --profile string The config profile to use

Additional help topics:
scw baremetal os An Operating System (OS) is the underlying software installed on your server
scw baremetal ip IP fail-over management
scw baremetal bmc Baseboard Management Controller (BMC) offers a low-level access to your baremetal instance
scw baremetal offer Commercial offers

Expand Down
Loading

0 comments on commit 5c611b1

Please sign in to comment.