summaryrefslogtreecommitdiff
path: root/ceilometer/opts.py
diff options
context:
space:
mode:
authorblue55 <yllan@fiberhome.com>2017-03-17 16:33:38 +0800
committerblue55 <yllan@fiberhome.com>2017-03-23 14:42:54 +0800
commit3b450c65dd4dbaff65a49f8c53a254c171ea9645 (patch)
tree751fa85f4501d9a2ddb807a85924ed913008c711 /ceilometer/opts.py
parent63122e8b4d413d9cb15a34568a4858cca804e92d (diff)
downloadceilometer-3b450c65dd4dbaff65a49f8c53a254c171ea9645.tar.gz
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: I2463fc873bb149cafa802f5743d5f482f25552fc
Diffstat (limited to 'ceilometer/opts.py')
-rw-r--r--ceilometer/opts.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/ceilometer/opts.py b/ceilometer/opts.py
index 4da8bac1..52ba520d 100644
--- a/ceilometer/opts.py
+++ b/ceilometer/opts.py
@@ -57,12 +57,13 @@ import ceilometer.volume.discovery
OPTS = [
- cfg.StrOpt('host',
- default=socket.gethostname(),
- sample_default='<your_hostname>',
- help='Name of this node, which must be valid in an AMQP '
- 'key. Can be an opaque identifier. For ZeroMQ only, must '
- 'be a valid host name, FQDN, or IP address.'),
+ cfg.HostAddressOpt('host',
+ default=socket.gethostname(),
+ sample_default='<your_hostname>',
+ help='Name of this node, which must be valid in an '
+ 'AMQP key. Can be an opaque identifier. For ZeroMQ '
+ 'only, must be a valid host name, FQDN, or IP '
+ 'address.'),
cfg.IntOpt('http_timeout',
default=600,
help='Timeout seconds for HTTP requests. Set it to None to '