diff options
author | 2016-01-14 08:09:40 +0000 | |
---|---|---|
committer | 2016-01-15 01:10:25 +0000 | |
commit | 9d36842e3966185e97cc5732aa7a0edd2050bfe2 (patch) | |
tree | dfe51fed8fe84188eb89bd4fd323d1c722967ab5 /yardstick/orchestrator/heat.py | |
parent | 9b8b765373abbb10289415312a24574ff122541a (diff) |
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 <liangqi1@huawei.com>
Diffstat (limited to 'yardstick/orchestrator/heat.py')
-rw-r--r-- | yardstick/orchestrator/heat.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/yardstick/orchestrator/heat.py b/yardstick/orchestrator/heat.py index 470f938ed..8d535c252 100644 --- a/yardstick/orchestrator/heat.py +++ b/yardstick/orchestrator/heat.py @@ -353,8 +353,8 @@ class HeatTemplate(HeatObject): } def add_server(self, name, image, flavor, ports=None, networks=None, - scheduler_hints=None, key_name=None, user_data=None, - metadata=None, additional_properties=None): + scheduler_hints=None, user=None, key_name=None, + user_data=None, metadata=None, additional_properties=None): '''add to the template a Nova Server''' log.debug("adding Nova::Server '%s', image '%s', flavor '%s', " "ports %s", name, image, flavor, ports) @@ -370,6 +370,9 @@ class HeatTemplate(HeatObject): 'networks': [] # list of dictionaries } + if user: + server_properties['admin_user'] = user + if key_name: self.resources[name]['depends_on'] = [key_name] server_properties['key_name'] = {'get_resource': key_name} |