commit 2990b45d29abacca569a20a02a6db8ee694f4d90
Author: Ken Gaillot <kgaillot@redhat.com>
Date:   Mon May 8 11:00:20 2017 -0500

    Feature: lrmd,pengine: remove versioned parameters from documentation and tests

diff --git a/doc/Pacemaker_Explained/en-US/Ch-Rules.txt b/doc/Pacemaker_Explained/en-US/Ch-Rules.txt
index f65f8a1ec..ac12fe634 100644
--- a/doc/Pacemaker_Explained/en-US/Ch-Rules.txt
+++ b/doc/Pacemaker_Explained/en-US/Ch-Rules.txt
@@ -163,12 +163,15 @@ special, built-in node attributes for each node that can also be used.
  unrelated to the now-common use of "container" for resource isolation).
  '(since 1.1.13)'
 
-|#ra-version
-|The installed version of the resource agent on the node, as defined
+////
+// put a pipe in front of first two lines
+ #ra-version
+ The installed version of the resource agent on the node, as defined
  by the +version+ attribute of the +resource-agent+ tag in the agent's
  metadata. Valid only within rules controlling resource options. This can be
  useful during rolling upgrades of a backward-incompatible resource agent.
- '(coming in 1.1.17)'
+ '(coming in 1.1.18)'
+////
 
 |=========================================================
 
diff --git a/lrmd/Makefile.am b/lrmd/Makefile.am
index 64450cdc7..e801fbce9 100644
--- a/lrmd/Makefile.am
+++ b/lrmd/Makefile.am
@@ -36,11 +36,14 @@ endif
 lrmd_CFLAGS		= $(CFLAGS_HARDENED_EXE)
 lrmd_LDFLAGS		= $(LDFLAGS_HARDENED_EXE)
 
+#VERSIONED_LDADD		= $(top_builddir)/lib/lrmd/liblrmd.la		\
+#			$(top_builddir)/lib/pengine/libpe_rules.la
+VERSIONED_LDADD		=
+
 lrmd_LDADD		= $(top_builddir)/lib/common/libcrmcommon.la	\
 			$(top_builddir)/lib/services/libcrmservice.la	\
-			$(top_builddir)/lib/lrmd/liblrmd.la		\
 			$(top_builddir)/lib/fencing/libstonithd.la	\
-			$(top_builddir)/lib/pengine/libpe_rules.la ${COMPAT_LIBS}
+			$(VERSIONED_LDADD) ${COMPAT_LIBS}
 lrmd_SOURCES		= main.c lrmd.c
 
 pacemaker_remoted_CPPFLAGS	= -DSUPPORT_REMOTE $(AM_CPPFLAGS)
diff --git a/lrmd/regression.py.in b/lrmd/regression.py.in
index 5bf47c7bd..329051b2c 100755
--- a/lrmd/regression.py.in
+++ b/lrmd/regression.py.in
@@ -918,6 +918,52 @@ if __name__ == "__main__":
         test.add_cmd("-c exec -r test_rsc -a stop %s -l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:stop rc:ok op_status:complete\"" % (timeout))
         test.add_cmd("-c unregister_rsc -r test_rsc %s -l \"NEW_EVENT event_type:unregister rsc_id:test_rsc action:none rc:ok op_status:complete\"" % (timeout))
 
+    def build_versioned_tests(self):
+        """ Register tests for versioned resource parameters """
+
+        ### Verify that versioned resource parameters are chosen properly ###
+
+        # We'll default to one state file, then check the version to use a different one
+        state_file_default = "@CRM_RSCTMP_DIR@/versioned_params_default.state"
+        state_file_expected = "@CRM_RSCTMP_DIR@/versioned_params_expected.state"
+
+        # Versioned attributes are passed as a single key-value pair.
+        # Here, we define the value to choose the state file;
+        # ocf:heartbeat:Dummy should always be at least version 0.9.
+        versioned_key = "#versioned_attributes"
+        versioned_attrs = """<versioned_attributes>
+          <instance_attributes id="id01" score="2">
+            <rule id="id02" score="INFINITY">
+              <expression id="id03" type="version" attribute="#ra-version" operation="gt" value="0.8"/>
+            </rule>
+            <nvpair id="id04" name="state" value="%s"/>
+          </instance_attributes>
+          <instance_attributes id="id05" score="1">
+            <nvpair id="id06" name="state" value="%s"/>
+          </instance_attributes>
+        </versioned_attributes>""" % (state_file_expected, state_file_default)
+        cmd_params = "-k '%s' -v '%s' " % (versioned_key, versioned_attrs)
+
+        test = self.new_test("versioned_params", "Verify use of versioned resource parameters")
+
+        # First, remove the possible state files, so we can reliably tell what gets created.
+        test.add_sys_cmd("rm", "-f %s %s" % (state_file_expected, state_file_default))
+
+        # Register and start the resource.
+        test.add_cmd("-c register_rsc -r test_rsc -P pacemaker -C ocf -T Dummy "
+                     "-l 'NEW_EVENT event_type:register rsc_id:test_rsc action:none rc:ok op_status:complete' "
+                     "%s" % (self.action_timeout))
+        test.add_cmd("-c exec -r test_rsc -a start -t 6000 %s" % cmd_params)
+
+        # Check the created state file.
+        test.add_expected_fail_sys_cmd("ls", state_file_default, 2)
+        test.add_sys_cmd("ls", state_file_expected)
+
+        # Stop and unregister the resource.
+        test.add_cmd("-c exec -r test_rsc -a stop -t 4000 %s" % cmd_params)
+        test.add_cmd("-c unregister_rsc -r test_rsc " + self.action_timeout +
+                     "-l \"NEW_EVENT event_type:unregister rsc_id:test_rsc action:none rc:ok op_status:complete\" ")
+
     def build_custom_tests(self):
         """ Register tests that target specific cases """
 
@@ -1000,50 +1046,6 @@ if __name__ == "__main__":
         test.add_cmd("-c unregister_rsc -r \"test_rsc\" "+self.action_timeout+
                      "-l \"NEW_EVENT event_type:unregister rsc_id:test_rsc action:none rc:ok op_status:complete\" ")
 
-        ### Verify that versioned resource parameters are chosen properly ###
-
-        # We'll default to one state file, then check the version to use a different one
-        state_file_default = "@CRM_RSCTMP_DIR@/versioned_params_default.state"
-        state_file_expected = "@CRM_RSCTMP_DIR@/versioned_params_expected.state"
-
-        # Versioned attributes are passed as a single key-value pair.
-        # Here, we define the value to choose the state file;
-        # ocf:heartbeat:Dummy should always be at least version 0.9.
-        versioned_key = "#versioned_attributes"
-        versioned_attrs = """<versioned_attributes>
-          <instance_attributes id="id01" score="2">
-            <rule id="id02" score="INFINITY">
-              <expression id="id03" type="version" attribute="#ra-version" operation="gt" value="0.8"/>
-            </rule>
-            <nvpair id="id04" name="state" value="%s"/>
-          </instance_attributes>
-          <instance_attributes id="id05" score="1">
-            <nvpair id="id06" name="state" value="%s"/>
-          </instance_attributes>
-        </versioned_attributes>""" % (state_file_expected, state_file_default)
-        cmd_params = "-k '%s' -v '%s' " % (versioned_key, versioned_attrs)
-
-        test = self.new_test("versioned_params", "Verify use of versioned resource parameters")
-
-        # First, remove the possible state files, so we can reliably tell what gets created.
-        test.add_sys_cmd("rm", "-f %s %s" % (state_file_expected, state_file_default))
-
-        # Register and start the resource.
-        test.add_cmd("-c register_rsc -r test_rsc -P pacemaker -C ocf -T Dummy "
-                     "-l 'NEW_EVENT event_type:register rsc_id:test_rsc action:none rc:ok op_status:complete' "
-                     "%s" % (self.action_timeout))
-        test.add_cmd("-c exec -r test_rsc -a start -t 6000 %s" % cmd_params)
-
-        # Check the created state file.
-        test.add_expected_fail_sys_cmd("ls", state_file_default, 2)
-        test.add_sys_cmd("ls", state_file_expected)
-
-        # Stop and unregister the resource.
-        test.add_cmd("-c exec -r test_rsc -a stop -t 4000 %s" % cmd_params)
-        test.add_cmd("-c unregister_rsc -r test_rsc " + self.action_timeout +
-                     "-l \"NEW_EVENT event_type:unregister rsc_id:test_rsc action:none rc:ok op_status:complete\" ")
-
-
         ### get metadata ###
         test = self.new_test("get_ocf_metadata", "Retrieve metadata for a resource")
         test.add_cmd_check_stdout("-c metadata -C \"ocf\" -P \"pacemaker\" -T \"Dummy\"",
@@ -1261,6 +1263,7 @@ def main(argv):
     tests.build_generic_tests()
     tests.build_multi_rsc_tests()
     tests.build_negative_tests()
+    #tests.build_versioned_tests()
     tests.build_custom_tests()
     tests.build_stress_tests()
 
diff --git a/pengine/regression.sh b/pengine/regression.sh
index 2de5e728a..e2e7bf67e 100755
--- a/pengine/regression.sh
+++ b/pengine/regression.sh
@@ -315,7 +315,7 @@ do_test 11-a-then-bm-b-move-a-clone-starting "Advanced migrate logic, A clone th
 do_test a-promote-then-b-migrate "A promote then B start. migrate B"
 do_test a-demote-then-b-migrate "A demote then B stop. migrate B"
 
-do_test migrate-versioned "Disable migration for versioned resources"
+#do_test migrate-versioned "Disable migration for versioned resources"
 
 #echo ""
 #do_test complex1 "Complex	"
@@ -847,8 +847,8 @@ do_test isolation-start-all   "Start docker isolated resources."
 do_test isolation-restart-all "Restart docker isolated resources."
 do_test isolation-clone       "Cloned isolated primitive."
 
-echo ""
-do_test versioned-resources     "Start resources with #ra-version rules"
+#echo ""
+#do_test versioned-resources     "Start resources with #ra-version rules"
 
 echo ""
 test_results
