Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes for advanced storage: WWID for multipath, path-id for zfcp, generate zfcp kickstart #5249

Closed
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyanaconda/modules/common/structures/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def attrs(self) -> Dict[Str, Str]:
fcp-lun
wwpn
hba-id
path-id

:return: a dictionary of attributes
"""
Expand Down
1 change: 1 addition & 0 deletions pyanaconda/modules/storage/devicetree/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def _set_device_data_zfcp(self, device, data):
data.attrs["fcp-lun"] = self._get_attribute(device, "fcp_lun")
data.attrs["wwpn"] = self._get_attribute(device, "wwpn")
data.attrs["hba-id"] = self._get_attribute(device, "hba_id")
data.attrs["path-id"] = self._get_attribute(device, "id_path")

def get_format_data(self, device_name):
"""Get the device format data.
Expand Down
12 changes: 12 additions & 0 deletions pyanaconda/modules/storage/zfcp/zfcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,15 @@ def process_kickstart(self, data):
def setup_kickstart(self, data):
"""Setup the kickstart data."""
data.zfcp.zfcp = self._zfcp_data
# So far, the data contains explicit zfcp statements from a
# kickstart file used as input for the installation. Now, add any
# missing entries that come from user interaction with the GUI.
for fcpdev in zfcp.fcpdevs:
zd = data.zfcp.dataClass()
zd.devnum = fcpdev.devnum
if "wwpn" in dir(fcpdev):
zd.wwpn = fcpdev.wwpn
if "fcplun" in dir(fcpdev):
zd.fcplun = fcpdev.fcplun
if zd not in data.zfcp.dataList():
data.zfcp.dataList().append(zd)
2 changes: 1 addition & 1 deletion pyanaconda/ui/gui/spokes/advanced_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def create_row(device_data, selected, mutable):
vendor=device_data.attrs.get("vendor", ""),
interconnect=device_data.attrs.get("bus", ""),
serial=device_data.attrs.get("serial", ""),
wwid=device_data.attrs.get("path-id", ""),
wwid=device_data.attrs.get("path-id", "") or device_data.attrs.get("wwn", ""),
paths="\n".join(device_data.parents),
port=device_data.attrs.get("port", ""),
target=device_data.attrs.get("target", ""),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,17 @@ def test_get_zfcp_device_data(self):
size=Size("10 GiB"),
fcp_lun="0x5719000000000000",
wwpn="0x5005076300c18154",
hba_id="0.0.010a"
hba_id="0.0.010a",
id_path="ccw-0.0.010a-fc-0x5005076300c18154-lun-0x5719000000000000"
))

data = self.interface.GetDeviceData("dev1")
assert data['type'] == get_variant(Str, 'zfcp')
assert data['attrs'] == get_variant(Dict[Str, Str], {
"fcp-lun": "0x5719000000000000",
"wwpn": "0x5005076300c18154",
"hba-id": "0.0.010a"
"hba-id": "0.0.010a",
"path-id": "ccw-0.0.010a-fc-0x5005076300c18154-lun-0x5719000000000000"
})

def test_get_format_data(self):
Expand Down