Skip to contentSkip to conversation

'discovery_nqn' configfs attribute

PATCH In review [email protected] 2 participants 2 messages Aug 23, 2025 – Sep 30, 2025 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 'discovery_nqn' configfs attribute

From: Hannes Reinecke <[email protected]>

Implement support for the 'discovery_nqn' configfs attribute to allow the user to read or modify the persistent discovery NQN.

---
 nvmet/nvme.py | 1 +
 nvmetcli      | 8 ++++++++
 2 files changed, 9 insertions(+)
nvmet/nvme.py +1 -0
index 59efdb5..5111db7 100644
@@ -234,6 +234,7 @@ class Root(CFSNode):
     def __init__(self):
         super(Root, self).__init__()
 
+        self.attr_groups = ['discovery']
         if not os.path.isdir(self.configfs_dir):
             self._modprobe('nvmet')
 
nvmetcli +8 -0
index d949891..9df6e89 100755
@@ -94,10 +94,18 @@ class UINode(configshell.node.ConfigNode):
 
 
 class UIRootNode(UINode):
+    ui_desc_discovery = {
+        'nqn': ('string', 'Discovery NQN'),
+    }
     def __init__(self, shell):
         UINode.__init__(self, '/', parent=None, cfnode=nvme.Root(),
                         shell=shell)
 
+    def summary(self):
+        info = []
+        info.append("discovery=" + self.cfnode.get_attr("discovery", "nqn"))
+        return (", ".join(info), True)
+
     def refresh(self):
         self._children = set([])
         UISubsystemsNode(self)
Signature · 1 line
2.43.0
#1 lore raw
Quoted 5 lines · On 8/22/25 13:54, [email protected] wrote:

From: Hannes Reinecke <[email protected]>

Implement support for the 'discovery_nqn' configfs attribute to allow the user to read or modify the persistent discovery NQN.

Christoph,

ping?

Cheers,

Hannes

Signature · 4 lines
Dr. Hannes Reinecke                  Kernel Storage Architect
[email protected]                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich