feat(lifecycle): route restart and delete by driver
Add lifecycle Delete and driver-qualified App Restart/Delete methods, CLI vm delete --driver/--keep-files, and frontend driver-aware actions. Extend the second-driver App acceptance to restart and delete while preserving legacy macOS restart fallback and cleanup.
This commit is contained in:
1 parent
71fb8bb458
commit
8b6ca5c719
11 files changed
+140
-17
No files matched your search
@@ -581,6 +581,17 @@ func cmdVM(cfg *config.Config, loc i18n.Locale, args []string, viaWindow bool) e
|
||||
return fmt.Errorf("usage: reims-go vm stop [--driver <id>] <name>")
|
||||
}
|
||||
return stopVM(ctx, cfg, *driverID, fs.Arg(0), false)
|
||||
case "delete":
|
||||
fs := flag.NewFlagSet("vm delete", flag.ContinueOnError)
|
||||
driverID := fs.String("driver", "", "Owning driver ID when VM names are ambiguous")
|
||||
keepFiles := fs.Bool("keep-files", false, "Delete registration but keep VM files")
|
||||
if err := fs.Parse(args[1:]); err != nil {
|
||||
return err
|
||||
}
|
||||
if fs.NArg() < 1 {
|
||||
return fmt.Errorf("usage: reims-go vm delete [--driver <id>] [--keep-files] <name>")
|
||||
}
|
||||
return deleteVM(ctx, cfg, *driverID, fs.Arg(0), *keepFiles)
|
||||
case "eject":
|
||||
if err := initReims(); err != nil {
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user