Merge "Use min and max on IntOpt option types"

This commit is contained in:
Jenkins 2015-09-08 12:23:19 +00:00 committed by Gerrit Code Review
commit 88f617800e
3 changed files with 4 additions and 3 deletions

View File

@ -131,6 +131,7 @@ common_opts = [
'be a security risk, so use this setting with '
'caution! The overrides show_image_direct_url.')),
cfg.IntOpt('image_size_cap', default=1099511627776,
max=9223372036854775808,
help=_("Maximum size of image a user can upload in bytes. "
"Defaults to 1099511627776 bytes (1 TB)."
"WARNING: this value should only be increased after "
@ -159,7 +160,7 @@ common_opts = [
cfg.StrOpt('pydev_worker_debug_host',
help=_('The hostname/IP of the pydev process listening for '
'debug connections')),
cfg.IntOpt('pydev_worker_debug_port', default=5678,
cfg.IntOpt('pydev_worker_debug_port', default=5678, min=1, max=65535,
help=_('The port on which a pydev process is listening for '
'connections.')),
cfg.StrOpt('metadata_encryption_key', secret=True,

View File

@ -59,7 +59,7 @@ bind_opts = [
cfg.StrOpt('bind_host', default='0.0.0.0',
help=_('Address to bind the server. Useful when '
'selecting a particular network interface.')),
cfg.IntOpt('bind_port',
cfg.IntOpt('bind_port', min=1, max=65535,
help=_('The port on which the server will listen.')),
]

View File

@ -26,7 +26,7 @@ _ = i18n._
registry_addr_opts = [
cfg.StrOpt('registry_host', default='0.0.0.0',
help=_('Address to find the registry server.')),
cfg.IntOpt('registry_port', default=9191,
cfg.IntOpt('registry_port', default=9191, min=1, max=65535,
help=_('Port the registry server is listening on.')),
]