diff options
author | Rex Lee <limingjiang@huawei.com> | 2017-07-21 01:14:24 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-07-21 01:14:24 +0000 |
commit | e67df4eae64b9a5e1a5296c0066ce768e82d34f8 (patch) | |
tree | 56628790ef092ad034241d7fe53609be9c6d1f6a | |
parent | ca43ec6fa7e3f39bc4a6172e9522167f375b0797 (diff) | |
parent | c23de3d10294b85d6bb54191027fd3be983ce2f7 (diff) |
Merge "Add API(v2) to get all test case info"
-rw-r--r-- | api/resources/v2/testcases.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/api/resources/v2/testcases.py b/api/resources/v2/testcases.py index 119d0e230..3277b4c43 100644 --- a/api/resources/v2/testcases.py +++ b/api/resources/v2/testcases.py @@ -4,6 +4,8 @@ import os from api import ApiResource from yardstick.common.utils import result_handler from yardstick.common import constants as consts +from yardstick.benchmark.core import Param +from yardstick.benchmark.core.testcase import Testcase LOG = logging.getLogger(__name__) LOG.setLevel(logging.DEBUG) @@ -11,6 +13,11 @@ LOG.setLevel(logging.DEBUG) class V2Testcases(ApiResource): + def get(self): + param = Param({}) + testcase_list = Testcase().list_all(param) + return result_handler(consts.API_SUCCESS, testcase_list) + def post(self): return self._dispatch_post() |