Hello community, here is the log from the commit of package crmsh for openSUSE:Factory checked in at 2014-08-28 21:05:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-08-25 11:05:23.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.crmsh.new/crmsh.changes 2014-08-28 21:05:54.000000000 +0200 @@ -1,0 +2,7 @@ +Thu Aug 28 13:19:09 UTC 2014 - kgronlund@suse.com + +- high: constants: Add acl_target and acl_group to cib_cli_map (bnc#894041) +- cibconfig: Clean up output from crm_verify (bnc#893138) +- upstream: 2.1.0-38-g7d05ad6 + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crmsh.spec ++++++ --- /var/tmp/diff_new_pack.uCJeZU/_old 2014-08-28 21:05:55.000000000 +0200 +++ /var/tmp/diff_new_pack.uCJeZU/_new 2014-08-28 21:05:55.000000000 +0200 @@ -41,7 +41,7 @@ Summary: High Availability cluster command-line interface License: GPL-2.0+ Group: %{pkg_group} -Version: 2.1+git33 +Version: 2.1+git38 Release: %{?crmsh_release}%{?dist} Url: http://crmsh.github.io Source0: crmsh.tar.bz2 ++++++ crmsh.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/Makefile.am new/crmsh/modules/Makefile.am --- old/crmsh/modules/Makefile.am 2014-08-22 13:11:04.000000000 +0200 +++ new/crmsh/modules/Makefile.am 2014-08-28 15:12:04.000000000 +0200 @@ -23,6 +23,7 @@ cache.py \ cibconfig.py \ cibstatus.py \ + cibverify.py \ clidisplay.py \ cliformat.py \ cmd_status.py \ 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-08-22 13:11:04.000000000 +0200 +++ new/crmsh/modules/cibconfig.py 2014-08-28 15:12:04.000000000 +0200 @@ -59,6 +59,7 @@ from cliformat import cli_nvpair, cli_acl_rule, rsc_set_constraint, get_kind, head_id_format from cliformat import cli_operations, simple_rsc_constraint, cli_rule, cli_format from cliformat import cli_acl_role, cli_acl_permission +import cibverify def show_unrecognized_elems(cib_elem): @@ -640,9 +641,6 @@ return rc -cib_verify = "crm_verify -V -p" - - class CibObjectSetRaw(CibObjectSet): ''' Edit or display one or more CIB objects (XML). @@ -702,10 +700,12 @@ if not self.obj_set: return True clidisplay.disable_pretty() - rc = pipe_string(cib_verify, self.repr(format=-1)) + cib = self.repr(format=-1) clidisplay.enable_pretty() + rc = cibverify.verify(cib) + if rc not in (0, 1): - common_debug("verify (rc=%s): %s" % (rc, self.repr())) + common_debug("verify (rc=%s): %s" % (rc, cib)) return rc in (0, 1) def ptest(self, nograph, scores, utilization, actions, verbosity): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/cibverify.py new/crmsh/modules/cibverify.py --- old/crmsh/modules/cibverify.py 1970-01-01 01:00:00.000000000 +0100 +++ new/crmsh/modules/cibverify.py 2014-08-28 15:12:04.000000000 +0200 @@ -0,0 +1,43 @@ +# Copyright (C) 2014 Kristoffer Gronlund <kgronlund@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 +# + +import re +import utils +from msg import err_buf + + +cib_verify = "crm_verify --verbose -p" +VALIDATE_RE = re.compile(r"^Entity: line (\d)+: element (\w+): " + + r"Relax-NG validity error : (.+)$") + + +def _prettify(line, indent=0): + m = VALIDATE_RE.match(line) + if m: + return "%s%s (%s): %s" % (indent*' ', m.group(2), m.group(1), m.group(3)) + return line + + +def verify(cib): + rc, _, stderr = utils.get_stdout_stderr(cib_verify, cib) + for i, line in enumerate(line for line in stderr.split('\n') if line): + line = _prettify(line, 0 if i == 0 else 7) + if i == 0: + err_buf.error(line) + else: + err_buf.writemsg(line) + return rc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/constants.py new/crmsh/modules/constants.py --- old/crmsh/modules/constants.py 2014-08-22 13:11:04.000000000 +0200 +++ new/crmsh/modules/constants.py 2014-08-28 15:12:04.000000000 +0200 @@ -32,6 +32,8 @@ "cluster_property_set": "property", "rsc_defaults": "rsc_defaults", "op_defaults": "op_defaults", + "acl_target": "acl_target", + "acl_group": "acl_group", "acl_user": "user", "acl_role": "role", "fencing-topology": "fencing_topology", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/test/testcases/common.excl new/crmsh/test/testcases/common.excl --- old/crmsh/test/testcases/common.excl 2014-08-22 13:11:04.000000000 +0200 +++ new/crmsh/test/testcases/common.excl 2014-08-28 15:12:04.000000000 +0200 @@ -11,7 +11,7 @@ .EXT crm_resource --list-ocf-alternatives Dummy ^\.EXT crmd version ^\.EXT cibadmin \-Ql -^\.EXT crm_verify \-V \-p +^\.EXT crm_verify \-\-verbose \-p ^\.EXT cibadmin \-p \-P ^\.EXT crm_diff \-\-help ^\.EXT crm_diff \-o [^ ]+ \-n \- 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 2014-08-22 13:11:04.000000000 +0200 +++ new/crmsh/test/testcases/confbasic-xml.exp 2014-08-28 15:12:04.000000000 +0200 @@ -1,5 +1,5 @@ <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config> <cluster_property_set id="cib-bootstrap-options"> @@ -10,30 +10,18 @@ </cluster_property_set> </crm_config> <nodes> - <node uname="node2" id="node2"> - <utilization id="node2-utilization"> - <nvpair name="cpu" value="4" id="node2-utilization-cpu"/> - </utilization> - </node> <node uname="node1" id="node1"> <instance_attributes id="node1-instance_attributes"> <nvpair name="mem" value="16G" id="node1-instance_attributes-mem"/> </instance_attributes> </node> + <node uname="node2" id="node2"> + <utilization id="node2-utilization"> + <nvpair name="cpu" value="4" id="node2-utilization-cpu"/> + </utilization> + </node> </nodes> <resources> - <primitive id="st" class="stonith" type="ssh"> - <instance_attributes id="st-instance_attributes"> - <nvpair name="hostlist" value="node1 node2" id="st-instance_attributes-hostlist"/> - </instance_attributes> - <meta_attributes id="st-meta_attributes"> - <nvpair name="target-role" value="Started" id="st-meta_attributes-target-role"/> - </meta_attributes> - <operations> - <op name="start" requires="nothing" timeout="60s" interval="0" id="st-start-0"/> - <op name="monitor" interval="60m" timeout="60s" id="st-monitor-60m"/> - </operations> - </primitive> <group id="g1"> <primitive id="d1" class="ocf" provider="pacemaker" type="Dummy"> <operations id="d1-ops"> @@ -43,7 +31,7 @@ <nvpair name="OCF_CHECK_LEVEL" value="10" id="d1-ops-monitor-120m-instance_attributes-OCF_CHECK_LEVEL"/> </instance_attributes> </op> - <op interval="60s" timeout="30s" name="monitor" id="d1-monitor-60s"/> + <op name="monitor" interval="60s" timeout="30s" id="d1-monitor-60s"/> </operations> </primitive> <primitive id="d2" class="ocf" provider="heartbeat" type="Delay"> @@ -53,36 +41,57 @@ <operations> <op name="start" timeout="60s" interval="0" id="d2-start-0"/> <op name="stop" timeout="60s" interval="0" id="d2-stop-0"/> - <op role="Started" interval="60s" timeout="30s" name="monitor" id="d2-monitor-60s"/> + <op name="monitor" role="Started" interval="60s" timeout="30s" id="d2-monitor-60s"/> </operations> </primitive> </group> - <primitive id="st2" class="stonith" type="ssh"> - <instance_attributes id="st2-instance_attributes"> - <nvpair name="hostlist" value="node1 node2" id="st2-instance_attributes-hostlist"/> - </instance_attributes> - </primitive> <clone id="c"> <meta_attributes id="c-meta_attributes"> <nvpair name="clone-max" value="1" id="c-meta_attributes-clone-max"/> </meta_attributes> <primitive id="d3" class="ocf" provider="pacemaker" type="Dummy"/> </clone> + <master id="m"> + <primitive id="d4" class="ocf" provider="pacemaker" type="Dummy"/> + </master> <master id="m5"> <primitive id="s5" class="ocf" provider="pacemaker" type="Stateful"> <operations id-ref="d1-ops"/> </primitive> </master> - <master id="m"> - <primitive id="d4" class="ocf" provider="pacemaker" type="Dummy"/> - </master> <master id="m6"> <primitive id="s6" class="ocf" provider="pacemaker" type="Stateful"> <operations id-ref="d1-ops"/> </primitive> </master> + <primitive id="st" class="stonith" type="ssh"> + <instance_attributes id="st-instance_attributes"> + <nvpair name="hostlist" value="node1 node2" id="st-instance_attributes-hostlist"/> + </instance_attributes> + <meta_attributes id="st-meta_attributes"> + <nvpair name="target-role" value="Started" id="st-meta_attributes-target-role"/> + </meta_attributes> + <operations> + <op name="start" requires="nothing" timeout="60s" interval="0" id="st-start-0"/> + <op name="monitor" interval="60m" timeout="60s" id="st-monitor-60m"/> + </operations> + </primitive> + <primitive id="st2" class="stonith" type="ssh"> + <instance_attributes id="st2-instance_attributes"> + <nvpair name="hostlist" value="node1 node2" id="st2-instance_attributes-hostlist"/> + </instance_attributes> + </primitive> </resources> <constraints> + <rsc_order id="o3" kind="Serialize" first="m5" then="m6"/> + <rsc_ticket id="ticket-C_master" ticket="ticket-C" loss-policy="fence"> + <resource_set id="ticket-C_master-0"> + <resource_ref id="m6"/> + </resource_set> + <resource_set role="Master" id="ticket-C_master-1"> + <resource_ref id="m5"/> + </resource_set> + </rsc_ticket> <rsc_location id="l3" rsc="m5"> <rule score="INFINITY" id="l3-rule"> <expression attribute="#uname" operation="eq" value="node1" id="l3-rule-expression"/> @@ -90,9 +99,26 @@ </rule> </rsc_location> <rsc_location id="l1" rsc="g1" score="100" node="node1"/> + <rsc_location id="l2" rsc="c"> + <rule id="l2-rule1" score="100"> + <expression attribute="#uname" operation="eq" value="node1" id="l2-rule1-expression"/> + </rule> + </rsc_location> + <rsc_ticket id="ticket-B_m6_m5" ticket="ticket-B" loss-policy="fence"> + <resource_set id="ticket-B_m6_m5-0"> + <resource_ref id="m6"/> + <resource_ref id="m5"/> + </resource_set> + </rsc_ticket> + <rsc_location id="l4" rsc="m5"> + <rule score="-INFINITY" boolean-op="or" id="l4-rule"> + <expression attribute="pingd" operation="not_defined" id="l4-rule-expression"/> + <expression attribute="pingd" operation="lte" value="0" id="l4-rule-expression-0"/> + </rule> + </rsc_location> <rsc_location id="l5" rsc="m5"> <rule score="-INFINITY" boolean-op="or" id="l5-rule"> - <expression operation="not_defined" attribute="pingd" id="l5-rule-expression"/> + <expression attribute="pingd" operation="not_defined" id="l5-rule-expression"/> <expression attribute="pingd" operation="lte" value="0" id="l5-rule-expression-0"/> </rule> <rule score="INFINITY" id="l5-rule-0"> @@ -100,66 +126,40 @@ <expression attribute="pingd" operation="gt" value="0" id="l5-rule-0-expression-0"/> </rule> <rule score="INFINITY" id="l5-rule-1"> - <date_expression operation="lt" id="l5-rule-1-expression" end="2009-05-26"/> - <date_expression operation="in_range" id="l5-rule-1-expression-0" start="2009-05-26" end="2009-07-26"/> - <date_expression operation="in_range" id="l5-rule-1-expression-1" start="2009-05-26"> - <duration id="l5-rule-1-expression-1-duration" years="2009"/> + <date_expression operation="lt" end="2009-05-26" id="l5-rule-1-expression"/> + <date_expression operation="in_range" start="2009-05-26" end="2009-07-26" id="l5-rule-1-expression-0"/> + <date_expression operation="in_range" start="2009-05-26" id="l5-rule-1-expression-1"> + <duration years="2009" id="l5-rule-1-expression-1-duration"/> </date_expression> <date_expression operation="date_spec" id="l5-rule-1-expression-2"> - <date_spec id="l5-rule-1-expression-2-date_spec" years="2009" hours="09-17"/> + <date_spec years="2009" hours="09-17" id="l5-rule-1-expression-2-date_spec"/> </date_expression> </rule> </rsc_location> + <rsc_colocation id="c2" score="INFINITY" rsc="m5" rsc-role="Master" with-rsc="d1" with-rsc-role="Started"/> + <rsc_ticket id="ticket-A_m6" ticket="ticket-A" rsc="m6"/> + <rsc_order id="o2" kind="Optional" first="d1" first-action="start" then="m5" then-action="promote"/> <rsc_location id="l6" rsc="m5"> <rule id-ref="l2-rule1"/> </rsc_location> - <rsc_colocation id="c2" score="INFINITY" rsc="m5" rsc-role="Master" with-rsc="d1" with-rsc-role="Started"/> + <rsc_order id="o1" kind="Mandatory" first="m5" then="m6"/> + <rsc_colocation id="c1" score="INFINITY" rsc="m6" with-rsc="m5"/> <rsc_location id="l7" rsc="m5"> <rule id-ref="l2-rule1"/> </rsc_location> - <rsc_colocation id="c1" score="INFINITY" rsc="m6" with-rsc="m5"/> - <rsc_order id="o1" kind="Mandatory" first="m5" then="m6"/> - <rsc_ticket id="ticket-B_m6_m5" ticket="ticket-B" loss-policy="fence"> - <resource_set id="ticket-B_m6_m5-0"> - <resource_ref id="m6"/> - <resource_ref id="m5"/> - </resource_set> - </rsc_ticket> - <rsc_ticket id="ticket-A_m6" ticket="ticket-A" rsc="m6"/> <rsc_order id="o4" score="INFINITY" first="m5" then="m6"/> - <rsc_order id="o3" kind="Serialize" first="m5" then="m6"/> - <rsc_order id="o2" kind="Optional" first="d1" first-action="start" then="m5" then-action="promote"/> - <rsc_location id="l4" rsc="m5"> - <rule score="-INFINITY" boolean-op="or" id="l4-rule"> - <expression operation="not_defined" attribute="pingd" id="l4-rule-expression"/> - <expression attribute="pingd" operation="lte" value="0" id="l4-rule-expression-0"/> - </rule> - </rsc_location> - <rsc_ticket id="ticket-C_master" ticket="ticket-C" loss-policy="fence"> - <resource_set id="ticket-C_master-0"> - <resource_ref id="m6"/> - </resource_set> - <resource_set id="ticket-C_master-1" role="Master"> - <resource_ref id="m5"/> - </resource_set> - </rsc_ticket> - <rsc_location id="l2" rsc="c"> - <rule id="l2-rule1" score="100"> - <expression attribute="#uname" operation="eq" value="node1" id="l2-rule1-expression"/> - </rule> - </rsc_location> </constraints> - <fencing-topology> - <fencing-level target="node1" devices="st" index="1" id="fencing"/> - <fencing-level target="node1" devices="st2" index="2" id="fencing-0"/> - <fencing-level target="node2" devices="st" index="1" id="fencing-1"/> - <fencing-level target="node2" devices="st2" index="2" id="fencing-2"/> - </fencing-topology> <rsc_defaults> <meta_attributes id="rsc-options"> <nvpair name="failure-timeout" value="10m" id="rsc-options-failure-timeout"/> </meta_attributes> </rsc_defaults> + <fencing-topology> + <fencing-level devices="st" index="1" target="node1" id="fencing"/> + <fencing-level devices="st2" index="2" target="node1" id="fencing-0"/> + <fencing-level devices="st" index="1" target="node2" id="fencing-1"/> + <fencing-level devices="st2" index="2" target="node2" id="fencing-2"/> + </fencing-topology> <op_defaults> <meta_attributes id="opsdef2"> <nvpair name="record-pending" value="true" id="opsdef2-record-pending"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/test/testcases/history.exp new/crmsh/test/testcases/history.exp --- old/crmsh/test/testcases/history.exp 2014-08-22 13:11:04.000000000 +0200 +++ new/crmsh/test/testcases/history.exp 2014-08-28 15:12:04.000000000 +0200 @@ -276,5 +276,6 @@ .TRY History 2 .INP: history .INP: session load _crmsh_regtest +.EXT tar -xj < history-test.tar.bz2 .INP: exclude corosync|crmd|pengine|stonith-ng|cib|attrd|mgmtd|sshd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/test/testcases/node.exp new/crmsh/test/testcases/node.exp --- old/crmsh/test/testcases/node.exp 2014-08-22 13:11:04.000000000 +0200 +++ new/crmsh/test/testcases/node.exp 2014-08-28 15:12:04.000000000 +0200 @@ -9,7 +9,7 @@ .INP: _regtest on .INP: show xml node1 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes> @@ -30,7 +30,7 @@ .INP: _regtest on .INP: show xml node1 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes> @@ -51,7 +51,7 @@ .INP: _regtest on .INP: show xml node1 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes> @@ -73,7 +73,7 @@ .INP: _regtest on .INP: show xml node1 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes> @@ -95,7 +95,7 @@ .INP: _regtest on .INP: show xml node1 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes> @@ -119,7 +119,7 @@ .INP: _regtest on .INP: show xml node1 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes> @@ -144,7 +144,7 @@ .INP: _regtest on .INP: show xml node1 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes> 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 2014-08-22 13:11:04.000000000 +0200 +++ new/crmsh/test/testcases/ra.exp 2014-08-28 15:12:04.000000000 +0200 @@ -74,7 +74,7 @@ Eg. node1:1;node2:2,3 would tell the cluster to use port 1 for node1 and ports 2 and 3 for node2 pcmk_host_list (string): A list of machines controlled by this device (Optional unless pcmk_host_check=static-list). -pcmk_host_check (string, [dynamic-list]): How to determin which machines are controlled by the device. +pcmk_host_check (string, [dynamic-list]): How to determine which machines are controlled by the device. Allowed values: dynamic-list (query the device), static-list (check the pcmk_host_list attribute), none (assume every device can fence every machine) pcmk_reboot_action (string, [reboot]): Advanced use only: An alternate command to run instead of 'reboot' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/test/testcases/resource.exp new/crmsh/test/testcases/resource.exp --- old/crmsh/test/testcases/resource.exp 2014-08-22 13:11:04.000000000 +0200 +++ new/crmsh/test/testcases/resource.exp 2014-08-28 15:12:04.000000000 +0200 @@ -7,7 +7,7 @@ .INP: _regtest on .INP: show xml p3 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -27,7 +27,7 @@ .INP: _regtest on .INP: show xml p3 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -48,7 +48,7 @@ .INP: _regtest on .INP: show xml c1 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -69,7 +69,7 @@ .INP: _regtest on .INP: show xml c1 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -92,7 +92,7 @@ .INP: _regtest on .INP: show xml cli-prefer-p3 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -113,7 +113,7 @@ .INP: _regtest on .INP: show xml cli-prefer-p3 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -134,7 +134,7 @@ .INP: _regtest on .INP: show xml p0 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -156,7 +156,7 @@ .INP: _regtest on .INP: show xml p0 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -178,7 +178,7 @@ .INP: _regtest on .INP: show xml p0 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -197,7 +197,7 @@ .INP: _regtest on .INP: show xml p0 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -220,7 +220,7 @@ .INP: _regtest on .INP: show xml p0 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -243,7 +243,7 @@ .INP: _regtest on .INP: show xml p0 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -262,7 +262,7 @@ .INP: _regtest on .INP: show xml p0 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -288,7 +288,7 @@ .INP: _regtest on .INP: show xml p0 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -314,7 +314,7 @@ .INP: _regtest on .INP: show xml p0 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -340,7 +340,7 @@ .INP: _regtest on .INP: show xml p0 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -370,7 +370,7 @@ .INP: _regtest on .INP: show xml p0 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -400,7 +400,7 @@ .INP: _regtest on .INP: show xml p0 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -432,7 +432,7 @@ .INP: _regtest on .INP: show xml p0 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -464,7 +464,7 @@ .INP: _regtest on .INP: show xml p0 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -492,7 +492,7 @@ .INP: _regtest on .INP: show xml p0 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -516,7 +516,7 @@ .INP: _regtest on .INP: show xml p0 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -540,7 +540,7 @@ .INP: _regtest on .INP: show xml p0 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -568,7 +568,7 @@ .INP: _regtest on .INP: show xml p0 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> @@ -592,7 +592,7 @@ .INP: _regtest on .INP: show xml p0 <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes/> 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 2014-08-22 13:11:04.000000000 +0200 +++ new/crmsh/test/testcases/rset-xml.exp 2014-08-28 15:12:04.000000000 +0200 @@ -1,11 +1,12 @@ <?xml version="1.0" ?> -<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2" cib-last-written="Sun Apr 12 21:37:48 2009"> +<cib num_updates="0" crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="1" admin_epoch="0" cib-last-written="Sun Apr 12 21:37:48 2009"> <configuration> <crm_config/> <nodes> <node uname="node1" id="node1"/> </nodes> <resources> + <primitive id="d5" class="ocf" provider="heartbeat" type="Dummy"/> <primitive id="st" class="stonith" type="ssh"> <instance_attributes id="st-instance_attributes"> <nvpair name="hostlist" value="node1" id="st-instance_attributes-hostlist"/> @@ -14,20 +15,19 @@ <op name="start" timeout="60s" interval="0" id="st-start-0"/> </operations> </primitive> - <primitive id="d5" class="ocf" provider="heartbeat" type="Dummy"/> <primitive id="d3" class="ocf" provider="heartbeat" type="Dummy"/> <primitive id="d1" class="ocf" provider="pacemaker" type="Dummy"/> </resources> <constraints> <rsc_colocation id="c2" score="INFINITY" rsc="d3" with-rsc="d1"/> <rsc_colocation id="c1" score="INFINITY"> - <resource_set id="c1-1" sequential="false"> + <resource_set sequential="false" id="c1-1"> <resource_ref id="d1"/> <resource_ref id="d3"/> </resource_set> </rsc_colocation> - <rsc_colocation id="c3" score="INFINITY" rsc="d3" with-rsc="d1"/> <rsc_order id="o1" kind="Serialize" first="d1" then="d3"/> + <rsc_colocation id="c3" score="INFINITY" rsc="d3" with-rsc="d1"/> </constraints> </configuration> </cib> 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-08-22 13:11:04.000000000 +0200 +++ new/crmsh/test/unittests/test_parse.py 2014-08-28 15:12:04.000000000 +0200 @@ -351,6 +351,17 @@ self.assertEqual(4, len(out)) # new type of acls + + out = self.parser.parse("acl_target foo a") + self.assertEqual('acl_target', out.tag) + self.assertEqual('foo', out.get('id')) + self.assertEqual(['a'], out.xpath('./role/@id')) + + out = self.parser.parse("acl_target foo a b") + self.assertEqual('acl_target', out.tag) + self.assertEqual('foo', out.get('id')) + self.assertEqual(['a', 'b'], out.xpath('./role/@id')) + out = self.parser.parse("acl_target foo a b c") self.assertEqual('acl_target', out.tag) self.assertEqual('foo', out.get('id')) -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de