summaryrefslogtreecommitdiffstats
path: root/api/resources/v2
diff options
context:
space:
mode:
authorrexlee8776 <limingjiang@huawei.com>2017-09-14 09:25:53 +0000
committerrexlee8776 <limingjiang@huawei.com>2017-09-14 09:25:53 +0000
commit7cf7a67475df3882be76fd510a011bdf2e25166f (patch)
tree70030de4e9ea480c2e1456f7b6c8cddd52d49c5a /api/resources/v2
parentdc4c82cda3362f1a1fa04340103846c4aa655ec5 (diff)
bugfix: show testcase api return type error
segmentation_id should be number, provider should be string Change-Id: Iabdc08cb0989f4d585013b5a8ef3662442eeda45 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
Diffstat (limited to 'api/resources/v2')
-rw-r--r--api/resources/v2/testcases.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/api/resources/v2/testcases.py b/api/resources/v2/testcases.py
index 316ef2664..0edbf6285 100644
--- a/api/resources/v2/testcases.py
+++ b/api/resources/v2/testcases.py
@@ -60,7 +60,13 @@ class V2Testcase(ApiResource):
options = {k: {'description': '', 'type': v.__class__.__name__}
for k, v in jinja2schema.infer(data).items()}
-
+ # [('segmentation_id', < scalar >), ('image', < string >), ('provider', < scalar >),
+ # ('physical_network', < string >), ('packetsize', < number >)]
+ for k, v in options.items():
+ if k == 'segmentation_id':
+ options[k]['type'] = 'Number'
+ if k == 'provider':
+ options[k]['type'] = 'String'
return result_handler(consts.API_SUCCESS, {'testcase': data, 'args': options})
def delete(self, case_name):