Use oslo_config PortOpt support
The oslo_config library provide PortOpt type to validate the port of range now. References: https://review.openstack.org/#/c/231257/ Depends-On: Ida294b05a85f5bef587b761fcd03c28c7a3474d8 Change-Id: I5934528896726d0da80dc40309e36907fd0049b6
This commit is contained in:
parent
a597a86b85
commit
66d2a5519d
|
@ -1016,12 +1016,12 @@ FILE_OPTIONS = {
|
||||||
deprecated_for_removal=True,
|
deprecated_for_removal=True,
|
||||||
help='The IP address of the network interface for the '
|
help='The IP address of the network interface for the '
|
||||||
'public service to listen on.'),
|
'public service to listen on.'),
|
||||||
cfg.IntOpt('public_port', default=5000, min=1, max=65535,
|
cfg.PortOpt('public_port', default=5000,
|
||||||
deprecated_name='public_port',
|
deprecated_name='public_port',
|
||||||
deprecated_group='DEFAULT',
|
deprecated_group='DEFAULT',
|
||||||
deprecated_for_removal=True,
|
deprecated_for_removal=True,
|
||||||
help='The port number which the public service listens '
|
help='The port number which the public service listens '
|
||||||
'on.'),
|
'on.'),
|
||||||
cfg.StrOpt('admin_bind_host',
|
cfg.StrOpt('admin_bind_host',
|
||||||
default='0.0.0.0', # nosec : Bind to all interfaces by
|
default='0.0.0.0', # nosec : Bind to all interfaces by
|
||||||
# default for backwards compatibility.
|
# default for backwards compatibility.
|
||||||
|
@ -1032,12 +1032,12 @@ FILE_OPTIONS = {
|
||||||
deprecated_for_removal=True,
|
deprecated_for_removal=True,
|
||||||
help='The IP address of the network interface for the '
|
help='The IP address of the network interface for the '
|
||||||
'admin service to listen on.'),
|
'admin service to listen on.'),
|
||||||
cfg.IntOpt('admin_port', default=35357, min=1, max=65535,
|
cfg.PortOpt('admin_port', default=35357,
|
||||||
deprecated_name='admin_port',
|
deprecated_name='admin_port',
|
||||||
deprecated_group='DEFAULT',
|
deprecated_group='DEFAULT',
|
||||||
deprecated_for_removal=True,
|
deprecated_for_removal=True,
|
||||||
help='The port number which the admin service listens '
|
help='The port number which the admin service listens '
|
||||||
'on.'),
|
'on.'),
|
||||||
cfg.BoolOpt('wsgi_keep_alive', default=True,
|
cfg.BoolOpt('wsgi_keep_alive', default=True,
|
||||||
help="If set to false, disables keepalives on the server; "
|
help="If set to false, disables keepalives on the server; "
|
||||||
"all connections will be closed after serving one "
|
"all connections will be closed after serving one "
|
||||||
|
@ -1125,8 +1125,8 @@ def configure(conf=None):
|
||||||
cfg.StrOpt('pydev-debug-host',
|
cfg.StrOpt('pydev-debug-host',
|
||||||
help='Host to connect to for remote debugger.'))
|
help='Host to connect to for remote debugger.'))
|
||||||
conf.register_cli_opt(
|
conf.register_cli_opt(
|
||||||
cfg.IntOpt('pydev-debug-port', min=1, max=65535,
|
cfg.PortOpt('pydev-debug-port',
|
||||||
help='Port to connect to for remote debugger.'))
|
help='Port to connect to for remote debugger.'))
|
||||||
|
|
||||||
for section in FILE_OPTIONS:
|
for section in FILE_OPTIONS:
|
||||||
for option in FILE_OPTIONS[section]:
|
for option in FILE_OPTIONS[section]:
|
||||||
|
|
Loading…
Reference in New Issue