Files
podman/cmd/podman/machine/config.go
Ashley Cui e899f32b5f 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>
2021-03-10 10:01:33 -05:00

39 lines
650 B
Go

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
}