From: Kefu Chai Date: Mon, 10 May 2021 01:50:42 +0000 (+0800) Subject: pybind/mgr/prometheus: assign default values for server_[addr,port] X-Git-Tag: v17.1.0~1986^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1958e4f4eb0f8b5c65dfe603ff730e5b5de3fca8;p=ceph.git pybind/mgr/prometheus: assign default values for server_[addr,port] and add desc to them, so these metadata can be extracted by the sphinx extension. Signed-off-by: Kefu Chai --- diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index 01c3f56e4af..5c00e9db6a9 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -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',