]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #21516 from rjfd/wip-dashboard-rest-improvements
authorRicardo Dias <rdias@suse.com>
Fri, 20 Apr 2018 15:45:26 +0000 (16:45 +0100)
committerGitHub <noreply@github.com>
Fri, 20 Apr 2018 15:45:26 +0000 (16:45 +0100)
mgr/dashboard: RESTController improvements

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
1  2 
src/pybind/mgr/dashboard/controllers/pool.py
src/pybind/mgr/dashboard/controllers/rbd.py

index 0917a13dd792ae45a28b3e74e65eb4a147332c3e,a67827e79434d8cf33e56b3d3fd99139faa2561d..e177bd1ddcf3439f3e1f40a2c0bad8e19d97b0a1
@@@ -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)