From a861f6fd3ebe4fe0b63a1b550e6b99d7525228c0 Mon Sep 17 00:00:00 2001 From: Ashley Cui Date: Thu, 4 Mar 2021 15:29:12 -0500 Subject: 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 --- cmd/podman/machine/config.go | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 cmd/podman/machine/config.go (limited to 'cmd/podman/machine/config.go') 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 +} -- cgit v1.2.3-54-g00ecf