diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-04-13 11:05:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-13 11:05:22 -0400 |
commit | 78b6dcd31c1e9cc1d637ea99344a2ddbed9f0ca1 (patch) | |
tree | b9ea003c9c5091cae3ee1664d4474a4412c61a15 /pkg/machine/config.go | |
parent | f6ce14b066ad57a86642f22c15ac42020fc0f660 (diff) | |
parent | 8710197e8592e9726d98d11d017d1c79ab07415b (diff) | |
download | podman-78b6dcd31c1e9cc1d637ea99344a2ddbed9f0ca1.tar.gz podman-78b6dcd31c1e9cc1d637ea99344a2ddbed9f0ca1.tar.bz2 podman-78b6dcd31c1e9cc1d637ea99344a2ddbed9f0ca1.zip |
Merge pull request #13829 from baude/machineinspect
Introduce machine inspect
Diffstat (limited to 'pkg/machine/config.go')
-rw-r--r-- | pkg/machine/config.go | 15 |
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? |