@@ -245,7 +245,7 @@ coder envs create my-new-powerful-env --cpu 12 --disk 100 --memory 16 --image ub
245
245
cmd .Flags ().IntVarP (& gpus , "gpus" , "g" , 0 , "number GPUs an environment should be provisioned with." )
246
246
cmd .Flags ().StringVarP (& img , "image" , "i" , "" , "name of the image to base the environment off of." )
247
247
cmd .Flags ().BoolVar (& follow , "follow" , false , "follow buildlog after initiating rebuild" )
248
- cmd .Flags ().BoolVar (& useCVM , "container-vm" , false , "deploy the environment as a Container-based VM" )
248
+ cmd .Flags ().BoolVar (& useCVM , "container-based- vm" , false , "deploy the environment as a Container-based VM" )
249
249
_ = cmd .MarkFlagRequired ("image" )
250
250
return cmd
251
251
}
@@ -260,8 +260,6 @@ func editEnvCmd() *cobra.Command {
260
260
disk int
261
261
gpus int
262
262
follow bool
263
- useCVM bool
264
- notCVM bool
265
263
user string
266
264
)
267
265
@@ -307,8 +305,6 @@ coder envs edit back-end-env --disk 20`,
307
305
image : img ,
308
306
imageTag : tag ,
309
307
orgName : org ,
310
- useCVM : useCVM ,
311
- notCVM : notCVM ,
312
308
})
313
309
if err != nil {
314
310
return err
@@ -341,8 +337,6 @@ coder envs edit back-end-env --disk 20`,
341
337
cmd .Flags ().IntVarP (& disk , "disk" , "d" , 0 , "The amount of disk storage an environment should be provisioned with." )
342
338
cmd .Flags ().IntVarP (& gpus , "gpu" , "g" , 0 , "The amount of disk storage to provision the environment with." )
343
339
cmd .Flags ().BoolVar (& follow , "follow" , false , "follow buildlog after initiating rebuild" )
344
- cmd .Flags ().BoolVar (& useCVM , "container-vm" , false , "deploy the environment as a Container-based VM" )
345
- cmd .Flags ().BoolVar (& notCVM , "not-container-vm" , false , "do not deploy the environment as a Container-based VM" )
346
340
cmd .Flags ().StringVar (& user , "user" , coder .Me , "Specify the user whose resources to target" )
347
341
return cmd
348
342
}
@@ -412,12 +406,8 @@ type updateConf struct {
412
406
image string
413
407
imageTag string
414
408
orgName string
415
- useCVM bool
416
- notCVM bool
417
409
}
418
410
419
- func boolP (a bool ) * bool { return & a }
420
-
421
411
func buildUpdateReq (ctx context.Context , client * coder.Client , conf updateConf ) (* coder.UpdateEnvironmentReq , error ) {
422
412
var (
423
413
updateReq coder.UpdateEnvironmentReq
@@ -426,16 +416,6 @@ func buildUpdateReq(ctx context.Context, client *coder.Client, conf updateConf)
426
416
defaultDiskGB int
427
417
)
428
418
429
- if conf .useCVM && conf .notCVM {
430
- return nil , xerrors .New ("--container-vm and --not-container-vm flags conflict" )
431
- }
432
- if conf .useCVM {
433
- updateReq .UseContainerVM = boolP (true )
434
- }
435
- if conf .notCVM {
436
- updateReq .UseContainerVM = boolP (false )
437
- }
438
-
439
419
// If this is not empty it means the user is requesting to change the environment image.
440
420
if conf .image != "" {
441
421
importedImg , err := findImg (ctx , client , findImgConf {
0 commit comments