Blame SOURCES/bz1164402-01-sbd-fix-call_node-calls-on-python3.patch

15f218
From dff92f778f692f0ec2aa7d0c20e76a06a767e4b2 Mon Sep 17 00:00:00 2001
15f218
From: Ondrej Mular <omular@redhat.com>
15f218
Date: Fri, 24 Jun 2016 20:17:38 +0200
15f218
Subject: [PATCH] bz1164402-01 sbd fix call_node calls on python3
15f218
15f218
---
15f218
 pcs/lib/sbd.py           | 14 +++++++-------
15f218
 pcs/test/test_lib_sbd.py | 10 +++++-----
15f218
 2 files changed, 12 insertions(+), 12 deletions(-)
15f218
15f218
diff --git a/pcs/lib/sbd.py b/pcs/lib/sbd.py
15f218
index 1330bfc..4488a73 100644
15f218
--- a/pcs/lib/sbd.py
15f218
+++ b/pcs/lib/sbd.py
15f218
@@ -57,7 +57,7 @@ def check_sbd(communicator, node, watchdog):
15f218
     return communicator.call_node(
15f218
         node,
15f218
         "remote/check_sbd",
15f218
-        NodeCommunicator.format_data_dict({"watchdog": watchdog})
15f218
+        NodeCommunicator.format_data_dict([("watchdog", watchdog)])
15f218
     )
15f218
 
15f218
 
15f218
@@ -119,7 +119,7 @@ def set_sbd_config(communicator, node, config):
15f218
     communicator.call_node(
15f218
         node,
15f218
         "remote/set_sbd_config",
15f218
-        NodeCommunicator.format_data_dict({"config": config})
15f218
+        NodeCommunicator.format_data_dict([("config", config)])
15f218
     )
15f218
 
15f218
 
15f218
@@ -171,7 +171,7 @@ def enable_sbd_service(communicator, node):
15f218
     communicator -- NodeCommunicator
15f218
     node -- NodeAddresses
15f218
     """
15f218
-    communicator.call_node(node, "remote/sbd_enable", "")
15f218
+    communicator.call_node(node, "remote/sbd_enable", None)
15f218
 
15f218
 
15f218
 def enable_sbd_service_on_node(report_processor, node_communicator, node):
15f218
@@ -215,7 +215,7 @@ def disable_sbd_service(communicator, node):
15f218
     communicator -- NodeCommunicator
15f218
     node -- NodeAddresses
15f218
     """
15f218
-    communicator.call_node(node, "remote/sbd_disable", "")
15f218
+    communicator.call_node(node, "remote/sbd_disable", None)
15f218
 
15f218
 
15f218
 def disable_sbd_service_on_node(report_processor, node_communicator, node):
15f218
@@ -259,7 +259,7 @@ def set_stonith_watchdog_timeout_to_zero(communicator, node):
15f218
     node -- NodeAddresses
15f218
     """
15f218
     communicator.call_node(
15f218
-        node, "remote/set_stonith_watchdog_timeout_to_zero", ""
15f218
+        node, "remote/set_stonith_watchdog_timeout_to_zero", None
15f218
     )
15f218
 
15f218
 
15f218
@@ -292,7 +292,7 @@ def remove_stonith_watchdog_timeout(communicator, node):
15f218
     communicator -- NodeCommunicator
15f218
     node -- NodeAddresses
15f218
     """
15f218
-    communicator.call_node(node, "remote/remove_stonith_watchdog_timeout", "")
15f218
+    communicator.call_node(node, "remote/remove_stonith_watchdog_timeout", None)
15f218
 
15f218
 
15f218
 def remove_stonith_watchdog_timeout_on_all_nodes(node_communicator, node_list):
15f218
@@ -351,7 +351,7 @@ def get_sbd_config(communicator, node):
15f218
     communicator -- NodeCommunicator
15f218
     node -- NodeAddresses
15f218
     """
15f218
-    return communicator.call_node(node, "remote/get_sbd_config", "")
15f218
+    return communicator.call_node(node, "remote/get_sbd_config", None)
15f218
 
15f218
 
15f218
 def is_sbd_enabled(runner):
15f218
diff --git a/pcs/test/test_lib_sbd.py b/pcs/test/test_lib_sbd.py
15f218
index 54c5669..e3c1401 100644
15f218
--- a/pcs/test/test_lib_sbd.py
15f218
+++ b/pcs/test/test_lib_sbd.py
15f218
@@ -360,7 +360,7 @@ class EnableSbdServiceTest(TestCase):
15f218
         node = NodeAddresses("node1")
15f218
         lib_sbd.enable_sbd_service(mock_communicator, node)
15f218
         mock_communicator.call_node.assert_called_once_with(
15f218
-            node, "remote/sbd_enable", ""
15f218
+            node, "remote/sbd_enable", None
15f218
         )
15f218
 
15f218
 
15f218
@@ -408,7 +408,7 @@ class DisableSbdServiceTest(TestCase):
15f218
         node = NodeAddresses("node1")
15f218
         lib_sbd.disable_sbd_service(mock_communicator, node)
15f218
         mock_communicator.call_node.assert_called_once_with(
15f218
-            node, "remote/sbd_disable", ""
15f218
+            node, "remote/sbd_disable", None
15f218
         )
15f218
 
15f218
 
15f218
@@ -456,7 +456,7 @@ class SetStonithWatchdogTimeoutToZeroTest(TestCase):
15f218
         node = NodeAddresses("node1")
15f218
         lib_sbd.set_stonith_watchdog_timeout_to_zero(mock_communicator, node)
15f218
         mock_communicator.call_node.assert_called_once_with(
15f218
-            node, "remote/set_stonith_watchdog_timeout_to_zero", ""
15f218
+            node, "remote/set_stonith_watchdog_timeout_to_zero", None
15f218
         )
15f218
 
15f218
 
15f218
@@ -520,7 +520,7 @@ class RemoveStonithWatchdogTimeoutTest(TestCase):
15f218
         node = NodeAddresses("node1")
15f218
         lib_sbd.remove_stonith_watchdog_timeout(mock_communicator, node)
15f218
         mock_communicator.call_node.assert_called_once_with(
15f218
-            node, "remote/remove_stonith_watchdog_timeout", ""
15f218
+            node, "remote/remove_stonith_watchdog_timeout", None
15f218
         )
15f218
 
15f218
 
15f218
@@ -584,7 +584,7 @@ class GetSbdConfigTest(TestCase):
15f218
         node = NodeAddresses("node1")
15f218
         lib_sbd.get_sbd_config(mock_communicator, node)
15f218
         mock_communicator.call_node.assert_called_once_with(
15f218
-            node, "remote/get_sbd_config", ""
15f218
+            node, "remote/get_sbd_config", None
15f218
         )
15f218
 
15f218
 
15f218
-- 
15f218
1.8.3.1
15f218