Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ ARGS:
[install.partitioning-schema.zfs.pools.{index}.options.{index}]
[install.partitioning-schema.zfs.pools.{index}.filesystem-options.{index}]
[option-ids.{index}] IDs of options to enable on server
[protected] If enabled, the server can not be deleted
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
[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 | nl-ams-2 | pl-waw-2 | pl-waw-3)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Update the server associated with the ID. You can update parameters such as the server's name, tags and description. Any parameters left null in the request body are not updated.
Update the server associated with the ID. You can update parameters such as the server's name, tags, description and protection flag. Any parameters left null in the request body are not updated.

USAGE:
scw baremetal server update <server-id ...> [arg=value ...]
Expand All @@ -10,6 +10,7 @@ ARGS:
[name] Name of the server (≠hostname), not updated if null
[description] Description associated with the server, max 255 characters, not updated if null
[tags.{index}] Tags associated with the server, not updated if null
[protected] If enabled, the server can not be deleted
[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 | nl-ams-2 | pl-waw-2 | pl-waw-3)

FLAGS:
Expand Down
4 changes: 3 additions & 1 deletion docs/commands/baremetal.md
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ scw baremetal server create [arg=value ...]
| install.partitioning-schema.zfs.pools.{index}.options.{index} | | |
| install.partitioning-schema.zfs.pools.{index}.filesystem-options.{index} | | |
| option-ids.{index} | | IDs of options to enable on server |
| protected | | If enabled, the server can not be deleted |
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-2`, `pl-waw-3` | Zone to target. If none is passed will use default zone from the config |

Expand Down Expand Up @@ -874,7 +875,7 @@ scw baremetal server stop 11111111-1111-1111-1111-111111111111

### Update an Elastic Metal server

Update the server associated with the ID. You can update parameters such as the server's name, tags and description. Any parameters left null in the request body are not updated.
Update the server associated with the ID. You can update parameters such as the server's name, tags, description and protection flag. Any parameters left null in the request body are not updated.

**Usage:**

Expand All @@ -891,6 +892,7 @@ scw baremetal server update <server-id ...> [arg=value ...]
| name | | Name of the server (≠hostname), not updated if null |
| description | | Description associated with the server, max 255 characters, not updated if null |
| tags.{index} | | Tags associated with the server, not updated if null |
| protected | | If enabled, the server can not be deleted |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-2`, `pl-waw-3` | Zone to target. If none is passed will use default zone from the config |


Expand Down
16 changes: 15 additions & 1 deletion internal/namespaces/baremetal/v1/baremetal_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,13 @@ func baremetalServerCreate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "protected",
Short: `If enabled, the server can not be deleted`,
Required: false,
Deprecated: false,
Positional: false,
},
core.OrganizationIDArgSpec(),
core.ZoneArgSpec(
scw.ZoneFrPar1,
Expand Down Expand Up @@ -529,7 +536,7 @@ func baremetalServerCreate() *core.Command {
func baremetalServerUpdate() *core.Command {
return &core.Command{
Short: `Update an Elastic Metal server`,
Long: `Update the server associated with the ID. You can update parameters such as the server's name, tags and description. Any parameters left null in the request body are not updated.`,
Long: `Update the server associated with the ID. You can update parameters such as the server's name, tags, description and protection flag. Any parameters left null in the request body are not updated.`,
Namespace: "baremetal",
Resource: "server",
Verb: "update",
Expand Down Expand Up @@ -564,6 +571,13 @@ func baremetalServerUpdate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "protected",
Short: `If enabled, the server can not be deleted`,
Required: false,
Deprecated: false,
Positional: false,
},
core.ZoneArgSpec(
scw.ZoneFrPar1,
scw.ZoneFrPar2,
Expand Down
Loading