Hello community,

here is the log from the commit of package nvmetcli for openSUSE:Factory 
checked in at 2018-01-24 15:30:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nvmetcli (Old)
 and      /work/SRC/openSUSE:Factory/.nvmetcli.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nvmetcli"

Wed Jan 24 15:30:56 2018 rev:7 rq:568526 version:0.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/nvmetcli/nvmetcli.changes        2017-12-01 
15:54:38.197881211 +0100
+++ /work/SRC/openSUSE:Factory/.nvmetcli.new/nvmetcli.changes   2018-01-24 
15:31:03.368813854 +0100
@@ -1,0 +2,11 @@
+Tue Jan 23 10:04:23 UTC 2018 - jthumsh...@suse.com
+
+- Update to version v0.6: (FATE#322737)
+   - 0001-nvmetcli-remove-status-method-for-the-uiportnode.patch
+  * nvmetcli: remove status method for the UIPortNode
+  * nvmetcli: expose ls to dump UI configuration
+  * nvmetcli: decorate namespace, subsystem and port UI
+  * nvmetcli: port decoration coloring only if its enabled
+  * bump version to v0.6
+
+-------------------------------------------------------------------

Old:
----
  0001-nvmetcli-remove-status-method-for-the-uiportnode.patch
  nvmetcli-v0.5.tar.gz

New:
----
  nvmetcli-v0.6.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ nvmetcli.spec ++++++
--- /var/tmp/diff_new_pack.DOKBCx/_old  2018-01-24 15:31:04.408765216 +0100
+++ /var/tmp/diff_new_pack.DOKBCx/_new  2018-01-24 15:31:04.412765029 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package nvmetcli
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,14 +17,13 @@
 
 
 Name:           nvmetcli
-Version:        0.5
+Version:        0.6
 Release:        1%{?dist}
 Summary:        Command line interface for the kernel NVMe nvmet
 License:        Apache-2.0
 Group:          System/Management
 Url:            http://git.infradead.org/users/hch/nvmetcli.git
 Source:         nvmetcli-v%{version}.tar.gz
-Patch1:         0001-nvmetcli-remove-status-method-for-the-uiportnode.patch
 BuildRequires:  python-devel
 BuildRequires:  python-setuptools
 Requires:       python-configshell-fb
@@ -43,7 +42,6 @@
 
 %prep
 %setup -q -n nvmetcli-v%{version}
-%patch1 -p1
 
 %build
 python setup.py build

++++++ _service ++++++
--- /var/tmp/diff_new_pack.DOKBCx/_old  2018-01-24 15:31:04.448763346 +0100
+++ /var/tmp/diff_new_pack.DOKBCx/_new  2018-01-24 15:31:04.452763158 +0100
@@ -4,8 +4,8 @@
     <param name="scm">git</param>
     <param name="url">git://git.infradead.org/users/hch/nvmetcli.git</param>
     <param name="filename">nvmetcli</param>
-    <param name="version">v0.5</param>
-    <param name="revision">v0.5</param>
+    <param name="version">v0.6</param>
+    <param name="revision">v0.6</param>
     <param name="exclude">.git</param>
     <param name="changesgenerate">enable</param>
   </service>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.DOKBCx/_old  2018-01-24 15:31:04.480761849 +0100
+++ /var/tmp/diff_new_pack.DOKBCx/_new  2018-01-24 15:31:04.484761662 +0100
@@ -1,4 +1,4 @@
 <servicedata>
 <service name="tar_scm">
             <param 
name="url">git://git.infradead.org/users/hch/nvmetcli.git</param>
-          <param 
name="changesrevision">389993977d5a0bfc366c8683a05553043740dfa9</param></service></servicedata>
\ No newline at end of file
+          <param 
name="changesrevision">9d51ae651a1c39a83b0192fbbe1e400abf3a0409</param></service></servicedata>
\ No newline at end of file

++++++ nvmetcli-v0.5.tar.gz -> nvmetcli-v0.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvmetcli-v0.5/Documentation/nvmetcli.txt 
new/nvmetcli-v0.6/Documentation/nvmetcli.txt
--- old/nvmetcli-v0.5/Documentation/nvmetcli.txt        2017-08-10 
14:46:02.000000000 +0200
+++ new/nvmetcli-v0.6/Documentation/nvmetcli.txt        2018-01-22 
19:45:05.000000000 +0100
@@ -105,6 +105,7 @@
                             Without specifying the filename this will use
                             */etc/nvmet/config.json*.
 | clear                   | Clears a current NVMe Target configuration.
+| ls                      | Dumps the current NVMe Target configuration.
 |==================
 
 EXAMPLES
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvmetcli-v0.5/nvmetcli new/nvmetcli-v0.6/nvmetcli
--- old/nvmetcli-v0.5/nvmetcli  2017-08-10 14:46:02.000000000 +0200
+++ new/nvmetcli-v0.6/nvmetcli  2018-01-22 19:45:05.000000000 +0100
@@ -24,7 +24,11 @@
 import sys
 import configshell_fb as configshell
 import nvmet as nvme
+from string import hexdigits
+import uuid
 
+def ngiud_set(nguid):
+    return any(c in hexdigits and c != '0' for c in nguid)
 
 class UINode(configshell.node.ConfigNode):
     def __init__(self, name, parent=None, cfnode=None, shell=None):
@@ -160,6 +164,13 @@
         UINamespacesNode(self)
         UIAllowedHostsNode(self)
 
+    def summary(self):
+        info = []
+        info.append("version=" + self.cfnode.get_attr("attr","version"))
+        info.append("allow_any=" + 
self.cfnode.get_attr("attr","allow_any_host"))
+        info.append("serial=" + self.cfnode.get_attr("attr","serial"))
+        return (", ".join(info), True)
+
 
 class UINamespacesNode(UINode):
     def __init__(self, parent):
@@ -247,6 +258,19 @@
                 raise configshell.ExecutionError(
                     "The Namespace could not be disabled.")
 
+    def summary(self):
+        info = []
+        info.append("path=" + self.cfnode.get_attr("device", "path"))
+        ns_uuid = self.cfnode.get_attr("device", "uuid")
+        if uuid.UUID(ns_uuid).int != 0:
+            info.append("uuid=" + str(ns_uuid))
+        ns_nguid = self.cfnode.get_attr("device", "nguid")
+        if ngiud_set(ns_nguid):
+            info.append("nguid=" + ns_nguid)
+        info.append("enabled" if self.cfnode.get_enable() else "disabled")
+        ns_enabled = self.cfnode.get_enable()
+        return (", ".join(info), True if ns_enabled == 1 else ns_enabled)
+
 
 class UIAllowedHostsNode(UINode):
     def __init__(self, parent):
@@ -356,11 +380,15 @@
         UIPortSubsystemsNode(self)
         UIReferralsNode(self)
 
-    def status(self):
-        if self.cfnode.get_enable():
-            return "enabled"
-        return "disabled"
-
+    def summary(self):
+        info = []
+        info.append("trtype=" + self.cfnode.get_attr("addr", "trtype"))
+        info.append("traddr=" + self.cfnode.get_attr("addr", "traddr"))
+        trsvcid = self.cfnode.get_attr("addr", "trsvcid")
+        if trsvcid != "none":
+            info.append("trsvcid=%s" % trsvcid)
+        enabled = not (not self.cfnode.subsystems and not 
list(self.cfnode.referrals))
+        return (", ".join(info), True if enabled else 0)
 
 class UIPortSubsystemsNode(UINode):
     def __init__(self, parent):
@@ -554,6 +582,7 @@
     print("syntax: %s save [file_to_save_to]" % sys.argv[0])
     print("        %s restore [file_to_restore_from]" % sys.argv[0])
     print("        %s clear" % sys.argv[0])
+    print("        %s ls" % sys.argv[0])
     sys.exit(-1)
 
 
@@ -577,7 +606,14 @@
     nvme.Root().clear_existing()
 
 
-funcs = dict(save=save, restore=restore, clear=clear)
+def ls(unused):
+    shell = configshell.shell.ConfigShell('~/.nvmetcli')
+    UIRootNode(shell)
+    shell.run_cmdline("ls")
+    sys.exit(0)
+
+
+funcs = dict(save=save, restore=restore, clear=clear, ls=ls)
 
 
 def main():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvmetcli-v0.5/setup.py new/nvmetcli-v0.6/setup.py
--- old/nvmetcli-v0.5/setup.py  2017-08-10 14:46:02.000000000 +0200
+++ new/nvmetcli-v0.6/setup.py  2018-01-22 19:45:05.000000000 +0100
@@ -20,7 +20,7 @@
 
 setup(
     name = 'nvmetcli',
-    version = 0.5,
+    version = 0.6,
     description = 'NVMe target configuration tool',
     license = 'Apache 2.0',
     maintainer = 'Christoph Hellwig',


Reply via email to