diff --git a/CHANGES/650.bugfix b/CHANGES/650.bugfix new file mode 100644 index 000000000..8fef9ebd7 --- /dev/null +++ b/CHANGES/650.bugfix @@ -0,0 +1 @@ +Option (also resource lookup option) --repository is now an eager (high priority) parameter. diff --git a/pulpcore/cli/common/generic.py b/pulpcore/cli/common/generic.py index 6fc02691f..3774b321f 100644 --- a/pulpcore/cli/common/generic.py +++ b/pulpcore/cli/common/generic.py @@ -863,11 +863,13 @@ def _type_callback(ctx: click.Context, param: click.Parameter, value: t.Optional help=_("Name of the repository"), callback=lookup_callback("name", PulpRepositoryContext), expose_value=False, + is_eager=True, ) repository_lookup_option = resource_lookup_option( "--repository", context_class=PulpRepositoryContext, + is_eager=True, ) remote_lookup_option = resource_lookup_option( "--remote", diff --git a/tests/scripts/pulp_container/test_copy.sh b/tests/scripts/pulp_container/test_copy.sh index d295d097a..45b5e79bd 100755 --- a/tests/scripts/pulp_container/test_copy.sh +++ b/tests/scripts/pulp_container/test_copy.sh @@ -29,7 +29,7 @@ expect_succ pulp container repository content -t "manifest" list --repository "c test "$(echo "$OUTPUT" | jq -r 'length')" -eq 1 test "$(echo "$OUTPUT" | jq -r '.[0].digest')" = "$DIGEST" -expect_succ pulp container repository copy-manifest --repository "cli_test_dest_container_repository" --source "cli_test_source_container_repository" --version "1" --media-type "application/vnd.docker.distribution.manifest.v2+json" +expect_succ pulp container repository copy-manifest --version "1" --repository "cli_test_dest_container_repository" --source "cli_test_source_container_repository" --media-type "application/vnd.docker.distribution.manifest.v2+json" expect_succ pulp container repository content -t "manifest" list --repository "cli_test_dest_container_repository" --version "2" COPIED="$(echo "$OUTPUT" | jq -r 'length')" test "$COPIED" -gt 1 diff --git a/tests/scripts/pulp_file/test_sync.sh b/tests/scripts/pulp_file/test_sync.sh index 2b842a12c..c490ffe62 100755 --- a/tests/scripts/pulp_file/test_sync.sh +++ b/tests/scripts/pulp_file/test_sync.sh @@ -46,7 +46,7 @@ expect_succ pulp file repository version repair --repository "cli_test_file_repo test "$(echo "$OUTPUT" | jq -r '.state')" = "completed" # Delete version again -expect_succ pulp file repository version destroy --repository "cli_test_file_repository" --version 1 +expect_succ pulp file repository version destroy --version 1 --repository "cli_test_file_repository" # Test autopublish if pulp debug has-plugin --name "file" --min-version "1.7.0" diff --git a/tests/scripts/pulp_rpm/test_rpm_sync_publish.sh b/tests/scripts/pulp_rpm/test_rpm_sync_publish.sh index 08e96c22c..c5286769d 100755 --- a/tests/scripts/pulp_rpm/test_rpm_sync_publish.sh +++ b/tests/scripts/pulp_rpm/test_rpm_sync_publish.sh @@ -95,7 +95,7 @@ then fi expect_succ pulp rpm repository version list --repository "cli_test_rpm_repository" -expect_succ pulp rpm repository version repair --repository "cli_test_rpm_repository" --version 1 +expect_succ pulp rpm repository version repair --version 1 --repository "cli_test_rpm_repository" expect_succ pulp rpm repository update --name "cli_test_rpm_repository" --retain-package-versions 2 expect_succ pulp rpm repository show --name "cli_test_rpm_repository"