Skip to content

Commit

Permalink
Add task destroy command
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
mdellweg committed Sep 21, 2021
1 parent a72507e commit c97f016
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES/376.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added the ability to delete tasks.
1 change: 1 addition & 0 deletions pulpcore/cli/core/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ class PulpTaskContext(PulpEntityContext):
HREF = "task_href"
LIST_ID = "tasks_list"
READ_ID = "tasks_read"
DELETE_ID = "tasks_delete"
CANCEL_ID: ClassVar[str] = "tasks_cancel"

resource_context: Optional[PulpEntityContext] = None
Expand Down
3 changes: 2 additions & 1 deletion pulpcore/cli/core/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
pass_entity_context,
pass_pulp_context,
)
from pulpcore.cli.common.generic import href_option, list_command, pulp_option
from pulpcore.cli.common.generic import destroy_command, href_option, list_command, pulp_option
from pulpcore.cli.core.context import PulpTaskContext
from pulpcore.cli.core.generic import task_filter

Expand Down Expand Up @@ -43,6 +43,7 @@ def task(ctx: click.Context, pulp_ctx: PulpContext) -> None:


task.add_command(list_command(decorators=task_filter))
task.add_command(destroy_command(decorators=[href_option, uuid_option]))


@task.command()
Expand Down

0 comments on commit c97f016

Please sign in to comment.