pyegeria 0.7.45.1__py3-none-any.whl → 0.8.1__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.
- examples/widgets/cat/list_cert_types.py +61 -43
- examples/widgets/cat/list_projects.py +1 -1
- examples/widgets/my/my_profile_actions.py +51 -32
- examples/widgets/ops/engine_actions.py +35 -23
- examples/widgets/ops/integration_daemon_actions.py +51 -32
- examples/widgets/tech/get_element_info.py +63 -38
- examples/widgets/tech/get_guid_info.py +50 -27
- examples/widgets/tech/list_asset_types.py +33 -23
- examples/widgets/tech/list_elements.py +44 -34
- examples/widgets/tech/list_elements_x.py +69 -49
- examples/widgets/tech/list_registered_services.py +44 -24
- examples/widgets/tech/list_related_specification.py +70 -45
- examples/widgets/tech/list_relationship_types.py +50 -31
- examples/widgets/tech/list_valid_metadata_values.py +57 -28
- examples/widgets/tech/x_list_related_elements.py +54 -34
- pyegeria/Xloaded_resources_omvs.py +43 -41
- pyegeria/__init__.py +6 -2
- pyegeria/_client.py +142 -102
- pyegeria/_deprecated_gov_engine.py +218 -167
- pyegeria/action_author_omvs.py +107 -88
- pyegeria/asset_catalog_omvs.py +467 -395
- pyegeria/automated_curation_omvs.py +2 -2
- pyegeria/classification_manager_omvs.py +3 -9
- pyegeria/collection_manager_omvs.py +1957 -1519
- pyegeria/core_omag_server_config.py +310 -192
- pyegeria/egeria_cat_client.py +88 -0
- pyegeria/egeria_config_client.py +37 -0
- pyegeria/egeria_my_client.py +47 -0
- pyegeria/egeria_ops_client.py +67 -0
- pyegeria/egeria_tech_client.py +77 -0
- pyegeria/feedback_manager_omvs.py +633 -631
- pyegeria/full_omag_server_config.py +330 -158
- pyegeria/glossary_browser_omvs.py +927 -474
- pyegeria/glossary_manager_omvs.py +1033 -543
- pyegeria/my_profile_omvs.py +714 -574
- pyegeria/platform_services.py +228 -176
- pyegeria/project_manager_omvs.py +1158 -903
- pyegeria/registered_info.py +76 -74
- pyegeria/runtime_manager_omvs.py +749 -670
- pyegeria/server_operations.py +123 -85
- pyegeria/valid_metadata_omvs.py +268 -168
- {pyegeria-0.7.45.1.dist-info → pyegeria-0.8.1.dist-info}/METADATA +1 -1
- {pyegeria-0.7.45.1.dist-info → pyegeria-0.8.1.dist-info}/RECORD +46 -42
- pyegeria/tech_guids_31-08-2024 14:33.py +0 -79
- {pyegeria-0.7.45.1.dist-info → pyegeria-0.8.1.dist-info}/LICENSE +0 -0
- {pyegeria-0.7.45.1.dist-info → pyegeria-0.8.1.dist-info}/WHEEL +0 -0
- {pyegeria-0.7.45.1.dist-info → pyegeria-0.8.1.dist-info}/entry_points.txt +0 -0
pyegeria/runtime_manager_omvs.py
CHANGED
@@ -6,13 +6,10 @@ Runtime manager is a view service that supports user interaction with the runnin
|
|
6
6
|
|
7
7
|
"""
|
8
8
|
import asyncio
|
9
|
-
from requests import Response
|
10
9
|
|
11
|
-
from
|
12
|
-
InvalidParameterException,
|
13
|
-
)
|
14
|
-
from pyegeria import Client, AutomatedCuration, max_paging_size, body_slimmer
|
10
|
+
from requests import Response
|
15
11
|
|
12
|
+
from pyegeria import Client, max_paging_size, body_slimmer
|
16
13
|
|
17
14
|
|
18
15
|
class RuntimeManager(Client):
|
@@ -30,938 +27,1020 @@ class RuntimeManager(Client):
|
|
30
27
|
when the user doesn't pass the user_id on a method call.
|
31
28
|
user_pwd: str
|
32
29
|
The password associated with the user_id. Defaults to None
|
33
|
-
|
34
|
-
|
35
|
-
Defaults to False.
|
30
|
+
token: str, optional
|
31
|
+
Bearer token
|
36
32
|
|
37
33
|
Methods:
|
38
34
|
|
39
35
|
"""
|
40
36
|
|
41
37
|
def __init__(
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
Client.__init__(self, server_name, platform_url, user_id,
|
50
|
-
user_pwd, verify_flag)
|
38
|
+
self,
|
39
|
+
server_name: str,
|
40
|
+
platform_url: str,
|
41
|
+
user_id: str,
|
42
|
+
user_pwd: str = None,
|
43
|
+
token: str = None,
|
44
|
+
):
|
45
|
+
Client.__init__(self, server_name, platform_url, user_id, user_pwd, token=token)
|
51
46
|
self.cur_command_root = f"{platform_url}/servers/"
|
52
|
-
self.platform_guid = "44bf319f-1e41-4da1-b771-2753b92b631a"
|
53
|
-
self.default_platform_name =
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
47
|
+
self.platform_guid = "44bf319f-1e41-4da1-b771-2753b92b631a" # this is platform @ 9443 from the core content archive
|
48
|
+
self.default_platform_name = (
|
49
|
+
"Default Local OMAG Server Platform" # this from the core content archive
|
50
|
+
)
|
51
|
+
|
52
|
+
async def _async_get_platforms_by_name(
|
53
|
+
self,
|
54
|
+
filter: str = None,
|
55
|
+
server: str = None,
|
56
|
+
effective_time: str = None,
|
57
|
+
start_from: int = 0,
|
58
|
+
page_size: int = max_paging_size,
|
59
|
+
) -> str | list:
|
60
|
+
"""Returns the list of platforms with a particular name. The name is specified in the filter. Async version.
|
61
|
+
Parameters
|
62
|
+
----------
|
63
|
+
filter : str, opt
|
64
|
+
Filter specifies the display name or qualified name of the platforms to return information for. If the
|
65
|
+
value is None, we will default to the default_platform_name that comes from the core content pack.
|
66
|
+
|
67
|
+
server : str, optional
|
68
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
69
|
+
will be used.
|
70
|
+
|
71
|
+
start_from : int, optional
|
72
|
+
The index from which to start fetching the engine actions. Default is 0.
|
73
|
+
|
74
|
+
page_size : int, optional
|
75
|
+
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
76
|
+
|
77
|
+
Returns
|
78
|
+
-------
|
79
|
+
Response
|
80
|
+
A lit of json dict with the platform reports.
|
81
|
+
|
82
|
+
Raises
|
83
|
+
------
|
84
|
+
InvalidParameterException
|
85
|
+
PropertyServerException
|
86
|
+
UserNotAuthorizedException
|
84
87
|
|
85
88
|
"""
|
86
89
|
if server is None:
|
87
|
-
|
90
|
+
server = self.server_name
|
88
91
|
|
89
92
|
if filter is None:
|
90
93
|
filter = self.default_platform_name
|
91
94
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
+
url = (
|
96
|
+
f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/platforms/by-name?"
|
97
|
+
f"startFrom={start_from}&pageSize={page_size}"
|
98
|
+
)
|
95
99
|
if effective_time is not None:
|
96
|
-
body = {
|
97
|
-
"filter" : filter,
|
98
|
-
"effectiveTime" : effective_time
|
99
|
-
}
|
100
|
+
body = {"filter": filter, "effectiveTime": effective_time}
|
100
101
|
else:
|
101
|
-
body = {
|
102
|
-
"filter": filter
|
103
|
-
}
|
102
|
+
body = {"filter": filter}
|
104
103
|
|
105
104
|
response = await self._async_make_request("POST", url, body)
|
106
105
|
|
107
|
-
return response.json().get(
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
106
|
+
return response.json().get("elementList", "No platforms found")
|
107
|
+
|
108
|
+
def get_platforms_by_name(
|
109
|
+
self,
|
110
|
+
filter: str = None,
|
111
|
+
server: str = None,
|
112
|
+
effective_time: str = None,
|
113
|
+
start_from: int = 0,
|
114
|
+
page_size: int = max_paging_size,
|
115
|
+
) -> str | list:
|
116
|
+
"""Returns the list of platforms with a particular name. The name is specified in the filter.
|
117
|
+
|
118
|
+
Parameters
|
119
|
+
----------
|
120
|
+
filter : str, opt
|
121
|
+
Filter specifies the display name or qualified name of the platforms to return information for. If the
|
122
|
+
value is None, we will default to the default_platform_name that comes from the core content pack.
|
123
|
+
|
124
|
+
server : str, optional
|
125
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
126
|
+
will be used.
|
127
|
+
|
128
|
+
start_from : int, optional
|
129
|
+
The index from which to start fetching the engine actions. Default is 0.
|
130
|
+
|
131
|
+
|
132
|
+
page_size : int, optional
|
133
|
+
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
134
|
+
|
135
|
+
Returns
|
136
|
+
-------
|
137
|
+
Response
|
138
|
+
A lit of json dict with the platform reports.
|
139
|
+
|
140
|
+
Raises
|
141
|
+
------
|
142
|
+
InvalidParameterException
|
143
|
+
PropertyServerException
|
144
|
+
UserNotAuthorizedException
|
141
145
|
"""
|
142
146
|
loop = asyncio.get_event_loop()
|
143
|
-
response = loop.run_until_complete(
|
144
|
-
|
145
|
-
|
147
|
+
response = loop.run_until_complete(
|
148
|
+
self._async_get_platforms_by_name(
|
149
|
+
filter, server, effective_time, start_from, page_size
|
150
|
+
)
|
151
|
+
)
|
146
152
|
return response
|
147
153
|
|
148
|
-
async def _async_get_platforms_by_type(
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
154
|
+
async def _async_get_platforms_by_type(
|
155
|
+
self,
|
156
|
+
filter: str = None,
|
157
|
+
server: str = None,
|
158
|
+
effective_time: str = None,
|
159
|
+
start_from: int = 0,
|
160
|
+
page_size: int = max_paging_size,
|
161
|
+
) -> str | list:
|
162
|
+
"""Returns the list of platforms with a particular deployed implementation type. The value is specified in
|
163
|
+
the filter. If it is null, or no request body is supplied, all platforms are returned. Async version.
|
164
|
+
|
165
|
+
Parameters
|
166
|
+
----------
|
167
|
+
filter : str, opt
|
168
|
+
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
169
|
+
If the value is None, we will default to the "OMAG Server Platform".
|
170
|
+
|
171
|
+
server : str, optional
|
172
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
173
|
+
will be used.
|
162
174
|
|
163
|
-
|
164
|
-
|
175
|
+
start_from : int, optional
|
176
|
+
The index from which to start fetching the engine actions. Default is 0.
|
165
177
|
|
166
|
-
|
167
|
-
|
178
|
+
page_size : int, optional
|
179
|
+
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
168
180
|
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
181
|
+
Returns
|
182
|
+
-------
|
183
|
+
Response
|
184
|
+
A lit of json dict with the platform reports.
|
173
185
|
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
186
|
+
Raises
|
187
|
+
------
|
188
|
+
InvalidParameterException
|
189
|
+
PropertyServerException
|
190
|
+
UserNotAuthorizedException
|
179
191
|
|
180
192
|
"""
|
181
193
|
if server is None:
|
182
|
-
|
194
|
+
server = self.server_name
|
183
195
|
|
184
196
|
if filter is None:
|
185
197
|
filter = "OMAG Server Platform"
|
186
198
|
|
187
|
-
url = (
|
188
|
-
|
199
|
+
url = (
|
200
|
+
f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/platforms/"
|
201
|
+
f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}"
|
202
|
+
)
|
189
203
|
|
190
204
|
if effective_time is not None:
|
191
|
-
body = {
|
192
|
-
"filter": filter,
|
193
|
-
"effectiveTime": effective_time
|
194
|
-
}
|
205
|
+
body = {"filter": filter, "effectiveTime": effective_time}
|
195
206
|
else:
|
196
|
-
body = {
|
197
|
-
"filter": filter
|
198
|
-
}
|
207
|
+
body = {"filter": filter}
|
199
208
|
|
200
209
|
response = await self._async_make_request("POST", url, body)
|
201
|
-
return response.json().get(
|
202
|
-
|
203
|
-
def get_platforms_by_type(
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
210
|
+
return response.json().get("elements", "No platforms found")
|
211
|
+
|
212
|
+
def get_platforms_by_type(
|
213
|
+
self,
|
214
|
+
filter: str = None,
|
215
|
+
server: str = None,
|
216
|
+
effective_time: str = None,
|
217
|
+
start_from: int = 0,
|
218
|
+
page_size: int = max_paging_size,
|
219
|
+
) -> str | list:
|
220
|
+
"""Returns the list of platforms with a particular deployed implementation type. The value is specified in
|
221
|
+
the filter. If it is null, or no request body is supplied, all platforms are returned.
|
222
|
+
|
223
|
+
Parameters
|
224
|
+
----------
|
225
|
+
filter : str, opt
|
226
|
+
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
227
|
+
If the value is None, we will default to the "OMAG Server Platform".
|
228
|
+
|
229
|
+
server : str, optional
|
230
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
231
|
+
will be used.
|
232
|
+
|
233
|
+
start_from : int, optional
|
234
|
+
The index from which to start fetching the engine actions. Default is 0.
|
235
|
+
|
236
|
+
|
237
|
+
page_size : int, optional
|
238
|
+
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
239
|
+
|
240
|
+
Returns
|
241
|
+
-------
|
242
|
+
Response
|
243
|
+
A lit of json dict with the platform reports.
|
244
|
+
|
245
|
+
Raises
|
246
|
+
------
|
247
|
+
InvalidParameterException
|
248
|
+
PropertyServerException
|
249
|
+
UserNotAuthorizedException
|
235
250
|
|
236
251
|
"""
|
237
252
|
loop = asyncio.get_event_loop()
|
238
|
-
response = loop.run_until_complete(
|
239
|
-
|
253
|
+
response = loop.run_until_complete(
|
254
|
+
self._async_get_platforms_by_type(
|
255
|
+
filter, server, effective_time, start_from, page_size
|
256
|
+
)
|
257
|
+
)
|
240
258
|
return response
|
241
259
|
|
242
|
-
async def _async_get_platform_templates_by_type(
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
260
|
+
async def _async_get_platform_templates_by_type(
|
261
|
+
self,
|
262
|
+
filter: str = None,
|
263
|
+
server: str = None,
|
264
|
+
effective_time: str = None,
|
265
|
+
start_from: int = 0,
|
266
|
+
page_size: int = max_paging_size,
|
267
|
+
) -> str | list:
|
268
|
+
"""Returns the list of platform templates for a particular deployed implementation type. The value is
|
269
|
+
specified in the filter. If it is null, or no request body is supplied, all platforms are returned.
|
270
|
+
Async version.
|
271
|
+
|
272
|
+
Parameters
|
273
|
+
----------
|
274
|
+
filter : str, opt
|
275
|
+
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
276
|
+
If the value is None, we will default to the "OMAG Server Platform".
|
277
|
+
|
278
|
+
server : str, optional
|
279
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
280
|
+
will be used.
|
257
281
|
|
258
|
-
|
259
|
-
|
282
|
+
start_from : int, optional
|
283
|
+
The index from which to start fetching the engine actions. Default is 0.
|
260
284
|
|
261
|
-
|
262
|
-
|
285
|
+
page_size : int, optional
|
286
|
+
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
263
287
|
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
288
|
+
Returns
|
289
|
+
-------
|
290
|
+
Response
|
291
|
+
A lit of json dict with the platform reports.
|
268
292
|
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
293
|
+
Raises
|
294
|
+
------
|
295
|
+
InvalidParameterException
|
296
|
+
PropertyServerException
|
297
|
+
UserNotAuthorizedException
|
274
298
|
|
275
299
|
"""
|
276
300
|
if server is None:
|
277
|
-
|
301
|
+
server = self.server_name
|
278
302
|
|
279
303
|
if filter is None:
|
280
304
|
filter = "OMAG Server Platform"
|
281
305
|
|
282
|
-
url = (
|
283
|
-
|
306
|
+
url = (
|
307
|
+
f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/platforms/"
|
308
|
+
f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}&getTemplates=true"
|
309
|
+
)
|
284
310
|
|
285
311
|
if effective_time is not None:
|
286
|
-
body = {
|
287
|
-
"filter": filter,
|
288
|
-
"effectiveTime": effective_time
|
289
|
-
}
|
312
|
+
body = {"filter": filter, "effectiveTime": effective_time}
|
290
313
|
else:
|
291
|
-
body = {
|
292
|
-
"filter": filter
|
293
|
-
}
|
314
|
+
body = {"filter": filter}
|
294
315
|
|
295
316
|
response = await self._async_make_request("POST", url, body)
|
296
|
-
return response.json().get(
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
317
|
+
return response.json().get("elements", "No platforms found")
|
318
|
+
|
319
|
+
def get_platform_templates_by_type(
|
320
|
+
self,
|
321
|
+
filter: str = None,
|
322
|
+
server: str = None,
|
323
|
+
effective_time: str = None,
|
324
|
+
start_from: int = 0,
|
325
|
+
page_size: int = max_paging_size,
|
326
|
+
) -> str | list:
|
327
|
+
"""Returns the list of platform templates with a particular deployed implementation type. The value is
|
328
|
+
specified in the filter. If it is null, or no request body is supplied, all platforms are returned.
|
329
|
+
|
330
|
+
Parameters
|
331
|
+
----------
|
332
|
+
filter : str, opt
|
333
|
+
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
334
|
+
If the value is None, we will default to the "OMAG Server Platform".
|
335
|
+
|
336
|
+
server : str, optional
|
337
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
338
|
+
will be used.
|
339
|
+
|
340
|
+
start_from : int, optional
|
341
|
+
The index from which to start fetching the engine actions. Default is 0.
|
342
|
+
|
343
|
+
|
344
|
+
page_size : int, optional
|
345
|
+
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
346
|
+
|
347
|
+
Returns
|
348
|
+
-------
|
349
|
+
Response
|
350
|
+
A lit of json dict with the platform reports.
|
351
|
+
|
352
|
+
Raises
|
353
|
+
------
|
354
|
+
InvalidParameterException
|
355
|
+
PropertyServerException
|
356
|
+
UserNotAuthorizedException
|
331
357
|
|
332
358
|
"""
|
333
359
|
loop = asyncio.get_event_loop()
|
334
|
-
response = loop.run_until_complete(
|
335
|
-
|
360
|
+
response = loop.run_until_complete(
|
361
|
+
self._async_get_platforms_by_type(
|
362
|
+
filter, server, effective_time, start_from, page_size
|
363
|
+
)
|
364
|
+
)
|
336
365
|
return response
|
337
366
|
|
338
|
-
async def _async_get_platform_report(
|
339
|
-
|
367
|
+
async def _async_get_platform_report(
|
368
|
+
self, platform_guid: str = None, server: str = None
|
369
|
+
) -> str | list:
|
370
|
+
"""Returns details about the running platform. Async version.
|
340
371
|
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
372
|
+
Parameters
|
373
|
+
----------
|
374
|
+
platform_guid : str
|
375
|
+
The unique identifier for the platform.
|
345
376
|
|
346
|
-
|
347
|
-
|
348
|
-
|
377
|
+
server : str, optional
|
378
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
379
|
+
will be used.
|
349
380
|
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
381
|
+
Returns
|
382
|
+
-------
|
383
|
+
Response
|
384
|
+
A json dict with the platform report.
|
354
385
|
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
386
|
+
Raises
|
387
|
+
------
|
388
|
+
InvalidParameterException
|
389
|
+
PropertyServerException
|
390
|
+
UserNotAuthorizedException
|
360
391
|
|
361
392
|
"""
|
362
393
|
if server is None:
|
363
|
-
|
394
|
+
server = self.server_name
|
364
395
|
|
365
|
-
url =
|
396
|
+
url = f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/platforms/{platform_guid}/report"
|
366
397
|
|
367
398
|
response = await self._async_make_request("GET", url)
|
368
399
|
|
369
|
-
return response.json().get(
|
400
|
+
return response.json().get("element", "No platforms found")
|
370
401
|
|
371
|
-
def get_platform_report(
|
372
|
-
|
402
|
+
def get_platform_report(
|
403
|
+
self, platform_guid: str = None, server: str = None
|
404
|
+
) -> str | list:
|
405
|
+
"""Returns details about the running platform.
|
373
406
|
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
407
|
+
Parameters
|
408
|
+
----------
|
409
|
+
platform_guid : str
|
410
|
+
The unique identifier for the platform.
|
378
411
|
|
379
|
-
|
380
|
-
|
381
|
-
|
412
|
+
server : str, optional
|
413
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
414
|
+
will be used.
|
382
415
|
|
383
416
|
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
417
|
+
Returns
|
418
|
+
-------
|
419
|
+
Response
|
420
|
+
A json dict with the platform report.
|
388
421
|
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
422
|
+
Raises
|
423
|
+
------
|
424
|
+
InvalidParameterException
|
425
|
+
PropertyServerException
|
426
|
+
UserNotAuthorizedException
|
394
427
|
|
395
428
|
"""
|
396
429
|
loop = asyncio.get_event_loop()
|
397
|
-
response = loop.run_until_complete(
|
430
|
+
response = loop.run_until_complete(
|
431
|
+
self._async_get_platform_report(platform_guid, server)
|
432
|
+
)
|
398
433
|
return response
|
399
434
|
|
400
|
-
async def _async_get_platform_by_guid(
|
401
|
-
|
402
|
-
|
435
|
+
async def _async_get_platform_by_guid(
|
436
|
+
self, platform_guid: str = None, server: str = None, effective_time: str = None
|
437
|
+
) -> str | list:
|
438
|
+
"""Returns details about the platform's catalog entry (asset). Async version.
|
403
439
|
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
440
|
+
Parameters
|
441
|
+
----------
|
442
|
+
filter : str, opt
|
443
|
+
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
444
|
+
If the value is None, we will default to the "OMAG Server Platform".
|
409
445
|
|
410
|
-
|
411
|
-
|
412
|
-
|
446
|
+
server : str, optional
|
447
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
448
|
+
will be used.
|
413
449
|
|
414
|
-
|
415
|
-
|
450
|
+
start_from : int, optional
|
451
|
+
The index from which to start fetching the engine actions. Default is 0.
|
416
452
|
|
417
453
|
|
418
|
-
|
419
|
-
|
454
|
+
page_size : int, optional
|
455
|
+
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
420
456
|
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
457
|
+
Returns
|
458
|
+
-------
|
459
|
+
Response
|
460
|
+
A lit of json dict with the platform reports.
|
425
461
|
|
426
462
|
"""
|
427
463
|
if server is None:
|
428
|
-
|
464
|
+
server = self.server_name
|
429
465
|
|
430
|
-
url =
|
466
|
+
url = f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/platforms/{platform_guid}"
|
431
467
|
|
432
468
|
if effective_time is not None:
|
433
|
-
body = {
|
434
|
-
"effectiveTime": effective_time
|
435
|
-
}
|
469
|
+
body = {"effectiveTime": effective_time}
|
436
470
|
response = await self._async_make_request("POST", url, body)
|
437
471
|
|
438
472
|
else:
|
439
473
|
response = await self._async_make_request("POST", url)
|
440
474
|
|
441
|
-
return response.json().get(
|
475
|
+
return response.json().get("elements", "No platforms found")
|
442
476
|
|
443
|
-
def get_platform_by_guid(
|
444
|
-
|
445
|
-
|
477
|
+
def get_platform_by_guid(
|
478
|
+
self, platform_guid: str = None, server: str = None, effective_time: str = None
|
479
|
+
) -> str | list:
|
480
|
+
"""Returns details about the platform's catalog entry (asset).
|
446
481
|
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
482
|
+
Parameters
|
483
|
+
----------
|
484
|
+
filter : str, opt
|
485
|
+
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
486
|
+
If the value is None, we will default to the "OMAG Server Platform".
|
452
487
|
|
453
|
-
|
454
|
-
|
455
|
-
|
488
|
+
server : str, optional
|
489
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
490
|
+
will be used.
|
456
491
|
|
457
|
-
|
458
|
-
|
492
|
+
start_from : int, optional
|
493
|
+
The index from which to start fetching the engine actions. Default is 0.
|
459
494
|
|
460
495
|
|
461
|
-
|
462
|
-
|
496
|
+
page_size : int, optional
|
497
|
+
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
463
498
|
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
499
|
+
Returns
|
500
|
+
-------
|
501
|
+
Response
|
502
|
+
A lit of json dict with the platform reports.
|
468
503
|
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
504
|
+
Raises
|
505
|
+
------
|
506
|
+
InvalidParameterException
|
507
|
+
PropertyServerException
|
508
|
+
UserNotAuthorizedException
|
474
509
|
|
475
510
|
"""
|
476
511
|
loop = asyncio.get_event_loop()
|
477
|
-
response = loop.run_until_complete(
|
478
|
-
|
512
|
+
response = loop.run_until_complete(
|
513
|
+
self._async_get_platforms_by_guid(platform_guid, server, effective_time)
|
514
|
+
)
|
479
515
|
return response
|
480
516
|
|
481
|
-
async def _async_get_server_by_guid(
|
482
|
-
|
483
|
-
|
517
|
+
async def _async_get_server_by_guid(
|
518
|
+
self, server_guid: str, server: str = None, effective_time: str = None
|
519
|
+
) -> str | dict:
|
520
|
+
"""Returns details about the server's catalog entry (asset). Async version.
|
484
521
|
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
522
|
+
Parameters
|
523
|
+
----------
|
524
|
+
server_guid : str
|
525
|
+
The unique identifier for the platform.
|
489
526
|
|
490
|
-
|
491
|
-
|
492
|
-
|
527
|
+
server : str, optional
|
528
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
529
|
+
will be used.
|
493
530
|
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
531
|
+
Returns
|
532
|
+
-------
|
533
|
+
Response
|
534
|
+
A lit of json dict with the platform reports.
|
498
535
|
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
536
|
+
Raises
|
537
|
+
------
|
538
|
+
InvalidParameterException
|
539
|
+
PropertyServerException
|
540
|
+
UserNotAuthorizedException
|
504
541
|
|
505
542
|
"""
|
506
543
|
if server is None:
|
507
|
-
|
544
|
+
server = self.server_name
|
508
545
|
|
509
|
-
url =
|
546
|
+
url = f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/software-servers/{server_guid}"
|
510
547
|
|
511
548
|
if effective_time is not None:
|
512
|
-
body = {
|
513
|
-
"effectiveTime": effective_time
|
514
|
-
}
|
549
|
+
body = {"effectiveTime": effective_time}
|
515
550
|
response = await self._async_make_request("POST", url, body)
|
516
551
|
|
517
552
|
else:
|
518
553
|
response = await self._async_make_request("POST", url)
|
519
554
|
|
520
|
-
return response.json().get(
|
555
|
+
return response.json().get("elements", "No server found")
|
521
556
|
|
522
|
-
def get_server_by_guid(
|
523
|
-
|
524
|
-
|
557
|
+
def get_server_by_guid(
|
558
|
+
self, server_guid: str, server: str = None, effective_time: str = None
|
559
|
+
) -> str | dict:
|
560
|
+
"""Returns details about the platform's catalog entry (asset).
|
525
561
|
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
562
|
+
Parameters
|
563
|
+
----------
|
564
|
+
server_guid : str
|
565
|
+
The unique identifier for the platform.
|
530
566
|
|
531
|
-
|
532
|
-
|
533
|
-
|
567
|
+
server : str, optional
|
568
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
569
|
+
will be used.
|
534
570
|
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
571
|
+
Returns
|
572
|
+
-------
|
573
|
+
Response
|
574
|
+
A lit of json dict with the platform reports.
|
539
575
|
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
576
|
+
Raises
|
577
|
+
------
|
578
|
+
InvalidParameterException
|
579
|
+
PropertyServerException
|
580
|
+
UserNotAuthorizedException
|
545
581
|
|
546
582
|
"""
|
547
583
|
loop = asyncio.get_event_loop()
|
548
|
-
response = loop.run_until_complete(
|
584
|
+
response = loop.run_until_complete(
|
585
|
+
self._async_get_server_by_guid(server_guid, server, effective_time)
|
586
|
+
)
|
549
587
|
return response
|
550
588
|
|
589
|
+
async def _async_get_servers_by_name(
|
590
|
+
self,
|
591
|
+
filter: str,
|
592
|
+
server: str = None,
|
593
|
+
effective_time: str = None,
|
594
|
+
start_from: int = 0,
|
595
|
+
page_size: int = max_paging_size,
|
596
|
+
) -> str | list:
|
597
|
+
"""Returns the list of servers with a particular name. The name is specified in the filter. Async version.
|
551
598
|
|
552
|
-
|
553
|
-
|
554
|
-
|
599
|
+
Parameters
|
600
|
+
----------
|
601
|
+
filter : str, opt
|
602
|
+
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
603
|
+
If the value is None, we will default to the "OMAG Server Platform".
|
555
604
|
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
560
|
-
If the value is None, we will default to the "OMAG Server Platform".
|
605
|
+
server : str, optional
|
606
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
607
|
+
will be used.
|
561
608
|
|
562
|
-
|
563
|
-
|
564
|
-
will be used.
|
565
|
-
|
566
|
-
start_from : int, optional
|
567
|
-
The index from which to start fetching the engine actions. Default is 0.
|
609
|
+
start_from : int, optional
|
610
|
+
The index from which to start fetching the engine actions. Default is 0.
|
568
611
|
|
569
612
|
|
570
|
-
|
571
|
-
|
613
|
+
page_size : int, optional
|
614
|
+
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
572
615
|
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
616
|
+
Returns
|
617
|
+
-------
|
618
|
+
Response
|
619
|
+
A lit of json dict with the platform reports.
|
577
620
|
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
621
|
+
Raises
|
622
|
+
------
|
623
|
+
InvalidParameterException
|
624
|
+
PropertyServerException
|
625
|
+
UserNotAuthorizedException
|
583
626
|
|
584
627
|
"""
|
585
628
|
if server is None:
|
586
|
-
|
629
|
+
server = self.server_name
|
587
630
|
|
588
|
-
url = (
|
589
|
-
|
631
|
+
url = (
|
632
|
+
f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/software-servers/by-name?"
|
633
|
+
f"startFrom={start_from}&pageSize={page_size}"
|
634
|
+
)
|
590
635
|
|
591
636
|
if effective_time is None:
|
592
|
-
body = {
|
593
|
-
"filter": filter
|
594
|
-
}
|
637
|
+
body = {"filter": filter}
|
595
638
|
else:
|
596
|
-
body = {
|
597
|
-
"filter": filter,
|
598
|
-
"effective_time": effective_time
|
599
|
-
}
|
639
|
+
body = {"filter": filter, "effective_time": effective_time}
|
600
640
|
response = await self._async_make_request("POST", url, body)
|
601
641
|
|
602
|
-
return response.json().get(
|
642
|
+
return response.json().get("elements", "No platforms found")
|
603
643
|
|
604
644
|
def get_servers_by_name(self, filter: str, server: str = None) -> str | list:
|
605
|
-
"""
|
645
|
+
"""Returns the list of servers with a particular name. The name is specified in the filter.
|
606
646
|
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
647
|
+
Parameters
|
648
|
+
----------
|
649
|
+
filter : str, opt
|
650
|
+
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
651
|
+
If the value is None, we will default to the "OMAG Server Platform".
|
612
652
|
|
613
|
-
|
614
|
-
|
615
|
-
|
653
|
+
server : str, optional
|
654
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
655
|
+
will be used.
|
616
656
|
|
617
|
-
|
618
|
-
|
657
|
+
start_from : int, optional
|
658
|
+
The index from which to start fetching the engine actions. Default is 0.
|
619
659
|
|
620
660
|
|
621
|
-
|
622
|
-
|
661
|
+
page_size : int, optional
|
662
|
+
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
623
663
|
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
664
|
+
Returns
|
665
|
+
-------
|
666
|
+
Response
|
667
|
+
A lit of json dict with the platform reports.
|
628
668
|
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
669
|
+
Raises
|
670
|
+
------
|
671
|
+
InvalidParameterException
|
672
|
+
PropertyServerException
|
673
|
+
UserNotAuthorizedException
|
634
674
|
|
635
675
|
"""
|
636
676
|
loop = asyncio.get_event_loop()
|
637
|
-
response = loop.run_until_complete(
|
677
|
+
response = loop.run_until_complete(
|
678
|
+
self._async_get_servers_by_name(filter, server)
|
679
|
+
)
|
638
680
|
return response
|
639
681
|
|
640
|
-
async def _async_get_servers_by_dep_impl_type(
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
682
|
+
async def _async_get_servers_by_dep_impl_type(
|
683
|
+
self,
|
684
|
+
filter: str = "*",
|
685
|
+
server: str = None,
|
686
|
+
effective_time: str = None,
|
687
|
+
start_from: int = 0,
|
688
|
+
page_size: int = max_paging_size,
|
689
|
+
) -> str | list:
|
690
|
+
"""Returns the list of servers with a particular deployed implementation type. The value is specified
|
691
|
+
in the filter. If it is null, or no request body is supplied, all servers are returned.
|
692
|
+
Async version.
|
693
|
+
|
694
|
+
Parameters
|
695
|
+
----------
|
696
|
+
filter : str, opt
|
697
|
+
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
698
|
+
If the value is None, we will default to the "OMAG Server Platform".
|
699
|
+
|
700
|
+
server : str, optional
|
701
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
702
|
+
will be used.
|
703
|
+
|
704
|
+
start_from : int, optional
|
705
|
+
The index from which to start fetching the engine actions. Default is 0.
|
706
|
+
|
707
|
+
|
708
|
+
page_size : int, optional
|
709
|
+
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
710
|
+
|
711
|
+
Returns
|
712
|
+
-------
|
713
|
+
Response
|
714
|
+
A lit of json dict with the platform reports.
|
715
|
+
|
716
|
+
Raises
|
717
|
+
------
|
718
|
+
InvalidParameterException
|
719
|
+
PropertyServerException
|
720
|
+
UserNotAuthorizedException
|
673
721
|
|
674
722
|
"""
|
675
723
|
if server is None:
|
676
|
-
|
724
|
+
server = self.server_name
|
677
725
|
|
678
|
-
if filter ==
|
726
|
+
if filter == "*":
|
679
727
|
filter = None
|
680
728
|
|
681
|
-
url = (
|
682
|
-
|
729
|
+
url = (
|
730
|
+
f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/software-servers/"
|
731
|
+
f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}"
|
732
|
+
)
|
683
733
|
|
684
|
-
body = body_slimmer({
|
734
|
+
body = body_slimmer({"filter": filter, "effective_time": effective_time})
|
685
735
|
|
686
736
|
response = await self._async_make_request("POST", url, body)
|
687
737
|
|
688
|
-
return response.json().get(
|
738
|
+
return response.json().get("elements", "No platforms found")
|
689
739
|
|
690
|
-
def get_servers_by_dep_impl_type(
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
740
|
+
def get_servers_by_dep_impl_type(
|
741
|
+
self,
|
742
|
+
filter: str = "*",
|
743
|
+
server: str = None,
|
744
|
+
effective_time: str = None,
|
745
|
+
start_from: int = 0,
|
746
|
+
page_size: int = max_paging_size,
|
747
|
+
) -> str | list:
|
748
|
+
"""Returns the list of servers with a particular deployed implementation type.
|
749
|
+
The value is specified in the filter. If it is null, or no request body is supplied,
|
750
|
+
all servers are returned.
|
695
751
|
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
752
|
+
Parameters
|
753
|
+
----------
|
754
|
+
filter : str, opt
|
755
|
+
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
756
|
+
If the value is None, we will default to the "OMAG Server Platform".
|
701
757
|
|
702
|
-
|
703
|
-
|
704
|
-
|
758
|
+
server : str, optional
|
759
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
760
|
+
will be used.
|
705
761
|
|
706
|
-
|
707
|
-
|
762
|
+
start_from : int, optional
|
763
|
+
The index from which to start fetching the engine actions. Default is 0.
|
708
764
|
|
709
765
|
|
710
|
-
|
711
|
-
|
766
|
+
page_size : int, optional
|
767
|
+
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
712
768
|
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
769
|
+
Returns
|
770
|
+
-------
|
771
|
+
Response
|
772
|
+
A lit of json dict with the platform reports.
|
717
773
|
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
774
|
+
Raises
|
775
|
+
------
|
776
|
+
InvalidParameterException
|
777
|
+
PropertyServerException
|
778
|
+
UserNotAuthorizedException
|
723
779
|
|
724
780
|
"""
|
725
781
|
loop = asyncio.get_event_loop()
|
726
|
-
response = loop.run_until_complete(
|
727
|
-
|
782
|
+
response = loop.run_until_complete(
|
783
|
+
self._async_get_servers_by_dep_impl_type(
|
784
|
+
filter, server, effective_time, start_from, page_size
|
785
|
+
)
|
786
|
+
)
|
728
787
|
return response
|
729
788
|
|
730
|
-
async def _async_get_server_templates_by_dep_impl_type(
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
789
|
+
async def _async_get_server_templates_by_dep_impl_type(
|
790
|
+
self,
|
791
|
+
filter: str = "*",
|
792
|
+
server: str = None,
|
793
|
+
effective_time: str = None,
|
794
|
+
start_from: int = 0,
|
795
|
+
page_size: int = max_paging_size,
|
796
|
+
) -> str | list:
|
797
|
+
"""Returns the list of server templates with a particular deployed implementation type. The value is
|
798
|
+
specified in the filter. If it is null, or no request body is supplied, all servers are returned.
|
799
|
+
Async version.
|
800
|
+
|
801
|
+
Parameters
|
802
|
+
----------
|
803
|
+
filter : str, opt
|
804
|
+
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
805
|
+
If the value is None, we will default to the "OMAG Server Platform".
|
806
|
+
|
807
|
+
server : str, optional
|
808
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
809
|
+
will be used.
|
810
|
+
|
811
|
+
start_from : int, optional
|
812
|
+
The index from which to start fetching the engine actions. Default is 0.
|
813
|
+
|
814
|
+
|
815
|
+
page_size : int, optional
|
816
|
+
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
817
|
+
|
818
|
+
Returns
|
819
|
+
-------
|
820
|
+
Response
|
821
|
+
A lit of json dict with the platform reports.
|
822
|
+
|
823
|
+
Raises
|
824
|
+
------
|
825
|
+
InvalidParameterException
|
826
|
+
PropertyServerException
|
827
|
+
UserNotAuthorizedException
|
763
828
|
|
764
829
|
"""
|
765
830
|
if server is None:
|
766
|
-
|
831
|
+
server = self.server_name
|
767
832
|
|
768
|
-
if filter ==
|
833
|
+
if filter == "*":
|
769
834
|
filter = None
|
770
835
|
|
771
|
-
url = (
|
772
|
-
|
836
|
+
url = (
|
837
|
+
f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/software-servers/"
|
838
|
+
f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}&getTemplates=true"
|
839
|
+
)
|
773
840
|
|
774
|
-
body = body_slimmer({
|
841
|
+
body = body_slimmer({"filter": filter, "effective_time": effective_time})
|
775
842
|
|
776
843
|
response = await self._async_make_request("POST", url, body)
|
777
844
|
|
778
|
-
return response.json().get(
|
845
|
+
return response.json().get("elements", "No platforms found")
|
779
846
|
|
780
|
-
def get_server_templates_by_dep_impl_type(
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
847
|
+
def get_server_templates_by_dep_impl_type(
|
848
|
+
self,
|
849
|
+
filter: str = "*",
|
850
|
+
server: str = None,
|
851
|
+
effective_time: str = None,
|
852
|
+
start_from: int = 0,
|
853
|
+
page_size: int = max_paging_size,
|
854
|
+
) -> str | list:
|
855
|
+
"""Returns the list of server templates with a particular deployed implementation type.
|
856
|
+
The value is specified in the filter. If it is null, or no request body is supplied,
|
857
|
+
all servers are returned.
|
785
858
|
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
859
|
+
Parameters
|
860
|
+
----------
|
861
|
+
filter : str, opt
|
862
|
+
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
863
|
+
If the value is None, we will default to the "OMAG Server Platform".
|
791
864
|
|
792
|
-
|
793
|
-
|
794
|
-
|
865
|
+
server : str, optional
|
866
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
867
|
+
will be used.
|
795
868
|
|
796
|
-
|
797
|
-
|
869
|
+
start_from : int, optional
|
870
|
+
The index from which to start fetching the engine actions. Default is 0.
|
798
871
|
|
799
872
|
|
800
|
-
|
801
|
-
|
873
|
+
page_size : int, optional
|
874
|
+
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
802
875
|
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
876
|
+
Returns
|
877
|
+
-------
|
878
|
+
Response
|
879
|
+
A lit of json dict with the platform reports.
|
807
880
|
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
881
|
+
Raises
|
882
|
+
------
|
883
|
+
InvalidParameterException
|
884
|
+
PropertyServerException
|
885
|
+
UserNotAuthorizedException
|
813
886
|
|
814
887
|
"""
|
815
888
|
loop = asyncio.get_event_loop()
|
816
|
-
response = loop.run_until_complete(
|
817
|
-
|
889
|
+
response = loop.run_until_complete(
|
890
|
+
self._async_get_server_templates_by_dep_impl_type(
|
891
|
+
filter, server, effective_time, start_from, page_size
|
892
|
+
)
|
893
|
+
)
|
818
894
|
return response
|
819
895
|
|
896
|
+
async def _async_get_server_by_guid(
|
897
|
+
self, server_guid: str = None, server: str = None, effective_time: str = None
|
898
|
+
) -> str | list:
|
899
|
+
"""Returns details about the server's catalog entry (asset). Async version.
|
820
900
|
|
821
|
-
|
822
|
-
|
823
|
-
|
901
|
+
Parameters
|
902
|
+
----------
|
903
|
+
filter : str, opt
|
904
|
+
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
905
|
+
If the value is None, we will default to the "OMAG Server Platform".
|
824
906
|
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
829
|
-
If the value is None, we will default to the "OMAG Server Platform".
|
907
|
+
server : str, optional
|
908
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
909
|
+
will be used.
|
830
910
|
|
831
|
-
|
832
|
-
|
833
|
-
will be used.
|
834
|
-
|
835
|
-
start_from : int, optional
|
836
|
-
The index from which to start fetching the engine actions. Default is 0.
|
911
|
+
start_from : int, optional
|
912
|
+
The index from which to start fetching the engine actions. Default is 0.
|
837
913
|
|
838
914
|
|
839
|
-
|
840
|
-
|
915
|
+
page_size : int, optional
|
916
|
+
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
841
917
|
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
918
|
+
Returns
|
919
|
+
-------
|
920
|
+
Response
|
921
|
+
A lit of json dict with the platform reports.
|
846
922
|
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
923
|
+
Raises
|
924
|
+
------
|
925
|
+
InvalidParameterException
|
926
|
+
PropertyServerException
|
927
|
+
UserNotAuthorizedException
|
852
928
|
|
853
929
|
"""
|
854
930
|
if server is None:
|
855
|
-
|
931
|
+
server = self.server_name
|
856
932
|
|
857
|
-
url =
|
933
|
+
url = f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/software-servers/{server_guid}"
|
858
934
|
|
859
935
|
if effective_time is not None:
|
860
|
-
body = {
|
861
|
-
"effectiveTime": effective_time
|
862
|
-
}
|
936
|
+
body = {"effectiveTime": effective_time}
|
863
937
|
response = await self._async_make_request("POST", url, body)
|
864
938
|
|
865
939
|
else:
|
866
940
|
response = await self._async_make_request("POST", url)
|
867
941
|
|
868
|
-
return response.json().get(
|
942
|
+
return response.json().get("element", "No servers found")
|
869
943
|
|
870
|
-
def get_server_by_guid(
|
871
|
-
|
872
|
-
|
944
|
+
def get_server_by_guid(
|
945
|
+
self, server_guid: str = None, server: str = None, effective_time: str = None
|
946
|
+
) -> str | list:
|
947
|
+
"""Returns details about the server's catalog entry (asset). Async version.
|
873
948
|
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
949
|
+
Parameters
|
950
|
+
----------
|
951
|
+
filter : str, opt
|
952
|
+
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
953
|
+
If the value is None, we will default to the "OMAG Server Platform".
|
879
954
|
|
880
|
-
|
881
|
-
|
882
|
-
|
955
|
+
server : str, optional
|
956
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
957
|
+
will be used.
|
883
958
|
|
884
|
-
|
885
|
-
|
959
|
+
start_from : int, optional
|
960
|
+
The index from which to start fetching the engine actions. Default is 0.
|
886
961
|
|
887
962
|
|
888
|
-
|
889
|
-
|
963
|
+
page_size : int, optional
|
964
|
+
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
890
965
|
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
966
|
+
Returns
|
967
|
+
-------
|
968
|
+
Response
|
969
|
+
A lit of json dict with the platform reports.
|
895
970
|
|
896
971
|
"""
|
897
972
|
loop = asyncio.get_event_loop()
|
898
|
-
response = loop.run_until_complete(
|
899
|
-
|
973
|
+
response = loop.run_until_complete(
|
974
|
+
self._async_get_server_by_guid(server_guid, server, effective_time)
|
975
|
+
)
|
900
976
|
return response
|
901
977
|
|
978
|
+
async def _async_get_server_report(
|
979
|
+
self, server_guid: str = None, server: str = None
|
980
|
+
) -> str | list:
|
981
|
+
"""Returns details about the running server. Async version.
|
902
982
|
|
903
|
-
|
904
|
-
|
983
|
+
Parameters
|
984
|
+
----------
|
985
|
+
filter : str, opt
|
986
|
+
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
987
|
+
If the value is None, we will default to the "OMAG Server Platform".
|
905
988
|
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
910
|
-
If the value is None, we will default to the "OMAG Server Platform".
|
989
|
+
server : str, optional
|
990
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
991
|
+
will be used.
|
911
992
|
|
912
|
-
server : str, optional
|
913
|
-
The name of the server to get governance engine summaries from. If not provided, the default server name
|
914
|
-
will be used.
|
915
993
|
|
994
|
+
Returns
|
995
|
+
-------
|
996
|
+
Response
|
997
|
+
A lit of json dict with the platform reports.
|
916
998
|
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
Raises
|
923
|
-
------
|
924
|
-
InvalidParameterException
|
925
|
-
PropertyServerException
|
926
|
-
UserNotAuthorizedException
|
999
|
+
Raises
|
1000
|
+
------
|
1001
|
+
InvalidParameterException
|
1002
|
+
PropertyServerException
|
1003
|
+
UserNotAuthorizedException
|
927
1004
|
|
928
1005
|
"""
|
929
1006
|
if server is None:
|
930
1007
|
server = self.server_name
|
931
1008
|
|
932
|
-
url =
|
1009
|
+
url = f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/software-servers/{server_guid}/report"
|
933
1010
|
|
934
1011
|
response = await self._async_make_request("GET", url)
|
935
1012
|
|
936
|
-
return response.json().get(
|
1013
|
+
return response.json().get("elements", "No server found")
|
937
1014
|
|
1015
|
+
def get_server_report(
|
1016
|
+
self, server_guid: str = None, server: str = None
|
1017
|
+
) -> str | list:
|
1018
|
+
"""Returns details about the running server.
|
938
1019
|
|
939
|
-
|
940
|
-
|
1020
|
+
Parameters
|
1021
|
+
----------
|
1022
|
+
filter : str, opt
|
1023
|
+
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
1024
|
+
If the value is None, we will default to the "OMAG Server Platform".
|
941
1025
|
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
946
|
-
If the value is None, we will default to the "OMAG Server Platform".
|
1026
|
+
server : str, optional
|
1027
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name
|
1028
|
+
will be used.
|
947
1029
|
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
Returns
|
953
|
-
-------
|
954
|
-
Response
|
955
|
-
A lit of json dict with the platform reports.
|
1030
|
+
Returns
|
1031
|
+
-------
|
1032
|
+
Response
|
1033
|
+
A lit of json dict with the platform reports.
|
956
1034
|
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
1035
|
+
Raises
|
1036
|
+
------
|
1037
|
+
InvalidParameterException
|
1038
|
+
PropertyServerException
|
1039
|
+
UserNotAuthorizedException
|
962
1040
|
|
963
1041
|
"""
|
964
1042
|
loop = asyncio.get_event_loop()
|
965
|
-
response = loop.run_until_complete(
|
1043
|
+
response = loop.run_until_complete(
|
1044
|
+
self._async_get_server_report(server_guid, server)
|
1045
|
+
)
|
966
1046
|
return response
|
967
|
-
|