diff options
Diffstat (limited to 'oslo_config/cfg.py')
-rw-r--r-- | oslo_config/cfg.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/oslo_config/cfg.py b/oslo_config/cfg.py index 39a9878..35f0cfb 100644 --- a/oslo_config/cfg.py +++ b/oslo_config/cfg.py @@ -1175,6 +1175,28 @@ class HostAddressOpt(Opt): **kwargs) +class HostDomainOpt(Opt): + + r"""Option for either an IP or a hostname. + + Like HostAddress with the support of _ character. + + Option with ``type`` :class:`oslo_config.types.HostDomain` + + :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:: 8.6 + """ + + def __init__(self, name, version=None, **kwargs): + super(HostDomainOpt, self).__init__(name, + type=types.HostDomain(version), + **kwargs) + + class URIOpt(Opt): r"""Opt with URI type |