Skip to content

Commit

Permalink
feat(baremetal): add support for projects (#1368)
Browse files Browse the repository at this point in the history
Co-authored-by: Rémy Léone <rleone@scaleway.com>
  • Loading branch information
scaleway-bot and remyleone authored Aug 31, 2020
1 parent af02f4c commit eb9c309
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ EXAMPLES:
scw baremetal server create name=foo tags.0=prod tags.1=blue type=GP-BM1-M

ARGS:
[project-id] Project ID with which the server will be created
name=<generated> Name of the server (≠hostname)
[description] Description associated to the server, max 255 characters
[type=GP-BM1-S] Server commercial type (GP-BM1-L | GP-BM1-M | GP-BM1-S | HC-BM1-L | HC-BM1-S | HM-BM1-XL | HM-BM1-M)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List baremetal servers.
List baremetal servers for organization.

USAGE:
scw baremetal server list [arg=value ...]
Expand All @@ -14,6 +14,7 @@ ARGS:
[tags.{index}] Filter servers by tags
[status.{index}] Filter servers by status
[name] Filter servers by name
[project-id] Filter servers by project ID
[organization-id] Filter servers by organization ID
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ AVAILABLE COMMANDS:
delete Delete a baremetal server
get Get a specific baremetal server
install Install a baremetal server
list List baremetal servers
list List baremetal servers for organization
reboot Reboot a baremetal server
start Start a baremetal server
stop Stop a baremetal server
Expand Down
16 changes: 14 additions & 2 deletions internal/namespaces/baremetal/v1/baremetal_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ For instance, your KVM-IP management console could be accessed with it.

func baremetalServerList() *core.Command {
return &core.Command{
Short: `List baremetal servers`,
Long: `List baremetal servers.`,
Short: `List baremetal servers for organization`,
Long: `List baremetal servers for organization.`,
Namespace: "baremetal",
Resource: "server",
Verb: "list",
Expand Down Expand Up @@ -110,6 +110,12 @@ func baremetalServerList() *core.Command {
Required: false,
Positional: false,
},
{
Name: "project-id",
Short: `Filter servers by project ID`,
Required: false,
Positional: false,
},
{
Name: "organization-id",
Short: `Filter servers by organization ID`,
Expand Down Expand Up @@ -188,6 +194,12 @@ func baremetalServerCreate() *core.Command {
Required: true,
Positional: false,
},
{
Name: "project-id",
Short: `Project ID with which the server will be created`,
Required: false,
Positional: false,
},
{
Name: "name",
Short: `Name of the server (≠hostname)`,
Expand Down

0 comments on commit eb9c309

Please sign in to comment.