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: I66fb2097a4b6908fc6ee9f41ff141d3067a18a31
This commit is contained in:
jeremy.zhang 2017-03-28 11:34:56 +08:00
parent 5e125bdb14
commit c98c7e6986
1 changed files with 2 additions and 2 deletions

View File

@ -21,8 +21,8 @@ from fuxi.i18n import _
from fuxi.version import version_info
default_opts = [
cfg.StrOpt('my_ip',
help=_('IP address of this machine.')),
cfg.HostAddressOpt('my_ip',
help=_('IP address of this machine.')),
cfg.IntOpt('fuxi_port',
default=7879,
help=_('Port for fuxi volume driver server.')),