From b71c7c1c43087d4f1ba3ad102cc2a4dd3e305c2f Mon Sep 17 00:00:00 2001 From: Brian Elliott Date: Wed, 29 May 2013 08:47:56 +0000 Subject: Fix msg version type sent to cells RPC API Regression fix from 6b16c8731c44e4a6c80b803f3e8afdd88386d577, cannot build instances through cells. The RPC dispatcher dislikes floats for version numbers. bug 1190371 Change-Id: I18994ce8a524f88910cfe37c9b302296ce30102f --- nova/tests/cells/test_cells_rpcapi.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'nova/tests') diff --git a/nova/tests/cells/test_cells_rpcapi.py b/nova/tests/cells/test_cells_rpcapi.py index e44c0be4a..4d58bdb9e 100644 --- a/nova/tests/cells/test_cells_rpcapi.py +++ b/nova/tests/cells/test_cells_rpcapi.py @@ -55,6 +55,9 @@ class CellsAPITestCase(test.TestCase): self.assertEqual(self.fake_context, call_info['context']) self.assertEqual(self.fake_topic, call_info['topic']) self.assertEqual(method, call_info['msg']['method']) + msg_version = call_info['msg']['version'] + self.assertTrue(isinstance(msg_version, basestring), + "Message version %s is not a string" % msg_version) self.assertEqual(version, call_info['msg']['version']) self.assertEqual(args, call_info['msg']['args']) @@ -127,7 +130,7 @@ class CellsAPITestCase(test.TestCase): 'arg2': 2, 'arg3': 3}} self._check_result(call_info, 'build_instances', - expected_args, version=1.8) + expected_args, version='1.8') def test_get_capacities(self): capacity_info = {"capacity": "info"} -- cgit