aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>2016-01-26 13:18:32 +0100
committerJörgen Karlsson <jorgen.w.karlsson@ericsson.com>2016-01-27 11:59:11 +0000
commite1d2d085b04dd3e6bbed0aede1cc5487b2916193 (patch)
tree7c3c9ca64c29e65b8e31ea6c055db21a088e8c4c
parent2a4d7b3313f6f59902cbedce51b9ee665bbc02a5 (diff)
Test: Workaround for ODL scenarios
Temporarily removing security group from generated heat template. This patch is pushed through for testing purposes and should be reverted when a proper solution is found. Change-Id: I64c86f41664499d46d8317bb1ebbe304083554ab Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com> (cherry picked from commit 8236c94ecef8aa25af073c50f7a0eaafae9b4bc6)
-rw-r--r--yardstick/benchmark/contexts/heat.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/yardstick/benchmark/contexts/heat.py b/yardstick/benchmark/contexts/heat.py
index 8c514d250..e58482286 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,13 @@ 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)
+ 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 +100,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)