diff options
author | rexlee8776 <limingjiang@huawei.com> | 2018-08-08 08:54:59 +0000 |
---|---|---|
committer | Rex Lee <limingjiang@huawei.com> | 2018-08-27 03:45:49 +0000 |
commit | ac4587e04248eb53c4df9519b6f918567949bedc (patch) | |
tree | c33f0fc1002072eacb7eff7b1749b174f647a0d1 /yardstick/benchmark | |
parent | 8af5c098fb0f30cc1bda0dd4431dbce1b2403a16 (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>
(cherry picked from commit cea576574ac0554c1320179bffe6965ac1333972)
Diffstat (limited to 'yardstick/benchmark')
-rw-r--r-- | yardstick/benchmark/contexts/heat.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/yardstick/benchmark/contexts/heat.py b/yardstick/benchmark/contexts/heat.py index ac85b6ffe..1be746bf3 100644 --- a/yardstick/benchmark/contexts/heat.py +++ b/yardstick/benchmark/contexts/heat.py @@ -58,6 +58,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 @@ -117,8 +118,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") @@ -184,7 +188,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 |