diff options
author | Jörgen Karlsson <jorgen.w.karlsson@ericsson.com> | 2016-02-04 15:55:56 +0000 |
---|---|---|
committer | Jörgen Karlsson <jorgen.w.karlsson@ericsson.com> | 2016-02-05 16:12:05 +0000 |
commit | 4be7c4c3960e941ce6fad82acd4572a5b96fb5c4 (patch) | |
tree | 28429198128b9cb5eaf7c2a94f6378466bf622ec | |
parent | 9a021c8498568e71ed61d2cfa9412131f974617a (diff) |
Test: Workaround for ODL Lithium
Change-Id: I9db7f95beb618e2a3125b5252a79bf1a400b6af1
(cherry picked from commit 912fe3bb9877456cb8ef363f9304bfab733eaffd)
-rw-r--r-- | yardstick/benchmark/contexts/heat.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/yardstick/benchmark/contexts/heat.py b/yardstick/benchmark/contexts/heat.py index 8c514d250..dcc2cbf1c 100644 --- a/yardstick/benchmark/contexts/heat.py +++ b/yardstick/benchmark/contexts/heat.py @@ -7,6 +7,7 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +import os import sys import pkg_resources @@ -54,6 +55,15 @@ class HeatContext(Context): self.keypair_name = self.name + "-key" self.secgroup_name = self.name + "-secgroup" + # Temporarily removing security group due to + # ssh problems with ODL scenarios. + scenario = os.environ.get('DEPLOY_SCENARIO', None) + installer = os.environ.get('INSTALLER_TYPE', None) + if installer == 'joid' or installer == 'apex': + if scenario and scenario.startswith('os-odl'): + print "INFO: ODL scenario - removing security group." + self.secgroup_name = None + if "image" in attrs: self._image = attrs["image"] @@ -92,7 +102,8 @@ class HeatContext(Context): def _add_resources_to_template(self, template): '''add to the template the resources represented by this context''' template.add_keypair(self.keypair_name) - template.add_security_group(self.secgroup_name) + if self.secgroup_name: + template.add_security_group(self.secgroup_name) for network in self.networks: template.add_network(network.stack_name) |