Fix host-disk-list listing mpath partitions

Command host-disk-list is listing mpath
partitions. It was filtering by the name
of the partition, which is not a mandatory
field. Changed to filter by partition number.

Test Plan:

PASS: AIO-SX with mpath. Created a partition
  without name and verified the host-disk-list
  command.

Story: 2010046
Task: 45473

Signed-off-by: Daian Cardoso Sganderlla <Daian.CardosoSganderlla@windriver.com>
Change-Id: Id198c58f1c2152635a2780f3d942fe2388e5d445
This commit is contained in:
Daian Cardoso Sganderlla 2022-05-25 13:12:26 -04:00
parent fa5d54cfc6
commit 36ad54f2bd
1 changed files with 1 additions and 1 deletions

View File

@ -567,7 +567,7 @@ def is_system_usable_block_device(pydev_device):
# Skip LVM devices
return False
if (constants.DEVICE_NAME_MPATH in pydev_device.get("DM_NAME", "")
and pydev_device.get("ID_PART_ENTRY_NAME")):
and pydev_device.get("ID_PART_ENTRY_NUMBER")):
# Skip mpath partition devices
return False
if pydev_device.get("ID_FS_TYPE") == constants.DEVICE_FS_TYPE_MPATH: