From 8681bc5960d91330a3afa3db5bd5a258901bb554 Mon Sep 17 00:00:00 2001 From: QiLiang Date: Thu, 14 Jan 2016 08:09:40 +0000 Subject: HeatContext model update to match heat code update In Heat Liberty release OS::Nova::Server will always use the user pre-configured in the image (e.g. "fedora" for stock Fedora cloud images, "ubuntu" for stock Ubuntu cloud images, "cloud-user" for stock CentOS cloud images etc) Change all ec2-user -> ubuntu Add admin-user in Heat model for backwards compatibility. Refer below links for detalis: https://etherpad.opnfv.org/p/yardstick_release_b_troubleshooting https://github.com/openstack/heat/commit/e423bec7f10b0f5d07f05d195b3b7860f6bceb00 http://blog.scottlowe.org/2015/04/23/ubuntu-openstack-heat-cloud-init/ JIRA: - Change-Id: I6b8b2b21daf113a3a86aee1126b0c3e74737ef4f Signed-off-by: QiLiang (cherry picked from commit 9d36842e3966185e97cc5732aa7a0edd2050bfe2) --- tests/unit/benchmark/contexts/test_model.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/unit/benchmark/contexts') diff --git a/tests/unit/benchmark/contexts/test_model.py b/tests/unit/benchmark/contexts/test_model.py index 48584cf33..a1978e320 100644 --- a/tests/unit/benchmark/contexts/test_model.py +++ b/tests/unit/benchmark/contexts/test_model.py @@ -167,6 +167,7 @@ class ServerTestCase(unittest.TestCase): self.mock_context.name = 'bar' self.mock_context.keypair_name = 'some-keys' self.mock_context.secgroup_name = 'some-secgroup' + self.mock_context.user = "some-user" def test_construct_defaults(self): @@ -215,6 +216,7 @@ class ServerTestCase(unittest.TestCase): mock_template.add_server.assert_called_with( 'some-server', 'some-image', 'some-flavor', ports=['some-server-some-network-port'], + user=self.mock_context.user, key_name=self.mock_context.keypair_name, scheduler_hints='hints') -- cgit 1.2.3-korg