Remove redundant WWPN when preparing boot-from-volume

We use one WWPN to do boot-from-volume, but SVC driver always
returns a WWPN list from Newton. So we have to remove the
redundant ones.

Change-Id: I6c43eb8f057c79b3f9f75a8532608e5f42e924b1
This commit is contained in:
Yi Chun Huang 2017-01-18 11:16:56 +08:00
parent 4d0d01a79a
commit d61e0d0879
1 changed files with 4 additions and 0 deletions

View File

@ -384,6 +384,10 @@ class ZVMInstance(object):
(lun, wwpn, size,
fcp) = self._volumeop.extract_connection_info(context,
connection_info)
if len(wwpn) > 16:
# a wwpn list similar to:
# 5005076800aa0001;5005076800aa0002;5005076800aa0003
wwpn = wwpn.split(';')[0]
(kernel_parm_string, scpdata) = self._forge_hex_scpdata(fcp,
wwpn, lun, volume_meta)