diff options
author | Rex Lee <limingjiang@huawei.com> | 2017-09-15 09:01:25 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-09-15 09:01:25 +0000 |
commit | 75ff03570c08093fbe5a2bb85856ec39752f900d (patch) | |
tree | 721e62553668d29200cf9ef0b1194312b8d412da /api/resources | |
parent | 1c67f896d6f8c19bb1589bba16f0e1ce2ebaae0a (diff) | |
parent | 7cf7a67475df3882be76fd510a011bdf2e25166f (diff) |
Merge "bugfix: show testcase api return type error"
Diffstat (limited to 'api/resources')
-rw-r--r-- | api/resources/v2/testcases.py | 8 |
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): |