Skip to content

Commit

Permalink
Added worker command.
Browse files Browse the repository at this point in the history
fixes #144
  • Loading branch information
David Davis committed Feb 13, 2021
1 parent c1f1774 commit 3b7a0d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pulpcore/cli/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from pulpcore.cli.core.status import status
from pulpcore.cli.core.task import task
from pulpcore.cli.core.user import user
from pulpcore.cli.core.worker import worker

# Register commands with cli
main.add_command(status)
Expand All @@ -25,3 +26,4 @@
main.add_command(export)
main.add_command(importer)
main.add_command(config)
main.add_command(worker)
7 changes: 7 additions & 0 deletions pulpcore/cli/core/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,10 @@ def find(self, **kwargs: Any) -> Any:
if len(search_result) != 1:
raise click.ClickException(f"Could not find {self.ENTITY} with {kwargs}.")
return search_result[0]


class PulpWorkerContext(PulpEntityContext):
ENTITY = "worker"
HREF = "worker_href"
LIST_ID = "workers_list"
READ_ID = "workers_read"

0 comments on commit 3b7a0d0

Please sign in to comment.