From 3432636b8aba7bd866ce252ce880fd95cbb28c82 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 4 Dec 2018 17:34:18 -0600 Subject: [PATCH] pybind/mgr: rename get_option -> get_ceph_option Signed-off-by: Sage Weil --- doc/mgr/plugins.rst | 46 +++++++++---------- src/pybind/mgr/balancer/module.py | 4 +- src/pybind/mgr/dashboard/module.py | 2 +- src/pybind/mgr/dashboard/settings.py | 5 +- .../dashboard/tests/test_access_control.py | 13 +++--- .../mgr/dashboard/tests/test_api_auditing.py | 16 +++---- .../mgr/dashboard/tests/test_grafana.py | 2 +- .../mgr/dashboard/tests/test_rest_client.py | 2 +- .../mgr/dashboard/tests/test_rgw_client.py | 12 ++--- .../mgr/dashboard/tests/test_settings.py | 16 +++---- src/pybind/mgr/dashboard/tests/test_sso.py | 13 +++--- src/pybind/mgr/devicehealth/module.py | 4 +- src/pybind/mgr/diskprediction_cloud/module.py | 6 +-- src/pybind/mgr/diskprediction_local/module.py | 4 +- src/pybind/mgr/mgr_module.py | 2 +- 15 files changed, 75 insertions(+), 72 deletions(-) diff --git a/doc/mgr/plugins.rst b/doc/mgr/plugins.rst index d1196dea6f7c..c3c2c8c58707 100644 --- a/doc/mgr/plugins.rst +++ b/doc/mgr/plugins.rst @@ -96,38 +96,38 @@ Configuration options --------------------- Modules can load and store configuration options using the -``set_config`` and ``get_config`` methods. +``set_module_option`` and ``get_module_option`` methods. -.. note:: Use ``set_config`` and ``get_config`` to manage user-visible - configuration options that are not blobs (like certificates). If you want to - persist module-internal data or binary configuration data consider using - the `KV store`_. +.. note:: Use ``set_module_option`` and ``get_module_option`` to + manage user-visible configuration options that are not blobs (like + certificates). If you want to persist module-internal data or + binary configuration data consider using the `KV store`_. You must declare your available configuration options in the -``OPTIONS`` class attribute, like this: +``MODULE_OPTIONS`` class attribute, like this: :: - OPTIONS = [ + MODULE_OPTIONS = [ { "name": "my_option" } ] -If you try to use set_config or get_config on options not declared -in ``OPTIONS``, an exception will be raised. +If you try to use set_module_option or get_module_option on options not declared +in ``MODULE_OPTIONS``, an exception will be raised. You may choose to provide setter commands in your module to perform high level validation. Users can also modify configuration using the normal `ceph config set` command, where the configuration options for a mgr module are named like `mgr//