summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-03-03 12:55:20 +0000
committerGerrit Code Review <review@openstack.org>2017-03-03 12:55:20 +0000
commite53c79ebbb0f31db3bdf64760551f357b50c08a7 (patch)
treea839ea2037b1ba28adc090f4ac37435a31fa52f9
parent27cc3478427e27118d02b3cd2bd6c5926c09bf8a (diff)
parente0f96fa022e2f8262e2a8d72c17eed9a4e76176e (diff)
downloadoslo-config-e53c79ebbb0f31db3bdf64760551f357b50c08a7.tar.gz
Merge "Fix up the option docs"3.23.0
-rw-r--r--oslo_config/cfg.py25
-rw-r--r--oslo_config/types.py10
2 files changed, 24 insertions, 11 deletions
diff --git a/oslo_config/cfg.py b/oslo_config/cfg.py
index ca6a44d..68e0a9f 100644
--- a/oslo_config/cfg.py
+++ b/oslo_config/cfg.py
@@ -1278,10 +1278,10 @@ class FloatOpt(Opt):
"""Option with Float type
Option with ``type`` :class:`oslo_config.types.Float`
- :param min: minimum value the float can take
- :param max: maximum value the float can take
:param name: the option's name
+ :param min: minimum value the float can take
+ :param max: maximum value the float can take
:param \*\*kwargs: arbitrary keyword arguments passed to :class:`Opt`
.. versionchanged:: 3.14
@@ -1358,10 +1358,10 @@ class PortOpt(Opt):
Option with ``type`` :class:`oslo_config.types.Integer`
:param name: the option's name
- :param choices: Optional sequence of valid values.
- :param \*\*kwargs: arbitrary keyword arguments passed to :class:`Opt`
:param min: minimum value the port can take
:param max: maximum value the port can take
+ :param choices: Optional sequence of valid values.
+ :param \*\*kwargs: arbitrary keyword arguments passed to :class:`Opt`
.. versionadded:: 2.6
.. versionchanged:: 3.2
@@ -1384,6 +1384,9 @@ class HostnameOpt(Opt):
Option with ``type`` :class:`oslo_config.types.Hostname`
+ :param name: the option's name
+ :param \*\*kwargs: arbitrary keyword arguments passed to :class:`Opt`
+
.. versionadded:: 3.8
"""
@@ -1393,11 +1396,19 @@ class HostnameOpt(Opt):
class HostAddressOpt(Opt):
+
"""Option for either an IP or a hostname.
- Accepts valid hostnames and valid IP addresses.
+ Accepts valid hostnames and valid IP addresses.
+
+ Option with ``type`` :class:`oslo_config.types.HostAddress`
+
+ :param name: the option's name
+ :param version: one of either ``4``, ``6``, or ``None`` to specify
+ either version.
+ :param \*\*kwargs: arbitrary keyword arguments passed to :class:`Opt`
- .. versionadded:: 3.22
+ .. versionadded:: 3.22
"""
def __init__(self, name, version=None, **kwargs):
@@ -1412,9 +1423,11 @@ class URIOpt(Opt):
Option with ``type`` :class:`oslo_config.types.URI`
+ :param name: the option's name
:param max_length: If positive integer, the value must be less than or
equal to this parameter.
:param schemes: list of valid URI schemes, e.g. 'https', 'ftp', 'git'
+ :param \*\*kwargs: arbitrary keyword arguments passed to :class:`Opt`
.. versionadded:: 3.12
diff --git a/oslo_config/types.py b/oslo_config/types.py
index 6cb84e2..81f9cb6 100644
--- a/oslo_config/types.py
+++ b/oslo_config/types.py
@@ -248,11 +248,11 @@ class Number(ConfigType):
"""Number class, base for Integer and Float.
+ :param num_type: the type of number used for casting (i.e int, float)
+ :param type_name: Type name to be used in the sample config file.
:param min: Optional check that value is greater than or equal to min.
:param max: Optional check that value is less than or equal to max.
- :param type_name: Type name to be used in the sample config file.
:param choices: Optional sequence of valid values.
- :param num_type: the type of number used for casting (i.e int, float)
.. versionadded:: 3.14
"""
@@ -358,9 +358,9 @@ class Float(Number):
"""Float type.
- :param type_name: Type name to be used in the sample config file.
:param min: Optional check that value is greater than or equal to min.
:param max: Optional check that value is less than or equal to max.
+ :param type_name: Type name to be used in the sample config file.
.. versionchanged:: 2.7
@@ -382,10 +382,10 @@ class Port(Integer):
Represents a L4 Port.
- :param type_name: Type name to be used in the sample config file.
- :param choices: Optional sequence of valid values.
:param min: Optional check that value is greater than or equal to min.
:param max: Optional check that value is less than or equal to max.
+ :param type_name: Type name to be used in the sample config file.
+ :param choices: Optional sequence of valid values.
.. versionadded:: 3.16
"""