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:
XiaBing Yao 2015-08-13 10:17:21 -04:00
parent a597a86b85
commit 66d2a5519d
1 changed files with 14 additions and 14 deletions

View File

@ -1016,7 +1016,7 @@ 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,
cfg.PortOpt('public_port', default=5000,
deprecated_name='public_port',
deprecated_group='DEFAULT',
deprecated_for_removal=True,
@ -1032,7 +1032,7 @@ 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,
cfg.PortOpt('admin_port', default=35357,
deprecated_name='admin_port',
deprecated_group='DEFAULT',
deprecated_for_removal=True,
@ -1125,7 +1125,7 @@ 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,
cfg.PortOpt('pydev-debug-port',
help='Port to connect to for remote debugger.'))
for section in FILE_OPTIONS: