Merge pull request #2946 from baude/segs

Fix segfaults attribute to missing options
This commit is contained in:
OpenShift Merge Robot 2019-04-16 06:25:41 -07:00 committed by GitHub
commit 713839cf83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
77 changed files with 106 additions and 10 deletions

View file

@ -17,6 +17,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
attachCommand.InputArgs = args
attachCommand.GlobalFlags = MainGlobalOpts
attachCommand.Remote = remoteclient
return attachCmd(&attachCommand)
},
Example: `podman attach ctrID

View file

@ -39,6 +39,7 @@ var (
buildCommand.FromAndBudResults = &fromAndBudValues
buildCommand.LayerResults = &layerValues
buildCommand.NameSpaceResults = &namespaceValues
buildCommand.Remote = remoteclient
return buildCmd(&buildCommand)
},
Example: `podman build .

View file

@ -23,6 +23,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
checkpointCommand.InputArgs = args
checkpointCommand.GlobalFlags = MainGlobalOpts
checkpointCommand.Remote = remoteclient
return checkpointCmd(&checkpointCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -24,6 +24,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
cleanupCommand.InputArgs = args
cleanupCommand.GlobalFlags = MainGlobalOpts
cleanupCommand.Remote = remoteclient
return cleanupCmd(&cleanupCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -26,7 +26,9 @@ func (p *PodmanCommand) IsSet(opt string) bool {
func (p *PodmanCommand) Bool(opt string) bool {
flag := p.Flags().Lookup(opt)
if flag == nil {
logrus.Errorf("Could not find flag %s", opt)
if !p.Remote {
logrus.Errorf("Could not find flag %s", opt)
}
return false
}
val, err := p.Flags().GetBool(opt)
@ -40,7 +42,9 @@ func (p *PodmanCommand) Bool(opt string) bool {
func (p *PodmanCommand) String(opt string) string {
flag := p.Flags().Lookup(opt)
if flag == nil {
logrus.Errorf("Could not find flag %s", opt)
if !p.Remote {
logrus.Errorf("Could not find flag %s", opt)
}
return ""
}
val, err := p.Flags().GetString(opt)
@ -54,7 +58,9 @@ func (p *PodmanCommand) String(opt string) string {
func (p *PodmanCommand) StringArray(opt string) []string {
flag := p.Flags().Lookup(opt)
if flag == nil {
logrus.Errorf("Could not find flag %s", opt)
if !p.Remote {
logrus.Errorf("Could not find flag %s", opt)
}
return []string{}
}
val, err := p.Flags().GetStringArray(opt)
@ -68,7 +74,9 @@ func (p *PodmanCommand) StringArray(opt string) []string {
func (p *PodmanCommand) StringSlice(opt string) []string {
flag := p.Flags().Lookup(opt)
if flag == nil {
logrus.Errorf("Could not find flag %s", opt)
if !p.Remote {
logrus.Errorf("Could not find flag %s", opt)
}
return []string{}
}
val, err := p.Flags().GetStringSlice(opt)
@ -82,7 +90,9 @@ func (p *PodmanCommand) StringSlice(opt string) []string {
func (p *PodmanCommand) Int(opt string) int {
flag := p.Flags().Lookup(opt)
if flag == nil {
logrus.Errorf("Could not find flag %s", opt)
if !p.Remote {
logrus.Errorf("Could not find flag %s", opt)
}
return 0
}
val, err := p.Flags().GetInt(opt)
@ -96,7 +106,9 @@ func (p *PodmanCommand) Int(opt string) int {
func (p *PodmanCommand) Uint(opt string) uint {
flag := p.Flags().Lookup(opt)
if flag == nil {
logrus.Errorf("Could not find flag %s", opt)
if !p.Remote {
logrus.Errorf("Could not find flag %s", opt)
}
return 0
}
val, err := p.Flags().GetUint(opt)
@ -110,7 +122,9 @@ func (p *PodmanCommand) Uint(opt string) uint {
func (p *PodmanCommand) Int64(opt string) int64 {
flag := p.Flags().Lookup(opt)
if flag == nil {
logrus.Errorf("Could not find flag %s", opt)
if !p.Remote {
logrus.Errorf("Could not find flag %s", opt)
}
return 0
}
val, err := p.Flags().GetInt64(opt)
@ -124,7 +138,9 @@ func (p *PodmanCommand) Int64(opt string) int64 {
func (p *PodmanCommand) Uint64(opt string) uint64 {
flag := p.Flags().Lookup(opt)
if flag == nil {
logrus.Errorf("Could not find flag %s", opt)
if !p.Remote {
logrus.Errorf("Could not find flag %s", opt)
}
return 0
}
val, err := p.Flags().GetUint64(opt)
@ -138,7 +154,9 @@ func (p *PodmanCommand) Uint64(opt string) uint64 {
func (p *PodmanCommand) Float64(opt string) float64 {
flag := p.Flags().Lookup(opt)
if flag == nil {
logrus.Errorf("Could not find flag %s", opt)
if !p.Remote {
logrus.Errorf("Could not find flag %s", opt)
}
return 0
}
val, err := p.Flags().GetFloat64(opt)

View file

@ -8,6 +8,7 @@ type PodmanCommand struct {
*cobra.Command
InputArgs []string
GlobalFlags MainFlags
Remote bool
}
type MainFlags struct {

View file

@ -28,6 +28,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
commitCommand.InputArgs = args
commitCommand.GlobalFlags = MainGlobalOpts
commitCommand.Remote = remoteclient
return commitCmd(&commitCommand)
},
Example: `podman commit -q --message "committing container to image" reverent_golick image-commited

View file

@ -27,6 +27,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
pruneContainersCommand.InputArgs = args
pruneContainersCommand.GlobalFlags = MainGlobalOpts
pruneContainersCommand.Remote = remoteclient
return pruneContainersCmd(&pruneContainersCommand)
},
}

View file

@ -36,6 +36,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
cpCommand.InputArgs = args
cpCommand.GlobalFlags = MainGlobalOpts
cpCommand.Remote = remoteclient
return cpCmd(&cpCommand)
},
Example: "[CONTAINER:]SRC_PATH [CONTAINER:]DEST_PATH",

View file

@ -22,6 +22,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
createCommand.InputArgs = args
createCommand.GlobalFlags = MainGlobalOpts
createCommand.Remote = remoteclient
return createCmd(&createCommand)
},
Example: `podman create alpine ls

View file

@ -43,6 +43,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
diffCommand.InputArgs = args
diffCommand.GlobalFlags = MainGlobalOpts
diffCommand.Remote = remoteclient
return diffCmd(&diffCommand)
},
Example: `podman diff imageID

View file

@ -18,6 +18,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
eventsCommand.InputArgs = args
eventsCommand.GlobalFlags = MainGlobalOpts
eventsCommand.Remote = remoteclient
return eventsCmd(&eventsCommand)
},
Example: `podman events

View file

@ -26,6 +26,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
execCommand.InputArgs = args
execCommand.GlobalFlags = MainGlobalOpts
execCommand.Remote = remoteclient
return execCmd(&execCommand)
},
Example: `podman exec -it ctrID ls

View file

@ -29,6 +29,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
imageExistsCommand.InputArgs = args
imageExistsCommand.GlobalFlags = MainGlobalOpts
imageExistsCommand.Remote = remoteclient
return imageExistsCmd(&imageExistsCommand)
},
Example: `podman image exists imageID
@ -42,6 +43,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
containerExistsCommand.InputArgs = args
containerExistsCommand.GlobalFlags = MainGlobalOpts
containerExistsCommand.Remote = remoteclient
return containerExistsCmd(&containerExistsCommand)
},
@ -56,6 +58,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
podExistsCommand.InputArgs = args
podExistsCommand.GlobalFlags = MainGlobalOpts
podExistsCommand.Remote = remoteclient
return podExistsCmd(&podExistsCommand)
},
Example: `podman pod exists podID

View file

@ -23,6 +23,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
exportCommand.InputArgs = args
exportCommand.GlobalFlags = MainGlobalOpts
exportCommand.Remote = remoteclient
return exportCmd(&exportCommand)
},
Example: `podman export ctrID > myCtr.tar

View file

@ -22,6 +22,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
containerKubeCommand.InputArgs = args
containerKubeCommand.GlobalFlags = MainGlobalOpts
containerKubeCommand.Remote = remoteclient
return generateKubeYAMLCmd(&containerKubeCommand)
},
Example: `podman generate kube ctrID

View file

@ -20,6 +20,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
healthcheckRunCommand.InputArgs = args
healthcheckRunCommand.GlobalFlags = MainGlobalOpts
healthcheckRunCommand.Remote = remoteclient
return healthCheckCmd(&healthcheckRunCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -47,6 +47,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
historyCommand.InputArgs = args
historyCommand.GlobalFlags = MainGlobalOpts
historyCommand.Remote = remoteclient
return historyCmd(&historyCommand)
},
}

View file

@ -96,6 +96,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
imagesCommand.InputArgs = args
imagesCommand.GlobalFlags = MainGlobalOpts
imagesCommand.Remote = remoteclient
return imagesCmd(&imagesCommand)
},
Example: `podman images --format json

View file

@ -22,6 +22,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
pruneImagesCommand.InputArgs = args
pruneImagesCommand.GlobalFlags = MainGlobalOpts
pruneImagesCommand.Remote = remoteclient
return pruneImagesCmd(&pruneImagesCommand)
},
}

View file

@ -24,6 +24,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
importCommand.InputArgs = args
importCommand.GlobalFlags = MainGlobalOpts
importCommand.Remote = remoteclient
return importCmd(&importCommand)
},
Example: `podman import http://example.com/ctr.tar url-image

View file

@ -28,6 +28,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
infoCommand.InputArgs = args
infoCommand.GlobalFlags = MainGlobalOpts
infoCommand.Remote = remoteclient
return infoCmd(&infoCommand)
},
Example: `podman info`,

View file

@ -33,6 +33,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
inspectCommand.InputArgs = args
inspectCommand.GlobalFlags = MainGlobalOpts
inspectCommand.Remote = remoteclient
return inspectCmd(&inspectCommand)
},
Example: `podman inspect alpine

View file

@ -20,6 +20,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
killCommand.InputArgs = args
killCommand.GlobalFlags = MainGlobalOpts
killCommand.Remote = remoteclient
return killCmd(&killCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -27,6 +27,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
loadCommand.InputArgs = args
loadCommand.GlobalFlags = MainGlobalOpts
loadCommand.Remote = remoteclient
return loadCmd(&loadCommand)
},
}

View file

@ -27,6 +27,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
loginCommand.InputArgs = args
loginCommand.GlobalFlags = MainGlobalOpts
loginCommand.Remote = remoteclient
return loginCmd(&loginCommand)
},
Example: `podman login -u testuser -p testpassword localhost:5000

View file

@ -20,6 +20,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
logoutCommand.InputArgs = args
logoutCommand.GlobalFlags = MainGlobalOpts
logoutCommand.Remote = remoteclient
return logoutCmd(&logoutCommand)
},
Example: `podman logout docker.io

View file

@ -24,6 +24,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
logsCommand.InputArgs = args
logsCommand.GlobalFlags = MainGlobalOpts
logsCommand.Remote = remoteclient
return logsCmd(&logsCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -110,6 +110,7 @@ func setupRootless(cmd *cobra.Command, args []string) error {
cmd,
args,
MainGlobalOpts,
remoteclient,
}
runtime, err := libpodruntime.GetRuntime(&podmanCmd)
if err != nil {

View file

@ -31,6 +31,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
mountCommand.InputArgs = args
mountCommand.GlobalFlags = MainGlobalOpts
mountCommand.Remote = remoteclient
return mountCmd(&mountCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -22,6 +22,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
pauseCommand.InputArgs = args
pauseCommand.GlobalFlags = MainGlobalOpts
pauseCommand.Remote = remoteclient
return pauseCmd(&pauseCommand)
},
Example: `podman pause mywebserver

View file

@ -42,6 +42,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
playKubeCommand.InputArgs = args
playKubeCommand.GlobalFlags = MainGlobalOpts
playKubeCommand.Remote = remoteclient
return playKubeYAMLCmd(&playKubeCommand)
},
Example: `podman play kube demo.yml

View file

@ -30,6 +30,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
podCreateCommand.InputArgs = args
podCreateCommand.GlobalFlags = MainGlobalOpts
podCreateCommand.Remote = remoteclient
return podCreateCmd(&podCreateCommand)
},
}

View file

@ -22,6 +22,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
podInspectCommand.InputArgs = args
podInspectCommand.GlobalFlags = MainGlobalOpts
podInspectCommand.Remote = remoteclient
return podInspectCmd(&podInspectCommand)
},
Example: `podman pod inspect podID`,

View file

@ -24,6 +24,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
podKillCommand.InputArgs = args
podKillCommand.GlobalFlags = MainGlobalOpts
podKillCommand.Remote = remoteclient
return podKillCmd(&podKillCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -21,6 +21,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
podPauseCommand.InputArgs = args
podPauseCommand.GlobalFlags = MainGlobalOpts
podPauseCommand.Remote = remoteclient
return podPauseCmd(&podPauseCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -127,6 +127,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
podPsCommand.InputArgs = args
podPsCommand.GlobalFlags = MainGlobalOpts
podPsCommand.Remote = remoteclient
return podPsCmd(&podPsCommand)
},
}

View file

@ -22,6 +22,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
podRestartCommand.InputArgs = args
podRestartCommand.GlobalFlags = MainGlobalOpts
podRestartCommand.Remote = remoteclient
return podRestartCmd(&podRestartCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -22,6 +22,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
podRmCommand.InputArgs = args
podRmCommand.GlobalFlags = MainGlobalOpts
podRmCommand.Remote = remoteclient
return podRmCmd(&podRmCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -22,6 +22,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
podStartCommand.InputArgs = args
podStartCommand.GlobalFlags = MainGlobalOpts
podStartCommand.Remote = remoteclient
return podStartCmd(&podStartCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -29,6 +29,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
podStatsCommand.InputArgs = args
podStatsCommand.GlobalFlags = MainGlobalOpts
podStatsCommand.Remote = remoteclient
return podStatsCmd(&podStatsCommand)
},
Example: `podman stats -a --no-stream

View file

@ -23,6 +23,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
podStopCommand.InputArgs = args
podStopCommand.GlobalFlags = MainGlobalOpts
podStopCommand.Remote = remoteclient
return podStopCmd(&podStopCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -28,6 +28,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
podTopCommand.InputArgs = args
podTopCommand.GlobalFlags = MainGlobalOpts
podTopCommand.Remote = remoteclient
return podTopCmd(&podTopCommand)
},
Example: `podman top ctrID

View file

@ -22,6 +22,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
podUnpauseCommand.InputArgs = args
podUnpauseCommand.GlobalFlags = MainGlobalOpts
podUnpauseCommand.Remote = remoteclient
return podUnpauseCmd(&podUnpauseCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -23,6 +23,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
portCommand.InputArgs = args
portCommand.GlobalFlags = MainGlobalOpts
portCommand.Remote = remoteclient
return portCmd(&portCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -161,6 +161,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
psCommand.InputArgs = args
psCommand.GlobalFlags = MainGlobalOpts
psCommand.Remote = remoteclient
return psCmd(&psCommand)
},
Example: `podman ps -a

View file

@ -32,6 +32,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
pullCommand.InputArgs = args
pullCommand.GlobalFlags = MainGlobalOpts
pullCommand.Remote = remoteclient
return pullCmd(&pullCommand)
},
Example: `podman pull imageName
@ -117,7 +118,7 @@ func pullCmd(c *cliconfig.PullValues) (retError error) {
DockerRegistryCreds: registryCreds,
DockerCertPath: c.CertDir,
}
if c.Flag("tls-verify").Changed {
if c.IsSet("tls-verify") {
dockerRegistryOptions.DockerInsecureSkipTLSVerify = types.NewOptionalBool(!c.TlsVerify)
}

View file

@ -31,6 +31,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
pushCommand.InputArgs = args
pushCommand.GlobalFlags = MainGlobalOpts
pushCommand.Remote = remoteclient
return pushCmd(&pushCommand)
},
Example: `podman push imageID docker://registry.example.com/repository:tag

View file

@ -24,6 +24,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
refreshCommand.InputArgs = args
refreshCommand.GlobalFlags = MainGlobalOpts
refreshCommand.Remote = remoteclient
return refreshCmd(&refreshCommand)
},
}

View file

@ -22,6 +22,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
restartCommand.InputArgs = args
restartCommand.GlobalFlags = MainGlobalOpts
restartCommand.Remote = remoteclient
return restartCmd(&restartCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -23,6 +23,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
restoreCommand.InputArgs = args
restoreCommand.GlobalFlags = MainGlobalOpts
restoreCommand.Remote = remoteclient
return restoreCmd(&restoreCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -22,6 +22,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
rmCommand.InputArgs = args
rmCommand.GlobalFlags = MainGlobalOpts
rmCommand.Remote = remoteclient
return rmCmd(&rmCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -21,6 +21,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
rmiCommand.InputArgs = args
rmiCommand.GlobalFlags = MainGlobalOpts
rmiCommand.Remote = remoteclient
return rmiCmd(&rmiCommand)
},
Example: `podman rmi imageID

View file

@ -19,6 +19,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
runCommand.InputArgs = args
runCommand.GlobalFlags = MainGlobalOpts
runCommand.Remote = remoteclient
return runCmd(&runCommand)
},
Example: `podman run imageID ls -alF /etc

View file

@ -30,6 +30,7 @@ Executes a command as described by a container image label.
RunE: func(cmd *cobra.Command, args []string) error {
runlabelCommand.InputArgs = args
runlabelCommand.GlobalFlags = MainGlobalOpts
runlabelCommand.Remote = remoteclient
return runlabelCmd(&runlabelCommand)
},
Example: `podman container runlabel run imageID

View file

@ -33,6 +33,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
saveCommand.InputArgs = args
saveCommand.GlobalFlags = MainGlobalOpts
saveCommand.Remote = remoteclient
return saveCmd(&saveCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -29,6 +29,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
searchCommand.InputArgs = args
searchCommand.GlobalFlags = MainGlobalOpts
searchCommand.Remote = remoteclient
return searchCmd(&searchCommand)
},
Example: `podman search --filter=is-official --limit 3 alpine

View file

@ -30,6 +30,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
signCommand.InputArgs = args
signCommand.GlobalFlags = MainGlobalOpts
signCommand.Remote = remoteclient
return signCmd(&signCommand)
},
Example: `podman sign --sign-by mykey imageID

View file

@ -25,6 +25,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
startCommand.InputArgs = args
startCommand.GlobalFlags = MainGlobalOpts
startCommand.Remote = remoteclient
return startCmd(&startCommand)
},
Example: `podman start --latest

View file

@ -39,6 +39,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
statsCommand.InputArgs = args
statsCommand.GlobalFlags = MainGlobalOpts
statsCommand.Remote = remoteclient
return statsCmd(&statsCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -21,6 +21,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
stopCommand.InputArgs = args
stopCommand.GlobalFlags = MainGlobalOpts
stopCommand.Remote = remoteclient
return stopCmd(&stopCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -33,6 +33,7 @@ var (
Long: dfSystemDescription,
RunE: func(cmd *cobra.Command, args []string) error {
dfSystemCommand.GlobalFlags = MainGlobalOpts
dfSystemCommand.Remote = remoteclient
return dfSystemCmd(&dfSystemCommand)
},
}

View file

@ -29,6 +29,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
pruneSystemCommand.InputArgs = args
pruneSystemCommand.GlobalFlags = MainGlobalOpts
pruneSystemCommand.Remote = remoteclient
return pruneSystemCmd(&pruneSystemCommand)
},
}

View file

@ -24,6 +24,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
renumberCommand.InputArgs = args
renumberCommand.GlobalFlags = MainGlobalOpts
renumberCommand.Remote = remoteclient
return renumberCmd(&renumberCommand)
},
}

View file

@ -18,6 +18,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
tagCommand.InputArgs = args
tagCommand.GlobalFlags = MainGlobalOpts
tagCommand.Remote = remoteclient
return tagCmd(&tagCommand)
},
Example: `podman tag 0e3bbc2 fedora:latest

View file

@ -39,6 +39,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
topCommand.InputArgs = args
topCommand.GlobalFlags = MainGlobalOpts
topCommand.Remote = remoteclient
return topCmd(&topCommand)
},
Example: `podman top ctrID

View file

@ -29,6 +29,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
treeCommand.InputArgs = args
treeCommand.GlobalFlags = MainGlobalOpts
treeCommand.Remote = remoteclient
return treeCmd(&treeCommand)
},
Example: "podman image tree alpine:latest",

View file

@ -29,6 +29,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
setTrustCommand.InputArgs = args
setTrustCommand.GlobalFlags = MainGlobalOpts
setTrustCommand.Remote = remoteclient
return setTrustCmd(&setTrustCommand)
},
}

View file

@ -24,6 +24,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
umountCommand.InputArgs = args
umountCommand.GlobalFlags = MainGlobalOpts
umountCommand.Remote = remoteclient
return umountCmd(&umountCommand)
},
Args: func(cmd *cobra.Command, args []string) error {

View file

@ -23,6 +23,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
unpauseCommand.InputArgs = args
unpauseCommand.GlobalFlags = MainGlobalOpts
unpauseCommand.Remote = remoteclient
return unpauseCmd(&unpauseCommand)
},
Example: `podman unpause ctrID

View file

@ -23,6 +23,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
versionCommand.InputArgs = args
versionCommand.GlobalFlags = MainGlobalOpts
versionCommand.Remote = remoteclient
return versionCmd(&versionCommand)
},
}

View file

@ -21,6 +21,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
volumeCreateCommand.InputArgs = args
volumeCreateCommand.GlobalFlags = MainGlobalOpts
volumeCreateCommand.Remote = remoteclient
return volumeCreateCmd(&volumeCreateCommand)
},
Example: `podman volume create myvol

View file

@ -19,6 +19,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
volumeInspectCommand.InputArgs = args
volumeInspectCommand.GlobalFlags = MainGlobalOpts
volumeInspectCommand.Remote = remoteclient
return volumeInspectCmd(&volumeInspectCommand)
},
Example: `podman volume inspect myvol

View file

@ -54,6 +54,7 @@ and the output format can be changed to JSON or a user specified Go template.`
RunE: func(cmd *cobra.Command, args []string) error {
volumeLsCommand.InputArgs = args
volumeLsCommand.GlobalFlags = MainGlobalOpts
volumeLsCommand.Remote = remoteclient
return volumeLsCmd(&volumeLsCommand)
},
}

View file

@ -28,6 +28,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
volumePruneCommand.InputArgs = args
volumePruneCommand.GlobalFlags = MainGlobalOpts
volumePruneCommand.Remote = remoteclient
return volumePruneCmd(&volumePruneCommand)
},
}

View file

@ -22,6 +22,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
volumeRmCommand.InputArgs = args
volumeRmCommand.GlobalFlags = MainGlobalOpts
volumeRmCommand.Remote = remoteclient
return volumeRmCmd(&volumeRmCommand)
},
Example: `podman volume rm myvol1 myvol2

View file

@ -21,6 +21,7 @@ var (
RunE: func(cmd *cobra.Command, args []string) error {
waitCommand.InputArgs = args
waitCommand.GlobalFlags = MainGlobalOpts
waitCommand.Remote = remoteclient
return waitCmd(&waitCommand)
},
Example: `podman wait --latest