Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(instance): add ubuntu as default for image arg in server create #1638

Merged
merged 1 commit into from
Jan 6, 2021
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 @@ -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