summaryrefslogtreecommitdiff
path: root/pkg/machine/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/machine/config.go')
-rw-r--r--pkg/machine/config.go15
1 files changed, 11 insertions, 4 deletions
diff --git a/pkg/machine/config.go b/pkg/machine/config.go
index 7e1561506..6c2fab0e5 100644
--- a/pkg/machine/config.go
+++ b/pkg/machine/config.go
@@ -33,14 +33,14 @@ type InitOptions struct {
UID string
}
-type QemuMachineStatus = string
+type Status = string
const (
// Running indicates the qemu vm is running.
- Running QemuMachineStatus = "running"
+ Running Status = "running"
// Stopped indicates the vm has stopped.
- Stopped QemuMachineStatus = "stopped"
- DefaultMachineName string = "podman-machine-default"
+ Stopped Status = "stopped"
+ DefaultMachineName string = "podman-machine-default"
)
type Provider interface {
@@ -113,12 +113,15 @@ type RemoveOptions struct {
SaveIgnition bool
}
+type InspectOptions struct{}
+
type VM interface {
Init(opts InitOptions) (bool, error)
Remove(name string, opts RemoveOptions) (string, func() error, error)
Set(name string, opts SetOptions) error
SSH(name string, opts SSHOptions) error
Start(name string, opts StartOptions) error
+ State() (Status, error)
Stop(name string, opts StopOptions) error
}
@@ -126,6 +129,10 @@ type DistributionDownload interface {
HasUsableCache() (bool, error)
Get() *Download
}
+type InspectInfo struct {
+ State Status
+ VM
+}
func (rc RemoteConnectionType) MakeSSHURL(host, path, port, userName string) url.URL {
//TODO Should this function have input verification?