mirror of
https://github.com/containers/podman.git
synced 2025-10-19 20:23:08 +08:00

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>
39 lines
650 B
Go
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
|
|
}
|