Hello community,

here is the log from the commit of package crmsh for openSUSE:Factory checked 
in at 2017-09-11 16:22:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/crmsh (Old)
 and      /work/SRC/openSUSE:Factory/.crmsh.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "crmsh"

Mon Sep 11 16:22:38 2017 rev:128 rq:522826 version:3.0.1+git.1504985015.b695b452

Changes:
--------
--- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes      2017-09-04 
12:31:02.888008774 +0200
+++ /work/SRC/openSUSE:Factory/.crmsh.new/crmsh.changes 2017-09-11 
16:23:30.010725703 +0200
@@ -1,0 +2,7 @@
+Sat Sep 09 19:24:24 UTC 2017 - kgronl...@suse.com
+
+- Update to version 3.0.1+git.1504985015.b695b452:
+  * medium: ui_node: node attribute/status-attr is about node attr, not for 
resources
+  * medium: bootstrap: Only call firewall-cmd if firewalld is active
+
+-------------------------------------------------------------------

Old:
----
  crmsh-3.0.1+git.1504075678.b5dce7ab.tar.bz2

New:
----
  crmsh-3.0.1+git.1504985015.b695b452.tar.bz2

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

Other differences:
------------------
++++++ crmsh.spec ++++++
--- /var/tmp/diff_new_pack.2EiCBu/_old  2017-09-11 16:23:30.506656067 +0200
+++ /var/tmp/diff_new_pack.2EiCBu/_new  2017-09-11 16:23:30.510655505 +0200
@@ -38,7 +38,7 @@
 Summary:        High Availability cluster command-line interface
 License:        GPL-2.0+
 Group:          %{pkg_group}
-Version:        3.0.1+git.1504075678.b5dce7ab
+Version:        3.0.1+git.1504985015.b695b452
 Release:        0
 Url:            http://crmsh.github.io
 Source0:        %{name}-%{version}.tar.bz2
@@ -54,7 +54,11 @@
 Requires:       python >= 2.6
 Requires:       python-dateutil
 Requires:       python-lxml
+%if 0%{?suse_version} > 1320
+Requires:       python2-parallax
+%else
 Requires:       python-parallax
+%endif
 BuildRequires:  python-lxml
 BuildRequires:  python-setuptools
 
@@ -109,7 +113,11 @@
 Requires(post):  procps
 Requires(post):  python-dateutil
 Requires(post):  python-nose
+%if 0%{?suse_version} > 1320
 Requires(post):  python2-parallax
+%else
+Requires(post):  python-parallax
+%endif
 Requires(post):  pacemaker
 %if 0%{?suse_version} > 1110
 BuildArch:      noarch

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.2EiCBu/_old  2017-09-11 16:23:30.546650451 +0200
+++ /var/tmp/diff_new_pack.2EiCBu/_new  2017-09-11 16:23:30.546650451 +0200
@@ -1,4 +1,4 @@
 <servicedata>
 <service name="tar_scm">
             <param name="url">git://github.com/ClusterLabs/crmsh.git</param>
-          <param 
name="changesrevision">1885eb21894cb66a375f6d6cc319f59b1653f0f4</param></service></servicedata>
\ No newline at end of file
+          <param 
name="changesrevision">b695b452ddaf39acd32311c0f64d8733b5a6348f</param></service></servicedata>
\ No newline at end of file

++++++ crmsh-3.0.1+git.1504075678.b5dce7ab.tar.bz2 -> 
crmsh-3.0.1+git.1504985015.b695b452.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-3.0.1+git.1504075678.b5dce7ab/crmsh/bootstrap.py 
new/crmsh-3.0.1+git.1504985015.b695b452/crmsh/bootstrap.py
--- old/crmsh-3.0.1+git.1504075678.b5dce7ab/crmsh/bootstrap.py  2017-08-30 
08:47:58.000000000 +0200
+++ new/crmsh-3.0.1+git.1504985015.b695b452/crmsh/bootstrap.py  2017-09-09 
21:23:35.000000000 +0200
@@ -484,6 +484,9 @@
             error("Failed to restart firewall (SuSEfirewall2)")
 
     def init_firewall_firewalld(tcp, udp):
+        if not service_is_active("firewalld"):
+            warn("Unable to configure firewall: Not active")
+            return
         for p in tcp:
             if not invoke("firewall-cmd --zone=public --add-port={}/tcp 
--permanent".format(p)):
                 error("Failed to configure firewall (firewalld via 
firewall-cmd)")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh-3.0.1+git.1504075678.b5dce7ab/crmsh/ui_node.py 
new/crmsh-3.0.1+git.1504985015.b695b452/crmsh/ui_node.py
--- old/crmsh-3.0.1+git.1504075678.b5dce7ab/crmsh/ui_node.py    2017-08-30 
08:47:58.000000000 +0200
+++ new/crmsh-3.0.1+git.1504985015.b695b452/crmsh/ui_node.py    2017-09-09 
21:23:35.000000000 +0200
@@ -42,17 +42,26 @@
     return uname, ident, typ, other, inst_attr, is_offline
 
 
-def _find_utilization(args):
+def _find_attr(args):
     """
-    complete utilization attrs
+    complete utilization/attribute/status-attr attrs
     """
+    if not len(args) >= 2:
+        return []
     cib = xmlutil.cibdump2elem()
     if cib is None:
         return []
 
     res = []
-    node_util = cib.xpath("//nodes/node[@uname='%s']/utilization/nvpair" % 
args[-3])
-    for item in node_util:
+    if args[0] == "utilization":
+       xpath = "//nodes/node[@uname='%s']/utilization/nvpair" % args[1]
+    if args[0] == "attribute":
+       xpath = "//nodes/node[@uname='%s']/instance_attributes/nvpair" % args[1]
+    if args[0] == "status-attr":
+       xpath = "//status/node_state[@uname='%s']/\
+                transient_attributes/instance_attributes/nvpair" % args[1]
+    node_attr = cib.xpath(xpath)
+    for item in node_attr:
         res.append(item.get("name"))
     return res
 
@@ -306,17 +315,17 @@
         return True
 
     @command.wait
-    @command.completers(compl.nodes, compl.choice(['set', 'delete', 'show']), 
compl.resources)
-    def do_attribute(self, context, node, cmd, rsc, value=None):
+    @command.completers(compl.nodes, compl.choice(['set', 'delete', 'show']), 
_find_attr)
+    def do_attribute(self, context, node, cmd, attr, value=None):
         """usage:
-        attribute <node> set <rsc> <value>
-        attribute <node> delete <rsc>
-        attribute <node> show <rsc>"""
+        attribute <node> set <attr> <value>
+        attribute <node> delete <attr>
+        attribute <node> show <attr>"""
         return ui_utils.manage_attr(context.get_command_name(), self.node_attr,
-                                    node, cmd, rsc, value)
+                                    node, cmd, attr, value)
 
     @command.wait
-    @command.completers(compl.nodes, compl.choice(['set', 'delete', 'show']), 
_find_utilization)
+    @command.completers(compl.nodes, compl.choice(['set', 'delete', 'show']), 
_find_attr)
     def do_utilization(self, context, node, cmd, attr, value=None):
         """usage:
         utilization <node> set <attr> <value>
@@ -327,14 +336,14 @@
 
     @command.wait
     @command.name('status-attr')
-    @command.completers(compl.nodes, compl.choice(['set', 'delete', 'show']), 
compl.resources)
-    def do_status_attr(self, context, node, cmd, rsc, value=None):
+    @command.completers(compl.nodes, compl.choice(['set', 'delete', 'show']), 
_find_attr)
+    def do_status_attr(self, context, node, cmd, attr, value=None):
         """usage:
-        status-attr <node> set <rsc> <value>
-        status-attr <node> delete <rsc>
-        status-attr <node> show <rsc>"""
+        status-attr <node> set <attr> <value>
+        status-attr <node> delete <attr>
+        status-attr <node> show <attr>"""
         return ui_utils.manage_attr(context.get_command_name(), 
self.node_status,
-                                    node, cmd, rsc, value)
+                                    node, cmd, attr, value)
 
     def do_server(self, context, *nodes):
         """


Reply via email to