mirror of
https://github.com/containers/podman.git
synced 2025-06-26 04:46:57 +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:
@ -187,7 +187,7 @@ func composeDockerHost() (string, error) {
|
||||
if info.State != define.Running {
|
||||
return "", fmt.Errorf("machine %s is not running but in state %s", item.Name, info.State)
|
||||
}
|
||||
if machineProvider.VMType() == machine.WSLVirt {
|
||||
if machineProvider.VMType() == define.WSLVirt {
|
||||
if info.ConnectionInfo.PodmanPipe == nil {
|
||||
return "", errors.New("pipe of machine is not set")
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ import (
|
||||
"github.com/containers/podman/v4/cmd/podman/registry"
|
||||
"github.com/containers/podman/v4/libpod/events"
|
||||
"github.com/containers/podman/v4/pkg/machine"
|
||||
"github.com/containers/podman/v4/pkg/machine/define"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@ -141,7 +142,7 @@ func initMachine(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
// The vmtype names need to be reserved and cannot be used for podman machine names
|
||||
if _, err := machine.ParseVMType(initOpts.Name, machine.UnknownVirt); err == nil {
|
||||
if _, err := define.ParseVMType(initOpts.Name, define.UnknownVirt); err == nil {
|
||||
return fmt.Errorf("cannot use %q for a machine name", initOpts.Name)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user