Dell PowerFlex: Set default value for port config

Added default port value for the Dell PowerFlex
NAS backend

Closes-Bug: #2066840
Change-Id: Ifda8c0b179763fe0884ef3845b6836be861ca6a8
This commit is contained in:
Nilesh Thathagar 2024-06-12 10:01:25 +00:00
parent 842fda18e5
commit d7f7b6312a
3 changed files with 11 additions and 4 deletions

View File

@ -44,7 +44,8 @@ POWERFLEX_OPTS = [
help='Protection domain to use.'),
cfg.StrOpt('dell_nas_backend_host',
help='Dell NAS backend hostname or IP address.'),
cfg.StrOpt('dell_nas_backend_port',
cfg.IntOpt('dell_nas_backend_port',
default=443,
help='Port number to use with the Dell NAS backend.'),
cfg.StrOpt('dell_nas_server',
help='Root directory or NAS server which owns the shares.'),
@ -100,8 +101,7 @@ class PowerFlexStorageConnection(driver.StorageConnection):
get_config_value = config.safe_get
self.verify_certificate = get_config_value("dell_ssl_cert_verify")
self.rest_ip = get_config_value("dell_nas_backend_host")
self.rest_port = (int(get_config_value("dell_nas_backend_port")) or
443)
self.rest_port = get_config_value("dell_nas_backend_port")
self.nas_server = get_config_value("dell_nas_server")
self.storage_pool = get_config_value("powerflex_storage_pool")
self.protection_domain = get_config_value(

View File

@ -47,7 +47,7 @@ class PowerFlexTest(test.TestCase):
if value == "dell_nas_backend_host":
return "192.168.0.110"
elif value == "dell_nas_backend_port":
return "443"
return 443
elif value == "dell_nas_login":
return "admin"
elif value == "dell_nas_password":

View File

@ -0,0 +1,7 @@
---
fixes:
- |
PowerFlex Driver `bug #2066840
<https://bugs.launchpad.net/manila/+bug/2066840>`_:
The default port value of 443 has been added for
the PowerFlex NAS backend.