Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES/168.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added checkpoint options to publication and distribution commands.
14 changes: 13 additions & 1 deletion pulpcore/cli/deb/distribution.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import gettext

import click
from pulp_glue.deb.context import PulpAptDistributionContext, PulpAptRepositoryContext
from pulp_glue.common.context import PluginRequirement
from pulp_glue.deb.context import (
PulpAptDistributionContext,
PulpAptRepositoryContext,
)
from pulpcore.cli.common.generic import (
PulpCLIContext,
base_path_contains_option,
Expand All @@ -14,6 +18,7 @@
list_command,
name_option,
pass_pulp_context,
pulp_option,
resource_option,
show_command,
update_command,
Expand All @@ -32,6 +37,12 @@
" Specified as '[[<plugin>:]<type>:]<name>' or as href."
),
)
checkpoint_option = pulp_option(
"--checkpoint/--not-checkpoint",
Comment thread
quba42 marked this conversation as resolved.
is_flag=True,
default=None,
needs_plugins=[PluginRequirement("deb", specifier=">=3.6.0")],
)


@click.group()
Expand All @@ -57,6 +68,7 @@ def distribution(ctx: click.Context, pulp_ctx: PulpCLIContext, /, distribution_t
click.option("--base-path"),
click.option("--publication", help=_("Publication to be served.")),
repository_option,
checkpoint_option,
]
create_options = update_options + [click.option("--name", required=True)]

Expand Down
10 changes: 10 additions & 0 deletions pulpcore/cli/deb/publication.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import gettext

import click
from pulp_glue.common.context import PluginRequirement
from pulp_glue.core.context import PulpSigningServiceContext
from pulp_glue.deb.context import (
PulpAptPublicationContext,
Expand All @@ -15,6 +16,7 @@
list_command,
pass_pulp_context,
publication_filter_options,
pulp_option,
resource_option,
show_command,
)
Expand All @@ -28,6 +30,13 @@
default_type="apt",
context_table={"deb:apt": PulpAptRepositoryContext},
)
checkpoint_option = pulp_option(
"--checkpoint",
Comment thread
quba42 marked this conversation as resolved.
is_flag=True,
default=None,
help=_("Create a checkpoint publication"),
needs_plugins=[PluginRequirement("deb", specifier=">=3.6.0")],
)


@click.group()
Expand All @@ -52,6 +61,7 @@ def publication(ctx: click.Context, pulp_ctx: PulpCLIContext, /, publication_typ
lookup_options = [href_option]
create_options = [
repository_option,
checkpoint_option,
click.option(
"--version", type=int, help=_("a repository version number, leave blank for latest")
),
Expand Down