Skip to content

Commit 8c4c1ca

Browse files
feat(as): add default value for create server (#1747)
Co-authored-by: Rémy Léone <[email protected]>
1 parent c9423ba commit 8c4c1ca

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

cmd/scw/testdata/test-all-usage-apple-silicon-server-create-usage.golden

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ USAGE:
66
scw apple-silicon server create [arg=value ...]
77

88
ARGS:
9-
[name] Create a server with this given name
10-
[project-id] Project ID to use. If none is passed the default project ID will be used
11-
[type] Create a server of the given type
9+
[name=<generated>] Create a server with this given name
10+
[project-id] Project ID to use. If none is passed the default project ID will be used
11+
[type=M1-M] Create a server of the given type
1212

1313
FLAGS:
1414
-h, --help help for create

internal/namespaces/applesilicon/v1alpha1/applesilicon_cli.go

+2
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ func appleSiliconServerCreate() *core.Command {
148148
Required: false,
149149
Deprecated: false,
150150
Positional: false,
151+
Default: core.RandomValueGenerator("as"),
151152
},
152153
core.ProjectIDArgSpec(),
153154
{
@@ -156,6 +157,7 @@ func appleSiliconServerCreate() *core.Command {
156157
Required: false,
157158
Deprecated: false,
158159
Positional: false,
160+
Default: core.DefaultValueSetter("M1-M"),
159161
},
160162
},
161163
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {

0 commit comments

Comments
 (0)