Hello community,

here is the log from the commit of package crmsh for openSUSE:Factory checked 
in at 2012-02-16 12:19:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/crmsh (Old)
 and      /work/SRC/openSUSE:Factory/.crmsh.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "crmsh", Maintainer is "dmuhameda...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes      2012-01-12 
15:25:48.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.crmsh.new/crmsh.changes 2012-02-16 
12:19:23.000000000 +0100
@@ -1,0 +2,15 @@
+Tue Feb 14 03:05:48 UTC 2012 - tser...@suse.com
+
+- history: reset time period when setting source
+- doc: describe deficiency in the configure edit command (bnc#715698)
+- cibconf: repair resource parameter uniqueness test
+- completion: add command aliases to completion tables (cl#5013)
+- cibconf: repair ability to manage multiple rsc/op_defaults (bnc#737812)
+- history: add clone/ms resources to events (fixes the transition command)
+- utils: repair ptest usage (bnc#736212)
+- cibconf: repair xml edit
+- history: expand clones and ms in the resource command (bnc#729631)
+- build: add optional regression testing on rpm build
+- upstream cs: c06b8cf8fcf8
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ crmsh.spec ++++++
--- /var/tmp/diff_new_pack.ygtnVe/_old  2012-02-16 12:19:25.000000000 +0100
+++ /var/tmp/diff_new_pack.ygtnVe/_new  2012-02-16 12:19:25.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package crmsh
 #
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,6 +16,8 @@
 #
 
 
+# crmsh requires pacemaker, which in turn requires cluster-glue, which has a
+# %pre script which creates the hacluster/haclient user and group used here:
 %global gname haclient
 %global uname hacluster
 %global crmsh_docdir %{_defaultdocdir}/%{name}
@@ -35,11 +37,11 @@
 
 Name:           crmsh
 Summary:        Pacemaker/CRM shell
+License:        GPL-2.0
+Group:          Productivity/Clustering/HA
 Version:        1.1.0
 Release:        0
-License:        GPL-2.0
 Url:            http://savannah.nongnu.org/projects/crmsh
-Group:          Productivity/Clustering/HA
 Source0:        crmsh.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Requires(pre): pacemaker
@@ -49,15 +51,27 @@
 %if 0%{?suse_version}
 # Suse splits this off into a separate package
 Requires:       python-curses python-xml
-BuildRequires:  python-curses python-xml
+BuildRequires:  python-curses
+BuildRequires:  python-xml
 %endif
 
 # Required for core functionality
-BuildRequires:  autoconf automake pkgconfig python
-BuildRequires:  libglue-devel libpacemaker-devel
+BuildRequires:  autoconf
+BuildRequires:  automake
+BuildRequires:  pkgconfig
+BuildRequires:  python
+BuildRequires:  libglue-devel
+BuildRequires:  libpacemaker-devel
 BuildRequires:  asciidoc
 BuildRequires:  libtool
 
+%if 0%{?with_regression_tests}
+BuildRequires:  corosync
+BuildRequires:  procps
+BuildRequires:  vim-base
+Requires:       pacemaker
+%endif
+
 %description
 CRM shell is a Pacemaker cluster resource manager command line
 interface. It supports Pacemaker configuration, management, and
@@ -99,6 +113,22 @@
 %install
 %make_install
 
+%if 0%{?with_regression_tests}
+%post
+# Needed so that the shell doesn't get stuck on escape
+# sequences
+# NB: this is called twice by OBS, that's why we touch the file
+if [ ! -e /tmp/.crmsh_regression_tests_ran ]; then
+       touch /tmp/.crmsh_regression_tests_ran
+       export TERM=dumb
+       if ! /usr/share/crmsh/tests/regression.sh ; then
+               echo "Shell tests failed."
+               cat crmtestout/regression.out
+               exit 1
+       fi
+fi
+%endif
+
 %files
 ###########################################################
 %defattr(-,root,root)

++++++ 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  2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/.hg_archival.txt  2012-02-03 12:13:57.000000000 +0100
@@ -1,5 +1,5 @@
 repo: 13c3bd69e935090cd25213c474cafc3f01b5910b
-node: cb8034d8d3da45143798cc25ab90cdecfc5e685a
+node: c06b8cf8fcf8d4345157048974313aaf48db1ef8
 branch: default
 latesttag: Pacemaker-1.1.5
-latesttagdistance: 73
+latesttagdistance: 96
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/crmsh.spec new/crmsh/crmsh.spec
--- old/crmsh/crmsh.spec        2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/crmsh.spec        2012-02-03 12:13:57.000000000 +0100
@@ -19,7 +19,7 @@
 Summary:       Pacemaker command line interface
 Version:       1.1.0
 Release:       %{crmsh_release}%{?dist}
-License:       GPLv2+ and LGPLv2+
+License:       GPLv2+
 Url:           http://www.clusterlabs.org
 Group:         Productivity/Clustering/HA
 Source0:       crmsh.tar.bz2
@@ -39,6 +39,11 @@
 BuildRequires: libpacemaker-devel libglue-devel
 BuildRequires: asciidoc
 
+%if 0%{?with_regression_tests}
+BuildRequires:  corosync procps vim-base
+Requires:       pacemaker
+%endif
+
 %description
 crm shell, a Pacemaker command line interface.
 
@@ -87,6 +92,19 @@
 %clean
 rm -rf %{buildroot}
 
+%if 0%{?with_regression_tests}
+
+%post
+# Needed so that the shell doesn't get stuck on escape
+# sequences
+export TERM=dumb
+if ! /usr/share/crmsh/tests/regression.sh ; then
+       echo "Shell tests failed."
+       cat crmtestout/regression.out
+       exit 1
+fi
+%endif
+
 %files
 ###########################################################
 %defattr(-,root,root)
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     2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/doc/crm.8.txt     2012-02-03 12:13:57.000000000 +0100
@@ -684,18 +684,22 @@
 ==== `meta` (`info`)
 
 Show the meta-data of a resource agent type. This is where users
-can find information on how to use a resource agent.
+can find information on how to use a resource agent. It is also
+possible to get information from some programs: `pengine`,
+`crmd`, `cib`, and `stonithd`. Just specify the program name
+instead of an RA.
 
 Usage:
 ...............
-        meta [<class>:[<provider>:]]<type>
-        meta <type> <class> [<provider>] (obsolete)
+        info [<class>:[<provider>:]]<type>
+        info <type> <class> [<provider>] (obsolete)
 ...............
 Example:
 ...............
-        meta apache
-        meta ocf:pacemaker:Dummy
-        meta stonith:ipmilan
+        info apache
+        info ocf:pacemaker:Dummy
+        info stonith:ipmilan
+        info pengine
 ...............
 
 [[cmdhelp_ra_providers,show providers for a RA and a class]]
@@ -1893,6 +1897,14 @@
         edit [xml] changed
 ...............
 
+.Note on renaming element ids
+****************************
+The edit command sometimes cannot properly handle modifying
+element ids. In particular for elements which belong to group or
+ms resources. Group and ms resources themselves also cannot be
+renamed. Please use the `rename` command instead.
+****************************
+
 [[cmdhelp_configure_filter,filter CIB objects]]
 ==== `filter`
 
@@ -2651,7 +2663,10 @@
 Show actions and any failures that happened on all specified
 resources on all nodes. Normally, one gives resource names as
 arguments, but it is also possible to use extended regular
-expressions.
+expressions. Note that neither groups nor clones or master/slave
+names are ever logged. The resource command is going to expand
+all of these appropriately, so that clone instances or resources
+which are part of a group are shown.
 
 Usage:
 ...............
@@ -2660,8 +2675,8 @@
 Example:
 ...............
         resource bigdb public_ip
-        resource bigdb:0
-        resource bigdb:.
+        resource my_.*_db2
+        resource ping_clone
 ...............
 
 [[cmdhelp_history_node,node events]]
@@ -2805,7 +2820,8 @@
 
 AUTHOR
 ------
-Written by Dejan Muhamedagic, <de...@suse.de>
+Dejan Muhamedagic, <de...@suse.de>
+and many OTHERS
 
 SEE ALSO
 --------
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      2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/modules/cibconfig.py      2012-02-03 12:13:57.000000000 +0100
@@ -246,6 +246,9 @@
             r_node = reduce_primitive(prim)
             if not r_node:
                 return # template not defined yet
+            ra_type = node.getAttribute("type")
+            ra_class = node.getAttribute("class")
+            ra_provider = node.getAttribute("provider")
             ra = get_ra(r_node)
             if not ra.mk_ra_node():  # no RA found?
                 return
@@ -544,10 +547,10 @@
     xml_node_type = e[0] in vars.defaults_tags and "meta_attributes" or e[0]
     node = cib_factory.createElement(xml_node_type)
     # another exception:
-    # cluster_property_set has nvpairs as direct children
+    # cluster_property_set and defaults have nvpairs as direct children
     # in that case the id_hint is equal id
     # and this is important in case there are multiple sets
-    if e[0] == "cluster_property_set" and id_hint:
+    if (e[0] == "cluster_property_set" or e[0] in vars.defaults_tags) and 
id_hint:
         node.setAttribute("id",id_hint)
     match_node = lookup_node(node,oldnode)
     #if match_node:
@@ -937,7 +940,9 @@
             return self.updated or self.origin == "user"
         if args[0].startswith("type:"):
             return self.obj_type == args[0][5:]
-        return self.obj_id in args
+        return self.obj_id in args or \
+            (self.obj_type == "node" and \
+            self.node.getAttribute("uname") in args)
 
 def mk_cli_list(cli):
     'Sometimes we get a string and sometimes a list.'
@@ -1756,6 +1761,11 @@
         for obj in self.cib_objects:
             if obj.obj_id == obj_id:
                 return obj
+            # special case for Heartbeat nodes which have id
+            # different from uname
+            if obj.obj_type == "node" and \
+                    obj.node.getAttribute("uname") == obj_id:
+                return obj
         return None
     #
     # tab completion functions
@@ -2136,6 +2146,8 @@
             return False
         oldnode = obj.node
         if xml_cmp(oldnode,newnode):
+            if newnode.parentNode:
+                newnode.parentNode.removeChild(newnode)
             newnode.unlink()
             return True # the new and the old versions are equal
         obj.node = newnode
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/modules/completion.py 
new/crmsh/modules/completion.py
--- old/crmsh/modules/completion.py     2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/modules/completion.py     2012-02-03 12:13:57.000000000 +0100
@@ -515,10 +515,12 @@
         "ticket" : (ticket_cmd_list,),
     },
 }
-def get_completer_list(level,cmd):
+def get_completer_list(lvl_obj,cmd):
     'Return a list of completer functions.'
-    try: return completer_lists[level][cmd]
-    except: return None
+    try: return completer_lists[lvl_obj.lvl_name][cmd]
+    except:
+        try: return 
completer_lists[lvl_obj.lvl_name][lvl_obj.rev_alias_table[cmd]]
+        except: return None
 
 compl_help = CompletionHelp()
 user_prefs = UserPrefs.getInstance()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/modules/levels.py new/crmsh/modules/levels.py
--- old/crmsh/modules/levels.py 2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/modules/levels.py 2012-02-03 12:13:57.000000000 +0100
@@ -39,7 +39,7 @@
         elif key == "help":
             ctab[key] = topics_dict(obj.help_table)
         else:
-            ctab[key] = get_completer_list(obj.lvl_name,key)
+            ctab[key] = get_completer_list(obj,key)
 
 class Levels(Singleton):
     '''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/modules/log_patterns.py 
new/crmsh/modules/log_patterns.py
--- old/crmsh/modules/log_patterns.py   2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/modules/log_patterns.py   2012-02-03 12:13:57.000000000 +0100
@@ -28,7 +28,7 @@
                        "[(]%%[)][[]",
                ),
                ( # detail 1
-                       "lrmd:.*rsc:%%:.*(probe|notify)",
+                       "lrmd:.*rsc:%% (probe|notify)",
                        "lrmd:.*info: Managed %%:.*exited",
                ),
        ),
@@ -45,6 +45,7 @@
                        "te_fence_node: Exec.*on %% ",
                        "pe_fence_node: Node %% will be fenced",
                        "stonith-ng.*remote_op_timeout:.*for %% timed",
+                       "stonith-ng.*can_fence_host_with_device:.*can not fence 
%%:",
                        "stonithd.*Succeeded.*node %%:",
                        "pcmk_peer_update.*(lost|memb): %% ",
                        "crmd.*ccm_event.*(NEW|LOST):.* %% ",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/modules/main.py new/crmsh/modules/main.py
--- old/crmsh/modules/main.py   2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/modules/main.py   2012-02-03 12:13:57.000000000 +0100
@@ -270,7 +270,6 @@
                 usage(0)
             elif o in ("--version"):
                 print >> sys.stdout,("""%s
-Written by Dejan Muhamedagic
 """ % vars.crm_version)
                 sys.exit(0)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/modules/report.py new/crmsh/modules/report.py
--- old/crmsh/modules/report.py 2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/modules/report.py 2012-02-03 12:13:57.000000000 +0100
@@ -431,7 +431,10 @@
         self.central_log = None
         self.peinputs_l = []
         self.cibgrp_d = {}
+        self.cibcln_d = {}
         self.cibrsc_l = []
+        self.cibnotcloned_l = []
+        self.cibcloned_l = []
         self.cibnode_l = []
         self.setnodes = []
         self.outdir = os.path.join(vars.report_cache,"psshout")
@@ -442,7 +445,7 @@
     def warn(self, s):
         common_warn("%s: %s" % (self.source, s))
     def rsc_list(self):
-        return self.cibgrp_d.keys() + self.cibrsc_l
+        return self.cibgrp_d.keys() + self.cibcln_d.keys() + 
self.cibnotcloned_l
     def node_list(self):
         return self.cibnode_l
     def peinputs_list(self):
@@ -707,7 +710,7 @@
             self.from_dt = from_dt
             self.to_dt = to_dt
         elif self.source != "live":
-            if self.from_dt > from_dt:
+            if from_dt and self.from_dt > from_dt:
                 self.error("from time %s not within report" % from_dt)
                 return False
             if to_dt and self.to_dt < to_dt:
@@ -759,6 +762,13 @@
             for x in conf.getElementsByTagName("node") ]
         for grp in conf.getElementsByTagName("group"):
             self.cibgrp_d[grp.getAttribute("id")] = get_rsc_children_ids(grp)
+        for cln in conf.getElementsByTagName("clone") + \
+                conf.getElementsByTagName("master"):
+            try:
+                self.cibcln_d[cln.getAttribute("id")] = 
get_prim_children_ids(cln)
+                self.cibcloned_l += self.cibcln_d[cln.getAttribute("id")]
+            except: pass
+        self.cibnotcloned_l = [x for x in self.cibrsc_l if x not in 
self.cibcloned_l]
     def set_node_colors(self):
         i = 0
         for n in self.cibnode_l:
@@ -937,7 +947,9 @@
         '''
         Show all events.
         '''
-        all_re_l = self.build_re("resource", self.cibrsc_l) + \
+        rsc_l = self.cibnotcloned_l
+        rsc_l += ["%s:[0-9]+" % x for x in self.cibcloned_l]
+        all_re_l = self.build_re("resource", rsc_l) + \
             self.build_re("node", self.cibnode_l) + \
             self.build_re("events", [])
         if not all_re_l:
@@ -1021,11 +1033,19 @@
         # expand groups (if any)
         expanded_l = []
         for a in args:
-            if a in self.cibgrp_d:
+            if a in self.cibgrp_d: # add group members, groups aren't logged
                 expanded_l += self.cibgrp_d[a]
+            elif a in self.cibcln_d: # add group members, groups aren't logged
+                expanded_l += self.cibcln_d[a]
             else:
                 expanded_l.append(a)
-        rsc_re_l = self.build_re("resource",expanded_l)
+        exp_cloned_l = []
+        for rsc in expanded_l:
+            if rsc in self.cibcloned_l:
+                exp_cloned_l.append("%s:[0-9]+" % rsc)
+            else:
+                exp_cloned_l.append(rsc)
+        rsc_re_l = self.build_re("resource", exp_cloned_l)
         if not rsc_re_l:
             return False
         self.show_logs(re_l = rsc_re_l)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/modules/ui.py.in new/crmsh/modules/ui.py.in
--- old/crmsh/modules/ui.py.in  2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/modules/ui.py.in  2012-02-03 12:13:57.000000000 +0100
@@ -63,6 +63,7 @@
     def __init__(self):
         self.help_table = odict()
         self.cmd_table = odict()
+        self.rev_alias_table = odict()
         self.cmd_table["help"] = (self.help,(0,1),0,0)
         self.cmd_table["quit"] = (self.exit,(0,0),0,0)
         self.cmd_table["end"] = (self.end,(0,1),0,0)
@@ -1750,18 +1751,18 @@
         '''
         parse time specs and set period
         '''
-        from_dt = self.parse_time(from_time)
-        if not from_dt:
-            return False
-        to_dt = None
+        from_dt = to_dt = None
+        if from_time:
+            from_dt = self.parse_time(from_time)
+            if not from_dt:
+                return False
         if to_time:
             to_dt = self.parse_time(to_time)
             if not to_dt:
                 return False
         if to_dt and to_dt <= from_dt:
-            common_err("%s - %s: bad period" % from_time, to_time)
+            common_err("%s - %s: bad period" % (from_time, to_time))
             return False
-        common_debug("setting period to <%s>:<%s>" % (from_dt,to_dt))
         return crm_report.set_period(from_dt,to_dt)
     def _check_source(self,src):
         'a (very) quick source check'
@@ -1785,10 +1786,11 @@
         if src == "live":
             options.report_from_time = time.ctime(live_from_time and \
                 live_from_time or (time.time() - 60*60))
-            rc = self._set_period(\
-                options.report_from_time, options.report_to_time)
         else:
             options.report_from_time = ''
+            options.report_to_time = ''
+        rc = self._set_period(\
+            options.report_from_time, options.report_to_time)
         return rc
     def source(self,cmd,src = None):
         "usage: source {<dir>|<file>|live}"
@@ -1907,8 +1909,8 @@
             return None
         return l[0]
     def transition(self,cmd,*args):
-        """usage: transition [<number>|<file>] [nograph] [v...] [scores] 
[actions] [utilization]
-        transition showdot [<number>|<file>]"""
+        """usage: transition [<number>|<index>|<file>] [nograph] [v...] 
[scores] [actions] [utilization]
+        transition showdot [<number>|<index>|<file>]"""
         argl = list(args)
         subcmd = "show"
         if argl and argl[0] == "showdot":
@@ -1929,8 +1931,7 @@
                     f = self._get_pe_bynum(n)
                 argl.pop(0)
             else:
-                common_err("<%s> doesn't sound like a PE input" % argl[0])
-                return False
+                f = self._get_pe_byidx(-1)
         else:
             f = self._get_pe_byidx(-1)
         if not f:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/modules/utils.py new/crmsh/modules/utils.py
--- old/crmsh/modules/utils.py  2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/modules/utils.py  2012-02-03 12:13:57.000000000 +0100
@@ -100,6 +100,7 @@
     for cmd in obj.cmd_aliases.keys():
         for alias in obj.cmd_aliases[cmd]:
             obj.cmd_table[alias] = obj.cmd_table[cmd]
+            obj.rev_alias_table[alias] = cmd
 
 def os_types_list(path):
     l = []
@@ -394,7 +395,7 @@
     Pipe graph_s thru ptest(8). Show graph using dotty if requested.
     '''
     actions_filter = "grep LogActions: | grep -vw Leave"
-    ptest = "2>&1 ptest -X"
+    ptest = "2>&1 ptest -x -"
     if verbosity:
         if actions:
             verbosity = 'v' * max(3,len(verbosity))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/modules/xmlutil.py new/crmsh/modules/xmlutil.py
--- old/crmsh/modules/xmlutil.py        2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/modules/xmlutil.py        2012-02-03 12:13:57.000000000 +0100
@@ -348,6 +348,11 @@
 def is_clonems(node):
     return is_element(node) \
         and node.tagName in vars.clonems_tags
+def is_cloned(node):
+    return is_element(node) \
+        and (node.parentNode.tagName in vars.clonems_tags or \
+            (node.parentNode.tagName == "group" and \
+            node.parentNode.parentNode.tagName in vars.clonems_tags))
 def is_container(node):
     return is_element(node) \
         and node.tagName in vars.container_tags
@@ -788,6 +793,11 @@
 def get_rsc_children_ids(node):
     return [x.getAttribute("id") \
         for x in node.childNodes if is_child_rsc(x)]
+def get_prim_children_ids(node):
+    l = [x for x in node.childNodes if is_child_rsc(x)]
+    if l and l[0].tagName == "group":
+        l = [x for x in l[0].childNodes if is_child_rsc(x)]
+    return [x.getAttribute("id") for x in l]
 def get_child_nvset_node(node, attr_set = "meta_attributes"):
     if not node:
         return None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/test/crm-interface new/crmsh/test/crm-interface
--- old/crmsh/test/crm-interface        2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/test/crm-interface        2012-02-03 12:13:57.000000000 +0100
@@ -51,7 +51,7 @@
 EOF
 }
 crm_showxml() {
-       CIB_file=sample.xml $CRM<<EOF
+       CIB_file=sample.xml $CRM<<EOF | sed -n '/^<?xml/,/^<\/cib>/p'
 configure
 _regtest on
 erase
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/test/descriptions new/crmsh/test/descriptions
--- old/crmsh/test/descriptions 2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/test/descriptions 2012-02-03 12:13:57.000000000 +0100
@@ -17,10 +17,10 @@
 
 lead=".TRY"
 describe_show() {
-       echo $lead Show CLI
+       echo $lead $*
 }
 describe_showxml() {
-       echo $lead Show XML
+       : echo $lead $*
 }
 describe_session() {
        echo $lead $*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/test/evaltest.sh new/crmsh/test/evaltest.sh
--- old/crmsh/test/evaltest.sh  2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/test/evaltest.sh  2012-02-03 12:13:57.000000000 +0100
@@ -70,7 +70,7 @@
 dotest_session() {
        echo -n "." >&3
        test_cnt=$(($test_cnt+1))
-       describe_session $*  # show what we are about to do
+       describe_$cmd $*  # show what we are about to do
        crm_$cmd |  # and execute the command
                { [ "$extcheck" ] && $extcheck || cat;}
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/test/testcases/Makefile.am 
new/crmsh/test/testcases/Makefile.am
--- old/crmsh/test/testcases/Makefile.am        2011-11-24 18:21:55.000000000 
+0100
+++ new/crmsh/test/testcases/Makefile.am        2012-02-03 12:13:57.000000000 
+0100
@@ -19,12 +19,13 @@
 MAINTAINERCLEANFILES = Makefile.in
 
 testcasesdir           =       $(datadir)/$(PACKAGE)/tests/testcases
-testcases_SCRIPTS      =       confbasic-xml.filter ra.filter xmlonly.sh
+testcases_SCRIPTS      =       ra.filter xmlonly.sh
 testcases_DATA         =       BSC basicset common.excl \
        confbasic confbasic-xml delete file node ra resource shadow acl \
-       rset \
+       rset rset-xml \
        confbasic-xml.exp confbasic.exp delete.exp file.exp \
-       node.exp ra.exp resource.exp shadow.exp acl.exp rset.exp
+       node.exp ra.exp resource.exp shadow.exp acl.exp \
+       rset.exp rset-xml.exp
 
 confbasic-xml.filter:
        ln xmlonly.sh $@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/test/testcases/basicset 
new/crmsh/test/testcases/basicset
--- old/crmsh/test/testcases/basicset   2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/test/testcases/basicset   2012-02-03 12:13:57.000000000 +0100
@@ -1,6 +1,7 @@
 confbasic
 confbasic-xml
 rset
+rset-xml
 delete
 node
 resource
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/test/testcases/confbasic 
new/crmsh/test/testcases/confbasic
--- old/crmsh/test/testcases/confbasic  2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/test/testcases/confbasic  2012-02-03 12:13:57.000000000 +0100
@@ -53,6 +53,9 @@
 collocation c2 inf: d5:Started d6:Started
 order o1 mandatory: d5 d6
 order o2 advisory: d5:start d6:promote
+rsc_ticket ticket-A_d6 ticket-A: d6
+rsc_ticket ticket-B_d6_d5 ticket-B: d6 d5 loss-policy=fence
+rsc_ticket ticket-C_master ticket-C: d6 d5:Master loss-policy=fence
 property stonith-enabled=true
 property $id=cpset2 maintenance-mode=true
 rsc_defaults failure-timeout=10m
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/test/testcases/confbasic-xml 
new/crmsh/test/testcases/confbasic-xml
--- old/crmsh/test/testcases/confbasic-xml      2011-11-24 18:21:55.000000000 
+0100
+++ new/crmsh/test/testcases/confbasic-xml      2012-02-03 12:13:57.000000000 
+0100
@@ -53,6 +53,9 @@
 collocation c2 inf: d5:Started d6:Started
 order o1 mandatory: d5 d6
 order o2 advisory: d5:start d6:promote
+rsc_ticket ticket-A_d6 ticket-A: d6
+rsc_ticket ticket-B_d6_d5 ticket-B: d6 d5 loss-policy=fence
+rsc_ticket ticket-C_master ticket-C: d6 d5:Master loss-policy=fence
 property stonith-enabled=true
 property $id=cpset2 maintenance-mode=true
 rsc_defaults failure-timeout=10m
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/test/testcases/confbasic-xml.exp 
new/crmsh/test/testcases/confbasic-xml.exp
--- old/crmsh/test/testcases/confbasic-xml.exp  2011-11-24 18:21:55.000000000 
+0100
+++ new/crmsh/test/testcases/confbasic-xml.exp  2012-02-03 12:13:57.000000000 
+0100
@@ -9,25 +9,30 @@
         <nvpair id="cpset2-maintenance-mode" name="maintenance-mode" 
value="true"/>
       </cluster_property_set>
     </crm_config>
-    <rsc_defaults>
-      <meta_attributes id="rsc-options">
-        <nvpair id="rsc-options-failure-timeout" name="failure-timeout" 
value="10m"/>
-      </meta_attributes>
-    </rsc_defaults>
-    <op_defaults>
-      <meta_attributes id="opsdef2">
-        <nvpair id="opsdef2-record-pending" name="record-pending" 
value="true"/>
-      </meta_attributes>
-    </op_defaults>
     <nodes>
-      <node id="pingnode" type="ping" uname="pingnode"/>
       <node id="node1" type="normal" uname="node1">
         <instance_attributes id="node1-instance_attributes">
           <nvpair id="node1-instance_attributes-mem" name="mem" value="16G"/>
         </instance_attributes>
       </node>
+      <node id="pingnode" type="ping" uname="pingnode"/>
     </nodes>
     <resources>
+      <master id="m">
+        <primitive class="ocf" id="d4" provider="pacemaker" type="Dummy"/>
+      </master>
+      <primitive class="stonith" id="st" type="ssh">
+        <instance_attributes id="st-instance_attributes">
+          <nvpair id="st-instance_attributes-hostlist" name="hostlist" 
value="node1"/>
+        </instance_attributes>
+        <meta_attributes id="st-meta_attributes">
+          <nvpair id="st-meta_attributes-target-role" name="target-role" 
value="Started"/>
+        </meta_attributes>
+        <operations>
+          <op id="st-start-0" interval="0" name="start" requires="nothing" 
timeout="60s"/>
+          <op id="st-monitor-60m" interval="60m" name="monitor" timeout="60s"/>
+        </operations>
+      </primitive>
       <group id="g1">
         <primitive class="ocf" id="d1" provider="pacemaker" type="Dummy">
           <operations id="d1-ops">
@@ -51,21 +56,6 @@
           </operations>
         </primitive>
       </group>
-      <master id="m">
-        <primitive class="ocf" id="d4" provider="pacemaker" type="Dummy"/>
-      </master>
-      <primitive class="stonith" id="st" type="ssh">
-        <instance_attributes id="st-instance_attributes">
-          <nvpair id="st-instance_attributes-hostlist" name="hostlist" 
value="node1"/>
-        </instance_attributes>
-        <meta_attributes id="st-meta_attributes">
-          <nvpair id="st-meta_attributes-target-role" name="target-role" 
value="Started"/>
-        </meta_attributes>
-        <operations>
-          <op id="st-start-0" interval="0" name="start" requires="nothing" 
timeout="60s"/>
-          <op id="st-monitor-60m" interval="60m" name="monitor" timeout="60s"/>
-        </operations>
-      </primitive>
       <clone id="c">
         <meta_attributes id="c-meta_attributes">
           <nvpair id="c-meta_attributes-clone-max" name="clone-max" value="1"/>
@@ -80,6 +70,25 @@
       </primitive>
     </resources>
     <constraints>
+      <rsc_order first="d5" id="o1" score="INFINITY" then="d6"/>
+      <rsc_location id="l1" node="node1" rsc="g1" score="100"/>
+      <rsc_location id="l2" rsc="c">
+        <rule id="l2-rule1" score="100">
+          <expression attribute="#uname" id="l2-expression" operation="eq" 
value="node1"/>
+        </rule>
+      </rsc_location>
+      <rsc_location id="l3" rsc="d5">
+        <rule id="l3-rule" score="INFINITY">
+          <expression attribute="#uname" id="l3-expression" operation="eq" 
value="node1"/>
+          <expression attribute="pingd" id="l3-expression-0" operation="gt" 
value="0"/>
+        </rule>
+      </rsc_location>
+      <rsc_location id="l4" rsc="d5">
+        <rule boolean-op="or" id="l4-rule" score="-INFINITY">
+          <expression attribute="pingd" id="l4-expression" 
operation="not_defined"/>
+          <expression attribute="pingd" id="l4-expression-0" operation="lte" 
value="0"/>
+        </rule>
+      </rsc_location>
       <rsc_location id="l5" rsc="d5">
         <rule boolean-op="or" id="l5-rule" score="-INFINITY">
           <expression attribute="pingd" id="l5-expression" 
operation="not_defined"/>
@@ -100,34 +109,40 @@
           </date_expression>
         </rule>
       </rsc_location>
-      <rsc_location id="l1" node="node1" rsc="g1" score="100"/>
-      <rsc_location id="l2" rsc="c">
-        <rule id="l2-rule1" score="100">
-          <expression attribute="#uname" id="l2-expression" operation="eq" 
value="node1"/>
-        </rule>
-      </rsc_location>
-      <rsc_location id="l3" rsc="d5">
-        <rule id="l3-rule" score="INFINITY">
-          <expression attribute="#uname" id="l3-expression" operation="eq" 
value="node1"/>
-          <expression attribute="pingd" id="l3-expression-0" operation="gt" 
value="0"/>
-        </rule>
-      </rsc_location>
-      <rsc_location id="l4" rsc="d5">
-        <rule boolean-op="or" id="l4-rule" score="-INFINITY">
-          <expression attribute="pingd" id="l4-expression" 
operation="not_defined"/>
-          <expression attribute="pingd" id="l4-expression-0" operation="lte" 
value="0"/>
-        </rule>
-      </rsc_location>
-      <rsc_location id="l7" rsc="d5">
-        <rule id-ref="l2-rule1"/>
-      </rsc_location>
       <rsc_location id="l6" rsc="d5">
         <rule id-ref="l2-rule1"/>
       </rsc_location>
-      <rsc_colocation id="c1" rsc="d5" score="INFINITY" with-rsc="d6"/>
       <rsc_colocation id="c2" rsc="d5" rsc-role="Started" score="INFINITY" 
with-rsc="d6" with-rsc-role="Started"/>
-      <rsc_order first="d5" id="o1" score="INFINITY" then="d6"/>
       <rsc_order first="d5" first-action="start" id="o2" score="0" then="d6" 
then-action="promote"/>
+      <rsc_ticket id="ticket-A_d6" rsc="d6" ticket="ticket-A"/>
+      <rsc_ticket id="ticket-B_d6_d5" loss-policy="fence" ticket="ticket-B">
+        <resource_set id="ticket-B_d6_d5-0">
+          <resource_ref id="d6"/>
+          <resource_ref id="d5"/>
+        </resource_set>
+      </rsc_ticket>
+      <rsc_ticket id="ticket-C_master" loss-policy="fence" ticket="ticket-C">
+        <resource_set id="ticket-C_master-0">
+          <resource_ref id="d6"/>
+        </resource_set>
+        <resource_set id="ticket-C_master-1" role="Master">
+          <resource_ref id="d5"/>
+        </resource_set>
+      </rsc_ticket>
+      <rsc_colocation id="c1" rsc="d5" score="INFINITY" with-rsc="d6"/>
+      <rsc_location id="l7" rsc="d5">
+        <rule id-ref="l2-rule1"/>
+      </rsc_location>
     </constraints>
+    <rsc_defaults>
+      <meta_attributes id="rsc-options">
+        <nvpair id="rsc-options-failure-timeout" name="failure-timeout" 
value="10m"/>
+      </meta_attributes>
+    </rsc_defaults>
+    <op_defaults>
+      <meta_attributes id="opsdef2">
+        <nvpair id="opsdef2-record-pending" name="record-pending" 
value="true"/>
+      </meta_attributes>
+    </op_defaults>
   </configuration>
 </cib>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/test/testcases/confbasic.exp 
new/crmsh/test/testcases/confbasic.exp
--- old/crmsh/test/testcases/confbasic.exp      2011-11-24 18:21:55.000000000 
+0100
+++ new/crmsh/test/testcases/confbasic.exp      2012-02-03 12:13:57.000000000 
+0100
@@ -32,6 +32,9 @@
 .INP: collocation c2 inf: d5:Started d6:Started
 .INP: order o1 mandatory: d5 d6
 .INP: order o2 advisory: d5:start d6:promote
+.INP: rsc_ticket ticket-A_d6 ticket-A: d6
+.INP: rsc_ticket ticket-B_d6_d5 ticket-B: d6 d5 loss-policy=fence
+.INP: rsc_ticket ticket-C_master ticket-C: d6 d5:Master loss-policy=fence
 .INP: property stonith-enabled=true
 .INP: property $id=cpset2 maintenance-mode=true
 .INP: rsc_defaults failure-timeout=10m
@@ -86,6 +89,9 @@
 colocation c2 inf: d5:Started d6:Started
 order o1 inf: d5 d6
 order o2 0: d5:start d6:promote
+rsc_ticket ticket-A_d6 ticket-A: d6
+rsc_ticket ticket-B_d6_d5 ticket-B: d6 d5 loss-policy=fence
+rsc_ticket ticket-C_master ticket-C: d6 d5:Master loss-policy=fence
 property $id="cib-bootstrap-options" \
        stonith-enabled="true"
 property $id="cpset2" \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/test/testcases/ra.exp 
new/crmsh/test/testcases/ra.exp
--- old/crmsh/test/testcases/ra.exp     2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/test/testcases/ra.exp     2012-02-03 12:13:57.000000000 +0100
@@ -91,7 +91,7 @@
 
 Operations' defaults (advisory minimum):
 
-    start         timeout=60
+    start         timeout=20
     stop          timeout=15
-    status        timeout=60
-    monitor       interval=3600 timeout=60
+    status        timeout=20
+    monitor       interval=3600 timeout=20
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/test/testcases/rset 
new/crmsh/test/testcases/rset
--- old/crmsh/test/testcases/rset       2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/test/testcases/rset       2012-02-03 12:13:57.000000000 +0100
@@ -16,7 +16,6 @@
 show o1 c1 c2 c3
 delete d4
 show o1 c1 c2 c3
-show xml o1 c1 c2 c3
 _test
 verify
 .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/test/testcases/rset-xml 
new/crmsh/test/testcases/rset-xml
--- old/crmsh/test/testcases/rset-xml   1970-01-01 01:00:00.000000000 +0100
+++ new/crmsh/test/testcases/rset-xml   2012-02-03 12:13:57.000000000 +0100
@@ -0,0 +1,19 @@
+showxml Resource sets
+node node1
+primitive st stonith:ssh \
+       params hostlist='node1' \
+       op start timeout=60s
+primitive d1 ocf:pacemaker:Dummy
+primitive d2 ocf:heartbeat:Dummy
+primitive d3 ocf:heartbeat:Dummy
+primitive d4 ocf:heartbeat:Dummy
+primitive d5 ocf:heartbeat:Dummy
+order o1 inf: d1 d2 ( d3 d4 )
+colocation c1 inf: d4 ( d1 d2 d3 )
+colocation c2 inf: d1 d2 d3 d4
+colocation c3 inf: ( d3 d4 ) ( d1 d2 )
+delete d2
+delete d4
+_test
+verify
+.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/test/testcases/rset-xml.exp 
new/crmsh/test/testcases/rset-xml.exp
--- old/crmsh/test/testcases/rset-xml.exp       1970-01-01 01:00:00.000000000 
+0100
+++ new/crmsh/test/testcases/rset-xml.exp       2012-02-03 12:13:57.000000000 
+0100
@@ -0,0 +1,33 @@
+<?xml version="1.0" ?>
+<cib admin_epoch="0" crm_feature_set="3.0.1" 
dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" 
num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
+  <configuration>
+    <crm_config/>
+    <nodes>
+      <node id="node1" type="normal" uname="node1"/>
+    </nodes>
+    <resources>
+      <primitive class="stonith" id="st" type="ssh">
+        <instance_attributes id="st-instance_attributes">
+          <nvpair id="st-instance_attributes-hostlist" name="hostlist" 
value="node1"/>
+        </instance_attributes>
+        <operations>
+          <op id="st-start-0" interval="0" name="start" timeout="60s"/>
+        </operations>
+      </primitive>
+      <primitive class="ocf" id="d1" provider="pacemaker" type="Dummy"/>
+      <primitive class="ocf" id="d3" provider="heartbeat" type="Dummy"/>
+      <primitive class="ocf" id="d5" provider="heartbeat" type="Dummy"/>
+    </resources>
+    <constraints>
+      <rsc_order first="d1" id="o1" score="INFINITY" then="d3"/>
+      <rsc_colocation id="c1" score="INFINITY">
+        <resource_set id="c1-1" sequential="false">
+          <resource_ref id="d1"/>
+          <resource_ref id="d3"/>
+        </resource_set>
+      </rsc_colocation>
+      <rsc_colocation id="c2" rsc="d3" score="INFINITY" with-rsc="d1"/>
+      <rsc_colocation id="c3" rsc="d3" score="INFINITY" with-rsc="d1"/>
+    </constraints>
+  </configuration>
+</cib>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/test/testcases/rset.exp 
new/crmsh/test/testcases/rset.exp
--- old/crmsh/test/testcases/rset.exp   2011-11-24 18:21:55.000000000 +0100
+++ new/crmsh/test/testcases/rset.exp   2012-02-03 12:13:57.000000000 +0100
@@ -34,27 +34,6 @@
 colocation c2 inf: d3 d1
 colocation c3 inf: d3 d1
 order o1 inf: d1 d3
-.INP: show xml o1 c1 c2 c3
-<?xml version="1.0" ?>
-<cib admin_epoch="0" crm_feature_set="3.0.1" 
dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" 
num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
-  <configuration>
-    <crm_config/>
-    <nodes/>
-    <resources/>
-    <constraints>
-      <rsc_order first="d1" id="o1" score="INFINITY" then="d3"/>
-      <rsc_colocation id="c1" score="INFINITY">
-        <resource_set id="c1-1" sequential="false">
-          <resource_ref id="d1"/>
-          <resource_ref id="d3"/>
-        </resource_set>
-      </rsc_colocation>
-      <rsc_colocation id="c2" rsc="d3" score="INFINITY" with-rsc="d1"/>
-      <rsc_colocation id="c3" rsc="d3" score="INFINITY" with-rsc="d1"/>
-    </constraints>
-  </configuration>
-</cib>
-
 .INP: _test
 .INP: verify
 .INP: show

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

Reply via email to