diff --git a/anaconda.spec.in b/anaconda.spec.in index 9509393bd7c..fad52a0d882 100644 --- a/anaconda.spec.in +++ b/anaconda.spec.in @@ -37,7 +37,7 @@ Source0: %{name}-%{version}.tar.bz2 %define nmver 1.0 %define pykickstartver 3.32.10-1 %define pypartedver 2.5-2 -%define pythonblivetver 1:3.6.0-4 +%define pythonblivetver 1:3.6.0-13 %define rpmver 4.10.0 %define simplelinever 1.8.3-1 %define subscriptionmanagerver 1.29.31 diff --git a/pyanaconda/modules/common/structures/storage.py b/pyanaconda/modules/common/structures/storage.py index f65e9d64918..51f7d322da5 100644 --- a/pyanaconda/modules/common/structures/storage.py +++ b/pyanaconda/modules/common/structures/storage.py @@ -186,6 +186,7 @@ def attrs(self) -> Dict[Str, Str]: fcp-lun wwpn hba-id + path-id :return: a dictionary of attributes """ diff --git a/pyanaconda/modules/storage/devicetree/viewer.py b/pyanaconda/modules/storage/devicetree/viewer.py index 6e9d68adb9c..2bf8e597bd9 100644 --- a/pyanaconda/modules/storage/devicetree/viewer.py +++ b/pyanaconda/modules/storage/devicetree/viewer.py @@ -176,6 +176,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. diff --git a/pyanaconda/modules/storage/zfcp/zfcp.py b/pyanaconda/modules/storage/zfcp/zfcp.py index 77405a52656..4fcb61d68bb 100644 --- a/pyanaconda/modules/storage/zfcp/zfcp.py +++ b/pyanaconda/modules/storage/zfcp/zfcp.py @@ -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) diff --git a/pyanaconda/ui/gui/spokes/advanced_storage.py b/pyanaconda/ui/gui/spokes/advanced_storage.py index 04ae7338095..b455d70f456 100644 --- a/pyanaconda/ui/gui/spokes/advanced_storage.py +++ b/pyanaconda/ui/gui/spokes/advanced_storage.py @@ -96,7 +96,7 @@ def create_row(device_data, selected, mutable): vendor=attrs.get("vendor", ""), interconnect=attrs.get("bus", ""), serial=attrs.get("serial", ""), - wwid=attrs.get("path-id", ""), + wwid=attrs.get("path-id", "") or attrs.get("wwn", ""), paths="\n".join(device.parents), port=attrs.get("port", ""), target=attrs.get("target", ""), diff --git a/tests/unit_tests/pyanaconda_tests/modules/storage/test_module_device_tree.py b/tests/unit_tests/pyanaconda_tests/modules/storage/test_module_device_tree.py index 15889bdac4f..6bbe6331f0f 100644 --- a/tests/unit_tests/pyanaconda_tests/modules/storage/test_module_device_tree.py +++ b/tests/unit_tests/pyanaconda_tests/modules/storage/test_module_device_tree.py @@ -345,7 +345,8 @@ 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") @@ -353,7 +354,8 @@ def test_get_zfcp_device_data(self): 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):