예제 #1
0
 def test_success(self):
     mock_communicator = mock.MagicMock(spec_set=NodeCommunicator)
     node = NodeAddresses("node1")
     lib_sbd.get_sbd_config(mock_communicator, node)
     mock_communicator.call_node.assert_called_once_with(
         node, "remote/get_sbd_config", None
     )
예제 #2
0
 def test_success(self):
     mock_communicator = mock.MagicMock(spec_set=NodeCommunicator)
     node = NodeAddresses("node1")
     lib_sbd.get_sbd_config(mock_communicator, node)
     mock_communicator.call_node.assert_called_once_with(
         node, "remote/get_sbd_config", None
     )
예제 #3
0
파일: sbd.py 프로젝트: rriifftt/pcs
 def get_sbd_config(node):
     try:
         config_list.append({
             "node": node,
             "config": environment_file_to_dict(
                 sbd.get_sbd_config(lib_env.node_communicator(), node)
             )
         })
         successful_node_list.append(node)
     except NodeCommandUnsuccessfulException as e:
         report_item_list.append(reports.unable_to_get_sbd_config(
             node.label,
             e.reason,
             Severities.WARNING
         ))
     except NodeCommunicationException as e:
         report_item_list.append(node_communicator_exception_to_report_item(
             e,
             severity=Severities.WARNING
         ))
         report_item_list.append(reports.unable_to_get_sbd_config(
             node.label,
             "", #reason is in previous report item
             Severities.WARNING
         ))