summaryrefslogtreecommitdiff
path: root/pkg/machine/applehv/machine.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-08-09 19:31:17 +0000
committerGitHub <noreply@github.com>2022-08-09 19:31:17 +0000
commit72679400b0cd7d059f20b2b84ee8b42306ce607a (patch)
treeea0e58b95051c1bcdb1e873431981441e56a3c91 /pkg/machine/applehv/machine.go
parent6d887bdc0188f08cd9b76c4a3d0531b1ab4a85b8 (diff)
parent1045647a4ad24b248be1038d5b89cfc4923213f9 (diff)
downloadpodman-72679400b0cd7d059f20b2b84ee8b42306ce607a.tar.gz
podman-72679400b0cd7d059f20b2b84ee8b42306ce607a.tar.bz2
podman-72679400b0cd7d059f20b2b84ee8b42306ce607a.zip
Merge pull request #15199 from baude/addapplehv
Add interface for apple hypervisor
Diffstat (limited to 'pkg/machine/applehv/machine.go')
-rw-r--r--pkg/machine/applehv/machine.go70
1 files changed, 70 insertions, 0 deletions
diff --git a/pkg/machine/applehv/machine.go b/pkg/machine/applehv/machine.go
new file mode 100644
index 000000000..35a8e9851
--- /dev/null
+++ b/pkg/machine/applehv/machine.go
@@ -0,0 +1,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
+}