mirror of
https://github.com/containers/podman.git
synced 2025-06-23 18:59:30 +08:00
Separate remote and local commands
In the previous CLI, we had an accurate depiction of commands available for the remote client and those available for the local client. Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
@ -34,8 +34,6 @@ func init() {
|
|||||||
flags.BoolVar(&attachCommand.SigProxy, "sig-proxy", true, "Proxy received signals to the process (default true)")
|
flags.BoolVar(&attachCommand.SigProxy, "sig-proxy", true, "Proxy received signals to the process (default true)")
|
||||||
|
|
||||||
flags.BoolVarP(&attachCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
flags.BoolVarP(&attachCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
||||||
|
|
||||||
rootCmd.AddCommand(attachCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func attachCmd(c *cliconfig.AttachValues) error {
|
func attachCmd(c *cliconfig.AttachValues) error {
|
||||||
|
@ -58,8 +58,6 @@ func init() {
|
|||||||
|
|
||||||
flags.AddFlagSet(&budFlags)
|
flags.AddFlagSet(&budFlags)
|
||||||
flags.AddFlagSet(&fromAndBugFlags)
|
flags.AddFlagSet(&fromAndBugFlags)
|
||||||
|
|
||||||
rootCmd.AddCommand(buildCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func getDockerfiles(files []string) []string {
|
func getDockerfiles(files []string) []string {
|
||||||
|
@ -6,24 +6,66 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Commands that the local client implements
|
||||||
|
func getMainCommands() []*cobra.Command {
|
||||||
|
rootCommands := []*cobra.Command{
|
||||||
|
_attachCommand,
|
||||||
|
_buildCommand,
|
||||||
|
_commitCommand,
|
||||||
|
_createCommand,
|
||||||
|
_diffCommand,
|
||||||
|
_execCommand,
|
||||||
|
_killCommand,
|
||||||
|
generateCommand.Command,
|
||||||
|
podCommand.Command,
|
||||||
|
_containerKubeCommand,
|
||||||
|
_psCommand,
|
||||||
|
_loadCommand,
|
||||||
|
_loginCommand,
|
||||||
|
_logoutCommand,
|
||||||
|
_logsCommand,
|
||||||
|
_mountCommand,
|
||||||
|
_pauseCommand,
|
||||||
|
_portCommand,
|
||||||
|
_pushCommand,
|
||||||
|
_refreshCommand,
|
||||||
|
_restartCommand,
|
||||||
|
_restoreCommand,
|
||||||
|
_rmCommand,
|
||||||
|
_runCommmand,
|
||||||
|
_saveCommand,
|
||||||
|
_searchCommand,
|
||||||
|
_signCommand,
|
||||||
|
_startCommand,
|
||||||
|
_statsCommand,
|
||||||
|
_stopCommand,
|
||||||
|
_topCommand,
|
||||||
|
_umountCommand,
|
||||||
|
_unpauseCommand,
|
||||||
|
_varlinkCommand,
|
||||||
|
volumeCommand.Command,
|
||||||
|
_waitCommand,
|
||||||
|
}
|
||||||
|
return rootCommands
|
||||||
|
}
|
||||||
|
|
||||||
|
// Commands that the local client implements
|
||||||
func getImageSubCommands() []*cobra.Command {
|
func getImageSubCommands() []*cobra.Command {
|
||||||
return []*cobra.Command{
|
return []*cobra.Command{
|
||||||
_buildCommand,
|
_buildCommand,
|
||||||
_importCommand,
|
|
||||||
_loadCommand,
|
_loadCommand,
|
||||||
_pullCommand,
|
_pushCommand,
|
||||||
_rmiCommand,
|
|
||||||
_saveCommand,
|
_saveCommand,
|
||||||
_signCommand,
|
_signCommand,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Commands that the local client implements
|
||||||
func getContainerSubCommands() []*cobra.Command {
|
func getContainerSubCommands() []*cobra.Command {
|
||||||
return []*cobra.Command{
|
return []*cobra.Command{
|
||||||
_attachCommand,
|
_attachCommand,
|
||||||
_checkpointCommand,
|
_checkpointCommand,
|
||||||
_cleanupCommand,
|
_cleanupCommand,
|
||||||
_containerExistsCommand,
|
|
||||||
_commitCommand,
|
_commitCommand,
|
||||||
_createCommand,
|
_createCommand,
|
||||||
_diffCommand,
|
_diffCommand,
|
||||||
@ -52,6 +94,7 @@ func getContainerSubCommands() []*cobra.Command {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Commands that the local client implements
|
||||||
func getPodSubCommands() []*cobra.Command {
|
func getPodSubCommands() []*cobra.Command {
|
||||||
return []*cobra.Command{
|
return []*cobra.Command{
|
||||||
_podCreateCommand,
|
_podCreateCommand,
|
||||||
@ -70,6 +113,7 @@ func getPodSubCommands() []*cobra.Command {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Commands that the local client implements
|
||||||
func getVolumeSubCommands() []*cobra.Command {
|
func getVolumeSubCommands() []*cobra.Command {
|
||||||
return []*cobra.Command{
|
return []*cobra.Command{
|
||||||
_volumeCreateCommand,
|
_volumeCreateCommand,
|
||||||
@ -80,18 +124,21 @@ func getVolumeSubCommands() []*cobra.Command {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Commands that the local client implements
|
||||||
func getGenerateSubCommands() []*cobra.Command {
|
func getGenerateSubCommands() []*cobra.Command {
|
||||||
return []*cobra.Command{
|
return []*cobra.Command{
|
||||||
_containerKubeCommand,
|
_containerKubeCommand,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Commands that the local client implements
|
||||||
func getPlaySubCommands() []*cobra.Command {
|
func getPlaySubCommands() []*cobra.Command {
|
||||||
return []*cobra.Command{
|
return []*cobra.Command{
|
||||||
_playKubeCommand,
|
_playKubeCommand,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Commands that the local client implements
|
||||||
func getTrustSubCommands() []*cobra.Command {
|
func getTrustSubCommands() []*cobra.Command {
|
||||||
return []*cobra.Command{
|
return []*cobra.Command{
|
||||||
_setTrustCommand,
|
_setTrustCommand,
|
||||||
@ -99,9 +146,9 @@ func getTrustSubCommands() []*cobra.Command {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Commands that the local client implements
|
||||||
func getSystemSubCommands() []*cobra.Command {
|
func getSystemSubCommands() []*cobra.Command {
|
||||||
return []*cobra.Command{
|
return []*cobra.Command{
|
||||||
_infoCommand,
|
|
||||||
_pruneSystemCommand,
|
_pruneSystemCommand,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,43 +6,52 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
//import "github.com/urfave/cli"
|
// commands that only the remoteclient implements
|
||||||
//
|
func getMainCommands() []*cobra.Command {
|
||||||
|
return []*cobra.Command{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// commands that only the remoteclient implements
|
||||||
func getAppCommands() []*cobra.Command {
|
func getAppCommands() []*cobra.Command {
|
||||||
return []*cobra.Command{}
|
return []*cobra.Command{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// commands that only the remoteclient implements
|
||||||
func getImageSubCommands() []*cobra.Command {
|
func getImageSubCommands() []*cobra.Command {
|
||||||
return []*cobra.Command{}
|
return []*cobra.Command{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// commands that only the remoteclient implements
|
||||||
func getContainerSubCommands() []*cobra.Command {
|
func getContainerSubCommands() []*cobra.Command {
|
||||||
return []*cobra.Command{}
|
return []*cobra.Command{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// commands that only the remoteclient implements
|
||||||
func getPodSubCommands() []*cobra.Command {
|
func getPodSubCommands() []*cobra.Command {
|
||||||
return []*cobra.Command{}
|
return []*cobra.Command{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// commands that only the remoteclient implements
|
||||||
func getVolumeSubCommands() []*cobra.Command {
|
func getVolumeSubCommands() []*cobra.Command {
|
||||||
return []*cobra.Command{}
|
return []*cobra.Command{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// commands that only the remoteclient implements
|
||||||
func getGenerateSubCommands() []*cobra.Command {
|
func getGenerateSubCommands() []*cobra.Command {
|
||||||
return []*cobra.Command{}
|
return []*cobra.Command{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// commands that only the remoteclient implements
|
||||||
func getPlaySubCommands() []*cobra.Command {
|
func getPlaySubCommands() []*cobra.Command {
|
||||||
return []*cobra.Command{}
|
return []*cobra.Command{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// commands that only the remoteclient implements
|
||||||
func getTrustSubCommands() []*cobra.Command {
|
func getTrustSubCommands() []*cobra.Command {
|
||||||
return []*cobra.Command{}
|
return []*cobra.Command{}
|
||||||
}
|
}
|
||||||
|
|
||||||
//func getMainAppFlags() []cli.Flag {
|
// commands that only the remoteclient implements
|
||||||
// return []cli.Flag{}
|
|
||||||
//}
|
|
||||||
func getSystemSubCommands() []*cobra.Command {
|
func getSystemSubCommands() []*cobra.Command {
|
||||||
return []*cobra.Command{}
|
return []*cobra.Command{}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,6 @@ func init() {
|
|||||||
flags.BoolVarP(&commitCommand.Pause, "pause", "p", false, "Pause container during commit")
|
flags.BoolVarP(&commitCommand.Pause, "pause", "p", false, "Pause container during commit")
|
||||||
flags.BoolVarP(&commitCommand.Quiet, "quiet", "q", false, "Suppress output")
|
flags.BoolVarP(&commitCommand.Quiet, "quiet", "q", false, "Suppress output")
|
||||||
|
|
||||||
rootCmd.AddCommand(commitCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func commitCmd(c *cliconfig.CommitValues) error {
|
func commitCmd(c *cliconfig.CommitValues) error {
|
||||||
|
@ -15,7 +15,13 @@ var containerCommand = cliconfig.PodmanCommand{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Commands that are universally implemented.
|
||||||
|
var containerCommands = []*cobra.Command{
|
||||||
|
_containerExistsCommand,
|
||||||
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
containerCommand.AddCommand(containerCommands...)
|
||||||
containerCommand.AddCommand(getContainerSubCommands()...)
|
containerCommand.AddCommand(getContainerSubCommands()...)
|
||||||
rootCmd.AddCommand(containerCommand.Command)
|
rootCmd.AddCommand(containerCommand.Command)
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,6 @@ func init() {
|
|||||||
flags := createCommand.Flags()
|
flags := createCommand.Flags()
|
||||||
flags.SetInterspersed(true)
|
flags.SetInterspersed(true)
|
||||||
|
|
||||||
rootCmd.AddCommand(createCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func createCmd(c *cliconfig.CreateValues) error {
|
func createCmd(c *cliconfig.CreateValues) error {
|
||||||
|
@ -59,9 +59,8 @@ func init() {
|
|||||||
|
|
||||||
flags.MarkHidden("archive")
|
flags.MarkHidden("archive")
|
||||||
|
|
||||||
rootCmd.AddCommand(diffCommand.Command)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func formatJSON(output []diffOutputParams) (diffJSONOutput, error) {
|
func formatJSON(output []diffOutputParams) (diffJSONOutput, error) {
|
||||||
jsonStruct := diffJSONOutput{}
|
jsonStruct := diffJSONOutput{}
|
||||||
for _, output := range output {
|
for _, output := range output {
|
||||||
|
@ -46,7 +46,6 @@ func init() {
|
|||||||
|
|
||||||
flags.StringVarP(&execCommand.Workdir, "workdir", "w", "", "Working directory inside the container")
|
flags.StringVarP(&execCommand.Workdir, "workdir", "w", "", "Working directory inside the container")
|
||||||
|
|
||||||
rootCmd.AddCommand(execCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func execCmd(c *cliconfig.ExecValues) error {
|
func execCmd(c *cliconfig.ExecValues) error {
|
||||||
|
@ -33,7 +33,6 @@ func init() {
|
|||||||
exportCommand.Command = _exportCommand
|
exportCommand.Command = _exportCommand
|
||||||
flags := exportCommand.Flags()
|
flags := exportCommand.Flags()
|
||||||
flags.StringVarP(&exportCommand.Output, "output", "o", "/dev/stdout", "Write to a file, default is STDOUT")
|
flags.StringVarP(&exportCommand.Output, "output", "o", "/dev/stdout", "Write to a file, default is STDOUT")
|
||||||
rootCmd.AddCommand(exportCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// exportCmd saves a container to a tarball on disk
|
// exportCmd saves a container to a tarball on disk
|
||||||
|
@ -17,5 +17,4 @@ var generateCommand = cliconfig.PodmanCommand{
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
generateCommand.AddCommand(getGenerateSubCommands()...)
|
generateCommand.AddCommand(getGenerateSubCommands()...)
|
||||||
rootCmd.AddCommand(generateCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
@ -60,9 +60,8 @@ func init() {
|
|||||||
flags.BoolVar(&historyCommand.NoTrunc, "no-trunc", false, "Do not truncate the output")
|
flags.BoolVar(&historyCommand.NoTrunc, "no-trunc", false, "Do not truncate the output")
|
||||||
flags.BoolVarP(&historyCommand.Quiet, "quiet", "q", false, "Display the numeric IDs only")
|
flags.BoolVarP(&historyCommand.Quiet, "quiet", "q", false, "Display the numeric IDs only")
|
||||||
|
|
||||||
rootCmd.AddCommand(historyCommand.Command)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func historyCmd(c *cliconfig.HistoryValues) error {
|
func historyCmd(c *cliconfig.HistoryValues) error {
|
||||||
runtime, err := adapter.GetRuntime(&c.PodmanCommand)
|
runtime, err := adapter.GetRuntime(&c.PodmanCommand)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -20,10 +20,11 @@ var (
|
|||||||
var imageSubCommands = []*cobra.Command{
|
var imageSubCommands = []*cobra.Command{
|
||||||
_historyCommand,
|
_historyCommand,
|
||||||
_imageExistsCommand,
|
_imageExistsCommand,
|
||||||
_inspectCommand,
|
|
||||||
_imagesCommand,
|
_imagesCommand,
|
||||||
|
_importCommand,
|
||||||
|
_inspectCommand,
|
||||||
_pruneImagesCommand,
|
_pruneImagesCommand,
|
||||||
_pushCommand,
|
_pullCommand,
|
||||||
_rmiCommand,
|
_rmiCommand,
|
||||||
_tagCommand,
|
_tagCommand,
|
||||||
}
|
}
|
||||||
@ -31,5 +32,4 @@ var imageSubCommands = []*cobra.Command{
|
|||||||
func init() {
|
func init() {
|
||||||
imageCommand.AddCommand(imageSubCommands...)
|
imageCommand.AddCommand(imageSubCommands...)
|
||||||
imageCommand.AddCommand(getImageSubCommands()...)
|
imageCommand.AddCommand(getImageSubCommands()...)
|
||||||
rootCmd.AddCommand(imageCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
@ -114,8 +114,6 @@ func init() {
|
|||||||
flags.BoolVarP(&imagesCommand.Quiet, "quiet", "q", false, "Display only image IDs")
|
flags.BoolVarP(&imagesCommand.Quiet, "quiet", "q", false, "Display only image IDs")
|
||||||
flags.StringVar(&imagesCommand.Sort, "sort", "created", "Sort by created, id, repository, size, or tag")
|
flags.StringVar(&imagesCommand.Sort, "sort", "created", "Sort by created, id, repository, size, or tag")
|
||||||
|
|
||||||
rootCmd.AddCommand(imagesCommand.Command)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func imagesCmd(c *cliconfig.ImagesValues) error {
|
func imagesCmd(c *cliconfig.ImagesValues) error {
|
||||||
|
@ -36,7 +36,6 @@ func init() {
|
|||||||
flags.StringVarP(&importCommand.Message, "message", "m", "", "Set commit message for imported image")
|
flags.StringVarP(&importCommand.Message, "message", "m", "", "Set commit message for imported image")
|
||||||
flags.BoolVarP(&importCommand.Quiet, "quiet", "q", false, "Suppress output")
|
flags.BoolVarP(&importCommand.Quiet, "quiet", "q", false, "Suppress output")
|
||||||
|
|
||||||
rootCmd.AddCommand(importCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func importCmd(c *cliconfig.ImportValues) error {
|
func importCmd(c *cliconfig.ImportValues) error {
|
||||||
|
@ -37,7 +37,6 @@ func init() {
|
|||||||
flags.BoolVarP(&infoCommand.Debug, "debug", "D", false, "Display additional debug information")
|
flags.BoolVarP(&infoCommand.Debug, "debug", "D", false, "Display additional debug information")
|
||||||
flags.StringVarP(&infoCommand.Format, "format", "f", "", "Change the output format to JSON or a Go template")
|
flags.StringVarP(&infoCommand.Format, "format", "f", "", "Change the output format to JSON or a Go template")
|
||||||
|
|
||||||
rootCmd.AddCommand(infoCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func infoCmd(c *cliconfig.InfoValues) error {
|
func infoCmd(c *cliconfig.InfoValues) error {
|
||||||
|
@ -46,7 +46,6 @@ func init() {
|
|||||||
flags.BoolVarP(&inspectCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of if the type is a container")
|
flags.BoolVarP(&inspectCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of if the type is a container")
|
||||||
flags.BoolVarP(&inspectCommand.Size, "size", "s", false, "Display total file size if the type is container")
|
flags.BoolVarP(&inspectCommand.Size, "size", "s", false, "Display total file size if the type is container")
|
||||||
|
|
||||||
rootCmd.AddCommand(inspectCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func inspectCmd(c *cliconfig.InspectValues) error {
|
func inspectCmd(c *cliconfig.InspectValues) error {
|
||||||
|
@ -40,7 +40,6 @@ func init() {
|
|||||||
flags.StringVarP(&killCommand.Signal, "signal", "s", "KILL", "Signal to send to the container")
|
flags.StringVarP(&killCommand.Signal, "signal", "s", "KILL", "Signal to send to the container")
|
||||||
flags.BoolVarP(&killCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
flags.BoolVarP(&killCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
||||||
|
|
||||||
rootCmd.AddCommand(killCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// killCmd kills one or more containers with a signal
|
// killCmd kills one or more containers with a signal
|
||||||
|
@ -39,7 +39,6 @@ func init() {
|
|||||||
flags.BoolVarP(&loadCommand.Quiet, "quiet", "q", false, "Suppress the output")
|
flags.BoolVarP(&loadCommand.Quiet, "quiet", "q", false, "Suppress the output")
|
||||||
flags.StringVar(&loadCommand.SignaturePolicy, "signature-policy", "", "Pathname of signature policy file (not usually used)")
|
flags.StringVar(&loadCommand.SignaturePolicy, "signature-policy", "", "Pathname of signature policy file (not usually used)")
|
||||||
|
|
||||||
rootCmd.AddCommand(loadCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// loadCmd gets the image/file to be loaded from the command line
|
// loadCmd gets the image/file to be loaded from the command line
|
||||||
|
@ -44,7 +44,6 @@ func init() {
|
|||||||
flags.BoolVar(&loginCommand.TlsVerify, "tls-verify", true, "Require HTTPS and verify certificates when contacting registries (default: true)")
|
flags.BoolVar(&loginCommand.TlsVerify, "tls-verify", true, "Require HTTPS and verify certificates when contacting registries (default: true)")
|
||||||
flags.StringVarP(&loginCommand.Username, "username", "u", "", "Username for registry")
|
flags.StringVarP(&loginCommand.Username, "username", "u", "", "Username for registry")
|
||||||
|
|
||||||
rootCmd.AddCommand(loginCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// loginCmd uses the authentication package to store a user's authenticated credentials
|
// loginCmd uses the authentication package to store a user's authenticated credentials
|
||||||
|
@ -32,7 +32,6 @@ func init() {
|
|||||||
flags.BoolVarP(&logoutCommand.All, "all", "a", false, "Remove the cached credentials for all registries in the auth file")
|
flags.BoolVarP(&logoutCommand.All, "all", "a", false, "Remove the cached credentials for all registries in the auth file")
|
||||||
flags.StringVar(&logoutCommand.Authfile, "authfile", "", "Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json. Use REGISTRY_AUTH_FILE environment variable to override")
|
flags.StringVar(&logoutCommand.Authfile, "authfile", "", "Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json. Use REGISTRY_AUTH_FILE environment variable to override")
|
||||||
|
|
||||||
rootCmd.AddCommand(logoutCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// logoutCmd uses the authentication package to remove the authenticated of a registry
|
// logoutCmd uses the authentication package to remove the authenticated of a registry
|
||||||
|
@ -43,7 +43,6 @@ func init() {
|
|||||||
|
|
||||||
flags.SetInterspersed(false)
|
flags.SetInterspersed(false)
|
||||||
|
|
||||||
rootCmd.AddCommand(logsCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func logsCmd(c *cliconfig.LogsValues) error {
|
func logsCmd(c *cliconfig.LogsValues) error {
|
||||||
|
@ -27,6 +27,24 @@ var (
|
|||||||
exitCode = 125
|
exitCode = 125
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Commands that the remote and local client have
|
||||||
|
// implemented.
|
||||||
|
var mainCommands = []*cobra.Command{
|
||||||
|
_exportCommand,
|
||||||
|
_historyCommand,
|
||||||
|
_imagesCommand,
|
||||||
|
_importCommand,
|
||||||
|
_infoCommand,
|
||||||
|
_inspectCommand,
|
||||||
|
_killCommand,
|
||||||
|
_pullCommand,
|
||||||
|
_rmiCommand,
|
||||||
|
_tagCommand,
|
||||||
|
_versionCommand,
|
||||||
|
imageCommand.Command,
|
||||||
|
systemCommand.Command,
|
||||||
|
}
|
||||||
|
|
||||||
var cmdsNotRequiringRootless = map[*cobra.Command]bool{
|
var cmdsNotRequiringRootless = map[*cobra.Command]bool{
|
||||||
_versionCommand: true,
|
_versionCommand: true,
|
||||||
_createCommand: true,
|
_createCommand: true,
|
||||||
@ -92,6 +110,8 @@ func init() {
|
|||||||
rootCmd.PersistentFlags().BoolVar(&MainGlobalOpts.Syslog, "syslog", false, "Output logging information to syslog as well as the console")
|
rootCmd.PersistentFlags().BoolVar(&MainGlobalOpts.Syslog, "syslog", false, "Output logging information to syslog as well as the console")
|
||||||
|
|
||||||
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.TmpDir, "tmpdir", "", "Path to the tmp directory")
|
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.TmpDir, "tmpdir", "", "Path to the tmp directory")
|
||||||
|
rootCmd.AddCommand(mainCommands...)
|
||||||
|
rootCmd.AddCommand(getMainCommands()...)
|
||||||
|
|
||||||
}
|
}
|
||||||
func initConfig() {
|
func initConfig() {
|
||||||
|
@ -45,7 +45,6 @@ func init() {
|
|||||||
flags.BoolVarP(&mountCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
flags.BoolVarP(&mountCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
||||||
flags.BoolVar(&mountCommand.NoTrunc, "notruncate", false, "Do not truncate output")
|
flags.BoolVar(&mountCommand.NoTrunc, "notruncate", false, "Do not truncate output")
|
||||||
|
|
||||||
rootCmd.AddCommand(mountCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// jsonMountPoint stores info about each container
|
// jsonMountPoint stores info about each container
|
||||||
|
@ -37,7 +37,6 @@ func init() {
|
|||||||
flags := pauseCommand.Flags()
|
flags := pauseCommand.Flags()
|
||||||
flags.BoolVarP(&pauseCommand.All, "all", "a", false, "Pause all running containers")
|
flags.BoolVarP(&pauseCommand.All, "all", "a", false, "Pause all running containers")
|
||||||
|
|
||||||
rootCmd.AddCommand(pauseCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func pauseCmd(c *cliconfig.PauseValues) error {
|
func pauseCmd(c *cliconfig.PauseValues) error {
|
||||||
|
@ -19,5 +19,4 @@ func init() {
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
playCommand.AddCommand(getPlaySubCommands()...)
|
playCommand.AddCommand(getPlaySubCommands()...)
|
||||||
rootCmd.AddCommand(playCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
@ -20,5 +20,4 @@ var podCommand = cliconfig.PodmanCommand{
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
podCommand.AddCommand(getPodSubCommands()...)
|
podCommand.AddCommand(getPodSubCommands()...)
|
||||||
rootCmd.AddCommand(podCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ func init() {
|
|||||||
flags.BoolVarP(&portCommand.All, "all", "a", false, "Display port information for all containers")
|
flags.BoolVarP(&portCommand.All, "all", "a", false, "Display port information for all containers")
|
||||||
flags.BoolVarP(&portCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
flags.BoolVarP(&portCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
||||||
|
|
||||||
rootCmd.AddCommand(portCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func portCmd(c *cliconfig.PortValues) error {
|
func portCmd(c *cliconfig.PortValues) error {
|
||||||
|
@ -187,9 +187,8 @@ func init() {
|
|||||||
flags.StringVar(&psCommand.Sort, "sort", "created", "Sort output by command, created, id, image, names, runningfor, size, or status")
|
flags.StringVar(&psCommand.Sort, "sort", "created", "Sort output by command, created, id, image, names, runningfor, size, or status")
|
||||||
flags.BoolVar(&psCommand.Sync, "sync", false, "Sync container state with OCI runtime")
|
flags.BoolVar(&psCommand.Sync, "sync", false, "Sync container state with OCI runtime")
|
||||||
|
|
||||||
rootCmd.AddCommand(psCommand.Command)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func psCmd(c *cliconfig.PsValues) error {
|
func psCmd(c *cliconfig.PsValues) error {
|
||||||
var (
|
var (
|
||||||
filterFuncs []libpod.ContainerFilter
|
filterFuncs []libpod.ContainerFilter
|
||||||
|
@ -48,7 +48,6 @@ func init() {
|
|||||||
flags.StringVar(&pullCommand.SignaturePolicy, "signature-policy", "", "`Pathname` of signature policy file (not usually used)")
|
flags.StringVar(&pullCommand.SignaturePolicy, "signature-policy", "", "`Pathname` of signature policy file (not usually used)")
|
||||||
flags.BoolVar(&pullCommand.TlsVerify, "tls-verify", true, "Require HTTPS and verify certificates when contacting registries (default: true)")
|
flags.BoolVar(&pullCommand.TlsVerify, "tls-verify", true, "Require HTTPS and verify certificates when contacting registries (default: true)")
|
||||||
|
|
||||||
rootCmd.AddCommand(pullCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// pullCmd gets the data from the command line and calls pullImage
|
// pullCmd gets the data from the command line and calls pullImage
|
||||||
|
@ -52,7 +52,6 @@ func init() {
|
|||||||
flags.StringVar(&pushCommand.SignaturePolicy, "signature-policy", "", "`Pathname` of signature policy file (not usually used)")
|
flags.StringVar(&pushCommand.SignaturePolicy, "signature-policy", "", "`Pathname` of signature policy file (not usually used)")
|
||||||
flags.StringVar(&pushCommand.SignBy, "sign-by", "", "Add a signature at the destination using the specified key")
|
flags.StringVar(&pushCommand.SignBy, "sign-by", "", "Add a signature at the destination using the specified key")
|
||||||
flags.BoolVar(&pushCommand.TlsVerify, "tls-verify", true, "Require HTTPS and verify certificates when contacting registries (default: true)")
|
flags.BoolVar(&pushCommand.TlsVerify, "tls-verify", true, "Require HTTPS and verify certificates when contacting registries (default: true)")
|
||||||
rootCmd.AddCommand(pushCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func pushCmd(c *cliconfig.PushValues) error {
|
func pushCmd(c *cliconfig.PushValues) error {
|
||||||
|
@ -27,7 +27,6 @@ var (
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
refreshCommand.Command = _refreshCommand
|
refreshCommand.Command = _refreshCommand
|
||||||
rootCmd.AddCommand(refreshCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func refreshCmd(c *cliconfig.RefreshValues) error {
|
func refreshCmd(c *cliconfig.RefreshValues) error {
|
||||||
|
@ -39,7 +39,6 @@ func init() {
|
|||||||
flags.UintVarP(&restartCommand.Timeout, "timeout", "t", libpod.CtrRemoveTimeout, "Seconds to wait for stop before killing the container")
|
flags.UintVarP(&restartCommand.Timeout, "timeout", "t", libpod.CtrRemoveTimeout, "Seconds to wait for stop before killing the container")
|
||||||
flags.UintVar(&restartCommand.Timeout, "time", libpod.CtrRemoveTimeout, "Seconds to wait for stop before killing the container")
|
flags.UintVar(&restartCommand.Timeout, "time", libpod.CtrRemoveTimeout, "Seconds to wait for stop before killing the container")
|
||||||
|
|
||||||
rootCmd.AddCommand(restartCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func restartCmd(c *cliconfig.RestartValues) error {
|
func restartCmd(c *cliconfig.RestartValues) error {
|
||||||
|
@ -42,7 +42,6 @@ func init() {
|
|||||||
// TODO: add ContainerStateCheckpointed
|
// TODO: add ContainerStateCheckpointed
|
||||||
flags.BoolVar(&restoreCommand.TcpEstablished, "tcp-established", false, "Checkpoint a container with established TCP connections")
|
flags.BoolVar(&restoreCommand.TcpEstablished, "tcp-established", false, "Checkpoint a container with established TCP connections")
|
||||||
|
|
||||||
rootCmd.AddCommand(restoreCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func restoreCmd(c *cliconfig.RestoreValues) error {
|
func restoreCmd(c *cliconfig.RestoreValues) error {
|
||||||
|
@ -39,7 +39,6 @@ func init() {
|
|||||||
flags.BoolVarP(&rmCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
flags.BoolVarP(&rmCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
||||||
flags.BoolVarP(&rmCommand.Volumes, "volumes", "v", false, "Remove the volumes associated with the container (Not implemented yet)")
|
flags.BoolVarP(&rmCommand.Volumes, "volumes", "v", false, "Remove the volumes associated with the container (Not implemented yet)")
|
||||||
|
|
||||||
rootCmd.AddCommand(rmCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// saveCmd saves the image to either docker-archive or oci
|
// saveCmd saves the image to either docker-archive or oci
|
||||||
|
@ -32,8 +32,6 @@ func init() {
|
|||||||
flags := rmiCommand.Flags()
|
flags := rmiCommand.Flags()
|
||||||
flags.BoolVarP(&rmiCommand.All, "all", "a", false, "Remove all images")
|
flags.BoolVarP(&rmiCommand.All, "all", "a", false, "Remove all images")
|
||||||
flags.BoolVarP(&rmiCommand.Force, "force", "f", false, "Force Removal of the image")
|
flags.BoolVarP(&rmiCommand.Force, "force", "f", false, "Force Removal of the image")
|
||||||
|
|
||||||
rootCmd.AddCommand(rmiCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func rmiCmd(c *cliconfig.RmiValues) error {
|
func rmiCmd(c *cliconfig.RmiValues) error {
|
||||||
|
@ -40,8 +40,6 @@ func init() {
|
|||||||
flags.SetInterspersed(false)
|
flags.SetInterspersed(false)
|
||||||
flags.Bool("sig-proxy", true, "Proxy received signals to the process (default true)")
|
flags.Bool("sig-proxy", true, "Proxy received signals to the process (default true)")
|
||||||
getCreateFlags(&runCommmand.PodmanCommand)
|
getCreateFlags(&runCommmand.PodmanCommand)
|
||||||
|
|
||||||
rootCmd.AddCommand(runCommmand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func runCmd(c *cliconfig.RunValues) error {
|
func runCmd(c *cliconfig.RunValues) error {
|
||||||
|
@ -52,8 +52,6 @@ func init() {
|
|||||||
flags.StringVar(&saveCommand.Format, "format", "", "Save image to oci-archive, oci-dir (directory with oci manifest type), docker-dir (directory with v2s2 manifest type)")
|
flags.StringVar(&saveCommand.Format, "format", "", "Save image to oci-archive, oci-dir (directory with oci manifest type), docker-dir (directory with v2s2 manifest type)")
|
||||||
flags.StringVarP(&saveCommand.Output, "output", "o", "/dev/stdout", "Write to a file, default is STDOUT")
|
flags.StringVarP(&saveCommand.Output, "output", "o", "/dev/stdout", "Write to a file, default is STDOUT")
|
||||||
flags.BoolVarP(&saveCommand.Quiet, "quiet", "q", false, "Suppress the output")
|
flags.BoolVarP(&saveCommand.Quiet, "quiet", "q", false, "Suppress the output")
|
||||||
|
|
||||||
rootCmd.AddCommand(saveCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// saveCmd saves the image to either docker-archive or oci
|
// saveCmd saves the image to either docker-archive or oci
|
||||||
|
@ -50,8 +50,6 @@ func init() {
|
|||||||
flags.IntVar(&searchCommand.Limit, "limit", 0, "Limit the number of results")
|
flags.IntVar(&searchCommand.Limit, "limit", 0, "Limit the number of results")
|
||||||
flags.BoolVar(&searchCommand.NoTrunc, "no-trunc", false, "Do not truncate the output")
|
flags.BoolVar(&searchCommand.NoTrunc, "no-trunc", false, "Do not truncate the output")
|
||||||
flags.BoolVar(&searchCommand.TlsVerify, "tls-verify", true, "Require HTTPS and verify certificates when contacting registries (default: true)")
|
flags.BoolVar(&searchCommand.TlsVerify, "tls-verify", true, "Require HTTPS and verify certificates when contacting registries (default: true)")
|
||||||
|
|
||||||
rootCmd.AddCommand(searchCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type searchParams struct {
|
type searchParams struct {
|
||||||
|
@ -42,8 +42,6 @@ func init() {
|
|||||||
flags.StringVarP(&signCommand.Directory, "directory", "d", "", "Define an alternate directory to store signatures")
|
flags.StringVarP(&signCommand.Directory, "directory", "d", "", "Define an alternate directory to store signatures")
|
||||||
flags.StringVar(&signCommand.SignBy, "sign-by", "", "Name of the signing key")
|
flags.StringVar(&signCommand.SignBy, "sign-by", "", "Name of the signing key")
|
||||||
|
|
||||||
rootCmd.AddCommand(signCommand.Command)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SignatureStoreDir defines default directory to store signatures
|
// SignatureStoreDir defines default directory to store signatures
|
||||||
|
@ -42,8 +42,6 @@ func init() {
|
|||||||
flags.BoolVarP(&startCommand.Interactive, "interactive", "i", false, "Keep STDIN open even if not attached")
|
flags.BoolVarP(&startCommand.Interactive, "interactive", "i", false, "Keep STDIN open even if not attached")
|
||||||
flags.BoolVarP(&startCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
flags.BoolVarP(&startCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
||||||
flags.BoolVar(&startCommand.SigProxy, "sig-proxy", true, "Proxy received signals to the process (default true if attaching, false otherwise)")
|
flags.BoolVar(&startCommand.SigProxy, "sig-proxy", true, "Proxy received signals to the process (default true if attaching, false otherwise)")
|
||||||
|
|
||||||
rootCmd.AddCommand(startCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func startCmd(c *cliconfig.StartValues) error {
|
func startCmd(c *cliconfig.StartValues) error {
|
||||||
|
@ -53,8 +53,6 @@ func init() {
|
|||||||
flags.BoolVarP(&statsCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
flags.BoolVarP(&statsCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
||||||
flags.BoolVar(&statsCommand.NoReset, "no-reset", false, "Disable resetting the screen between intervals")
|
flags.BoolVar(&statsCommand.NoReset, "no-reset", false, "Disable resetting the screen between intervals")
|
||||||
flags.BoolVar(&statsCommand.NoStream, "no-stream", false, "Disable streaming stats and only pull the first result, default setting is false")
|
flags.BoolVar(&statsCommand.NoStream, "no-stream", false, "Disable streaming stats and only pull the first result, default setting is false")
|
||||||
|
|
||||||
rootCmd.AddCommand(statsCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func statsCmd(c *cliconfig.StatsValues) error {
|
func statsCmd(c *cliconfig.StatsValues) error {
|
||||||
|
@ -42,8 +42,6 @@ func init() {
|
|||||||
flags.BoolVarP(&stopCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
flags.BoolVarP(&stopCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
||||||
flags.UintVar(&stopCommand.Timeout, "time", libpod.CtrRemoveTimeout, "Seconds to wait for stop before killing the container")
|
flags.UintVar(&stopCommand.Timeout, "time", libpod.CtrRemoveTimeout, "Seconds to wait for stop before killing the container")
|
||||||
flags.UintVarP(&stopCommand.Timeout, "timeout", "t", libpod.CtrRemoveTimeout, "Seconds to wait for stop before killing the container")
|
flags.UintVarP(&stopCommand.Timeout, "timeout", "t", libpod.CtrRemoveTimeout, "Seconds to wait for stop before killing the container")
|
||||||
|
|
||||||
rootCmd.AddCommand(stopCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func stopCmd(c *cliconfig.StopValues) error {
|
func stopCmd(c *cliconfig.StopValues) error {
|
||||||
|
@ -17,7 +17,11 @@ var (
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
var systemCommands = []*cobra.Command{
|
||||||
systemCommand.AddCommand(getSystemSubCommands()...)
|
_infoCommand,
|
||||||
rootCmd.AddCommand(systemCommand.Command)
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
systemCommand.AddCommand(systemCommands...)
|
||||||
|
systemCommand.AddCommand(getSystemSubCommands()...)
|
||||||
}
|
}
|
||||||
|
@ -26,8 +26,6 @@ var (
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
tagCommand.Command = _tagCommand
|
tagCommand.Command = _tagCommand
|
||||||
rootCmd.AddCommand(tagCommand.Command)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func tagCmd(c *cliconfig.TagValues) error {
|
func tagCmd(c *cliconfig.TagValues) error {
|
||||||
|
@ -52,8 +52,6 @@ func init() {
|
|||||||
flags.BoolVar(&topCommand.ListDescriptors, "list-descriptors", false, "")
|
flags.BoolVar(&topCommand.ListDescriptors, "list-descriptors", false, "")
|
||||||
flags.MarkHidden("list-descriptors")
|
flags.MarkHidden("list-descriptors")
|
||||||
flags.BoolVarP(&topCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
flags.BoolVarP(&topCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
||||||
|
|
||||||
rootCmd.AddCommand(topCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func topCmd(c *cliconfig.TopValues) error {
|
func topCmd(c *cliconfig.TopValues) error {
|
||||||
|
@ -41,8 +41,6 @@ func init() {
|
|||||||
flags.BoolVarP(&umountCommand.All, "all", "a", false, "Umount all of the currently mounted containers")
|
flags.BoolVarP(&umountCommand.All, "all", "a", false, "Umount all of the currently mounted containers")
|
||||||
flags.BoolVarP(&umountCommand.Force, "force", "f", false, "Force the complete umount all of the currently mounted containers")
|
flags.BoolVarP(&umountCommand.Force, "force", "f", false, "Force the complete umount all of the currently mounted containers")
|
||||||
flags.BoolVarP(&umountCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
flags.BoolVarP(&umountCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
||||||
|
|
||||||
rootCmd.AddCommand(umountCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func umountCmd(c *cliconfig.UmountValues) error {
|
func umountCmd(c *cliconfig.UmountValues) error {
|
||||||
|
@ -37,8 +37,6 @@ func init() {
|
|||||||
unpauseCommand.Command = _unpauseCommand
|
unpauseCommand.Command = _unpauseCommand
|
||||||
flags := unpauseCommand.Flags()
|
flags := unpauseCommand.Flags()
|
||||||
flags.BoolVarP(&unpauseCommand.All, "all", "a", false, "Unpause all paused containers")
|
flags.BoolVarP(&unpauseCommand.All, "all", "a", false, "Unpause all paused containers")
|
||||||
|
|
||||||
rootCmd.AddCommand(unpauseCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func unpauseCmd(c *cliconfig.UnpauseValues) error {
|
func unpauseCmd(c *cliconfig.UnpauseValues) error {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// +build varlink
|
// +build varlink,!remoteclient
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@ -40,8 +40,6 @@ func init() {
|
|||||||
varlinkCommand.Command = _varlinkCommand
|
varlinkCommand.Command = _varlinkCommand
|
||||||
flags := varlinkCommand.Flags()
|
flags := varlinkCommand.Flags()
|
||||||
flags.Int64VarP(&varlinkCommand.Timeout, "timeout", "t", 1000, "Time until the varlink session expires in milliseconds. Use 0 to disable the timeout")
|
flags.Int64VarP(&varlinkCommand.Timeout, "timeout", "t", 1000, "Time until the varlink session expires in milliseconds. Use 0 to disable the timeout")
|
||||||
|
|
||||||
rootCmd.AddCommand(varlinkCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func varlinkCmd(c *cliconfig.VarlinkValues) error {
|
func varlinkCmd(c *cliconfig.VarlinkValues) error {
|
||||||
|
@ -30,7 +30,6 @@ func init() {
|
|||||||
versionCommand.Command = _versionCommand
|
versionCommand.Command = _versionCommand
|
||||||
flags := versionCommand.Flags()
|
flags := versionCommand.Flags()
|
||||||
flags.StringVarP(&versionCommand.Format, "format", "f", "", "Change the output format to JSON or a Go template")
|
flags.StringVarP(&versionCommand.Format, "format", "f", "", "Change the output format to JSON or a Go template")
|
||||||
rootCmd.AddCommand(versionCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// versionCmd gets and prints version info for version command
|
// versionCmd gets and prints version info for version command
|
||||||
|
@ -19,5 +19,4 @@ var volumeCommand = cliconfig.PodmanCommand{
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
volumeCommand.AddCommand(getVolumeSubCommands()...)
|
volumeCommand.AddCommand(getVolumeSubCommands()...)
|
||||||
rootCmd.AddCommand(volumeCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
@ -37,8 +37,6 @@ func init() {
|
|||||||
flags := waitCommand.Flags()
|
flags := waitCommand.Flags()
|
||||||
flags.UintVarP(&waitCommand.Interval, "interval", "i", 250, "Milliseconds to wait before polling for completion")
|
flags.UintVarP(&waitCommand.Interval, "interval", "i", 250, "Milliseconds to wait before polling for completion")
|
||||||
flags.BoolVarP(&waitCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
flags.BoolVarP(&waitCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
||||||
|
|
||||||
rootCmd.AddCommand(waitCommand.Command)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func waitCmd(c *cliconfig.WaitValues) error {
|
func waitCmd(c *cliconfig.WaitValues) error {
|
||||||
|
Reference in New Issue
Block a user