From e48e1d3c0721f6fb87b8e23555272864008a87c6 Mon Sep 17 00:00:00 2001 From: lingyongxu Date: Thu, 6 Apr 2017 15:43:06 +0800 Subject: [PATCH] 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 --- stackalytics/dashboard/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stackalytics/dashboard/config.py b/stackalytics/dashboard/config.py index 3852c1153..12c4e6750 100644 --- a/stackalytics/dashboard/config.py +++ b/stackalytics/dashboard/config.py @@ -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',