def test_reset_node_success(self, mock_get_url, mock_request):
"""Test successfully reset node status"""
mock_get_url.return_value = '/redfish/v1/Nodes'
fake_node_detail = fakes.mock_request_get(
fakes.fake_node_detail(), http_client.OK)
fake_node_action_resp = fakes.mock_request_get(
{}, http_client.NO_CONTENT)
mock_request.side_effect = [fake_node_detail, fake_node_action_resp]
result = redfish.reset_node("1", {"Reset": {"Type": "On"}})
expected = exception.confirmation(
confirm_code="Reset Composed Node",
confirm_detail="This composed node has been set to 'On' "
"successfully.")
self.assertEqual(expected, result)
评论列表
文章目录