Browse Source

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
changes/91/238291/6
XiaBing Yao 6 years ago
parent
commit
66d2a5519d
  1. 28
      keystone/common/config.py

28
keystone/common/config.py

@ -1016,12 +1016,12 @@ FILE_OPTIONS = {
deprecated_for_removal=True,
help='The IP address of the network interface for the '
'public service to listen on.'),
cfg.IntOpt('public_port', default=5000, min=1, max=65535,
deprecated_name='public_port',
deprecated_group='DEFAULT',
deprecated_for_removal=True,
help='The port number which the public service listens '
'on.'),
cfg.PortOpt('public_port', default=5000,
deprecated_name='public_port',
deprecated_group='DEFAULT',
deprecated_for_removal=True,
help='The port number which the public service listens '
'on.'),
cfg.StrOpt('admin_bind_host',
default='0.0.0.0', # nosec : Bind to all interfaces by
# default for backwards compatibility.
@ -1032,12 +1032,12 @@ FILE_OPTIONS = {
deprecated_for_removal=True,
help='The IP address of the network interface for the '
'admin service to listen on.'),
cfg.IntOpt('admin_port', default=35357, min=1, max=65535,
deprecated_name='admin_port',
deprecated_group='DEFAULT',
deprecated_for_removal=True,
help='The port number which the admin service listens '
'on.'),
cfg.PortOpt('admin_port', default=35357,
deprecated_name='admin_port',
deprecated_group='DEFAULT',
deprecated_for_removal=True,
help='The port number which the admin service listens '
'on.'),
cfg.BoolOpt('wsgi_keep_alive', default=True,
help="If set to false, disables keepalives on the server; "
"all connections will be closed after serving one "
@ -1125,8 +1125,8 @@ def configure(conf=None):
cfg.StrOpt('pydev-debug-host',
help='Host to connect to for remote debugger.'))
conf.register_cli_opt(
cfg.IntOpt('pydev-debug-port', min=1, max=65535,
help='Port to connect to for remote debugger.'))
cfg.PortOpt('pydev-debug-port',
help='Port to connect to for remote debugger.'))
for section in FILE_OPTIONS:
for option in FILE_OPTIONS[section]:

Loading…
Cancel
Save