spiegel_podman/test/apiv2/python/rest_api
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
..
fixtures feat: Add OCI Artifact support to the Podman REST API 2025-06-04 15:49:34 +10:00
__init__.py Break up python APIv2 tests 2021-05-18 08:39:35 -07:00
test_v2_0_0_artifact.py Add --replace option to podman artifact add command 2025-10-06 12:22:40 -04:00
test_v2_0_0_container.py compat: Add CgroupnsMode to POST /containers/create 2025-05-15 15:31:16 +02:00
test_v2_0_0_image.py [compat api] Remove ContainerConfig field 2025-09-27 20:50:30 +10:00
test_v2_0_0_manifest.py Break up python APIv2 tests 2021-05-18 08:39:35 -07:00
test_v2_0_0_network.py Set network ID if available during container inspect 2025-01-20 15:55:26 +01:00
test_v2_0_0_pod.py Break up python APIv2 tests 2021-05-18 08:39:35 -07:00
test_v2_0_0_system.py Add missing security options to /info response 2023-04-16 18:27:16 +02:00
test_v2_0_0_volume.py Allow label and labels when creating volumes 2021-10-28 16:02:22 -07:00
v1_test_rest_v1_0_0.py Fix documentation of use of tcp connections 2022-08-23 16:12:08 -04:00