Use HostAddressOpt for opts that accept IP and hostnames

TrivialFix
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.config version 3.22.

This patch changes the opt type of configuration options to use
this more relevant opt type - HostAddressOpt.

[1] I77bdb64b7e6e56ce761d76696bc4448a9bd325eb

Change-Id: I321543b1acb3ece6877f9a9c35d10cd798716580
This commit is contained in:
ckji 2017-03-21 18:04:24 +08:00
parent 1714db29ac
commit 9eb39bfba0
1 changed files with 2 additions and 2 deletions

View File

@ -54,8 +54,8 @@ core_opts = [
help=_("The maximum number of items returned in a single "
"response. The string 'infinite' or a negative "
"integer value means 'no limit'")),
cfg.StrOpt('host', default=utils.get_hostname(),
help=_("The hostname Octavia is running on")),
cfg.HostAddressOpt('host', default=utils.get_hostname(),
help=_("The hostname Octavia is running on")),
cfg.StrOpt('octavia_plugins',
default='hot_plug_plugin',
help=_('Name of the controller plugin to use'))