From 5a6e75ea55a2f9d6ef0ae655139b9b8b0e7e2780 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Fri, 20 Apr 2018 17:41:19 +0800 Subject: impl import-testapiclient framework the usage: from testapiclient.client import pods pod_client = pods.PodsClient(user='test', password='pass') pod_client.create({'name': 'test-api', 'mode':'metal', 'role':'community_ci', 'details':''} from testapiclient.client import pods from testapiclient.models import pods as pm pod_client = pods.PodsClient(user='test', password='pass') pod = pm.Pods(name='test') pod_client.create(pod.__dict__) Change-Id: I6a7770d0b54f5570552a6ebbf1c42a638723997c Signed-off-by: SerenaFeng --- testapi/testapi-client/testapiclient/models/__init__.py | 0 testapi/testapi-client/testapiclient/models/pods.py | 6 ++++++ 2 files changed, 6 insertions(+) create mode 100644 testapi/testapi-client/testapiclient/models/__init__.py create mode 100644 testapi/testapi-client/testapiclient/models/pods.py (limited to 'testapi/testapi-client/testapiclient/models') diff --git a/testapi/testapi-client/testapiclient/models/__init__.py b/testapi/testapi-client/testapiclient/models/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/testapi/testapi-client/testapiclient/models/pods.py b/testapi/testapi-client/testapiclient/models/pods.py new file mode 100644 index 0000000..27ea311 --- /dev/null +++ b/testapi/testapi-client/testapiclient/models/pods.py @@ -0,0 +1,6 @@ +class PodCreateRequest(object): + def __init__(self, name='', mode='', details='', role=""): + self.name = name + self.mode = mode + self.details = details + self.role = role -- cgit 1.2.3-korg