codecraftai-restclient-pychestrate 1.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ccai/pychestrate/py.typed +0 -0
- ccai/pychestrate/rest/client/__init__.py +0 -0
- ccai/pychestrate/rest/client/generation/__init__.py +0 -0
- ccai/pychestrate/rest/client/generation/pychestraterestclientgenerator.py +98 -0
- ccai/pychestrate/rest/client/generation/specs/pychestrate.yaml +3757 -0
- ccai/pychestrate/rest/client/groups/__init__.py +0 -0
- ccai/pychestrate/rest/client/groups/agents.py +171 -0
- ccai/pychestrate/rest/client/groups/artifacts.py +103 -0
- ccai/pychestrate/rest/client/groups/audit.py +99 -0
- ccai/pychestrate/rest/client/groups/auth.py +55 -0
- ccai/pychestrate/rest/client/groups/clients.py +287 -0
- ccai/pychestrate/rest/client/groups/dispatch.py +118 -0
- ccai/pychestrate/rest/client/groups/enrollment.py +212 -0
- ccai/pychestrate/rest/client/groups/flags.py +332 -0
- ccai/pychestrate/rest/client/groups/me.py +55 -0
- ccai/pychestrate/rest/client/groups/notifications.py +128 -0
- ccai/pychestrate/rest/client/groups/pluginapi.py +128 -0
- ccai/pychestrate/rest/client/groups/pods.py +558 -0
- ccai/pychestrate/rest/client/groups/progress.py +64 -0
- ccai/pychestrate/rest/client/groups/projects.py +420 -0
- ccai/pychestrate/rest/client/groups/projecttemplates.py +91 -0
- ccai/pychestrate/rest/client/groups/rbac.py +243 -0
- ccai/pychestrate/rest/client/groups/results.py +193 -0
- ccai/pychestrate/rest/client/groups/retention.py +169 -0
- ccai/pychestrate/rest/client/groups/runs.py +152 -0
- ccai/pychestrate/rest/client/groups/secrets.py +91 -0
- ccai/pychestrate/rest/client/groups/tagging.py +216 -0
- ccai/pychestrate/rest/client/groups/testcatalog.py +152 -0
- ccai/pychestrate/rest/client/groups/testruns.py +58 -0
- ccai/pychestrate/rest/client/groups/users.py +91 -0
- ccai/pychestrate/rest/client/groups/variables.py +228 -0
- ccai/pychestrate/rest/client/models/__init__.py +0 -0
- ccai/pychestrate/rest/client/models/agents.py +34 -0
- ccai/pychestrate/rest/client/models/artifactlocaluploadresult.py +18 -0
- ccai/pychestrate/rest/client/models/artifacts.py +24 -0
- ccai/pychestrate/rest/client/models/artifactuploadtarget.py +20 -0
- ccai/pychestrate/rest/client/models/audit.py +18 -0
- ccai/pychestrate/rest/client/models/auth.py +15 -0
- ccai/pychestrate/rest/client/models/capabilityentry.py +15 -0
- ccai/pychestrate/rest/client/models/client.py +19 -0
- ccai/pychestrate/rest/client/models/clients.py +40 -0
- ccai/pychestrate/rest/client/models/dispatch.py +26 -0
- ccai/pychestrate/rest/client/models/enrollment.py +39 -0
- ccai/pychestrate/rest/client/models/flags.py +55 -0
- ccai/pychestrate/rest/client/models/jobdeadline.py +11 -0
- ccai/pychestrate/rest/client/models/jobenvelope.py +38 -0
- ccai/pychestrate/rest/client/models/jobforwardinginfo.py +12 -0
- ccai/pychestrate/rest/client/models/jobpipelineref.py +11 -0
- ccai/pychestrate/rest/client/models/jobrefs.py +14 -0
- ccai/pychestrate/rest/client/models/jobresultslocator.py +11 -0
- ccai/pychestrate/rest/client/models/me.py +14 -0
- ccai/pychestrate/rest/client/models/notifications.py +24 -0
- ccai/pychestrate/rest/client/models/pagemeta.py +18 -0
- ccai/pychestrate/rest/client/models/pluginapi.py +21 -0
- ccai/pychestrate/rest/client/models/podmember.py +14 -0
- ccai/pychestrate/rest/client/models/pods.py +75 -0
- ccai/pychestrate/rest/client/models/podtopologylink.py +15 -0
- ccai/pychestrate/rest/client/models/problem.py +19 -0
- ccai/pychestrate/rest/client/models/progress.py +18 -0
- ccai/pychestrate/rest/client/models/progressrecord.py +26 -0
- ccai/pychestrate/rest/client/models/progresssummary.py +29 -0
- ccai/pychestrate/rest/client/models/projects.py +49 -0
- ccai/pychestrate/rest/client/models/projecttemplates.py +14 -0
- ccai/pychestrate/rest/client/models/rbac.py +46 -0
- ccai/pychestrate/rest/client/models/results.py +56 -0
- ccai/pychestrate/rest/client/models/retention.py +26 -0
- ccai/pychestrate/rest/client/models/runevent.py +25 -0
- ccai/pychestrate/rest/client/models/runs.py +32 -0
- ccai/pychestrate/rest/client/models/scopedsecret.py +13 -0
- ccai/pychestrate/rest/client/models/secrets.py +16 -0
- ccai/pychestrate/rest/client/models/signingkey.py +19 -0
- ccai/pychestrate/rest/client/models/tagging.py +24 -0
- ccai/pychestrate/rest/client/models/testcatalog.py +50 -0
- ccai/pychestrate/rest/client/models/testcatalogimportsummary.py +16 -0
- ccai/pychestrate/rest/client/models/testruns.py +25 -0
- ccai/pychestrate/rest/client/models/users.py +23 -0
- ccai/pychestrate/rest/client/models/variableeffectiveentry.py +13 -0
- ccai/pychestrate/rest/client/models/variables.py +30 -0
- ccai/pychestrate/rest/client/pychestraterestclient.py +166 -0
- ccai/pychestrate/rest/client/pychestraterestclientbase.py +147 -0
- codecraftai_restclient_pychestrate-1.2.0.dist-info/METADATA +96 -0
- codecraftai_restclient_pychestrate-1.2.0.dist-info/RECORD +84 -0
- codecraftai_restclient_pychestrate-1.2.0.dist-info/WHEEL +4 -0
- codecraftai_restclient_pychestrate-1.2.0.dist-info/licenses/LICENSE.md +204 -0
|
File without changes
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# Auto-generated by RestClientGenerator. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
from typing import Any, Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from ccai.pychestrate.rest.client.models.agents import Agentrollout
|
|
6
|
+
from ccai.pychestrate.rest.client.models.agents import Agentrolloutcreaterequest
|
|
7
|
+
from ccai.pychestrate.rest.client.models.agents import Clientcapabilities
|
|
8
|
+
from ccai.pychestrate.rest.client.models.agents import Clientinventory
|
|
9
|
+
from ccai.restclient.base.aspectsrest import AspectsRest
|
|
10
|
+
from ccai.restclient.base.restapigroup import RestApiGroup
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class AgentsApiGroup(RestApiGroup):
|
|
14
|
+
"""
|
|
15
|
+
Agent rollouts and per-client capability inventory.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
def agents_create_rollout(self, body: Agentrolloutcreaterequest, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
19
|
+
"""
|
|
20
|
+
Create an agent rollout plan.
|
|
21
|
+
"""
|
|
22
|
+
client = self.client
|
|
23
|
+
if aspects is None:
|
|
24
|
+
aspects = client.aspects
|
|
25
|
+
|
|
26
|
+
header_params = client.headers
|
|
27
|
+
if headers is not None:
|
|
28
|
+
header_params = headers
|
|
29
|
+
|
|
30
|
+
call_leaf = "/agent-rollouts"
|
|
31
|
+
|
|
32
|
+
query_params = None
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
if exp_status is None:
|
|
36
|
+
exp_status = [201]
|
|
37
|
+
|
|
38
|
+
resp = client.perform_call(
|
|
39
|
+
leaf=call_leaf,
|
|
40
|
+
method="POST",
|
|
41
|
+
params=query_params if query_params else None,
|
|
42
|
+
body=body,
|
|
43
|
+
exp_status=exp_status,
|
|
44
|
+
headers=header_params if header_params else None,
|
|
45
|
+
context_msg=None,
|
|
46
|
+
aspects=aspects,
|
|
47
|
+
)
|
|
48
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
49
|
+
rtnval = None
|
|
50
|
+
else:
|
|
51
|
+
rtnval = resp.json()
|
|
52
|
+
return rtnval
|
|
53
|
+
|
|
54
|
+
def agents_get_client_capabilities(self, client_id: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Clientcapabilities:
|
|
55
|
+
"""
|
|
56
|
+
Read advertised capabilities for a client.
|
|
57
|
+
"""
|
|
58
|
+
client = self.client
|
|
59
|
+
if aspects is None:
|
|
60
|
+
aspects = client.aspects
|
|
61
|
+
|
|
62
|
+
header_params = client.headers
|
|
63
|
+
if headers is not None:
|
|
64
|
+
header_params = headers
|
|
65
|
+
|
|
66
|
+
leaf_template = "/clients/{client_id}/capabilities"
|
|
67
|
+
path_params = {
|
|
68
|
+
'client_id': client_id,
|
|
69
|
+
}
|
|
70
|
+
call_leaf = leaf_template.format(**path_params)
|
|
71
|
+
|
|
72
|
+
query_params = None
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
if exp_status is None:
|
|
76
|
+
exp_status = [200]
|
|
77
|
+
|
|
78
|
+
resp = client.perform_call(
|
|
79
|
+
leaf=call_leaf,
|
|
80
|
+
method="GET",
|
|
81
|
+
params=query_params if query_params else None,
|
|
82
|
+
body=None,
|
|
83
|
+
exp_status=exp_status,
|
|
84
|
+
headers=header_params if header_params else None,
|
|
85
|
+
context_msg=None,
|
|
86
|
+
aspects=aspects,
|
|
87
|
+
)
|
|
88
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
89
|
+
rtnobj = None
|
|
90
|
+
else:
|
|
91
|
+
raw_data = resp.json()
|
|
92
|
+
rtnobj = Clientcapabilities.from_dict(raw_data)
|
|
93
|
+
return rtnobj
|
|
94
|
+
|
|
95
|
+
def agents_get_client_inventory(self, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Clientinventory:
|
|
96
|
+
"""
|
|
97
|
+
Cross-fleet inventory of clients.
|
|
98
|
+
"""
|
|
99
|
+
client = self.client
|
|
100
|
+
if aspects is None:
|
|
101
|
+
aspects = client.aspects
|
|
102
|
+
|
|
103
|
+
header_params = client.headers
|
|
104
|
+
if headers is not None:
|
|
105
|
+
header_params = headers
|
|
106
|
+
|
|
107
|
+
call_leaf = "/clients:inventory"
|
|
108
|
+
|
|
109
|
+
query_params = None
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
if exp_status is None:
|
|
113
|
+
exp_status = [200]
|
|
114
|
+
|
|
115
|
+
resp = client.perform_call(
|
|
116
|
+
leaf=call_leaf,
|
|
117
|
+
method="GET",
|
|
118
|
+
params=query_params if query_params else None,
|
|
119
|
+
body=None,
|
|
120
|
+
exp_status=exp_status,
|
|
121
|
+
headers=header_params if header_params else None,
|
|
122
|
+
context_msg=None,
|
|
123
|
+
aspects=aspects,
|
|
124
|
+
)
|
|
125
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
126
|
+
rtnobj = None
|
|
127
|
+
else:
|
|
128
|
+
raw_data = resp.json()
|
|
129
|
+
rtnobj = Clientinventory.from_dict(raw_data)
|
|
130
|
+
return rtnobj
|
|
131
|
+
|
|
132
|
+
def agents_start_rollout(self, rollout_id: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Agentrollout:
|
|
133
|
+
"""
|
|
134
|
+
Start an agent rollout.
|
|
135
|
+
"""
|
|
136
|
+
client = self.client
|
|
137
|
+
if aspects is None:
|
|
138
|
+
aspects = client.aspects
|
|
139
|
+
|
|
140
|
+
header_params = client.headers
|
|
141
|
+
if headers is not None:
|
|
142
|
+
header_params = headers
|
|
143
|
+
|
|
144
|
+
leaf_template = "/agent-rollouts/{rollout_id}:start"
|
|
145
|
+
path_params = {
|
|
146
|
+
'rollout_id': rollout_id,
|
|
147
|
+
}
|
|
148
|
+
call_leaf = leaf_template.format(**path_params)
|
|
149
|
+
|
|
150
|
+
query_params = None
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
if exp_status is None:
|
|
154
|
+
exp_status = [200]
|
|
155
|
+
|
|
156
|
+
resp = client.perform_call(
|
|
157
|
+
leaf=call_leaf,
|
|
158
|
+
method="POST",
|
|
159
|
+
params=query_params if query_params else None,
|
|
160
|
+
body=None,
|
|
161
|
+
exp_status=exp_status,
|
|
162
|
+
headers=header_params if header_params else None,
|
|
163
|
+
context_msg=None,
|
|
164
|
+
aspects=aspects,
|
|
165
|
+
)
|
|
166
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
167
|
+
rtnobj = None
|
|
168
|
+
else:
|
|
169
|
+
raw_data = resp.json()
|
|
170
|
+
rtnobj = Agentrollout.from_dict(raw_data)
|
|
171
|
+
return rtnobj
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Auto-generated by RestClientGenerator. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from ccai.pychestrate.rest.client.models.artifacts import Artifactentry
|
|
6
|
+
from ccai.pychestrate.rest.client.models.artifacts import Artifactentrypage
|
|
7
|
+
from ccai.restclient.base.aspectsrest import AspectsRest
|
|
8
|
+
from ccai.restclient.base.restapigroup import RestApiGroup
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ArtifactsApiGroup(RestApiGroup):
|
|
12
|
+
"""
|
|
13
|
+
Artifact listings and browsing for a run.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
def artifacts_get_entry(self, run_id: str, artifact_path: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Artifactentry:
|
|
17
|
+
"""
|
|
18
|
+
Read metadata for one artifact entry.
|
|
19
|
+
"""
|
|
20
|
+
client = self.client
|
|
21
|
+
if aspects is None:
|
|
22
|
+
aspects = client.aspects
|
|
23
|
+
|
|
24
|
+
header_params = client.headers
|
|
25
|
+
if headers is not None:
|
|
26
|
+
header_params = headers
|
|
27
|
+
|
|
28
|
+
leaf_template = "/runs/{run_id}/artifacts/{artifact_path}"
|
|
29
|
+
path_params = {
|
|
30
|
+
'run_id': run_id,
|
|
31
|
+
'artifact_path': artifact_path,
|
|
32
|
+
}
|
|
33
|
+
call_leaf = leaf_template.format(**path_params)
|
|
34
|
+
|
|
35
|
+
query_params = None
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
if exp_status is None:
|
|
39
|
+
exp_status = [200]
|
|
40
|
+
|
|
41
|
+
resp = client.perform_call(
|
|
42
|
+
leaf=call_leaf,
|
|
43
|
+
method="GET",
|
|
44
|
+
params=query_params if query_params else None,
|
|
45
|
+
body=None,
|
|
46
|
+
exp_status=exp_status,
|
|
47
|
+
headers=header_params if header_params else None,
|
|
48
|
+
context_msg=None,
|
|
49
|
+
aspects=aspects,
|
|
50
|
+
)
|
|
51
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
52
|
+
rtnobj = None
|
|
53
|
+
else:
|
|
54
|
+
raw_data = resp.json()
|
|
55
|
+
rtnobj = Artifactentry.from_dict(raw_data)
|
|
56
|
+
return rtnobj
|
|
57
|
+
|
|
58
|
+
def artifacts_list_for_run(self, run_id: str, *, prefix: Optional[str] = None, page: Optional[int] = 1, per_page: Optional[int] = 50, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Artifactentrypage:
|
|
59
|
+
"""
|
|
60
|
+
List artifacts for a run.
|
|
61
|
+
"""
|
|
62
|
+
client = self.client
|
|
63
|
+
if aspects is None:
|
|
64
|
+
aspects = client.aspects
|
|
65
|
+
|
|
66
|
+
header_params = client.headers
|
|
67
|
+
if headers is not None:
|
|
68
|
+
header_params = headers
|
|
69
|
+
|
|
70
|
+
leaf_template = "/runs/{run_id}/artifacts"
|
|
71
|
+
path_params = {
|
|
72
|
+
'run_id': run_id,
|
|
73
|
+
}
|
|
74
|
+
call_leaf = leaf_template.format(**path_params)
|
|
75
|
+
|
|
76
|
+
query_params = {}
|
|
77
|
+
if prefix is not None:
|
|
78
|
+
query_params['prefix'] = prefix
|
|
79
|
+
if page is not None:
|
|
80
|
+
query_params['page'] = page
|
|
81
|
+
if per_page is not None:
|
|
82
|
+
query_params['per_page'] = per_page
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
if exp_status is None:
|
|
86
|
+
exp_status = [200]
|
|
87
|
+
|
|
88
|
+
resp = client.perform_call(
|
|
89
|
+
leaf=call_leaf,
|
|
90
|
+
method="GET",
|
|
91
|
+
params=query_params if query_params else None,
|
|
92
|
+
body=None,
|
|
93
|
+
exp_status=exp_status,
|
|
94
|
+
headers=header_params if header_params else None,
|
|
95
|
+
context_msg=None,
|
|
96
|
+
aspects=aspects,
|
|
97
|
+
)
|
|
98
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
99
|
+
rtnobj = None
|
|
100
|
+
else:
|
|
101
|
+
raw_data = resp.json()
|
|
102
|
+
rtnobj = Artifactentrypage.from_dict(raw_data)
|
|
103
|
+
return rtnobj
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Auto-generated by RestClientGenerator. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
from typing import Any, Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from ccai.pychestrate.rest.client.models.audit import Auditrecord
|
|
6
|
+
from ccai.restclient.base.aspectsrest import AspectsRest
|
|
7
|
+
from ccai.restclient.base.restapigroup import RestApiGroup
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class AuditApiGroup(RestApiGroup):
|
|
11
|
+
"""
|
|
12
|
+
Append-only audit log access.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def audit_get_by_sequence(self, sequence_number: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Auditrecord:
|
|
16
|
+
"""
|
|
17
|
+
Read a single audit record by sequence number.
|
|
18
|
+
"""
|
|
19
|
+
client = self.client
|
|
20
|
+
if aspects is None:
|
|
21
|
+
aspects = client.aspects
|
|
22
|
+
|
|
23
|
+
header_params = client.headers
|
|
24
|
+
if headers is not None:
|
|
25
|
+
header_params = headers
|
|
26
|
+
|
|
27
|
+
leaf_template = "/audit/{sequence_number}"
|
|
28
|
+
path_params = {
|
|
29
|
+
'sequence_number': sequence_number,
|
|
30
|
+
}
|
|
31
|
+
call_leaf = leaf_template.format(**path_params)
|
|
32
|
+
|
|
33
|
+
query_params = None
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
if exp_status is None:
|
|
37
|
+
exp_status = [200]
|
|
38
|
+
|
|
39
|
+
resp = client.perform_call(
|
|
40
|
+
leaf=call_leaf,
|
|
41
|
+
method="GET",
|
|
42
|
+
params=query_params if query_params else None,
|
|
43
|
+
body=None,
|
|
44
|
+
exp_status=exp_status,
|
|
45
|
+
headers=header_params if header_params else None,
|
|
46
|
+
context_msg=None,
|
|
47
|
+
aspects=aspects,
|
|
48
|
+
)
|
|
49
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
50
|
+
rtnobj = None
|
|
51
|
+
else:
|
|
52
|
+
raw_data = resp.json()
|
|
53
|
+
rtnobj = Auditrecord.from_dict(raw_data)
|
|
54
|
+
return rtnobj
|
|
55
|
+
|
|
56
|
+
def audit_list(self, *, limit: Optional[int] = 100, after_sequence: Optional[int] = None, actor_id: Optional[str] = None, action: Optional[str] = None, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
57
|
+
"""
|
|
58
|
+
List audit-log records.
|
|
59
|
+
"""
|
|
60
|
+
client = self.client
|
|
61
|
+
if aspects is None:
|
|
62
|
+
aspects = client.aspects
|
|
63
|
+
|
|
64
|
+
header_params = client.headers
|
|
65
|
+
if headers is not None:
|
|
66
|
+
header_params = headers
|
|
67
|
+
|
|
68
|
+
call_leaf = "/audit"
|
|
69
|
+
|
|
70
|
+
query_params = {}
|
|
71
|
+
if limit is not None:
|
|
72
|
+
query_params['limit'] = limit
|
|
73
|
+
if after_sequence is not None:
|
|
74
|
+
query_params['after_sequence'] = after_sequence
|
|
75
|
+
if actor_id is not None:
|
|
76
|
+
query_params['actor_id'] = actor_id
|
|
77
|
+
if action is not None:
|
|
78
|
+
query_params['action'] = action
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
if exp_status is None:
|
|
82
|
+
exp_status = [200]
|
|
83
|
+
|
|
84
|
+
resp = client.perform_call(
|
|
85
|
+
leaf=call_leaf,
|
|
86
|
+
method="GET",
|
|
87
|
+
params=query_params if query_params else None,
|
|
88
|
+
body=None,
|
|
89
|
+
exp_status=exp_status,
|
|
90
|
+
headers=header_params if header_params else None,
|
|
91
|
+
context_msg=None,
|
|
92
|
+
aspects=aspects,
|
|
93
|
+
)
|
|
94
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
95
|
+
rtnval = None
|
|
96
|
+
else:
|
|
97
|
+
raw_data = resp.json()
|
|
98
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
99
|
+
return rtnval
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Auto-generated by RestClientGenerator. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from ccai.pychestrate.rest.client.models.auth import Logoutrequest
|
|
6
|
+
from ccai.pychestrate.rest.client.models.auth import Logoutresponse
|
|
7
|
+
from ccai.restclient.base.aspectsrest import AspectsRest
|
|
8
|
+
from ccai.restclient.base.restapigroup import RestApiGroup
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AuthApiGroup(RestApiGroup):
|
|
12
|
+
"""
|
|
13
|
+
Local-credential authentication and session lifecycle.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
def auth_logout(self, body: Logoutrequest, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Logoutresponse:
|
|
17
|
+
"""
|
|
18
|
+
Close the current session.
|
|
19
|
+
|
|
20
|
+
Close the session named in the request body. Returns
|
|
21
|
+
`{session_id, status: "closed"}` on success.
|
|
22
|
+
|
|
23
|
+
"""
|
|
24
|
+
client = self.client
|
|
25
|
+
if aspects is None:
|
|
26
|
+
aspects = client.aspects
|
|
27
|
+
|
|
28
|
+
header_params = client.headers
|
|
29
|
+
if headers is not None:
|
|
30
|
+
header_params = headers
|
|
31
|
+
|
|
32
|
+
call_leaf = "/auth/logout"
|
|
33
|
+
|
|
34
|
+
query_params = None
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
if exp_status is None:
|
|
38
|
+
exp_status = [200]
|
|
39
|
+
|
|
40
|
+
resp = client.perform_call(
|
|
41
|
+
leaf=call_leaf,
|
|
42
|
+
method="POST",
|
|
43
|
+
params=query_params if query_params else None,
|
|
44
|
+
body=body,
|
|
45
|
+
exp_status=exp_status,
|
|
46
|
+
headers=header_params if header_params else None,
|
|
47
|
+
context_msg=None,
|
|
48
|
+
aspects=aspects,
|
|
49
|
+
)
|
|
50
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
51
|
+
rtnobj = None
|
|
52
|
+
else:
|
|
53
|
+
raw_data = resp.json()
|
|
54
|
+
rtnobj = Logoutresponse.from_dict(raw_data)
|
|
55
|
+
return rtnobj
|