Skip to content

Commit

Permalink
lib: fix call_node calls on python3
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmular authored and tomjelinek committed Jun 30, 2016
1 parent 2f18464 commit a74f707
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions pcs/lib/sbd.py
Expand Up @@ -57,7 +57,7 @@ def check_sbd(communicator, node, watchdog):
return communicator.call_node(
node,
"remote/check_sbd",
NodeCommunicator.format_data_dict({"watchdog": watchdog})
NodeCommunicator.format_data_dict([("watchdog", watchdog)])
)


Expand Down Expand Up @@ -119,7 +119,7 @@ def set_sbd_config(communicator, node, config):
communicator.call_node(
node,
"remote/set_sbd_config",
NodeCommunicator.format_data_dict({"config": config})
NodeCommunicator.format_data_dict([("config", config)])
)


Expand Down Expand Up @@ -171,7 +171,7 @@ def enable_sbd_service(communicator, node):
communicator -- NodeCommunicator
node -- NodeAddresses
"""
communicator.call_node(node, "remote/sbd_enable", "")
communicator.call_node(node, "remote/sbd_enable", None)


def enable_sbd_service_on_node(report_processor, node_communicator, node):
Expand Down Expand Up @@ -215,7 +215,7 @@ def disable_sbd_service(communicator, node):
communicator -- NodeCommunicator
node -- NodeAddresses
"""
communicator.call_node(node, "remote/sbd_disable", "")
communicator.call_node(node, "remote/sbd_disable", None)


def disable_sbd_service_on_node(report_processor, node_communicator, node):
Expand Down Expand Up @@ -259,7 +259,7 @@ def set_stonith_watchdog_timeout_to_zero(communicator, node):
node -- NodeAddresses
"""
communicator.call_node(
node, "remote/set_stonith_watchdog_timeout_to_zero", ""
node, "remote/set_stonith_watchdog_timeout_to_zero", None
)


Expand Down Expand Up @@ -292,7 +292,7 @@ def remove_stonith_watchdog_timeout(communicator, node):
communicator -- NodeCommunicator
node -- NodeAddresses
"""
communicator.call_node(node, "remote/remove_stonith_watchdog_timeout", "")
communicator.call_node(node, "remote/remove_stonith_watchdog_timeout", None)


def remove_stonith_watchdog_timeout_on_all_nodes(node_communicator, node_list):
Expand Down Expand Up @@ -351,7 +351,7 @@ def get_sbd_config(communicator, node):
communicator -- NodeCommunicator
node -- NodeAddresses
"""
return communicator.call_node(node, "remote/get_sbd_config", "")
return communicator.call_node(node, "remote/get_sbd_config", None)


def is_sbd_enabled(runner):
Expand Down
10 changes: 5 additions & 5 deletions pcs/test/test_lib_sbd.py
Expand Up @@ -360,7 +360,7 @@ def test_success(self):
node = NodeAddresses("node1")
lib_sbd.enable_sbd_service(mock_communicator, node)
mock_communicator.call_node.assert_called_once_with(
node, "remote/sbd_enable", ""
node, "remote/sbd_enable", None
)


Expand Down Expand Up @@ -408,7 +408,7 @@ def test_success(self):
node = NodeAddresses("node1")
lib_sbd.disable_sbd_service(mock_communicator, node)
mock_communicator.call_node.assert_called_once_with(
node, "remote/sbd_disable", ""
node, "remote/sbd_disable", None
)


Expand Down Expand Up @@ -456,7 +456,7 @@ def test_success(self):
node = NodeAddresses("node1")
lib_sbd.set_stonith_watchdog_timeout_to_zero(mock_communicator, node)
mock_communicator.call_node.assert_called_once_with(
node, "remote/set_stonith_watchdog_timeout_to_zero", ""
node, "remote/set_stonith_watchdog_timeout_to_zero", None
)


Expand Down Expand Up @@ -520,7 +520,7 @@ def test_success(self):
node = NodeAddresses("node1")
lib_sbd.remove_stonith_watchdog_timeout(mock_communicator, node)
mock_communicator.call_node.assert_called_once_with(
node, "remote/remove_stonith_watchdog_timeout", ""
node, "remote/remove_stonith_watchdog_timeout", None
)


Expand Down Expand Up @@ -584,7 +584,7 @@ def test_success(self):
node = NodeAddresses("node1")
lib_sbd.get_sbd_config(mock_communicator, node)
mock_communicator.call_node.assert_called_once_with(
node, "remote/get_sbd_config", ""
node, "remote/get_sbd_config", None
)


Expand Down

0 comments on commit a74f707

Please sign in to comment.