diff options
author | Taseer Ahmed <taseer94@gmail.com> | 2017-07-27 00:46:28 +0500 |
---|---|---|
committer | Taseer Ahmed <taseer94@gmail.com> | 2017-07-27 09:38:11 +0500 |
commit | 57396276d5b503461af0ccaee750e85b9b1e4475 (patch) | |
tree | fe2102d5b1e13322f7fd355d5803a51edae1eeee /docker/storperf-master/storperf | |
parent | 967371648191c37e20123c08e761c7a8a2a98516 (diff) |
Add availability zone option to launch agent.
JIRA: STORPERF-178
Change-Id: I1a5c1a0d1c3b700a0858f644b01553bf0b5675de
Signed-off-by: Taseer Ahmed <taseer94@gmail.com>
Diffstat (limited to 'docker/storperf-master/storperf')
-rw-r--r-- | docker/storperf-master/storperf/resources/hot/storperf-agent.yaml | 4 | ||||
-rw-r--r-- | docker/storperf-master/storperf/storperf_master.py | 13 |
2 files changed, 17 insertions, 0 deletions
diff --git a/docker/storperf-master/storperf/resources/hot/storperf-agent.yaml b/docker/storperf-master/storperf/resources/hot/storperf-agent.yaml index 7bf8b4d..9f0481e 100644 --- a/docker/storperf-master/storperf/resources/hot/storperf-agent.yaml +++ b/docker/storperf-master/storperf/resources/hot/storperf-agent.yaml @@ -39,6 +39,9 @@ parameters: type: string constraints: - custom_constraint: neutron.network + agent_zone: + type: string + default: nova resources: storperf_agent: @@ -52,6 +55,7 @@ resources: - port: { get_resource: storperf_agent_port } user_data: { get_resource: storperf_agent_config } user_data_format: RAW + availability_zone: { get_param: agent_zone} storperf_agent_config: type: "OS::Heat::CloudConfig" diff --git a/docker/storperf-master/storperf/storperf_master.py b/docker/storperf-master/storperf/storperf_master.py index 866a98e..8c2a7b4 100644 --- a/docker/storperf-master/storperf/storperf_master.py +++ b/docker/storperf-master/storperf/storperf_master.py @@ -168,6 +168,19 @@ class StorPerfMaster(object): value) @property + def availability_zone(self): + return self.configuration_db.get_configuration_value( + 'stack', + 'availability_zone') + + @availability_zone.setter + def availability_zone(self, value): + self.configuration_db.set_configuration_value( + 'stack', + 'availability_zone', + value) + + @property def volume_quota(self): self._attach_to_openstack() quotas = self._cinder_client.quotas.get( |