From 1ac621a37910cd83536e0839d7a74ecca0ad5ccc Mon Sep 17 00:00:00 2001 From: Yuriy Taraday Date: Fri, 29 Apr 2011 13:20:31 +0400 Subject: [PATCH 1/4] Changed test_cloud and fake virt driver to show out the fix. --- nova/tests/test_cloud.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/tests/test_cloud.py b/nova/tests/test_cloud.py index c45bdd12..f271c03f 100644 --- a/nova/tests/test_cloud.py +++ b/nova/tests/test_cloud.py @@ -290,7 +290,7 @@ class CloudTestCase(test.TestCase): instance_id = rv['instancesSet'][0]['instanceId'] output = self.cloud.get_console_output(context=self.context, instance_id=[instance_id]) - self.assertEquals(b64decode(output['output']), 'FAKE CONSOLE OUTPUT') + self.assertEquals(b64decode(output['output']), 'FAKE CONSOLE?OUTPUT') # TODO(soren): We need this until we can stop polling in the rpc code # for unit tests. greenthread.sleep(0.3) From 324f2cf4b9b9122b5aa969c3746faf4869b9a066 Mon Sep 17 00:00:00 2001 From: Yuriy Taraday Date: Tue, 3 May 2011 11:05:45 +0400 Subject: [PATCH 2/4] Moved reencoding logic to compute manager and cloud EC2 API. --- nova/tests/test_cloud.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nova/tests/test_cloud.py b/nova/tests/test_cloud.py index f271c03f..311adfd5 100644 --- a/nova/tests/test_cloud.py +++ b/nova/tests/test_cloud.py @@ -290,7 +290,8 @@ class CloudTestCase(test.TestCase): instance_id = rv['instancesSet'][0]['instanceId'] output = self.cloud.get_console_output(context=self.context, instance_id=[instance_id]) - self.assertEquals(b64decode(output['output']), 'FAKE CONSOLE?OUTPUT') + self.assertEquals(b64decode(output['output']).decode('utf-8'), + u'FAKE CONSOLE\ufffdOUTPUT') # TODO(soren): We need this until we can stop polling in the rpc code # for unit tests. greenthread.sleep(0.3) From e45823d51b53e92a7195f69bbb156b77483fd932 Mon Sep 17 00:00:00 2001 From: Yuriy Taraday Date: Thu, 5 May 2011 07:50:58 +0400 Subject: [PATCH 3/4] Moved all reencoding to compute manager to satisfy both Direct API and internal cloud call. --- nova/tests/test_cloud.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nova/tests/test_cloud.py b/nova/tests/test_cloud.py index 311adfd5..f271c03f 100644 --- a/nova/tests/test_cloud.py +++ b/nova/tests/test_cloud.py @@ -290,8 +290,7 @@ class CloudTestCase(test.TestCase): instance_id = rv['instancesSet'][0]['instanceId'] output = self.cloud.get_console_output(context=self.context, instance_id=[instance_id]) - self.assertEquals(b64decode(output['output']).decode('utf-8'), - u'FAKE CONSOLE\ufffdOUTPUT') + self.assertEquals(b64decode(output['output']), 'FAKE CONSOLE?OUTPUT') # TODO(soren): We need this until we can stop polling in the rpc code # for unit tests. greenthread.sleep(0.3) From f8d1ccd787b96b60ad887fbf8696258924b773fe Mon Sep 17 00:00:00 2001 From: Yuriy Taraday Date: Fri, 6 May 2011 06:50:48 +0400 Subject: [PATCH 4/4] Added myself to Authors file. --- Authors | 1 + 1 file changed, 1 insertion(+) diff --git a/Authors b/Authors index 1cdeeff9..8a1571a0 100644 --- a/Authors +++ b/Authors @@ -80,4 +80,5 @@ Vasiliy Shlykov Vishvananda Ishaya Yoshiaki Tamura Youcef Laribi +Yuriy Taraday Zhixue Wu