From 3920d57e719467de36f80ee426ea38f33a3e3791 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Mon, 26 Apr 2021 15:46:19 +0200 Subject: [PATCH] Support for --mirror flag when syncing rpm repositories [noissue] --- pulpcore/cli/rpm/repository.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pulpcore/cli/rpm/repository.py b/pulpcore/cli/rpm/repository.py index 6ec7c392e..6b16de4bb 100644 --- a/pulpcore/cli/rpm/repository.py +++ b/pulpcore/cli/rpm/repository.py @@ -84,6 +84,7 @@ def repository(ctx: click.Context, pulp_ctx: PulpContext, repo_type: str) -> Non @repository.command() @click.option("--name", required=True) +@click.option("--mirror") @click.option("--remote") @pass_repository_context @pass_pulp_context @@ -92,12 +93,16 @@ def sync( repository_ctx: PulpRepositoryContext, name: str, remote: Optional[str], + mirror: Optional[bool], ) -> None: repository = repository_ctx.find(name=name) repository_href = repository["pulp_href"] body = {} + if mirror is not None: + body["mirror"] = mirror + if remote: remote_href: str = PulpRpmRemoteContext(pulp_ctx).find(name=remote)["pulp_href"] body["remote"] = remote_href