Skip to contentSkip to conversation

nvmetcli: remove status method for the UIPortNode

PATCH New Johannes Thumshirn 2 participants 2 messages Nov 30, 2017 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvmetcli: remove status method for the UIPortNode

nvmetcli defines a status method for the UIPortNode class but there is no corresponding 'enable' file in configfs so typing in status will always result in nvmetcli printing disbaled if one types 'status' in the port node:

/> cd ports/1/
/ports/1> status
Status for /ports/1: disabled
/ports/1>

There are two possible ways for fixing this issue, provide a configfs file to enable/disable the port node in the kernel or delete the method in nvmetcli. Having a configfs file in the kernel is pointless, as ports get enabled when symlinked to a namespace so zap the pointless status method in user-space.

Signed-off-by Johannes Thumshirn <jthumshirn at suse.de>
Reported-by Hannes Reinecke <hare at suse.de>
---
 nvmetcli | 5 -----
 1 file changed, 5 deletions(-)
nvmetcli +0 -5
index 5378365eb91f..4fbc12ec430f 100755
@@ -356,11 +356,6 @@ class UIPortNode(UINode):
         UIPortSubsystemsNode(self)
         UIReferralsNode(self)
 
-    def status(self):
-        if self.cfnode.get_enable():
-            return "enabled"
-        return "disabled"
-
 
 class UIPortSubsystemsNode(UINode):
     def __init__(self, parent):
Signature · 1 line
2.13.6
maintainer Applied
#1 lore raw

PATCH 1/1 nvmetcli: remove status method for the UIPortNode

Thanks Johannes,

applied.