diff options
author | Serena Feng <feng.xiaowei@zte.com.cn> | 2018-05-07 14:14:15 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-05-07 14:14:15 +0000 |
commit | bdd692287fc028295ef5763c48d2218d6c7e06cb (patch) | |
tree | 6d2cb1c0d47f585c31928f8196ca3f8e709a19ef /testapi/testapi-client/testapiclient/cli/testcases.py | |
parent | ba70e3d75f1be0f1b57203cabe31bceedb1856df (diff) | |
parent | c3ba7064f4a4f0744bb4c416d204f12387d0b2f6 (diff) |
Merge "Add testcase model in the client"
Diffstat (limited to 'testapi/testapi-client/testapiclient/cli/testcases.py')
-rw-r--r-- | testapi/testapi-client/testapiclient/cli/testcases.py | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/testapi/testapi-client/testapiclient/cli/testcases.py b/testapi/testapi-client/testapiclient/cli/testcases.py index 6c97edb..3052c18 100644 --- a/testapi/testapi-client/testapiclient/cli/testcases.py +++ b/testapi/testapi-client/testapiclient/cli/testcases.py @@ -2,6 +2,7 @@ import json from testapiclient.utils import command from testapiclient.utils import urlparse +from testapiclient.models import testcase def testcases_url(name): @@ -60,12 +61,9 @@ class TestcaseCreate(command.ShowOne): parser.add_argument('testcase', type=json.loads, help='Testcase create request format:\n' - '\'{"run": "", "name": "", "ci_loop": "",' - '"tags": "",\n "url": "", "blocking": "",' - '"domains": "", "dependencies": "",\n ' - '"version": "", "criteria": "", "tier": "",' - '"trust": "",\n "catalog_description": "",' - '"description": ""}\'') + '\'{}\''.format(json.dumps( + testcase.TestCaseCreateRequest().__dict__ + ))) return parser def take_action(self, parsed_args): @@ -105,12 +103,9 @@ class TestcasePut(command.ShowOne): parser.add_argument('testcase', type=json.loads, help='Testcase Update request format:\n' - '\'{"run": "", "name": "", "ci_loop": "",' - '"tags": "",\n "url": "", "blocking": "",' - '"domains": "", "dependencies": "",\n ' - '"version": "", "criteria": "", "tier": "",' - '"trust": "",\n "catalog_description": "",' - '"description": ""}\'') + '\'{}\''.format(json.dumps( + testcase.TestCaseCreateRequest().__dict__ + ))) return parser def take_action(self, parsed_args): |