Skip to contentSkip to conversation

Fix usage of configshell-fb module

PATCH In review Stephan Müller 2 participants 4 messages Oct 9, 2025 – Oct 10, 2025 NVMe

lore
Share & tools
lore
#0 lore raw

cover Fix usage of configshell-fb module

Hello

These patches are necessary on Debian 13 with configshell v.2.0.0. Calls to "configshell_fb.node.ConfigNode" are no longer possible, when importing "configshell_fb".

1. From configshell-fb v2.0.0 on, the module is actually named configshell. This already fixes the Debian issue and also works on Debian 12 with configshell-fb v1.2.8.

2. They now explicitly export module symbols, so we should use those instead of referring to file names. This is more cosmetic thing.

Have a nice day
stephan

Stephan Müller (2):
Use preferred module name
Use exported configshell symbols

 nvmetcli | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
2.39.5
#1 lore raw

PATCH 1/2 Use preferred module name

The configshell-fb module is now called configshell. From v2.0.0 onwards the preferred way is to import the module as configshell.

---
 nvmetcli | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
nvmetcli +1 -1
index d949891..433e4c4 100755
@@ -22,7 +22,7 @@ from __future__ import print_function
 
 import os
 import sys
-import configshell_fb as configshell
+import configshell
 import nvmet as nvme
 import errno
 from string import hexdigits
Signature · 1 line
2.39.5
#2 lore raw

PATCH 2/2 Use exported configshell symbols

In reply to Stephan Müller

Replace direct invocations of configshell internals with actually exported symbols.

---
 nvmetcli | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
nvmetcli +4 -4
index 433e4c4..fe8a58e 100755
@@ -33,9 +33,9 @@ def ngiud_set(nguid):
     return any(c in hexdigits and c != '0' for c in nguid)
 
 
-class UINode(configshell.node.ConfigNode):
+class UINode(configshell.ConfigNode):
     def __init__(self, name, parent=None, cfnode=None, shell=None):
-        configshell.node.ConfigNode.__init__(self, name, parent, shell)
+        configshell.ConfigNode.__init__(self, name, parent, shell)
         self.cfnode = cfnode
         if self.cfnode:
             if self.cfnode.attr_groups:
@@ -704,7 +704,7 @@ def clear(unused):
 
 
 def ls(unused):
-    shell = configshell.shell.ConfigShell('~/.nvmetcli')
+    shell = configshell.ConfigShell('~/.nvmetcli')
     UIRootNode(shell)
     shell.run_cmdline("ls")
     sys.exit(0)
@@ -737,7 +737,7 @@ def main():
         return
 
     try:
-        shell = configshell.shell.ConfigShell('~/.nvmetcli')
+        shell = configshell.ConfigShell('~/.nvmetcli')
         UIRootNode(shell)
     except Exception as msg:
         shell.log.error(str(msg))
Signature · 1 line
2.39.5
#3 lore raw
In reply to Stephan Müller
Quoted 5 lines · Stephan Müller

Hello

These patches are necessary on Debian 13 with configshell v.2.0.0. Calls to "configshell_fb.node.ConfigNode" are no longer possible, when importing "configshell_fb".

Newer configshell versions should improve backward compatibility, but yes, the new module name "configshell" is preferred.

Quoted 12 lines

1. From configshell-fb v2.0.0 on, the module is actually named configshell. This already fixes the Debian issue and also works on Debian 12 with configshell-fb v1.2.8.

2. They now explicitly export module symbols, so we should use those instead of referring to file names. This is more cosmetic thing.

Have a nice day
stephan

Quoted 6 lines

Stephan Müller (2):
Use preferred module name
Use exported configshell symbols

 nvmetcli | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Tested on Fedora rawhide with configshell 2.0.2

ACK

Maurizio