Hello community,

here is the log from the commit of package crmsh for openSUSE:Factory checked 
in at 2014-02-17 12:52:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/crmsh (Old)
 and      /work/SRC/openSUSE:Factory/.crmsh.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "crmsh"

Changes:
--------
--- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes      2014-02-11 
11:03:15.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.crmsh.new/crmsh.changes 2014-02-17 
12:52:27.000000000 +0100
@@ -1,0 +2,16 @@
+Thu Feb 13 15:20:02 UTC 2014 - kgronl...@suse.com
+
+- medium: hb_report: Fix incorrect quotes (bnc#863816)
+- upstream cs: 364c59ee0612 
+
+-------------------------------------------------------------------
+Thu Feb 13 10:34:21 UTC 2014 - kgronl...@suse.com
+
+- spec: Require python >= 2.6
+- high: cibconfig: Handle non-string arguments (bnc#863736)
+- low: cibconfig: do not format xml tags when requested (bnc#863746)
+- medium: ui_root: Rename root level to 'root' (bnc#863583)
+- doc: manpages: Section name broke docbook generation (bnc#863055)
+- upstream cs: 6545c6fc8bf6 
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ crmsh.spec ++++++
--- /var/tmp/diff_new_pack.okWM6e/_old  2014-02-17 12:52:28.000000000 +0100
+++ /var/tmp/diff_new_pack.okWM6e/_new  2014-02-17 12:52:28.000000000 +0100
@@ -52,7 +52,7 @@
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Requires(pre):  pacemaker
 Requires:       pssh
-Requires:       python >= 2.4
+Requires:       python >= 2.6
 Requires:       python-PyYAML
 Requires:       python-dateutil
 Requires:       python-lxml

++++++ crmsh.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/.hg_archival.txt new/crmsh/.hg_archival.txt
--- old/crmsh/.hg_archival.txt  2014-02-10 08:37:44.000000000 +0100
+++ new/crmsh/.hg_archival.txt  2014-02-13 16:16:00.000000000 +0100
@@ -1,5 +1,5 @@
 repo: 13c3bd69e935090cd25213c474cafc3f01b5910b
-node: 49572fb0f7bbf6fce9cf3df967799c2132f109bb
+node: 364c59ee0612e71579ffacbdf628022043e61ba6
 branch: default
 latesttag: 1.2.6-rc1
-latesttagdistance: 415
+latesttagdistance: 425
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/crmsh.spec new/crmsh/crmsh.spec
--- old/crmsh/crmsh.spec        2014-02-10 08:37:44.000000000 +0100
+++ new/crmsh/crmsh.spec        2014-02-13 16:16:00.000000000 +0100
@@ -52,7 +52,7 @@
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Requires(pre):  pacemaker
 Requires:       pssh
-Requires:       python >= 2.4
+Requires:       python >= 2.6
 Requires:       python-PyYAML
 Requires:       python-dateutil
 Requires:       python-lxml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/doc/crm.8.txt new/crmsh/doc/crm.8.txt
--- old/crmsh/doc/crm.8.txt     2014-02-10 08:37:44.000000000 +0100
+++ new/crmsh/doc/crm.8.txt     2014-02-13 16:16:00.000000000 +0100
@@ -617,7 +617,7 @@
 repeated, `|` means pick one of many, and the rest are literals
 (strings, `:`, `=`).
 
-[[cmdhelp_._status,Cluster status]]
+[[cmdhelp_root_status,Cluster status]]
 === `status`
 
 Show cluster status. The status is displayed by `crm_mon`. Supply
@@ -3131,9 +3131,10 @@
 
 Usage:
 ...............
-new <config> <template> [<template> ...] [params name=value ...]"
+new <config> <template> [<template> ...] [params name=value ...]
 ...............
-Examples:
+
+Example:
 ...............
 new vip virtual-ip
 new bigfs ocfs2 params device=/dev/sdx8 directory=/bigfs
@@ -3500,7 +3501,9 @@
 
 If you think you may have found a bug or just need clarification
 from developers or your support, the `session pack` command can
-help create a report. This is an example:
+help create a report.
+
+Example:
 ...............
 crm(live)history# timeframe "Jul 18 12:00" "Jul 18 12:30"
 crm(live)history# session save strange_restart
@@ -3508,6 +3511,7 @@
 Report saved in .../strange_restart.tar.bz2
 crm(live)history# 
 ...............
+
 In order to reduce report size and allow developers to
 concentrate on the issue, you should beforehand limit the time
 frame. Giving a meaningful session name helps too.
@@ -3931,7 +3935,7 @@
 session list
 ...............
 
-[[cmdhelp_._report,Create cluster status report]]
+[[cmdhelp_root_report,Create cluster status report]]
 === `report`
 
 Interface to a tool for creating a cluster report. A report is an
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/hb_report/hb_report.in 
new/crmsh/hb_report/hb_report.in
--- old/crmsh/hb_report/hb_report.in    2014-02-10 08:37:44.000000000 +0100
+++ new/crmsh/hb_report/hb_report.in    2014-02-13 16:16:00.000000000 +0100
@@ -26,7 +26,7 @@
 unset LANG
 export LC_ALL=POSIX
 
-PROG=`report`
+PROG="report"
 
 # the default syslog facility is not (yet) exported by heartbeat
 # to shell scripts
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/modules/cibconfig.py 
new/crmsh/modules/cibconfig.py
--- old/crmsh/modules/cibconfig.py      2014-02-10 08:37:44.000000000 +0100
+++ new/crmsh/modules/cibconfig.py      2014-02-13 16:16:00.000000000 +0100
@@ -657,8 +657,12 @@
             v = v.lower()
         if n.startswith('$'):
             n = n.lstrip('$')
-        if (type(v) != type('') and type(v) != type(u'')) \
-                or v:  # skip empty strings
+        if not isinstance(v, basestring):
+            if isinstance(v, bool):
+                v = str(v).lower()
+            else:
+                raise ValueError("cannot make attribute value from '%s'" % (v))
+        if v:  # skip empty strings
             node.set(n, v)
     id_ref = node.get("id-ref")
     if id_ref:
@@ -898,10 +902,16 @@
                                 len(self.children))
 
     def _repr_cli_xml(self, format):
-        h = cli_display.keyword("xml")
-        l = etree.tostring(self.node, pretty_print=True).split('\n')
-        l = [x for x in l if x]  # drop empty lines
-        return "%s %s" % (h, cli_format(l, break_lines=(format > 0), xml=True))
+        if format < 0:
+            cli_display.set_no_pretty()
+        try:
+            h = cli_display.keyword("xml")
+            l = etree.tostring(self.node, pretty_print=True).split('\n')
+            l = [x for x in l if x]  # drop empty lines
+            return "%s %s" % (h, cli_format(l, break_lines=(format > 0), 
xml=True))
+        finally:
+            if format < 0:
+                cli_display.reset_no_pretty()
 
     def _gv_rsc_id(self):
         if self.parent and self.parent.obj_type in vars.clonems_tags:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/modules/help.py new/crmsh/modules/help.py
--- old/crmsh/modules/help.py   2014-02-10 08:37:44.000000000 +0100
+++ new/crmsh/modules/help.py   2014-02-13 16:16:00.000000000 +0100
@@ -157,7 +157,7 @@
     s += "\n"
     s += "Available commands:\n\n"
 
-    for title, command in _COMMANDS.get('.', {}).iteritems():
+    for title, command in _COMMANDS.get('root', {}).iteritems():
         if not command.is_alias():
             s += '\t' + _titleline(title, command.short)
     s += "\n"
@@ -165,7 +165,7 @@
     hidden_commands = ('up', 'cd', 'help', 'quit', 'ls')
 
     for title, level in _LEVELS.iteritems():
-        if title != '.' and title in _COMMANDS:
+        if title != 'root' and title in _COMMANDS:
             s += '\t' + _titleline(title, level.short, suffix='/')
             for cmdname, cmd in _COMMANDS[title].iteritems():
                 if cmdname in hidden_commands:
@@ -241,7 +241,7 @@
     """
     _load_help()
     if subject is None:
-        if context == '.':
+        if context == 'root':
             return help_overview()
         return help_level(context)
     if subject.lower() == 'overview':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/modules/ui_context.py 
new/crmsh/modules/ui_context.py
--- old/crmsh/modules/ui_context.py     2014-02-10 08:37:44.000000000 +0100
+++ new/crmsh/modules/ui_context.py     2014-02-13 16:16:00.000000000 +0100
@@ -320,7 +320,7 @@
     def level_name(self):
         '''
         Returns the name of the current level.
-        Returns '.' if at the root level.
+        Returns 'root' if at the root level.
         '''
         return self.current_level().name
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/modules/ui_root.py new/crmsh/modules/ui_root.py
--- old/crmsh/modules/ui_root.py        2014-02-10 08:37:44.000000000 +0100
+++ new/crmsh/modules/ui_root.py        2014-02-13 16:16:00.000000000 +0100
@@ -53,7 +53,7 @@
     """
 
     # name is the user-visible name of this CLI level.
-    name = '.'
+    name = 'root'
 
     @command.level(ui_cluster.Cluster)
     @command.help('''Cluster setup and management
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/test/unittests/test_cliformat.py 
new/crmsh/test/unittests/test_cliformat.py
--- old/crmsh/test/unittests/test_cliformat.py  1970-01-01 01:00:00.000000000 
+0100
+++ new/crmsh/test/unittests/test_cliformat.py  2014-02-13 16:16:00.000000000 
+0100
@@ -0,0 +1,74 @@
+# Copyright (C) 2014 Kristoffer Gronlund <kgronl...@suse.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#
+# unit tests for cliformat.py
+
+import utils
+import parse
+import cibconfig
+from test_parse import MockValidation
+
+factory = cibconfig.cib_factory
+
+
+def mk_cli_list(cli):
+    'Sometimes we get a string and sometimes a list.'
+    if isinstance(cli, basestring):
+        cp = parse.CliParser()
+        mv = MockValidation()
+        for p in cp.parsers.values():
+            p.validation = mv
+        # what follows looks strange, but the last string actually matters
+        # the previous ones may be comments and are collected by the parser
+        for s in utils.lines2cli(cli):
+            cli_list = cp.parse2(s)
+        return cli_list
+    else:
+        return cli
+
+
+def roundtrip(type, name, cli):
+    obj = factory.new_object(type, name)
+    assert obj is not None
+    cli_list = mk_cli_list(cli)
+    node = obj.cli2node(cli_list)
+    assert node is not None
+    obj.node = node
+    obj.set_id()
+    obj.nocli = True
+    xml = obj.repr_cli(format=-1)
+    print xml
+    obj.nocli = False
+    s = obj.repr_cli(format=-1)
+    if s != cli:
+        print "GOT:", s
+        print "EXP:", cli
+    assert s == cli
+
+
+def test_rscset():
+    roundtrip('colocation', 'foo', 'colocation foo inf: a b')
+    roundtrip('order', 'order_2', 'order order_2 Mandatory: [ A B ] C')
+    roundtrip('rsc_template', 'public_vm', 'rsc_template public_vm 
ocf:heartbeat:Xen')
+
+
+def test_bnc863736():
+    roundtrip('order', 'order_3', 'order order_3 Mandatory: [ A B ] C 
symmetrical=true')
+
+
+def test_sequential():
+    roundtrip('colocation', 'rsc_colocation-master',
+              'colocation rsc_colocation-master inf: [ vip-master vip-rep 
sequential="true" ] [ msPostgresql:Master sequential="true" ]')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/test/unittests/test_parse.py 
new/crmsh/test/unittests/test_parse.py
--- old/crmsh/test/unittests/test_parse.py      2014-02-10 08:37:44.000000000 
+0100
+++ new/crmsh/test/unittests/test_parse.py      2014-02-13 16:16:00.000000000 
+0100
@@ -257,6 +257,20 @@
         out = self.parser.parse('order o1 Serialize: A ( B C )')
         self.assertEqual(out.id, 'o1')
 
+        out = self.parser.parse('order o1 Serialize: A ( B C ) 
symmetrical=false')
+        self.assertEqual(out.id, 'o1')
+        self.assertFalse(out.symmetrical)
+
+        out = self.parser.parse('order o1 Serialize: A ( B C ) 
symmetrical=true')
+        self.assertEqual(out.id, 'o1')
+        self.assertTrue(out.symmetrical)
+
+        out = self.parser.parse('colocation rsc_colocation-master INFINITY: [ 
vip-master vip-rep sequential=true ] [ msPostgresql:Master sequential=true ]')
+        print out.to_list()
+        self.assertEqual(out.resources[0][0], 'resource_set')
+        self.assertTrue(['sequential', 'true'] in out.resources[0][1])
+        self.assertEqual(out.id, 'rsc_colocation-master')
+
         out = self.parser.parse('order order_2 Mandatory: [ A B ] C')
         self.assertEqual(out.id, 'order_2')
         self.assertEqual(out.to_list(), [['order', [['id', 'order_2'], 
['kind', 'Mandatory']]], ['resource_set', [['require-all', 'false'], 
['sequential', 'false'], ['resource_ref', ['id', 'A']], ['resource_ref', ['id', 
'B']]]], ['resource_set', [['resource_ref', ['id', 'C']]]]])

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to