]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/controllers/erasure_code_profile.py
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / controllers / erasure_code_profile.py
index 6842943c193efc0397565a8693aebe499547b2e9..4b8264ef0bd5c7e78c7f378eb114384b9939c84a 100644 (file)
@@ -3,20 +3,31 @@ from __future__ import absolute_import
 
 from cherrypy import NotFound
 
-from . import ApiController, ControllerDoc, RESTController, Endpoint, ReadPermission, \
-    UiApiController
+from .. import mgr
 from ..security import Scope
 from ..services.ceph_service import CephService
-from .. import mgr
+from . import ApiController, ControllerDoc, Endpoint, EndpointDoc, \
+    ReadPermission, RESTController, UiApiController
+
+LIST_CODE__SCHEMA = {
+    "crush-failure-domain": (str, ''),
+    "k": (int, 'Number of data chunks'),
+    "m": (int, 'Number of coding chunks'),
+    "plugin": (str, 'Plugin Info'),
+    "technique": (str, ''),
+    "name": (str, 'Name of the profile')
+}
 
 
 @ApiController('/erasure_code_profile', Scope.POOL)
+@ControllerDoc("Erasure Code Profile Management API", "ErasureCodeProfile")
 class ErasureCodeProfile(RESTController):
     """
     create() supports additional key-value arguments that are passed to the
     ECP plugin.
     """
-
+    @EndpointDoc("List Erasure Code Profile Information",
+                 responses={'200': [LIST_CODE__SCHEMA]})
     def list(self):
         return CephService.get_erasure_code_profiles()