aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/contexts/model.py
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-08-24 15:06:50 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-12-14 03:46:30 +0000
commit6c191845688b5c6d1fdf71524d820dc67f15b888 (patch)
treebe251ea41d03bbf5b82e0b8a8d6510eed1fa6c3b /yardstick/benchmark/contexts/model.py
parent4f0b2293ce25d8311d352bc4f10708d6a1e00c79 (diff)
Heat: add availability_zone
Users would like to ensure placement of VMs on specific compute nodes so that the measurements are meaningful. Examples: Measure network performance in different scenarios (VMs in same host, in different hosts, across fabric, across tenants) Example: context: name: yardstick placement_groups: pgrp1: policy: "availability" servers: tg_0: floating_ip: true placement: "pgrp1" availability_zone: "zone2" vnf_0: floating_ip: true placement: "pgrp1" availability_zone: "zone1" Change-Id: I28a757c25ae3f5b3571ab3edd82d51ceba32c302 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> (cherry picked from commit 81b9d338268f47f3d8863f10ef3940f0ea79d618)
Diffstat (limited to 'yardstick/benchmark/contexts/model.py')
-rw-r--r--yardstick/benchmark/contexts/model.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/yardstick/benchmark/contexts/model.py b/yardstick/benchmark/contexts/model.py
index 97560c9f6..ae56066ee 100644
--- a/yardstick/benchmark/contexts/model.py
+++ b/yardstick/benchmark/contexts/model.py
@@ -239,6 +239,7 @@ class Server(Object): # pragma: no cover
self._flavor = attrs["flavor"]
self.user_data = attrs.get('user_data', '')
+ self.availability_zone = attrs.get('availability_zone')
Server.list.append(self)
@@ -355,12 +356,10 @@ class Server(Object): # pragma: no cover
mountpoint=self.volume_mountpoint)
template.add_server(server_name, self.image, flavor=self.flavor_name,
- flavors=self.context.flavors,
- ports=port_name_list,
- user=self.user,
- key_name=self.keypair_name,
- user_data=self.user_data,
- scheduler_hints=scheduler_hints)
+ flavors=self.context.flavors, ports=port_name_list,
+ scheduler_hints=scheduler_hints, user=self.user,
+ key_name=self.keypair_name, user_data=self.user_data,
+ availability_zone=self.availability_zone)
def add_to_template(self, template, networks, scheduler_hints=None):
"""adds to the template one or more servers (instances)"""