Skip to content

Commit

Permalink
fix(instance): allow unknown commerical types (#1500)
Browse files Browse the repository at this point in the history
Signed-off-by: Patrik Cyvoct <pcyvoct@scaleway.com>
  • Loading branch information
Sh4d1 authored Oct 29, 2020
1 parent feafe6a commit cc46d8e
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 7 deletions.
4 changes: 4 additions & 0 deletions internal/namespaces/instance/v1/custom_server_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ func serverCreateCommand() *core.Command {
Short: "Server commercial type",
Default: core.DefaultValueSetter("DEV1-S"),
EnumValues: []string{"GP1-XS", "GP1-S", "GP1-M", "GP1-L", "GP1-XL", "DEV1-S", "DEV1-M", "DEV1-L", "DEV1-XL", "RENDER-S"},
ValidateFunc: func(argSpec *core.ArgSpec, value interface{}) error {
// Allow all commercial types
return nil
},
},
{
Name: "name",
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
🎲🎲🎲 EXIT CODE: 1 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Invalid value 'MACBOOK1-S' for arg 'type'

Hint:
Accepted values for 'type' are [GP1-XS GP1-S GP1-M GP1-L GP1-XL DEV1-S DEV1-M DEV1-L DEV1-XL RENDER-S]
Bad image label 'ubuntu_bionic' for MACBOOK1-S
🟥🟥🟥 JSON STDERR 🟥🟥🟥
{
"message": "invalid value 'MACBOOK1-S' for arg 'type'",
"error": {},
"hint": "Accepted values for 'type' are [GP1-XS GP1-S GP1-M GP1-L GP1-XL DEV1-S DEV1-M DEV1-L DEV1-XL RENDER-S]"
"error": "bad image label 'ubuntu_bionic' for MACBOOK1-S"
}

0 comments on commit cc46d8e

Please sign in to comment.