Use min and max on IntOpt option types

Latest version of oslo.config support the ability to set valid
range on IntOpt option values.  This path makes use of that feature
for a number of options with well known minimum and maximum values.

Change-Id: I26c920a2be68deeaa6ba534eb9d92b2960f78328
This commit is contained in:
Eric Brown 2015-08-15 11:11:01 -07:00
parent 3c10d3876e
commit 0108a27f94
3 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,7 @@ from oslo_config import cfg
OPTS = [
cfg.IntOpt('port',
default=8777,
min=1, max=65535,
deprecated_name='metering_api_port',
deprecated_group='DEFAULT',
help='The port for the ceilometer API server.',

View File

@ -35,6 +35,7 @@ OPTS = [
'an empty string to disable.'),
cfg.IntOpt('udp_port',
default=4952,
min=1, max=65535,
help='Port to which the UDP socket is bound.'),
cfg.BoolOpt('requeue_sample_on_dispatcher_error',
default=False,

View File

@ -34,6 +34,7 @@ OPTS = [
help='IP address of the VMware vSphere host.'),
cfg.IntOpt('host_port',
default=443,
min=1, max=65535,
help='Port of the VMware vSphere host.'),
cfg.StrOpt('host_username',
default='',