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/rest_server.py | |
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/rest_server.py')
-rw-r--r-- | docker/storperf-master/rest_server.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/docker/storperf-master/rest_server.py b/docker/storperf-master/rest_server.py index d551b57..7452898 100644 --- a/docker/storperf-master/rest_server.py +++ b/docker/storperf-master/rest_server.py @@ -33,7 +33,8 @@ class ConfigurationRequestModel: 'agent_flavor': fields.String, 'agent_image': fields.String, 'public_network': fields.String, - 'volume_size': fields.Integer + 'volume_size': fields.Integer, + 'availability_zone': fields.String } @@ -46,7 +47,8 @@ class ConfigurationResponseModel: 'public_network': fields.String, 'stack_created': fields.Boolean, 'stack_id': fields.String, - 'volume_size': fields.Integer + 'volume_size': fields.Integer, + 'availability_zone': fields.String } @@ -68,6 +70,7 @@ class Configure(Resource): 'public_network': storperf.public_network, 'volume_size': storperf.volume_size, 'stack_created': storperf.is_stack_created, + 'availability_zone': storperf.availability_zone, 'stack_id': storperf.stack_id}) @swagger.operation( @@ -102,6 +105,8 @@ class Configure(Resource): storperf.public_network = request.json['public_network'] 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.create_stack() if storperf.stack_id is None: @@ -112,6 +117,7 @@ class Configure(Resource): 'agent_image': storperf.agent_image, 'public_network': storperf.public_network, 'volume_size': storperf.volume_size, + 'availability_zone': storperf.availability_zone, 'stack_id': storperf.stack_id}) except Exception as e: |