mirror of https://github.com/containers/podman.git
				
				
				
			Merge pull request #21412 from umohnani8/farm-engine
Don't require engine connection for farm
This commit is contained in:
		
						commit
						7ed4478c08
					
				| 
						 | 
				
			
			@ -6,6 +6,7 @@ import (
 | 
			
		|||
	"github.com/containers/common/pkg/completion"
 | 
			
		||||
	"github.com/containers/common/pkg/config"
 | 
			
		||||
	"github.com/containers/podman/v4/cmd/podman/registry"
 | 
			
		||||
	"github.com/containers/podman/v4/cmd/podman/validate"
 | 
			
		||||
	"github.com/spf13/cobra"
 | 
			
		||||
	"golang.org/x/exp/slices"
 | 
			
		||||
)
 | 
			
		||||
| 
						 | 
				
			
			@ -20,7 +21,9 @@ var (
 | 
			
		|||
		Args:               cobra.MinimumNArgs(1),
 | 
			
		||||
		Short:              "Create a new farm",
 | 
			
		||||
		Long:               farmCreateDescription,
 | 
			
		||||
		PersistentPreRunE:  validate.NoOp,
 | 
			
		||||
		RunE:               create,
 | 
			
		||||
		PersistentPostRunE: validate.NoOp,
 | 
			
		||||
		ValidArgsFunction:  completion.AutocompleteNone,
 | 
			
		||||
		Example: `podman farm create myfarm connection1
 | 
			
		||||
  podman farm create myfarm`,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -25,7 +25,9 @@ and the output format can be changed to JSON or a user specified Go template.`
 | 
			
		|||
		Args:               validate.NoArgs,
 | 
			
		||||
		Short:              "List all existing farms",
 | 
			
		||||
		Long:               farmLsDescription,
 | 
			
		||||
		PersistentPreRunE:  validate.NoOp,
 | 
			
		||||
		RunE:               list,
 | 
			
		||||
		PersistentPostRunE: validate.NoOp,
 | 
			
		||||
		ValidArgsFunction:  completion.AutocompleteNone,
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,6 +7,7 @@ import (
 | 
			
		|||
	"github.com/containers/common/pkg/config"
 | 
			
		||||
	"github.com/containers/podman/v4/cmd/podman/common"
 | 
			
		||||
	"github.com/containers/podman/v4/cmd/podman/registry"
 | 
			
		||||
	"github.com/containers/podman/v4/cmd/podman/validate"
 | 
			
		||||
	"github.com/sirupsen/logrus"
 | 
			
		||||
	"github.com/spf13/cobra"
 | 
			
		||||
)
 | 
			
		||||
| 
						 | 
				
			
			@ -18,7 +19,9 @@ var (
 | 
			
		|||
		Aliases:            []string{"rm"},
 | 
			
		||||
		Short:              "Remove one or more farms",
 | 
			
		||||
		Long:               farmRmDescription,
 | 
			
		||||
		PersistentPreRunE:  validate.NoOp,
 | 
			
		||||
		RunE:               rm,
 | 
			
		||||
		PersistentPostRunE: validate.NoOp,
 | 
			
		||||
		ValidArgsFunction:  common.AutoCompleteFarms,
 | 
			
		||||
		Example: `podman farm rm myfarm1 myfarm2
 | 
			
		||||
  podman farm rm --all`,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,6 +8,7 @@ import (
 | 
			
		|||
	"github.com/containers/common/pkg/config"
 | 
			
		||||
	"github.com/containers/podman/v4/cmd/podman/common"
 | 
			
		||||
	"github.com/containers/podman/v4/cmd/podman/registry"
 | 
			
		||||
	"github.com/containers/podman/v4/cmd/podman/validate"
 | 
			
		||||
	"github.com/spf13/cobra"
 | 
			
		||||
	"golang.org/x/exp/slices"
 | 
			
		||||
)
 | 
			
		||||
| 
						 | 
				
			
			@ -18,7 +19,9 @@ var (
 | 
			
		|||
		Use:                "update [options] FARM",
 | 
			
		||||
		Short:              "Update an existing farm",
 | 
			
		||||
		Long:               farmUpdateDescription,
 | 
			
		||||
		PersistentPreRunE:  validate.NoOp,
 | 
			
		||||
		RunE:               farmUpdate,
 | 
			
		||||
		PersistentPostRunE: validate.NoOp,
 | 
			
		||||
		Args:               cobra.ExactArgs(1),
 | 
			
		||||
		ValidArgsFunction:  common.AutoCompleteFarms,
 | 
			
		||||
		Example: `podman farm update --add con1 farm1
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue