aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark
diff options
context:
space:
mode:
authorrexlee8776 <limingjiang@huawei.com>2018-08-08 08:54:59 +0000
committerrexlee8776 <limingjiang@huawei.com>2018-08-20 04:04:05 +0000
commitcea576574ac0554c1320179bffe6965ac1333972 (patch)
tree4d9baf9d63e1c388fad138b46a11eb2591c69fdd /yardstick/benchmark
parent799a7d36587b14cbc0a9e24da5ba627b7ccb935c (diff)
Make security group configurable - dovetail
Make sercurity group can be configured via the context. The format would be: context: name: demo image: yardstick-image flavor: yardstick-flavor user: ubuntu security_group: rules: - remote_ip_prefix: "0.0.0.0/0" protocol: "tcp" port_range_min: 1 port_range_max: 65535 - remote_ip_prefix: "0.0.0.0/0" protocol: "udp" port_range_min: 1 port_range_max: 65535 - remote_ip_prefix: "0.0.0.0/0" protocol: "icmp" JIRA: YARDSTICK-1360 Change-Id: I00c45767ee2d70b790590e824599d5a4c274bced Signed-off-by: rexlee8776 <limingjiang@huawei.com>
Diffstat (limited to 'yardstick/benchmark')
-rw-r--r--yardstick/benchmark/contexts/heat.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/yardstick/benchmark/contexts/heat.py b/yardstick/benchmark/contexts/heat.py
index f118ffc32..c3c5451bd 100644
--- a/yardstick/benchmark/contexts/heat.py
+++ b/yardstick/benchmark/contexts/heat.py
@@ -59,6 +59,7 @@ class HeatContext(Context):
self.server_groups = []
self.keypair_name = None
self.secgroup_name = None
+ self.security_group = None
self._server_map = {}
self.attrs = {}
self._image = None
@@ -118,8 +119,11 @@ class HeatContext(Context):
return
self.keypair_name = h_join(self.name, "key")
+
self.secgroup_name = h_join(self.name, "secgroup")
+ self.security_group = attrs.get("security_group")
+
self._image = attrs.get("image")
self._flavor = attrs.get("flavor")
@@ -185,7 +189,7 @@ class HeatContext(Context):
self.flavors.add(flavor)
template.add_keypair(self.keypair_name, self.name)
- template.add_security_group(self.secgroup_name)
+ template.add_security_group(self.secgroup_name, self.security_group)
for network in self.networks.values():
# Using existing network