diff options
author | blue55 <yllan@fiberhome.com> | 2017-08-02 11:13:06 +0800 |
---|---|---|
committer | Ruby Loo <opensrloo@gmail.com> | 2018-08-17 13:35:25 +0000 |
commit | f021922dec168a4bb97516eb6b7a7ca5fe3bfb96 (patch) | |
tree | 742541cc4be5a891f9b3fe3657697f462e77f226 /ironic/conf/api.py | |
parent | a860834574ace20420e5035260937fed8f51bc38 (diff) | |
download | ironic-f021922dec168a4bb97516eb6b7a7ca5fe3bfb96.tar.gz |
Use HostAddressOpt for opts that accept IP and hostnames
Some configuration options were accepting both IP addresses and
hostnames. Since there was no specific OSLO opt type to support
this, we were using "StrOpt". The change [1] that added support
for "HostAddressOpt" type was merged in Ocata and became available
for use with oslo version 3.22.
This patch changes the opt type of configuration options to use
this more relevant opt type - HostAddressOpt.
[1] I77bdb64b7e6e56ce761d76696bc4448a9bd325eb
Change-Id: Ib0f90935ccd548a3ec21ed4b6ba45387f6ed5ee4
Diffstat (limited to 'ironic/conf/api.py')
-rw-r--r-- | ironic/conf/api.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ironic/conf/api.py b/ironic/conf/api.py index d9b74414f..85bfc9464 100644 --- a/ironic/conf/api.py +++ b/ironic/conf/api.py @@ -19,9 +19,10 @@ from oslo_config import cfg from ironic.common.i18n import _ opts = [ - cfg.StrOpt('host_ip', - default='0.0.0.0', - help=_('The IP address on which ironic-api listens.')), + cfg.HostAddressOpt('host_ip', + default='0.0.0.0', + help=_('The IP address or hostname on which ironic-api ' + 'listens.')), cfg.PortOpt('port', default=6385, help=_('The TCP port on which ironic-api listens.')), |