From: Lenz Grimmer Date: Mon, 24 Aug 2020 11:22:08 +0000 (+0200) Subject: Merge pull request #36347 from rhcs-dashboard/wip-40767-master X-Git-Tag: v16.1.0~1348 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=976930174aa6b11bb75c5a852318df103e748d35;p=ceph.git Merge pull request #36347 from rhcs-dashboard/wip-40767-master mgr/dashboard: Placeholders for Documenting REST API Reviewed-by: Alfonso Martínez Reviewed-by: Ernesto Puerta Reviewed-by: Laura Paduano --- 976930174aa6b11bb75c5a852318df103e748d35 diff --cc src/pybind/mgr/dashboard/controllers/orchestrator.py index c26558c70b13,8ef183285e72..d7871ebeb0b9 --- a/src/pybind/mgr/dashboard/controllers/orchestrator.py +++ b/src/pybind/mgr/dashboard/controllers/orchestrator.py @@@ -11,9 -11,14 +11,14 @@@ from .. import mg from ..exceptions import DashboardException from ..security import Scope from ..services.exception import handle_orchestrator_error -from ..services.orchestrator import OrchClient +from ..services.orchestrator import OrchClient, OrchFeature from ..tools import TaskManager + STATUS_SCHEMA = { + "available": (bool, "Orchestrator status"), + "description": (str, "Description") + } + def get_device_osd_map(): """Get mappings from inventory devices to OSD IDs. @@@ -110,9 -108,10 +118,10 @@@ class Orchestrator(RESTController) @ApiController('/orchestrator/inventory', Scope.HOSTS) + @ControllerDoc("Get Orchestrator Inventory Details", "OrchestratorInventory") class OrchestratorInventory(RESTController): - @raise_if_no_orchestrator + @raise_if_no_orchestrator([OrchFeature.DEVICE_LIST]) def list(self, hostname=None): orch = OrchClient.instance() hosts = [hostname] if hostname else None