]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/dashboard: restcontroller: support explicit resource ID
authorRicardo Dias <rdias@suse.com>
Thu, 19 Apr 2018 07:45:40 +0000 (08:45 +0100)
committerRicardo Dias <rdias@suse.com>
Thu, 19 Apr 2018 07:52:26 +0000 (08:52 +0100)
commit671b1348857e30172dc06be7b9a214d7fc386bf1
tree536779461db9815685ff193882c7954db917747f
parent6931ab7ec9f28c7a301da658c2c9a78b879f91f4
mgr/dashboard: restcontroller: support explicit resource ID

In the current implementation, RESTController tries to infer the
resource ID by looking at the declared parameters of the resource
methods (get, delete, set, and patch). This inference may not always
be correct, and therefore with this commit we can now explicitely
specify the structure of the resource ID. If the resource ID is
not explicitly specified, then we fallback to the inference algorithm.

Signed-off-by: Ricardo Dias <rdias@suse.com>
src/pybind/mgr/dashboard/controllers/__init__.py
src/pybind/mgr/dashboard/controllers/rbd.py