diff options
author | Ashley Cui <acui@redhat.com> | 2021-03-04 15:29:12 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2021-03-25 08:41:11 -0500 |
commit | a861f6fd3ebe4fe0b63a1b550e6b99d7525228c0 (patch) | |
tree | 6d39e58da427d09e75ebbb440521d520342a0089 /cmd/podman/machine/config.go | |
parent | af91f27d85f4104267eea493f8588f8c6a2d01e3 (diff) | |
download | podman-a861f6fd3ebe4fe0b63a1b550e6b99d7525228c0.tar.gz podman-a861f6fd3ebe4fe0b63a1b550e6b99d7525228c0.tar.bz2 podman-a861f6fd3ebe4fe0b63a1b550e6b99d7525228c0.zip |
Podman machine CLI and interface stub
Podman machine will be a mac-only command that manages the VM where
containers are run. Currently, only the CLI is written and the interface
function for the VM management is stub for future developement
The podman machine cli is only built on mac builds.
Signed-off-by: Ashley Cui <acui@redhat.com>
Diffstat (limited to 'cmd/podman/machine/config.go')
-rw-r--r-- | cmd/podman/machine/config.go | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/cmd/podman/machine/config.go b/cmd/podman/machine/config.go new file mode 100644 index 000000000..5fa6aa50d --- /dev/null +++ b/cmd/podman/machine/config.go @@ -0,0 +1,38 @@ +package machine + +import "fmt" + +type CreateOptions struct { + CPUS uint64 + Memory uint64 + KernelPath string + Devices []VMDevices +} + +type VMDevices struct { + Path string + ReadOnly bool +} + +type VM interface { + Create(name string, opts CreateOptions) error + Start(name string) error + Stop(name string) error +} + +type TestVM struct { +} + +func (vm *TestVM) Create(name string, opts CreateOptions) error { + fmt.Printf("Created: %s\n", name) + return nil +} + +func (vm *TestVM) Start(name string) error { + fmt.Printf("Started: %s\n", name) + return nil +} +func (vm *TestVM) Stop(name string) error { + fmt.Printf("Stopped: %s\n", name) + return nil +} |