From: John Spray Date: Mon, 16 Apr 2018 21:29:42 +0000 (-0400) Subject: doc: update mgr plugin guide X-Git-Tag: v13.1.0~143^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5414b738009727c7cbaf748d614976290a17b330;p=ceph.git doc: update mgr plugin guide ...for recent config changes. Explain about MgrModule.OPTIONS, and explain the new store/config distinction. Signed-off-by: John Spray --- diff --git a/doc/mgr/plugins.rst b/doc/mgr/plugins.rst index 0ac5ee1ba762..eb41dee3088b 100644 --- a/doc/mgr/plugins.rst +++ b/doc/mgr/plugins.rst @@ -62,25 +62,91 @@ Ceph mon and admin socket commands (see mon/MonCommands.h in the Ceph source for examples). Note that the "poll" field is optional, and is set to False by default. -Config settings ---------------- +Configuration options +--------------------- + +Modules can load and store configuration options using the +``set_config`` and ``get_config`` methods. + +You must declare your available configuration options in the +``OPTIONS`` class attribute, like this: + +:: + + 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. + +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//