@@ -11,7 +11,6 @@ import (
1111 "os"
1212
1313 "cdr.dev/coder-cli/coder-sdk"
14- "cdr.dev/coder-cli/internal/config"
1514 "cdr.dev/coder-cli/internal/x/xcobra"
1615 "cdr.dev/coder-cli/pkg/clog"
1716 "cdr.dev/coder-cli/pkg/tablewriter"
152151
153152func createEnvCmd () * cobra.Command {
154153 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
165163 )
166164
167165 cmd := & cobra.Command {
@@ -172,9 +170,6 @@ func createEnvCmd() *cobra.Command {
172170 Example : `# create a new environment using default resource amounts
173171coder envs create my-new-env --image ubuntu
174172coder 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- },
178173 RunE : func (cmd * cobra.Command , args []string ) error {
179174 ctx := cmd .Context ()
180175 if img == "" {
@@ -205,16 +200,15 @@ coder envs create my-new-powerful-env --cpu 12 --disk 100 --memory 16 --image ub
205200
206201 // ExactArgs(1) ensures our name value can't panic on an out of bounds.
207202 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 ,
218212 }
219213
220214 // 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
258252 cmd .Flags ().StringVarP (& img , "image" , "i" , "" , "name of the image to base the environment off of." )
259253 cmd .Flags ().BoolVar (& follow , "follow" , false , "follow buildlog after initiating rebuild" )
260254 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." )
262255 _ = cmd .MarkFlagRequired ("image" )
263256 return cmd
264257}
@@ -391,9 +384,6 @@ func editEnvCmd() *cobra.Command {
391384 Example : `coder envs edit back-end-env --cpu 4
392385
393386coder envs edit back-end-env --disk 20` ,
394- PreRun : func (cmd * cobra.Command , args []string ) {
395- autoStartInfo ()
396- },
397387 RunE : func (cmd * cobra.Command , args []string ) error {
398388 ctx := cmd .Context ()
399389 client , err := newClient (ctx )
@@ -621,18 +611,3 @@ func buildUpdateReq(ctx context.Context, client *coder.Client, conf updateConf)
621611 }
622612 return & updateReq , nil
623613}
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