@@ -11,7 +11,6 @@ import (
11
11
"os"
12
12
13
13
"cdr.dev/coder-cli/coder-sdk"
14
- "cdr.dev/coder-cli/internal/config"
15
14
"cdr.dev/coder-cli/internal/x/xcobra"
16
15
"cdr.dev/coder-cli/pkg/clog"
17
16
"cdr.dev/coder-cli/pkg/tablewriter"
152
151
153
152
func createEnvCmd () * cobra.Command {
154
153
var (
155
- org string
156
- cpu float32
157
- memory float32
158
- disk int
159
- gpus int
160
- img string
161
- tag string
162
- follow bool
163
- useCVM bool
164
- enableAutostart bool
154
+ org string
155
+ cpu float32
156
+ memory float32
157
+ disk int
158
+ gpus int
159
+ img string
160
+ tag string
161
+ follow bool
162
+ useCVM bool
165
163
)
166
164
167
165
cmd := & cobra.Command {
@@ -172,9 +170,6 @@ func createEnvCmd() *cobra.Command {
172
170
Example : `# create a new environment using default resource amounts
173
171
coder envs create my-new-env --image ubuntu
174
172
coder envs create my-new-powerful-env --cpu 12 --disk 100 --memory 16 --image ubuntu` ,
175
- PreRun : func (cmd * cobra.Command , args []string ) {
176
- autoStartInfo ()
177
- },
178
173
RunE : func (cmd * cobra.Command , args []string ) error {
179
174
ctx := cmd .Context ()
180
175
if img == "" {
@@ -205,16 +200,15 @@ coder envs create my-new-powerful-env --cpu 12 --disk 100 --memory 16 --image ub
205
200
206
201
// ExactArgs(1) ensures our name value can't panic on an out of bounds.
207
202
createReq := & coder.CreateEnvironmentRequest {
208
- Name : args [0 ],
209
- ImageID : importedImg .ID ,
210
- OrgID : importedImg .OrganizationID ,
211
- ImageTag : tag ,
212
- CPUCores : cpu ,
213
- MemoryGB : memory ,
214
- DiskGB : disk ,
215
- GPUs : gpus ,
216
- UseContainerVM : useCVM ,
217
- EnableAutoStart : enableAutostart ,
203
+ Name : args [0 ],
204
+ ImageID : importedImg .ID ,
205
+ OrgID : importedImg .OrganizationID ,
206
+ ImageTag : tag ,
207
+ CPUCores : cpu ,
208
+ MemoryGB : memory ,
209
+ DiskGB : disk ,
210
+ GPUs : gpus ,
211
+ UseContainerVM : useCVM ,
218
212
}
219
213
220
214
// if any of these defaulted to their zero value we provision
@@ -258,7 +252,6 @@ coder envs create my-new-powerful-env --cpu 12 --disk 100 --memory 16 --image ub
258
252
cmd .Flags ().StringVarP (& img , "image" , "i" , "" , "name of the image to base the environment off of." )
259
253
cmd .Flags ().BoolVar (& follow , "follow" , false , "follow buildlog after initiating rebuild" )
260
254
cmd .Flags ().BoolVar (& useCVM , "container-based-vm" , false , "deploy the environment as a Container-based VM" )
261
- cmd .Flags ().BoolVar (& enableAutostart , "enable-autostart" , false , "automatically start this environment at your preferred time." )
262
255
_ = cmd .MarkFlagRequired ("image" )
263
256
return cmd
264
257
}
@@ -391,9 +384,6 @@ func editEnvCmd() *cobra.Command {
391
384
Example : `coder envs edit back-end-env --cpu 4
392
385
393
386
coder envs edit back-end-env --disk 20` ,
394
- PreRun : func (cmd * cobra.Command , args []string ) {
395
- autoStartInfo ()
396
- },
397
387
RunE : func (cmd * cobra.Command , args []string ) error {
398
388
ctx := cmd .Context ()
399
389
client , err := newClient (ctx )
@@ -621,18 +611,3 @@ func buildUpdateReq(ctx context.Context, client *coder.Client, conf updateConf)
621
611
}
622
612
return & updateReq , nil
623
613
}
624
-
625
- // TODO (Grey): Remove education in a future non-patch release.
626
- func autoStartInfo () {
627
- var preferencesURI string
628
-
629
- accessURI , err := config .URL .Read ()
630
- if err != nil {
631
- // Error is fairly benign in this case, fallback to relative URI
632
- preferencesURI = "/preferences"
633
- } else {
634
- preferencesURI = fmt .Sprintf ("%s%s" , accessURI , "/preferences?tab=autostart" )
635
- }
636
-
637
- clog .LogInfo ("⚡NEW: Automate daily environment startup" , "Visit " + preferencesURI + " to configure your preferred time" )
638
- }
0 commit comments