diff --git a/pulpcore/cli/core/__init__.py b/pulpcore/cli/core/__init__.py index 22e19e36b..c8ae1dc8d 100644 --- a/pulpcore/cli/core/__init__.py +++ b/pulpcore/cli/core/__init__.py @@ -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) @@ -25,3 +26,4 @@ main.add_command(export) main.add_command(importer) main.add_command(config) +main.add_command(worker) diff --git a/pulpcore/cli/core/context.py b/pulpcore/cli/core/context.py index c328fa5b4..f604635c2 100644 --- a/pulpcore/cli/core/context.py +++ b/pulpcore/cli/core/context.py @@ -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"