From: Ricardo Dias Date: Fri, 20 Apr 2018 15:45:26 +0000 (+0100) Subject: Merge pull request #21516 from rjfd/wip-dashboard-rest-improvements X-Git-Tag: v13.1.0~173 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2f0984ae0641132d81f58db535ec7f545ebf3551;p=ceph.git Merge pull request #21516 from rjfd/wip-dashboard-rest-improvements mgr/dashboard: RESTController improvements Reviewed-by: Sebastian Wagner Reviewed-by: Volker Theile --- 2f0984ae0641132d81f58db535ec7f545ebf3551 diff --cc src/pybind/mgr/dashboard/controllers/rbd.py index 0917a13dd792a,a67827e79434d..e177bd1ddcf34 --- a/src/pybind/mgr/dashboard/controllers/rbd.py +++ b/src/pybind/mgr/dashboard/controllers/rbd.py @@@ -352,12 -351,12 +351,13 @@@ class Rbd(RESTController) @ApiController('block/image/:pool_name/:image_name/snap') +@AuthRequired() class RbdSnapshot(RESTController): + RESOURCE_ID = "snapshot_name" + @RbdTask('snap/create', ['{pool_name}', '{image_name}', '{snapshot_name}'], 2.0) - @RESTController.args_from_json def create(self, pool_name, image_name, snapshot_name): def _create_snapshot(ioctx, img, snapshot_name): img.create_snap(snapshot_name)