aboutsummaryrefslogtreecommitdiff
path: root/pkg/machine/applehv/machine.go
blob: 35a8e98514d89e5f8e29f7f3af1bf70649b00d39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//go:build arm64 && !windows && !linux
// +build darwin

package applehv

import (
	"time"

	"github.com/containers/podman/v4/pkg/machine"
)

type Provider struct{}

var (
	hvProvider = &Provider{}
	// vmtype refers to qemu (vs libvirt, krun, etc).
	vmtype = "apple"
)

func GetVirtualizationProvider() machine.Provider {
	return hvProvider
}

const (
	// Some of this will need to change when we are closer to having
	// working code.
	VolumeTypeVirtfs     = "virtfs"
	MountType9p          = "9p"
	dockerSock           = "/var/run/docker.sock"
	dockerConnectTimeout = 5 * time.Second
	apiUpTimeout         = 20 * time.Second
)

type apiForwardingState int

const (
	noForwarding apiForwardingState = iota
	claimUnsupported
	notInstalled
	machineLocal
	dockerGlobal
)

func (p *Provider) NewMachine(opts machine.InitOptions) (machine.VM, error) {
	return nil, machine.ErrNotImplemented
}

func (p *Provider) LoadVMByName(name string) (machine.VM, error) {
	return nil, machine.ErrNotImplemented
}

func (p *Provider) List(opts machine.ListOptions) ([]*machine.ListResponse, error) {
	return nil, machine.ErrNotImplemented
}

func (p *Provider) IsValidVMName(name string) (bool, error) {
	return false, machine.ErrNotImplemented
}

func (p *Provider) CheckExclusiveActiveVM() (bool, string, error) {
	return false, "", machine.ErrNotImplemented
}

func (p *Provider) RemoveAndCleanMachines() error {
	return machine.ErrNotImplemented
}

func (p *Provider) VMType() string {
	return vmtype
}