From b5ebf03149c6a918a9aaeb92a3b5b62668c3b1b2 Mon Sep 17 00:00:00 2001 From: thuva4 Date: Sat, 5 May 2018 12:56:00 +0530 Subject: Add deploy result model to testapi client Change-Id: I53881146306087da5da967408d2a585a8775f641 Signed-off-by: thuva4 --- testapi/testapi-client/testapiclient/cli/deployresults.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'testapi/testapi-client/testapiclient/cli') diff --git a/testapi/testapi-client/testapiclient/cli/deployresults.py b/testapi/testapi-client/testapiclient/cli/deployresults.py index a6fe13e..1ca0bef 100644 --- a/testapi/testapi-client/testapiclient/cli/deployresults.py +++ b/testapi/testapi-client/testapiclient/cli/deployresults.py @@ -2,6 +2,7 @@ import json from testapiclient.utils import command from testapiclient.utils import urlparse +from testapiclient.models import deployresult def deployresults_url(): @@ -85,13 +86,10 @@ class DeployresultCreate(command.ShowOne): parser.add_argument('deployresult', type=json.loads, help='Deployresult create request format:\n' - '\'{"job_name" : "","scenario" : "",' - '"stop_date" : "", "build_id" : "",' - '"upstream_job_name": "",' - '"version" : "", "pod_name" : "",' - '"criteria" : "", "installer" : "",' - '"upstream_build_id" : "",' - '"start_date" : "", "details" : ""}\'') + '\'{}\''.format(json.dumps( + deployresult.DeployResultCreateRequest( + ).__dict__ + ))) return parser def take_action(self, parsed_args): -- cgit 1.2.3-korg