Skip to content

Commit 42552ba

Browse files
committed
Add support for checkpoint distributions and publications
fixes #1129
1 parent cfb14be commit 42552ba

File tree

5 files changed

+27
-0
lines changed

5 files changed

+27
-0
lines changed

CHANGES/1129.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added support for checkpoint distributions and publications.

pulpcore/cli/file/distribution.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ def distribution(ctx: click.Context, pulp_ctx: PulpCLIContext, distribution_type
7171
repository_option,
7272
content_guard_option,
7373
pulp_labels_option,
74+
click.option(
75+
"--checkpoint/--not-checkpoint",
76+
is_flag=True,
77+
default=None,
78+
help=_("Create a checkpoint distribution."),
79+
),
7480
]
7581
create_options = common_distribution_create_options + update_options
7682

pulpcore/cli/file/publication.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ def publication(ctx: click.Context, pulp_ctx: PulpCLIContext, publication_type:
5656
"--manifest",
5757
help=_("Filename to use for manifest file containing metadata for all the files."),
5858
),
59+
click.option(
60+
"--checkpoint",
61+
is_flag=True,
62+
default=False,
63+
help=_("Create a checkpoint publication"),
64+
),
5965
]
6066
publication.add_command(list_command(decorators=publication_filter_options + [repository_option]))
6167
publication.add_command(show_command(decorators=lookup_options))

pulpcore/cli/rpm/distribution.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import click
2+
from pulp_glue.common.context import PluginRequirement
23
from pulp_glue.common.i18n import get_translation
34
from pulp_glue.rpm.context import PulpRpmDistributionContext, PulpRpmRepositoryContext
45

@@ -76,6 +77,12 @@ def distribution(ctx: click.Context, pulp_ctx: PulpCLIContext, distribution_type
7677
repository_option,
7778
content_guard_option,
7879
pulp_labels_option,
80+
pulp_option(
81+
"--checkpoint/--not-checkpoint",
82+
is_flag=True,
83+
default=None,
84+
needs_plugins=[PluginRequirement("rpm", specifier=">=3.29.0")],
85+
),
7986
]
8087
create_options = common_distribution_create_options + update_options
8188

pulpcore/cli/rpm/publication.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ def publication(ctx: click.Context, pulp_ctx: PulpCLIContext, publication_type:
7474
),
7575
needs_plugins=[PluginRequirement("rpm", specifier=">=3.25.0")],
7676
),
77+
pulp_option(
78+
"--checkpoint",
79+
is_flag=True,
80+
default=False,
81+
help=_("Create a checkpoint publication"),
82+
needs_plugins=[PluginRequirement("rpm", specifier=">=3.29.0")],
83+
),
7784
]
7885
publication.add_command(list_command(decorators=publication_filter_options + [repository_option]))
7986
publication.add_command(show_command(decorators=lookup_options))

0 commit comments

Comments
 (0)