]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: Added Versioning to the REST API 35769/head
authorChristopher Odom <codom@redhat.com>
Mon, 22 Jun 2020 15:23:16 +0000 (11:23 -0400)
committerAvan Thakkar <athakkar@redhat.com>
Wed, 28 Oct 2020 14:03:39 +0000 (19:33 +0530)
commitdcac50e322b361e91134dc9db6df71cea74960ac
tree6b88073bc6309491819cd066a2ca90fdb4d6dc17
parentc0cf69e067613d69936537113494f3a0321e57c4
mgr/dashboard: Added Versioning to the REST API

Versioning is handled by the RESTContoller decorators.
It works by adding a version attribute to the endpoint object,
which will be checked by the _request_wrapper against the requested
version before the controller method is dispatched.

This commit also updates all of the testing to support
version vendor mime types, as well as adding an http
interceptor to add versioned mime types to all frontend
requests.

Fixes: https://tracker.ceph.com/issues/40909
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
17 files changed:
qa/tasks/mgr/dashboard/__init__.py
qa/tasks/mgr/dashboard/helper.py
qa/tasks/mgr/dashboard/test_api.py [new file with mode: 0644]
qa/tasks/mgr/dashboard/test_requests.py
src/pybind/mgr/dashboard/__init__.py
src/pybind/mgr/dashboard/controllers/__init__.py
src/pybind/mgr/dashboard/controllers/docs.py
src/pybind/mgr/dashboard/frontend/cypress/support/commands.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/api-interceptor.service.ts
src/pybind/mgr/dashboard/module.py
src/pybind/mgr/dashboard/openapi.yaml
src/pybind/mgr/dashboard/tests/__init__.py
src/pybind/mgr/dashboard/tests/test_docs.py
src/pybind/mgr/dashboard/tests/test_iscsi.py
src/pybind/mgr/dashboard/tests/test_settings.py
src/pybind/mgr/dashboard/tests/test_tools.py
src/pybind/mgr/dashboard/tests/test_versioning.py [new file with mode: 0644]