]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: replace string version with class 43285/head
authorErnesto Puerta <epuertat@redhat.com>
Fri, 24 Sep 2021 15:46:42 +0000 (17:46 +0200)
committerErnesto Puerta <epuertat@redhat.com>
Sat, 25 Sep 2021 11:47:06 +0000 (13:47 +0200)
commit357f79ff2e2187403d496dcbb5af5b36169a3b1e
tree78b4d9cab8c5e18b0181750768928915c8c0de73
parent88a8732215240c9ab4abe23e8909fe3ac544d5fd
mgr/dashboard: replace string version with class

* APIVersion:
  * Moved to a separate file
  * Added doctests
  * Added sentinel values:
    * DEFAULT = 1.0
    * EXPERIMENTAL = 0.1
    * NONE = 0.0
  * Added to_mime_type() helper method
* Controllers.__init__:
  * Added type hints
  * Replaced string versions with APIVersions
* Feedback controller:
  * Replaced with EXPERIMENTAL (probably it should be NONE)

Fixes: https://tracker.ceph.com/issues/52480
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
13 files changed:
src/pybind/mgr/dashboard/__init__.py
src/pybind/mgr/dashboard/controllers/__init__.py
src/pybind/mgr/dashboard/controllers/_version.py [new file with mode: 0644]
src/pybind/mgr/dashboard/controllers/crush_rule.py
src/pybind/mgr/dashboard/controllers/docs.py
src/pybind/mgr/dashboard/controllers/feedback.py
src/pybind/mgr/dashboard/controllers/host.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_host.py
src/pybind/mgr/dashboard/tests/test_tools.py
src/pybind/mgr/dashboard/tests/test_versioning.py