summaryrefslogtreecommitdiff
path: root/pkg/machine/config.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2021-03-22 13:29:25 -0500
committerbaude <bbaude@redhat.com>2021-03-25 11:02:33 -0500
commit4ab8a6f67eb9de0de40d478cb0cbec05b1b725c0 (patch)
tree00743bf608cc5700fe8a7fca1bb3b0f3a4457b7d /pkg/machine/config.go
parente7661137373b5f87bf6ec45e32326821b172ce7b (diff)
downloadpodman-4ab8a6f67eb9de0de40d478cb0cbec05b1b725c0.tar.gz
podman-4ab8a6f67eb9de0de40d478cb0cbec05b1b725c0.tar.bz2
podman-4ab8a6f67eb9de0de40d478cb0cbec05b1b725c0.zip
Improvements for machine
clean up ci failures and add appropriate arch,os exclusion tags Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/machine/config.go')
-rw-r--r--pkg/machine/config.go37
1 files changed, 11 insertions, 26 deletions
diff --git a/pkg/machine/config.go b/pkg/machine/config.go
index 2a70b8ff7..242401ab4 100644
--- a/pkg/machine/config.go
+++ b/pkg/machine/config.go
@@ -50,7 +50,7 @@ type StartOptions struct{}
type StopOptions struct{}
-type DestroyOptions struct {
+type RemoveOptions struct {
Force bool
SaveKeys bool
SaveImage bool
@@ -59,7 +59,7 @@ type DestroyOptions struct {
type VM interface {
Create(opts CreateOptions) error
- Destroy(name string, opts DestroyOptions) (string, func() error, error)
+ Remove(name string, opts RemoveOptions) (string, func() error, error)
SSH(name string, opts SSHOptions) error
Start(name string, opts StartOptions) error
Stop(name string, opts StopOptions) error
@@ -70,33 +70,18 @@ type DistributionDownload interface {
Get() *Download
}
-// TODO is this even needed?
-type TestVM struct{}
-
-func (vm *TestVM) Create(opts CreateOptions) error {
- return nil
-}
-
-func (vm *TestVM) Start(name string, opts StartOptions) error {
- return nil
-}
-func (vm *TestVM) Stop(name string, opts StopOptions) error {
- return nil
-}
-
func (rc RemoteConnectionType) MakeSSHURL(host, path, port, userName string) url.URL {
userInfo := url.User(userName)
uri := url.URL{
- Scheme: "ssh",
- Opaque: "",
- User: userInfo,
- Host: host,
- Path: path,
- RawPath: "",
- ForceQuery: false,
- RawQuery: "",
- Fragment: "",
- RawFragment: "",
+ Scheme: "ssh",
+ Opaque: "",
+ User: userInfo,
+ Host: host,
+ Path: path,
+ RawPath: "",
+ ForceQuery: false,
+ RawQuery: "",
+ Fragment: "",
}
if len(port) > 0 {
uri.Host = net.JoinHostPort(uri.Hostname(), port)