spiegel_podman/pkg/api/handlers/libpod
Daniel J Walsh b765c91580
Add --replace option to podman artifact add command
This commit implements the --replace functionality for the artifact add command,
allowing users to replace existing artifacts without having to manually remove
them first.

Changes made:
- Add Replace field to ArtifactAddOptions entity types
- Add --replace CLI flag with validation to prevent conflicts with --append
- Implement replace logic in ABI backend to remove existing artifacts before adding
- Update API handlers and tunnel implementation for podman-remote support
- Add comprehensive documentation and examples to man page
- Add e2e and system BATS tests for --replace functionality
- Fix code formatting in pkg/bindings/artifacts/types_pull_options.go:
  * Reorder imports with proper spacing
  * Fix function declaration spacing
  * Convert spaces to proper tab indentation
  * Remove extraneous blank lines

The --replace option follows the same pattern as other podman replace options
like 'podman container create --replace' and 'podman pod create --replace'.
It gracefully handles cases where no existing artifact exists (no error thrown).

Usage examples:
  podman artifact add --replace quay.io/myimage/artifact:latest /path/to/file
  podman artifact add --replace localhost/test/artifact /tmp/newfile.txt

Fixes: Implements requested --replace functionality for artifact add command
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-10-06 12:22:40 -04:00
..
artifacts.go Add --replace option to podman artifact add command 2025-10-06 12:22:40 -04:00
containers.go Add support for criu's tcp-close functionality. 2025-08-27 18:52:34 -04:00
containers_create.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
containers_stats.go fix: set header fields before response status code to prevent missing fields 2025-09-08 09:06:36 +02:00
generate.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
healthcheck.go Add stopped status for HealthCheck 2025-03-03 17:09:30 +01:00
images.go fix: set header fields before response status code to prevent missing fields 2025-09-08 09:06:36 +02:00
images_pull.go fix: set header fields before response status code to prevent missing fields 2025-09-08 09:06:36 +02:00
images_push.go fix: set header fields before response status code to prevent missing fields 2025-09-08 09:06:36 +02:00
info.go set !remote build tags where needed 2024-08-19 11:41:28 +02:00
kube.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
kube_test.go feat(libpod): support kube play tar content-type (#24015) 2024-09-27 15:40:55 +02:00
manifests.go fix: set header fields before response status code to prevent missing fields 2025-09-08 09:06:36 +02:00
networks.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
play.go set !remote build tags where needed 2024-08-19 11:41:28 +02:00
pods.go update golangci-lint to v2.1.1 2025-04-14 19:33:42 +02:00
quadlets.go pkg/api: api list quadlets resource 2025-10-01 21:10:36 -03:00
secrets.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
swagger_spec.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
system.go Clean up after unexpectedly terminated build 2025-01-27 14:21:27 +01:00
volumes.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00