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
This commit is contained in:
parent
a860834574
commit
f021922dec
|
@ -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.')),
|
||||
|
|
Loading…
Reference in New Issue