summaryrefslogtreecommitdiff
path: root/cmd/podman/images/diff.go
Commit message (Collapse)AuthorAge
* podman diff accept two images or containersPaul Holzinger2021-07-02
| | | | | | | | | | | | | | | | | | | First, make podman diff accept optionally a second argument. This allows the user to specify a second image/container to compare the first with. If it is not set the parent layer will be used as before. Second, podman container diff should only use containers and podman image diff should only use images. Previously, podman container diff would use the image when both an image and container with this name exists. To make this work two new parameters have been added to the api. If they are not used the previous behaviour is used. The same applies to the bindings. Fixes #10649 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* [Techinal Debt] Cleanup ABI vs. Tunnel CLI commandsJhon Honce2021-05-27
| | | | | | | | | | | | | | | | | | [NO TESTS NEEDED] This commit cleans up two issues: * Most commands support all EngineModes so default to that. Let outlayers declare their intent. * Use cobra.Annotations to set supported EngineMode. This simplies instantiating commands as there is now one method to communicate a commands requirements rather than two. * Combined aliased commands into one file * Fixed aliased commands where Args field did not match * Updated examples in README.md for writing commands * Remove redundant flag DisableFlagsInUseLine in cobra.Command initialization. Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Add go template shell completion for --formatPaul Holzinger2021-04-22
| | | | | | | | | | | | | | | | | | | The --format flags accepts go template strings. I use this often but I consistently forget the field names. This commit adds a way to provide shell completion for the --format flag. It works by automatically receiving the field names with the reflect package from the given struct. This requires almost no maintenance since this ensures that we always use the correct field names. This also works for nested structs. ``` $ podman ps --format "{{.P" {{.Pid}} {{.PIDNS}} {{.Pod}} {{.PodName}} {{.Ports}} ``` NOTE: This only works when you use quotes otherwise the shell does not provide completions. Also this does not work for fish at the moment. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* bump go module to v3Valentin Rothberg2021-02-22
| | | | | | | | | We missed bumping the go module, so let's do it now :) * Automated go code with github.com/sirkon/go-imports-rename * Manually via `vgrep podman/v2` the rest Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Add shell completion with cobraPaul Holzinger2020-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow automatic generation for shell completion scripts with the internal cobra functions (requires v1.0.0+). This should replace the handwritten completion scripts and even adds support for fish. With this approach it is less likley that completions and code are out of sync. We can now create the scripts with - podman completion bash - podman completion zsh - podman completion fish To test the completion run: source <(podman completion bash) The same works for podman-remote and podman --remote and it will complete your remote containers/images with the correct endpoints values from --url/--connection. The completion logic is written in go and provided by the cobra library. The completion functions lives in `cmd/podman/completion/completion.go`. The unit test at cmd/podman/shell_completion_test.go checks if each command and flag has an autocompletion function set. This prevents that commands and flags have no shell completion set. This commit does not replace the current autocompletion scripts. Closes #6440 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* Merge pull request #8077 from jwhonce/wip/reportOpenShift Merge Robot2020-10-21
|\ | | | | Refactor podman to use c/common/pkg/report
| * Refactor podman to use c/common/pkg/reportJhon Honce2020-10-21
| | | | | | | | | | | | | | All formatting for containers stack moved into one package The does not correct issue with headers when using custom tables Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Switch use of Flags to OptionsDaniel J Walsh2020-10-21
|/ | | | | | | | Want to have man pages match commands, since we have lots of printed man pages with using Options, we will change the command line to use Options in --help. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* --format updates for images/diff.goParker Van Roy2020-10-08
| | | | Signed-off-by: Parker Van Roy <pvanroy@redhat.com>
* Switch all references to github.com/containers/libpod -> podmanDaniel J Walsh2020-07-28
| | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* move go module to v2Valentin Rothberg2020-07-06
| | | | | | | | | | | | | | | With the advent of Podman 2.0.0 we crossed the magical barrier of go modules. While we were able to continue importing all packages inside of the project, the project could not be vendored anymore from the outside. Move the go module to new major version and change all imports to `github.com/containers/libpod/v2`. The renaming of the imports was done via `gomove` [1]. [1] https://github.com/KSubedi/gomove Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Fixes --remote flag issuesJhon Honce2020-06-26
| | | | | | | | | | | | | | | * --remote, --url and --identity are now anchored to podman command. Subcommands should no longer have issues * TraverseChildren now set to V1 expectations * Latest flag now has helper function. Now has consistent usage. * IsRemote() uses cobra parser to determin if --remote is given * Moved validation functions from parser pkg to validate pkg * Fixes #6598 Fixes #6704 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Fix errors found when comparing podman v1 --help versus V2Daniel J Walsh2020-05-04
| | | | | | | | Mainly add missing commands to podman image, podman containers, podman system Also fix some informations messages and descriptions. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* V2 Fix --latest for podman diff commandsJhon Honce2020-04-20
| | | | | | | | * --latest now forces container diff * diff options now passed into domain layer * updated help/usage messages Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Podman V2 birthBrent Baude2020-04-16
remote podman v1 and replace with podman v2. Signed-off-by: Brent Baude <bbaude@redhat.com>