(ctx context.Context, options client.CreateOptions)
| 84 | } |
| 85 | |
| 86 | func (s *machineClient) Create(ctx context.Context, options client.CreateOptions) error { |
| 87 | done := printStillRunningLogMessagePeriodically(s.log) |
| 88 | defer close(done) |
| 89 | |
| 90 | writer := s.log.Writer(logrus.InfoLevel, false) |
| 91 | defer writer.Close() |
| 92 | |
| 93 | // create a machine |
| 94 | s.log.Infof("Create machine '%s' with provider '%s'...", s.machine.ID, s.config.Name) |
| 95 | err := RunCommandWithBinaries( |
| 96 | ctx, |
| 97 | "create", |
| 98 | s.config.Exec.Create, |
| 99 | s.machine.Context, |
| 100 | nil, |
| 101 | s.machine, |
| 102 | s.devPodConfig.ProviderOptions(s.config.Name), |
| 103 | s.config, |
| 104 | nil, |
| 105 | nil, |
| 106 | writer, |
| 107 | writer, |
| 108 | s.log, |
| 109 | ) |
| 110 | if err != nil { |
| 111 | return err |
| 112 | } |
| 113 | |
| 114 | s.log.Donef("Successfully created machine '%s' with provider '%s'", s.machine.ID, s.config.Name) |
| 115 | return nil |
| 116 | } |
| 117 | |
| 118 | func (s *machineClient) Start(ctx context.Context, options client.StartOptions) error { |
| 119 | done := printStillRunningLogMessagePeriodically(s.log) |
nothing calls this directly
no test coverage detected