-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: extract a Provider seam and an explicit SSH endpoint #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
267caaa
3d1381e
7654269
fe16df9
f3c56d4
4b0fa57
c13296c
ac15a60
2fde90e
2c363a0
bcbee2d
e2d4c63
721c935
bd5940c
4cf033f
0454799
1b511ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -94,6 +94,10 @@ type VM struct { | |
| // Written by the form at creation time; dispatch elsewhere in stoat | ||
| // keys off Mode, not this field. | ||
| Backend string `toml:"backend"` | ||
| // Provider is the execution surface: "qemu" for a local hypervisor VM, | ||
| // or a cloud provider's name. Empty means "qemu", which is what every | ||
| // vm.toml written before this field existed says. | ||
| Provider string `toml:"provider,omitempty"` | ||
| // Base is the absolute path to the shared base image an overlay is | ||
| // created from. Cloud mode only. | ||
| Base string `toml:"base"` | ||
|
|
@@ -202,7 +206,7 @@ func Root() string { | |
|
|
||
| // EnsureRoot creates the data root and its fixed subdirectories. | ||
| func EnsureRoot() error { | ||
| if err := hostops.RequireVM(); err != nil { | ||
| if err := hostops.RequireLocalHypervisor(); err != nil { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win Use
🤖 Prompt for AI Agents |
||
| return err | ||
| } | ||
| for _, d := range []string{"isos", "recipes"} { | ||
|
|
@@ -276,7 +280,7 @@ func (v *VM) ISOPath() string { | |
|
|
||
| // Save writes vm.toml, creating the VM directory if needed. | ||
| func (v *VM) Save() error { | ||
| if err := hostops.RequireVM(); err != nil { | ||
| if err := hostops.RequireLocalHypervisor(); err != nil { | ||
| return err | ||
| } | ||
| if v.Dir == "" { | ||
|
|
@@ -381,7 +385,7 @@ var sshPortLine = regexp.MustCompile(`(?m)^\s*sshport\s*=\s*(\d+)\s*$`) | |
|
|
||
| // Delete removes the VM directory. It never touches isos/. | ||
| func (v *VM) Delete() error { | ||
| if err := hostops.RequireVM(); err != nil { | ||
| if err := hostops.RequireLocalHypervisor(); err != nil { | ||
| return err | ||
| } | ||
| if v.Dir == "" || filepath.Dir(v.Dir) != Root() { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: NovusEdge/stoat
Length of output: 50372
🏁 Script executed:
Repository: NovusEdge/stoat
Length of output: 50372
🏁 Script executed:
Repository: NovusEdge/stoat
Length of output: 50371
🏁 Script executed:
Repository: NovusEdge/stoat
Length of output: 1538
🏁 Script executed:
Repository: NovusEdge/stoat
Length of output: 50372
🏁 Script executed:
Repository: NovusEdge/stoat
Length of output: 15853
Correct the unsupported-host documentation. The CLI rejects
ls,get,status, andupdatebefore dispatch by callinghostops.RequireLocalHypervisor(). These commands do not run on unsupported hosts. Update the statement in all three locations.📍 Affects 2 files
docs/getting-started/installation.md#L192-L192(this comment)docs/troubleshooting.md#L10-L10docs/troubleshooting.md#L22-L22🤖 Prompt for AI Agents