Hello community, here is the log from the commit of package crmsh for openSUSE:Factory checked in at 2015-11-22 11:00:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2015-11-10 10:03:36.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.crmsh.new/crmsh.changes 2015-11-22 11:02:40.000000000 +0100 @@ -1,0 +2,6 @@ +Thu Nov 19 13:54:29 UTC 2015 - [email protected] + +- Update to version 2.2.0~rc3+git.1447774225.24dd944: + + high: xmlutil: Order is significant in resource_set (bsc#955434) + +------------------------------------------------------------------- Old: ---- crmsh-2.2.0~rc3+git.1447033314.c640af6.tar.bz2 New: ---- crmsh-2.2.0~rc3+git.1447774225.24dd944.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crmsh.spec ++++++ --- /var/tmp/diff_new_pack.8GIWK3/_old 2015-11-22 11:02:41.000000000 +0100 +++ /var/tmp/diff_new_pack.8GIWK3/_new 2015-11-22 11:02:41.000000000 +0100 @@ -36,7 +36,7 @@ Summary: High Availability cluster command-line interface License: GPL-2.0+ Group: %{pkg_group} -Version: 2.2.0~rc3+git.1447033314.c640af6 +Version: 2.2.0~rc3+git.1447774225.24dd944 Release: 0 Url: http://crmsh.github.io Source0: %{name}-%{version}.tar.bz2 ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.8GIWK3/_old 2015-11-22 11:02:41.000000000 +0100 +++ /var/tmp/diff_new_pack.8GIWK3/_new 2015-11-22 11:02:41.000000000 +0100 @@ -1,4 +1,4 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/ClusterLabs/crmsh.git</param> - <param name="changesrevision">c640af66732c310de38b4cc37308eaff466ede66</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">24dd9445d95803f77eeb0325b1196bf2288d1044</param></service></servicedata> \ No newline at end of file ++++++ crmsh-2.2.0~rc3+git.1447033314.c640af6.tar.bz2 -> crmsh-2.2.0~rc3+git.1447774225.24dd944.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0~rc3+git.1447033314.c640af6/modules/xmlutil.py new/crmsh-2.2.0~rc3+git.1447774225.24dd944/modules/xmlutil.py --- old/crmsh-2.2.0~rc3+git.1447033314.c640af6/modules/xmlutil.py 2015-11-09 03:13:51.000000000 +0100 +++ new/crmsh-2.2.0~rc3+git.1447774225.24dd944/modules/xmlutil.py 2015-11-19 14:54:29.000000000 +0100 @@ -1202,7 +1202,10 @@ def xml_equals_unordered(a, b): - "used by xml_equals to compare xml trees without ordering" + """ + used by xml_equals to compare xml trees without ordering. + NOTE: resource_set children SHOULD be compared with ordering. + """ def fail(msg): common_debug("%s!=%s: %s" % (a.tag, b.tag, msg)) return False @@ -1233,8 +1236,11 @@ # order matters here, but in a strange way: # all primitive tags should sort the same.. - sorted_children = zip(sorted(a, key=sortby), sorted(b, key=sortby)) - return all(xml_equals_unordered(a, b) for a, b in sorted_children) + if a.tag == 'resource_set': + return all(xml_equals_unordered(a, b) for a, b in zip(a, b)) + else: + sorted_children = zip(sorted(a, key=sortby), sorted(b, key=sortby)) + return all(xml_equals_unordered(a, b) for a, b in sorted_children) def xml_equals(n, m, show=False): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0~rc3+git.1447033314.c640af6/test/unittests/test_bugs.py new/crmsh-2.2.0~rc3+git.1447774225.24dd944/test/unittests/test_bugs.py --- old/crmsh-2.2.0~rc3+git.1447033314.c640af6/test/unittests/test_bugs.py 2015-11-09 03:13:51.000000000 +0100 +++ new/crmsh-2.2.0~rc3+git.1447774225.24dd944/test/unittests/test_bugs.py 2015-11-19 14:54:29.000000000 +0100 @@ -810,3 +810,29 @@ if o.node.tag == 'fencing-topology': assert o.check_sanity() == 0 + +@with_setup(setup_func, teardown_func) +def test_reordering_resource_sets(): + """ + Can we reorder resource sets? + """ + from crmsh import clidisplay + obj1 = factory.create_object('primitive', 'p1', 'Dummy') + assert obj1 is True + obj2 = factory.create_object('primitive', 'p2', 'Dummy') + assert obj2 is True + obj3 = factory.create_object('primitive', 'p3', 'Dummy') + assert obj3 is True + obj4 = factory.create_object('primitive', 'p4', 'Dummy') + assert obj4 is True + o1 = factory.create_object('order', 'o1', 'p1', 'p2', 'p3', 'p4') + assert o1 is True + + obj = cibconfig.mkset_obj('o1') + assert obj is not None + rc = obj.save('order o1 p4 p3 p2 p1') + assert rc == True + + obj2 = cibconfig.mkset_obj('o1') + with clidisplay.nopretty(): + assert "order o1 p4 p3 p2 p1" == obj2.repr().strip()
