From 5cdeb6b094d72d42478d820d3d58fe29de1908e1 Mon Sep 17 00:00:00 2001 From: Abdul Haleem Date: Thu, 15 Feb 2024 00:02:23 +0530 Subject: [PATCH] dlpar_vscsi: get device node for lscfg lscfg -vl do not support device id input, so get the node name for given device id to fix device not found error Signed-off-by: Abdul Haleem --- io/disk/dlpar_vscsi.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/io/disk/dlpar_vscsi.py b/io/disk/dlpar_vscsi.py index 10967a87b..6527068a4 100644 --- a/io/disk/dlpar_vscsi.py +++ b/io/disk/dlpar_vscsi.py @@ -17,6 +17,7 @@ DLPAR operations """ +import os from avocado import Test from avocado.utils import process from avocado.utils import disk @@ -34,7 +35,8 @@ def setUp(self): Gather necessary test inputs. ''' device = self.params.get('disk', default=None) - self.disk = disk.get_absolute_disk_path(device) + dev_path = disk.get_absolute_disk_path(device) + self.disk = os.path.basename(os.path.realpath(dev_path)) self.num_of_dlpar = int(self.params.get("num_of_dlpar", default='1')) self.vios_ip = self.params.get('vios_ip', '*', default=None) self.vios_user = self.params.get('vios_username', '*', default=None)