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: Ic7f3f4c940a502d0ed44134a3de0d95bc2c63a1b
This commit is contained in:
lingyongxu 2017-04-06 15:43:06 +08:00
parent 0622fbaa77
commit e48e1d3c07

View File

@ -19,8 +19,8 @@ from oslo_config import cfg
DASHBOARD_OPTS = [
cfg.StrOpt('listen-host', default='127.0.0.1',
help='The address dashboard listens on'),
cfg.HostAddressOpt('listen-host', default='127.0.0.1',
help='The address dashboard listens on'),
cfg.IntOpt('listen-port', default=8080,
help='The port dashboard listens on'),
cfg.StrOpt('default-metric', default='marks',