mirror of
https://github.com/containers/podman.git
synced 2025-11-02 23:39:52 +08:00
Create pkg/machine/ignition package
Moves all of the ignitionfiles out of the `machine` package and into its own called `ignition`. This required `VMType` to get moved out of the `machine` package and into the `define` package in order to prevent a circular dependency. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
This commit is contained in:
@ -8,6 +8,7 @@ import (
|
||||
|
||||
"github.com/containers/common/pkg/config"
|
||||
"github.com/containers/podman/v4/pkg/machine"
|
||||
"github.com/containers/podman/v4/pkg/machine/define"
|
||||
"github.com/containers/podman/v4/pkg/machine/qemu"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
@ -21,14 +22,14 @@ func Get() (machine.VirtProvider, error) {
|
||||
if providerOverride, found := os.LookupEnv("CONTAINERS_MACHINE_PROVIDER"); found {
|
||||
provider = providerOverride
|
||||
}
|
||||
resolvedVMType, err := machine.ParseVMType(provider, machine.QemuVirt)
|
||||
resolvedVMType, err := define.ParseVMType(provider, define.QemuVirt)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
logrus.Debugf("Using Podman machine with `%s` virtualization provider", resolvedVMType.String())
|
||||
switch resolvedVMType {
|
||||
case machine.QemuVirt:
|
||||
case define.QemuVirt:
|
||||
return qemu.VirtualizationProvider(), nil
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported virtualization provider: `%s`", resolvedVMType.String())
|
||||
|
||||
Reference in New Issue
Block a user