Browse Source

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
changes/84/238384/2
ZhiQiang Fan 6 years ago
parent
commit
2a148d3d31
  1. 6
      manila/service.py
  2. 6
      manila/share/drivers/emc/driver.py
  3. 12
      manila/share/drivers/hdfs/hdfs_native.py
  4. 6
      manila/share/drivers/hp/hp_3par_driver.py
  5. 6
      manila/share/drivers/ibm/gpfs.py
  6. 8
      manila/share/drivers/netapp/options.py

6
manila/service.py

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

6
manila/share/drivers/emc/driver.py

@ -36,9 +36,9 @@ 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',
default=8080,
help='Port number for the EMC server.'),
cfg.PortOpt('emc_nas_server_port',
default=8080,
help='Port number for the EMC server.'),
cfg.BoolOpt('emc_nas_server_secure',
default=True,
help='Use secure connection to server.'),

12
manila/share/drivers/hdfs/hdfs_native.py

@ -46,12 +46,12 @@ 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',
default=9000,
help='The port of HDFS namenode service.'),
cfg.IntOpt('hdfs_ssh_port',
default=22,
help='HDFS namenode SSH port.'),
cfg.PortOpt('hdfs_namenode_port',
default=9000,
help='The port of HDFS namenode service.'),
cfg.PortOpt('hdfs_ssh_port',
default=22,
help='HDFS namenode SSH port.'),
cfg.StrOpt('hdfs_ssh_name',
help='HDFS namenode ssh login name.'),
cfg.StrOpt('hdfs_ssh_pw',

6
manila/share/drivers/hp/hp_3par_driver.py

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

6
manila/share/drivers/ibm/gpfs.py

@ -71,9 +71,9 @@ 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',
default=22,
help='GPFS server SSH port.'),
cfg.PortOpt('gpfs_ssh_port',
default=22,
help='GPFS server SSH port.'),
cfg.StrOpt('gpfs_ssh_login',
help='GPFS server SSH login name.'),
cfg.StrOpt('gpfs_ssh_password',

8
manila/share/drivers/netapp/options.py

@ -33,10 +33,10 @@ 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',
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.')), ]
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.')), ]
netapp_transport_opts = [
cfg.StrOpt('netapp_transport_type',

Loading…
Cancel
Save