]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Merge pull request #36347 from rhcs-dashboard/wip-40767-master
authorLenz Grimmer <lgrimmer@suse.com>
Mon, 24 Aug 2020 11:22:08 +0000 (13:22 +0200)
committerGitHub <noreply@github.com>
Mon, 24 Aug 2020 11:22:08 +0000 (13:22 +0200)
mgr/dashboard: Placeholders for Documenting REST API

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
1  2 
src/pybind/mgr/dashboard/controllers/host.py
src/pybind/mgr/dashboard/controllers/orchestrator.py
src/pybind/mgr/dashboard/controllers/osd.py
src/pybind/mgr/dashboard/controllers/service.py

index c26558c70b13672ee77c1d818ae73d40b32f742c,8ef183285e72fbc8d5e8d885e23e2c88b5755766..d7871ebeb0b905b54c06df4c193800719f9690ad
@@@ -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