]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/prometheus: assign default values for server_[addr,port]
authorKefu Chai <kchai@redhat.com>
Mon, 10 May 2021 01:50:42 +0000 (09:50 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 11 May 2021 07:43:59 +0000 (15:43 +0800)
and add desc to them, so these metadata can be extracted by the sphinx extension.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/mgr/prometheus/module.py

index 01c3f56e4af1fd293f2def0525f6bb212a32d6e2..5c00e9db6a94141942e97e33fd91969a00190b7c 100644 (file)
@@ -269,11 +269,15 @@ class MetricCollectionThread(threading.Thread):
 class Module(MgrModule):
     MODULE_OPTIONS = [
         Option(
-            'server_addr'
+            'server_addr',
+            default=get_default_addr(),
+            desc='the IPv4 or IPv6 address on which the module listens for HTTP requests',
         ),
         Option(
             'server_port',
-            type='int'
+            type='int',
+            default=DEFAULT_PORT,
+            desc='the port on which the module listens for HTTP requests'
         ),
         Option(
             'scrape_interval',