diff options
4 files changed, 10 insertions, 6 deletions
diff --git a/docker/storperf-master/rest_server.py b/docker/storperf-master/rest_server.py index 7bcd650..9280721 100644 --- a/docker/storperf-master/rest_server.py +++ b/docker/storperf-master/rest_server.py @@ -173,7 +173,7 @@ class Configure(Resource): if ('volume_size' in request.json): storperf.volume_size = request.json['volume_size'] if ('availability_zone' in request.json): - storperf.availabilty_zone = request.json['availability_zone'] + storperf.availability_zone = request.json['availability_zone'] if ('username' in request.json): storperf.username = request.json['username'] if ('password' in request.json): @@ -186,9 +186,9 @@ class Configure(Resource): return jsonify({'agent_count': storperf.agent_count, 'agent_flavor': storperf.agent_flavor, 'agent_image': storperf.agent_image, + 'availability_zone': storperf.availability_zone, 'public_network': storperf.public_network, 'volume_size': storperf.volume_size, - 'availability_zone': storperf.availability_zone, 'stack_id': storperf.stack_id}) except Exception as e: diff --git a/docker/storperf-master/storperf/resources/hot/agent-group.yaml b/docker/storperf-master/storperf/resources/hot/agent-group.yaml index c758ecd..3c02e31 100644 --- a/docker/storperf-master/storperf/resources/hot/agent-group.yaml +++ b/docker/storperf-master/storperf/resources/hot/agent-group.yaml @@ -33,7 +33,9 @@ parameters: constraints: - range: { min: 1, max: 512 } description: must be between 1 and 512 agents. - + availability_zone: + type: string + default: nova resources: slaves: @@ -49,6 +51,7 @@ resources: agent_network: {get_resource: storperf_network}, flavor: {get_param: agent_flavor}, image: {get_param: agent_image}, + availability_zone: {get_param: availability_zone}, storperf_open_security_group: {get_resource: storperf_open_security_group}, key_name: {get_resource: storperf_key_pair}, volume_size: {get_param: volume_size} diff --git a/docker/storperf-master/storperf/resources/hot/storperf-agent.yaml b/docker/storperf-master/storperf/resources/hot/storperf-agent.yaml index 9f0481e..7841e8c 100644 --- a/docker/storperf-master/storperf/resources/hot/storperf-agent.yaml +++ b/docker/storperf-master/storperf/resources/hot/storperf-agent.yaml @@ -39,11 +39,11 @@ parameters: type: string constraints: - custom_constraint: neutron.network - agent_zone: + availability_zone: type: string default: nova -resources: +resources: storperf_agent: type: "OS::Nova::Server" properties: @@ -55,7 +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} + availability_zone: { get_param: availability_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 a795faa..ad6e16c 100644 --- a/docker/storperf-master/storperf/storperf_master.py +++ b/docker/storperf-master/storperf/storperf_master.py @@ -509,6 +509,7 @@ class StorPerfMaster(object): heat_parameters['volume_size'] = self.volume_size heat_parameters['agent_image'] = self.agent_image heat_parameters['agent_flavor'] = self.agent_flavor + heat_parameters['availability_zone'] = self.availability_zone return heat_parameters def _attach_to_openstack(self): |