Skip to content

Commit

Permalink
Support for --mirror <boolean> flag when syncing rpm repositories
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
vonsch committed Apr 26, 2021
1 parent 0158b85 commit 816c951
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pulpcore/cli/rpm/repository.py
Expand Up @@ -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
Expand All @@ -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:
body["mirror"] = mirror

if remote:
remote_href: str = PulpRpmRemoteContext(pulp_ctx).find(name=remote)["pulp_href"]
body["remote"] = remote_href
Expand Down

0 comments on commit 816c951

Please sign in to comment.