Use oslo_config new type PortOpt for port options

The oslo_config library provides new type PortOpt to validate the
range of port now.

Change-Id: I8d1746c399268d7b3388db82de77c5e6c06844a3
ref: https://github.com/openstack/oslo.config/blob/2.6.0/oslo_config/cfg.py#L1114
This commit is contained in:
ZhiQiang Fan 2015-10-22 00:49:11 -06:00
parent f15e0bf123
commit 2a148d3d31
6 changed files with 22 additions and 22 deletions

View File

@ -55,7 +55,7 @@ service_opts = [
cfg.StrOpt('osapi_share_listen',
default="::",
help='IP address for OpenStack Share API to listen on.'),
cfg.IntOpt('osapi_share_listen_port',
cfg.PortOpt('osapi_share_listen_port',
default=8786,
help='Port for OpenStack Share API to listen on.'),
cfg.IntOpt('osapi_share_workers',

View File

@ -36,7 +36,7 @@ EMC_NAS_OPTS = [
help='Password for the EMC server.'),
cfg.StrOpt('emc_nas_server',
help='EMC server hostname or IP address.'),
cfg.IntOpt('emc_nas_server_port',
cfg.PortOpt('emc_nas_server_port',
default=8080,
help='Port number for the EMC server.'),
cfg.BoolOpt('emc_nas_server_secure',

View File

@ -46,10 +46,10 @@ LOG = log.getLogger(__name__)
hdfs_native_share_opts = [
cfg.StrOpt('hdfs_namenode_ip',
help='The IP of the HDFS namenode.'),
cfg.IntOpt('hdfs_namenode_port',
cfg.PortOpt('hdfs_namenode_port',
default=9000,
help='The port of HDFS namenode service.'),
cfg.IntOpt('hdfs_ssh_port',
cfg.PortOpt('hdfs_ssh_port',
default=22,
help='HDFS namenode SSH port.'),
cfg.StrOpt('hdfs_ssh_name',

View File

@ -55,7 +55,7 @@ HP3PAR_OPTS = [
default='',
help="Password for SAN controller",
secret=True),
cfg.IntOpt('hp3par_san_ssh_port',
cfg.PortOpt('hp3par_san_ssh_port',
default=22,
help='SSH port to use with SAN'),
cfg.StrOpt('hp3par_fpg',

View File

@ -71,7 +71,7 @@ gpfs_share_opts = [
cfg.ListOpt('gpfs_nfs_server_list',
help=('A list of the fully qualified NFS server names that '
'make up the OpenStack Manila configuration.')),
cfg.IntOpt('gpfs_ssh_port',
cfg.PortOpt('gpfs_ssh_port',
default=22,
help='GPFS server SSH port.'),
cfg.StrOpt('gpfs_ssh_login',

View File

@ -33,7 +33,7 @@ netapp_connection_opts = [
cfg.StrOpt('netapp_server_hostname',
deprecated_name='netapp_nas_server_hostname',
help='The hostname (or IP address) for the storage system.'),
cfg.IntOpt('netapp_server_port',
cfg.PortOpt('netapp_server_port',
help=('The TCP port to use for communication with the storage '
'system or proxy server. If not specified, Data ONTAP '
'drivers will use 80 for HTTP and 443 for HTTPS.')), ]