From 3284beb6cbae8d396a082fb64d60d20222d88694 Mon Sep 17 00:00:00 2001 From: Karol Latecki Date: Mon, 25 Jun 2018 13:40:34 +0200 Subject: [PATCH] spdkcli: use lower case letters for directories Change-Id: I98e37bc2f58e553c7dff325d7b331b088e9c9d33 Signed-off-by: Karol Latecki Reviewed-on: https://review.gerrithub.io/416706 Tested-by: SPDK Automated Test System Reviewed-by: Pawel Kaminski Reviewed-by: Daniel Verkamp Reviewed-by: Ben Walker --- scripts/spdkcli/ui_node.py | 18 +++++++++--------- scripts/spdkcli/ui_root.py | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/spdkcli/ui_node.py b/scripts/spdkcli/ui_node.py index b6cc4c8c3..d26d10809 100644 --- a/scripts/spdkcli/ui_node.py +++ b/scripts/spdkcli/ui_node.py @@ -180,7 +180,7 @@ class UIBdev(UINode): class UIMallocBdev(UIBdev): def __init__(self, parent): - UIBdev.__init__(self, "Malloc", parent) + UIBdev.__init__(self, "malloc", parent) def ui_command_create(self, size, block_size, name=None, uuid=None): """ @@ -219,7 +219,7 @@ class UIMallocBdev(UIBdev): class UIAIOBdev(UIBdev): def __init__(self, parent): - UIBdev.__init__(self, "AIO", parent) + UIBdev.__init__(self, "aio", parent) def ui_command_create(self, name, filename, block_size): """ @@ -245,7 +245,7 @@ class UIAIOBdev(UIBdev): class UILvolBdev(UIBdev): def __init__(self, parent): - UIBdev.__init__(self, "Logical_Volume", parent) + UIBdev.__init__(self, "logical_volume", parent) def ui_command_create(self, name, size, lvs, thin_provision=None): """ @@ -281,7 +281,7 @@ class UILvolBdev(UIBdev): class UINvmeBdev(UIBdev): def __init__(self, parent): - UIBdev.__init__(self, "NVMe", parent) + UIBdev.__init__(self, "nvme", parent) def ui_command_create(self, name, trtype, traddr, adrfam=None, trsvcid=None, subnqn=None): @@ -300,7 +300,7 @@ class UINvmeBdev(UIBdev): class UINullBdev(UIBdev): def __init__(self, parent): - UIBdev.__init__(self, "Null", parent) + UIBdev.__init__(self, "null", parent) def ui_command_create(self, name, size, block_size, uuid=None): """ @@ -328,7 +328,7 @@ class UINullBdev(UIBdev): class UIErrorBdev(UIBdev): def __init__(self, parent): - UIBdev.__init__(self, "Error", parent) + UIBdev.__init__(self, "error", parent) def ui_command_create(self, base_name): """ @@ -345,7 +345,7 @@ class UIErrorBdev(UIBdev): class UISplitBdev(UIBdev): def __init__(self, parent): - UIBdev.__init__(self, "Split_Disk", parent) + UIBdev.__init__(self, "split_disk", parent) class UIPmemBdev(UIBdev): @@ -378,7 +378,7 @@ class UIPmemBdev(UIBdev): class UIRbdBdev(UIBdev): def __init__(self, parent): - UIBdev.__init__(self, "Rbd", parent) + UIBdev.__init__(self, "rbd", parent) def ui_command_create(self, pool_name, rbd_name, block_size, name=None): block_size = self.ui_eval_param(block_size, "number", None) @@ -394,7 +394,7 @@ class UIRbdBdev(UIBdev): class UIiSCSIBdev(UIBdev): def __init__(self, parent): - UIBdev.__init__(self, "iSCSI", parent) + UIBdev.__init__(self, "iscsi", parent) def ui_command_create(self, name, url, initiator_iqn): """ diff --git a/scripts/spdkcli/ui_root.py b/scripts/spdkcli/ui_root.py index ee724abc0..98c87e84b 100644 --- a/scripts/spdkcli/ui_root.py +++ b/scripts/spdkcli/ui_root.py @@ -31,7 +31,7 @@ class UIRoot(UINode): # For example logical volumes: listing in menu is "Logical_Volume" # (cannot have space), but the product name in SPDK is "Logical Volume" bdev_type = bdev_type.replace("_", " ") - for bdev in filter(lambda x: bdev_type in x["product_name"], + for bdev in filter(lambda x: bdev_type in x["product_name"].lower(), self.current_bdevs): test = Bdev(bdev) yield test