Skip to content

Commit

Permalink
feat(instance): add ubuntu as default for image arg in server create (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
remyleone authored Jan 6, 2021
1 parent 2d9d215 commit 1041d1c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ EXAMPLES:
scw instance server create image=ubuntu_focal ip=$ip

ARGS:
image Image ID or label of the server
image=ubuntu_focal Image ID or label of the server
[type=DEV1-S] Server commercial type (GP1-XS | GP1-S | GP1-M | GP1-L | GP1-XL | DEV1-S | DEV1-M | DEV1-L | DEV1-XL | RENDER-S | STARDUST1-S)
[name=<generated>] Server name
[root-volume] Local root volume of the server
Expand Down
1 change: 1 addition & 0 deletions internal/namespaces/instance/v1/custom_server_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func serverCreateCommand() *core.Command {
{
Name: "image",
Short: "Image ID or label of the server",
Default: core.DefaultValueSetter("ubuntu_focal"),
Required: true,
AutoCompleteFunc: instanceServerCreateImageAutoCompleteFunc,
},
Expand Down
10 changes: 0 additions & 10 deletions internal/namespaces/instance/v1/custom_server_create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,6 @@ func Test_CreateServerErrors(t *testing.T) {
////
// Image errors
////
t.Run("Error: missing image label", core.Test(&core.TestConfig{
Commands: GetCommands(),
Cmd: "scw instance server create",
Check: core.TestCheckCombine(
core.TestCheckGolden(),
core.TestCheckExitCode(1),
),
DisableParallel: true,
}))

t.Run("Error: invalid image label", core.Test(&core.TestConfig{
Commands: GetCommands(),
Cmd: "scw instance server create image=macos",
Expand Down

0 comments on commit 1041d1c

Please sign in to comment.