Skip to content

Commit

Permalink
Add --cid to task list
Browse files Browse the repository at this point in the history
Filter tasks by correlation id.

fixes TBA
  • Loading branch information
mdellweg committed Jun 17, 2021
1 parent 7f80f3e commit e362612
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES/TBA.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added ``--cid`` option to ``task list`` command to allow fitering by correlation id.
9 changes: 8 additions & 1 deletion pulpcore/cli/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
import click

from pulpcore.cli.common.context import (
PluginRequirement,
PulpContext,
PulpEntityContext,
pass_entity_context,
pass_pulp_context,
)
from pulpcore.cli.common.generic import list_command
from pulpcore.cli.common.generic import list_command, pulp_option
from pulpcore.cli.core.context import PulpTaskContext

_ = gettext.gettext
Expand All @@ -26,6 +27,12 @@
"name__contains",
help=_("List only tasks whose name contains this."),
),
pulp_option(
"--cid",
"logging_cid__contains",
help=_("List only tasks with this correlation id."),
needs_plugins=[PluginRequirement("core", "3.14.0.dev")],
),
click.option(
"--state",
type=click.Choice(
Expand Down

0 comments on commit e362612

Please sign in to comment.