From 896ec41e1fa2d732e98514dcb6b76b229d3b02b9 Mon Sep 17 00:00:00 2001 From: Timothy Mullican <18095326+tjmullicani@users.noreply.github.com> Date: Tue, 22 Nov 2022 10:24:42 -0600 Subject: [PATCH] Add "--metadata-signing-service" option to rpm fixes #605 Co-Authored-By: Matthias Dellweg <2500@gmx.de> --- CHANGES/607.feature | 1 + pulpcore/cli/rpm/repository.py | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 CHANGES/607.feature diff --git a/CHANGES/607.feature b/CHANGES/607.feature new file mode 100644 index 000000000..aff7430b6 --- /dev/null +++ b/CHANGES/607.feature @@ -0,0 +1 @@ +Add '--metadata-signing-service' option to rpm. diff --git a/pulpcore/cli/rpm/repository.py b/pulpcore/cli/rpm/repository.py index f9f8b8dac..a97a4184a 100644 --- a/pulpcore/cli/rpm/repository.py +++ b/pulpcore/cli/rpm/repository.py @@ -15,6 +15,7 @@ PulpRpmRepositoryContext, PulpUlnRemoteContext, ) +from pulp_glue.core.context import PulpSigningServiceContext from pulpcore.cli.common.generic import ( PulpCLIContext, @@ -59,6 +60,14 @@ ), ) +metadata_signing_service_option = resource_option( + "--metadata-signing-service", + default_plugin="core", + default_type="core", + context_table={"core:core": PulpSigningServiceContext}, + href_pattern=PulpSigningServiceContext.HREF_PATTERN, +) + def _content_callback(ctx: click.Context, param: click.Parameter, value: Any) -> Any: if value: @@ -125,6 +134,7 @@ def repository(ctx: click.Context, pulp_ctx: PulpCLIContext, repo_type: str) -> click.option("--description"), click.option("--retain-package-versions", type=int), remote_option, + metadata_signing_service_option, click.option( "--metadata-checksum-type", type=click.Choice(CHECKSUM_CHOICES, case_sensitive=False) ),