Skip to content

Commit

Permalink
Merge branch '3.8-devel' into 3.9-devel
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtechtrefny committed Dec 12, 2023
2 parents e82653e + 1e2cdcb commit c55b3cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions blivet/devices/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,10 +469,12 @@ def __init__(self, device, **kwargs):
:keyword hba_id: ???
:keyword wwpn: ???
:keyword fcp_lun: ???
:keyword id_path: string from udev-builtin-path_id
"""
self.hba_id = kwargs.pop("hba_id")
self.wwpn = kwargs.pop("wwpn")
self.fcp_lun = kwargs.pop("fcp_lun")
self.id_path = kwargs.pop("id_path")
DiskDevice.__init__(self, device, **kwargs)
self._clear_local_tags()
self.tags.add(Tags.remote)
Expand Down
1 change: 1 addition & 0 deletions blivet/populator/helpers/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ def match(cls, data):
def _get_kwargs(self):
kwargs = super(ZFCPDevicePopulator, self)._get_kwargs()

kwargs["id_path"] = udev.device_get_path(self.data)
for attr in ['hba_id', 'wwpn', 'fcp_lun']:
kwargs[attr] = udev.device_get_zfcp_attribute(self.data, attr=attr)

Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/tags_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_auto_tags(self):
fcoe_device = FcoeDiskDevice('test6', nic=None, identifier=None, id_path=None)
self.assertIn(Tags.remote, fcoe_device.tags)
self.assertNotIn(Tags.local, fcoe_device.tags)
zfcp_device = ZFCPDiskDevice('test7', hba_id=None, wwpn=None, fcp_lun=None)
zfcp_device = ZFCPDiskDevice('test7', hba_id=None, wwpn=None, fcp_lun=None, id_path=None)
self.assertIn(Tags.remote, zfcp_device.tags)
self.assertNotIn(Tags.local, zfcp_device.tags)

Expand Down

0 comments on commit c55b3cc

Please sign in to comment.