From d7b3e7b890fa21a018900e459c8b85e7a8f68332 Mon Sep 17 00:00:00 2001 From: thuva4 Date: Thu, 26 Apr 2018 13:15:03 +0530 Subject: Add get functionality for the import module Tested Module will deserialize the json objects from the server to Pod instance. Change-Id: I3e2cb9386f8949d544624be687ee227ae4529d72 Signed-off-by: thuva4 --- testapi/testapi-client/testapiclient/cli/pods.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'testapi/testapi-client/testapiclient/cli/pods.py') diff --git a/testapi/testapi-client/testapiclient/cli/pods.py b/testapi/testapi-client/testapiclient/cli/pods.py index df63737..a7706f6 100644 --- a/testapi/testapi-client/testapiclient/cli/pods.py +++ b/testapi/testapi-client/testapiclient/cli/pods.py @@ -3,6 +3,7 @@ import json from testapiclient.client import pods from testapiclient.utils import command from testapiclient.utils import urlparse +from testapiclient.models import pods as pm def pods_url(): @@ -61,8 +62,10 @@ class PodCreate(command.ShowOne): parser.add_argument('pod', type=json.loads, help='Pod create request format :\n' - '\'{"role": "", "name": "", "details": "", ' - '"mode": ""}\',\n role should be either ' + '\'{}\''.format(json.dumps( + pm.PodCreateRequest().__dict__ + )) + + '\n role should be either ' '"community-ci" or "production-ci", and ' 'mode should be either "metal" or "virtual.') return parser -- cgit 1.2.3-korg