Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Commitc25b0e9

Browse files
authored
Remove cvm edit flag (#204)
1 parent68114e3 commitc25b0e9

File tree

4 files changed

+21
-44
lines changed

4 files changed

+21
-44
lines changed

‎coder-sdk/env.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ type UpdateEnvironmentReq struct {
132132
GPUs*int`json:"gpus"`
133133
Services*[]string`json:"services"`
134134
CodeServerReleaseURL*string`json:"code_server_release_url"`
135-
UseContainerVM*bool`json:"use_container_vm"`
136135
}
137136

138137
// RebuildEnvironment requests that the given envID is rebuilt with no changes to its specification.

‎docs/coder_envs_create.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ coder envs create my-new-powerful-env --cpu 12 --disk 100 --memory 16 --image ub
2121
###Options
2222

2323
```
24-
--container-vm deploy the environment as a Container-based VM
25-
-c, --cpu float32 number of cpu cores the environment should be provisioned with.
26-
-d, --disk int GB of disk storage an environment should be provisioned with.
27-
--follow follow buildlog after initiating rebuild
28-
-g, --gpus int number GPUs an environment should be provisioned with.
29-
-h, --help help for create
30-
-i, --image string name of the image to base the environment off of.
31-
-m, --memory float32 GB of RAM an environment should be provisioned with.
32-
-o, --org string name of the organization the environment should be created under.
33-
-t, --tag string tag of the image the environment will be based off of. (default "latest")
24+
--container-based-vm deploy the environment as a Container-based VM
25+
-c, --cpu float32number of cpu cores the environment should be provisioned with.
26+
-d, --disk intGB of disk storage an environment should be provisioned with.
27+
--followfollow buildlog after initiating rebuild
28+
-g, --gpus intnumber GPUs an environment should be provisioned with.
29+
-h, --helphelp for create
30+
-i, --image stringname of the image to base the environment off of.
31+
-m, --memory float32GB of RAM an environment should be provisioned with.
32+
-o, --org stringname of the organization the environment should be created under.
33+
-t, --tag stringtag of the image the environment will be based off of. (default "latest")
3434
```
3535

3636
###Options inherited from parent commands

‎docs/coder_envs_edit.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,16 @@ coder envs edit back-end-env --disk 20
2121
###Options
2222

2323
```
24-
--container-vm deploy the environment as a Container-based VM
25-
-c, --cpu float32 The number of cpu cores the environment should be provisioned with.
26-
-d, --disk int The amount of disk storage an environment should be provisioned with.
27-
--follow follow buildlog after initiating rebuild
28-
-g, --gpu int The amount of disk storage to provision the environment with.
29-
-h, --help help for edit
30-
-i, --image string name of the image you want the environment to be based off of.
31-
-m, --memory float32 The amount of RAM an environment should be provisioned with.
32-
--not-container-vm do not deploy the environment as a Container-based VM
33-
-o, --org string name of the organization the environment should be created under.
34-
-t, --tag string image tag of the image you want to base the environment off of. (default "latest")
35-
--user string Specify the user whose resources to target (default "me")
24+
-c, --cpu float32 The number of cpu cores the environment should be provisioned with.
25+
-d, --disk int The amount of disk storage an environment should be provisioned with.
26+
--follow follow buildlog after initiating rebuild
27+
-g, --gpu int The amount of disk storage to provision the environment with.
28+
-h, --help help for edit
29+
-i, --image string name of the image you want the environment to be based off of.
30+
-m, --memory float32 The amount of RAM an environment should be provisioned with.
31+
-o, --org string name of the organization the environment should be created under.
32+
-t, --tag string image tag of the image you want to base the environment off of. (default "latest")
33+
--user string Specify the user whose resources to target (default "me")
3634
```
3735

3836
###Options inherited from parent commands

‎internal/cmd/envs.go

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ coder envs create my-new-powerful-env --cpu 12 --disk 100 --memory 16 --image ub
245245
cmd.Flags().IntVarP(&gpus,"gpus","g",0,"number GPUs an environment should be provisioned with.")
246246
cmd.Flags().StringVarP(&img,"image","i","","name of the image to base the environment off of.")
247247
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")
249249
_=cmd.MarkFlagRequired("image")
250250
returncmd
251251
}
@@ -260,8 +260,6 @@ func editEnvCmd() *cobra.Command {
260260
diskint
261261
gpusint
262262
followbool
263-
useCVMbool
264-
notCVMbool
265263
userstring
266264
)
267265

@@ -307,8 +305,6 @@ coder envs edit back-end-env --disk 20`,
307305
image:img,
308306
imageTag:tag,
309307
orgName:org,
310-
useCVM:useCVM,
311-
notCVM:notCVM,
312308
})
313309
iferr!=nil {
314310
returnerr
@@ -341,8 +337,6 @@ coder envs edit back-end-env --disk 20`,
341337
cmd.Flags().IntVarP(&disk,"disk","d",0,"The amount of disk storage an environment should be provisioned with.")
342338
cmd.Flags().IntVarP(&gpus,"gpu","g",0,"The amount of disk storage to provision the environment with.")
343339
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")
346340
cmd.Flags().StringVar(&user,"user",coder.Me,"Specify the user whose resources to target")
347341
returncmd
348342
}
@@ -412,12 +406,8 @@ type updateConf struct {
412406
imagestring
413407
imageTagstring
414408
orgNamestring
415-
useCVMbool
416-
notCVMbool
417409
}
418410

419-
funcboolP(abool)*bool {return&a }
420-
421411
funcbuildUpdateReq(ctx context.Context,client*coder.Client,confupdateConf) (*coder.UpdateEnvironmentReq,error) {
422412
var (
423413
updateReq coder.UpdateEnvironmentReq
@@ -426,16 +416,6 @@ func buildUpdateReq(ctx context.Context, client *coder.Client, conf updateConf)
426416
defaultDiskGBint
427417
)
428418

429-
ifconf.useCVM&&conf.notCVM {
430-
returnnil,xerrors.New("--container-vm and --not-container-vm flags conflict")
431-
}
432-
ifconf.useCVM {
433-
updateReq.UseContainerVM=boolP(true)
434-
}
435-
ifconf.notCVM {
436-
updateReq.UseContainerVM=boolP(false)
437-
}
438-
439419
// If this is not empty it means the user is requesting to change the environment image.
440420
ifconf.image!="" {
441421
importedImg,err:=findImg(ctx,client,findImgConf{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp