Merge "[Pure Storage] Add check for NVMe-FC capable array"

This commit is contained in:
Zuul 2021-11-08 19:53:30 +00:00 committed by Gerrit Code Review
commit f2620a1fe4
3 changed files with 18 additions and 1 deletions

View File

@ -150,11 +150,13 @@ FC_PORTS = [{"name": name,
"iqn": None,
"portal": None,
"wwn": wwn,
"nqn": None,
} for name, wwn in zip(FC_PORT_NAMES, FC_WWNS)]
AC_FC_PORTS = [{"name": name,
"iqn": None,
"portal": None,
"wwn": wwn,
"nqn": None,
} for name, wwn in zip(FC_PORT_NAMES, AC_FC_WWNS)]
NON_ISCSI_PORT = {
"name": "ct0.fc1",

View File

@ -2823,7 +2823,17 @@ class PureFCDriver(PureBaseVolumeDriver, driver.FibreChannelDriver):
def _get_array_wwns(array):
"""Return list of wwns from the array"""
ports = array.list_ports()
return [port["wwn"] for port in ports if port["wwn"]]
try:
valid_ports = [
port["wwn"]
for port in ports
if port["wwn"] and not port["nqn"]
]
except KeyError: # Older array code versions will not return nqn
valid_ports = [
port["wwn"] for port in ports if port["wwn"]
]
return valid_ports
@pure_driver_debug_trace
def initialize_connection(self, volume, connector):

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Pure Storage Driver: Add internal check to allow for FlashArray with
joint FC and NVMe-FC support