Set the min and max value of IntOpt config options

This patch sets the min and max value for all
IntOpt config options based on the functionality.

Change-Id: I959371c4ba8ede400f8f1eb3b271016769d8473e
This commit is contained in:
asmita singh 2018-12-14 14:37:57 +00:00
parent b7b600efc2
commit ff94c95b1a
3 changed files with 8 additions and 1 deletions

View File

@ -32,7 +32,10 @@ from blazar.utils import service as service_utils
opts = [
cfg.IntOpt('port', default=1234,
cfg.IntOpt('port',
default=1234,
min=0,
max=65535,
help='Port that will be used to listen on'),
]

View File

@ -38,11 +38,13 @@ manager_opts = [
'support.)'),
cfg.IntOpt('minutes_before_end_lease',
default=60,
min=0,
help='Minutes prior to the end of a lease in which actions '
'like notification and snapshot are taken. If this is '
'set to 0, then these actions are not taken.'),
cfg.IntOpt('event_max_retries',
default=1,
min=0,
max=50,
help='Number of times to retry an event action.')
]

View File

@ -56,9 +56,11 @@ plugin_opts = [
'of compute hosts by polling the Nova API.'),
cfg.IntOpt('polling_interval',
default=60,
min=1,
help='Interval (seconds) of polling for health checking.'),
cfg.IntOpt('healing_interval',
default=60,
min=0,
help='Interval (minutes) of reservation healing. '
'If 0 is specified, the interval is infinite and all the '
'reservations in the future is healed at one time.'),