Add minimum and maximum on port option

oslo.config can use minimum and maximum to support the ability to
set valid range on port option values

Change-Id: Idd182617cd500a7ed91ff18933bc989764c310db
This commit is contained in:
lei-zhang-99cloud 2015-08-26 16:01:49 +08:00
parent 5e93b59ac1
commit 5c9076b5b1
4 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,7 @@ API_SERVICE_OPTS = [
help=_('The IP address on which ironic-api listens.')),
cfg.IntOpt('port',
default=6385,
min=1, max=65535,
help=_('The TCP port on which ironic-api listens.')),
cfg.IntOpt('max_limit',
default=1000,

View File

@ -50,6 +50,7 @@ glance_opts = [
help=_('Default glance hostname or IP address.')),
cfg.IntOpt('glance_port',
default=9292,
min=1, max=65535,
help=_('Default glance port.')),
cfg.StrOpt('glance_protocol',
default='http',

View File

@ -45,6 +45,7 @@ opts = [
help=_('Timeout (in seconds) for iLO operations')),
cfg.IntOpt('client_port',
default=443,
min=1, max=65535,
help=_('Port to be used for iLO operations')),
cfg.StrOpt('swift_ilo_container',
default='ironic_ilo_container',

View File

@ -48,6 +48,7 @@ VIRTUALBOX_TO_IRONIC_POWER_MAPPING = {
opts = [
cfg.IntOpt('port',
default=18083,
min=1, max=65535,
help=_('Port on which VirtualBox web service is listening.')),
]
CONF = cfg.CONF