pyegeria 0.7.45__py3-none-any.whl → 0.8.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.
- examples/widgets/cat/list_cert_types.py +61 -43
- examples/widgets/cat/list_projects.py +1 -1
- examples/widgets/cli/egeria.py +18 -2
- examples/widgets/cli/egeria_tech.py +299 -98
- 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 +5 -1
- 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 +1920 -868
- 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/mermaid_utilities.py +1 -1
- 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.dist-info → pyegeria-0.8.0.dist-info}/METADATA +1 -1
- {pyegeria-0.7.45.dist-info → pyegeria-0.8.0.dist-info}/RECORD +49 -46
- examples/widgets/tech/list_gov_processes.py +0 -162
- pyegeria/tech_guids_31-08-2024 14:33.py +0 -79
- {pyegeria-0.7.45.dist-info → pyegeria-0.8.0.dist-info}/LICENSE +0 -0
- {pyegeria-0.7.45.dist-info → pyegeria-0.8.0.dist-info}/WHEEL +0 -0
- {pyegeria-0.7.45.dist-info → pyegeria-0.8.0.dist-info}/entry_points.txt +0 -0
pyegeria/server_operations.py
CHANGED
@@ -30,16 +30,18 @@ class ServerOps(Platform):
|
|
30
30
|
The password associated with the user_id. Defaults to None
|
31
31
|
|
32
32
|
"""
|
33
|
+
|
33
34
|
def __init__(
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
verify_flag: bool = False,
|
35
|
+
self,
|
36
|
+
server_name: str,
|
37
|
+
platform_url: str,
|
38
|
+
user_id: str,
|
39
|
+
user_pwd: str = None,
|
40
40
|
):
|
41
|
-
Platform.__init__(self, server_name, platform_url, user_id, user_pwd
|
42
|
-
self.ops_command_root =
|
41
|
+
Platform.__init__(self, server_name, platform_url, user_id, user_pwd)
|
42
|
+
self.ops_command_root = (
|
43
|
+
f"{self.platform_url}/open-metadata/server-operations/users/{user_id}"
|
44
|
+
)
|
43
45
|
|
44
46
|
async def _async_get_active_configuration(self, server: str = None) -> dict | str:
|
45
47
|
"""
|
@@ -83,10 +85,12 @@ class ServerOps(Platform):
|
|
83
85
|
response = loop.run_until_complete(self._async_get_active_configuration(server))
|
84
86
|
return response
|
85
87
|
|
86
|
-
#
|
87
|
-
# Archive Files
|
88
|
-
#
|
89
|
-
async def _async_add_archive_file(
|
88
|
+
#
|
89
|
+
# Archive Files
|
90
|
+
#
|
91
|
+
async def _async_add_archive_file(
|
92
|
+
self, archive_file: str, server: str = None, timeout: int = 60
|
93
|
+
) -> None:
|
90
94
|
"""
|
91
95
|
Load the server with the contents of the indicated archive file.
|
92
96
|
|
@@ -105,14 +109,17 @@ class ServerOps(Platform):
|
|
105
109
|
server = self.server_name
|
106
110
|
|
107
111
|
url = (
|
108
|
-
|
109
|
-
|
110
|
-
|
112
|
+
self.ops_command_root
|
113
|
+
+ "/servers/"
|
114
|
+
+ server
|
115
|
+
+ "/instance/open-metadata-archives/file"
|
111
116
|
)
|
112
117
|
|
113
118
|
await self._async_make_request("POST-DATA", url, archive_file, time_out=timeout)
|
114
119
|
|
115
|
-
def add_archive_file(
|
120
|
+
def add_archive_file(
|
121
|
+
self, archive_file: str, server: str = None, timeout: int = 30
|
122
|
+
) -> None:
|
116
123
|
"""
|
117
124
|
Load the server with the contents of the indicated archive file.
|
118
125
|
|
@@ -129,10 +136,14 @@ class ServerOps(Platform):
|
|
129
136
|
|
130
137
|
"""
|
131
138
|
loop = asyncio.get_event_loop()
|
132
|
-
loop.run_until_complete(
|
139
|
+
loop.run_until_complete(
|
140
|
+
self._async_add_archive_file(archive_file, server, timeout)
|
141
|
+
)
|
133
142
|
|
134
|
-
async def _async_add_archive(
|
135
|
-
|
143
|
+
async def _async_add_archive(
|
144
|
+
self, archive_connection: str, server: str = None
|
145
|
+
) -> None:
|
146
|
+
"""Load the server with the contents of the indicated archive file.
|
136
147
|
|
137
148
|
/open-metadata/server-operations/users/{userId}/server-platform/servers/{serverName}/instance/open-metadata-archives/connection
|
138
149
|
|
@@ -153,9 +164,10 @@ class ServerOps(Platform):
|
|
153
164
|
server = self.server_name
|
154
165
|
|
155
166
|
url = (
|
156
|
-
|
157
|
-
|
158
|
-
|
167
|
+
self.ops_command_root
|
168
|
+
+ "/servers/"
|
169
|
+
+ server
|
170
|
+
+ "/instance/open-metadata-archives/connection"
|
159
171
|
)
|
160
172
|
await self._async_make_request("POST-DATA", url, archive_connection)
|
161
173
|
|
@@ -178,13 +190,16 @@ class ServerOps(Platform):
|
|
178
190
|
|
179
191
|
"""
|
180
192
|
loop = asyncio.get_event_loop()
|
181
|
-
loop.run_until_complete(
|
182
|
-
|
183
|
-
|
184
|
-
|
193
|
+
loop.run_until_complete(
|
194
|
+
self._async_add_archive_file(archive_connection, server)
|
195
|
+
)
|
196
|
+
|
197
|
+
#
|
198
|
+
# Server Ops
|
199
|
+
#
|
185
200
|
|
186
201
|
async def _async_get_active_server_status(self, server: str = None) -> dict:
|
187
|
-
"""
|
202
|
+
"""Get the status for the specified server.
|
188
203
|
|
189
204
|
Parameters
|
190
205
|
----------
|
@@ -237,7 +252,9 @@ class ServerOps(Platform):
|
|
237
252
|
response = loop.run_until_complete(self._async_get_active_server_status(server))
|
238
253
|
return response.json()
|
239
254
|
|
240
|
-
async def _async_get_active_service_list_for_server(
|
255
|
+
async def _async_get_active_service_list_for_server(
|
256
|
+
self, server: str = None
|
257
|
+
) -> Response:
|
241
258
|
"""
|
242
259
|
List all known active servers on the associated platform.
|
243
260
|
|
@@ -275,14 +292,16 @@ class ServerOps(Platform):
|
|
275
292
|
|
276
293
|
"""
|
277
294
|
loop = asyncio.get_event_loop()
|
278
|
-
response = loop.run_until_complete(
|
295
|
+
response = loop.run_until_complete(
|
296
|
+
self._async_get_active_service_list_for_server(server)
|
297
|
+
)
|
279
298
|
return response
|
280
299
|
|
281
|
-
#
|
282
|
-
# Governance Engine Ops
|
283
|
-
#
|
300
|
+
#
|
301
|
+
# Governance Engine Ops
|
302
|
+
#
|
284
303
|
async def _async_get_governance_engine_summaries(self, server: str = None) -> dict:
|
285
|
-
"""
|
304
|
+
"""Get Governance Engine Summaries. Async version.
|
286
305
|
Parameters
|
287
306
|
----------
|
288
307
|
server : str, optional
|
@@ -298,8 +317,10 @@ class ServerOps(Platform):
|
|
298
317
|
if server is None:
|
299
318
|
server = self.server_name
|
300
319
|
|
301
|
-
url = (
|
302
|
-
|
320
|
+
url = (
|
321
|
+
f"{self.platform_url}/servers/{server}/open-metadata/engine-host/users/{self.user_id}"
|
322
|
+
f"/governance-engines/summary"
|
323
|
+
)
|
303
324
|
response = await self._async_make_request("GET", url)
|
304
325
|
return response.json().get("governanceEngineSummaries")
|
305
326
|
|
@@ -318,16 +339,18 @@ class ServerOps(Platform):
|
|
318
339
|
|
319
340
|
"""
|
320
341
|
loop = asyncio.get_event_loop()
|
321
|
-
response = loop.run_until_complete(
|
342
|
+
response = loop.run_until_complete(
|
343
|
+
self._async_get_governance_engine_summaries(server)
|
344
|
+
)
|
322
345
|
return response
|
323
346
|
|
324
|
-
#
|
325
|
-
# Integration Daemon Ops
|
326
|
-
#
|
327
|
-
async def _async_get_integration_daemon_status(
|
328
|
-
|
329
|
-
|
330
|
-
"""
|
347
|
+
#
|
348
|
+
# Integration Daemon Ops
|
349
|
+
#
|
350
|
+
async def _async_get_integration_daemon_status(
|
351
|
+
self, server: str = None
|
352
|
+
) -> dict | str:
|
353
|
+
"""Get the current status of the integration daemon. Async version."""
|
331
354
|
if server is None:
|
332
355
|
server = self.server_name
|
333
356
|
|
@@ -337,89 +360,104 @@ class ServerOps(Platform):
|
|
337
360
|
# return response.json()
|
338
361
|
|
339
362
|
def get_integration_daemon_status(self, server: str = None) -> dict | str:
|
340
|
-
"""
|
341
|
-
|
342
|
-
"""
|
363
|
+
"""Get the current status of the integration daemon. Async version."""
|
343
364
|
loop = asyncio.get_event_loop()
|
344
|
-
response = loop.run_until_complete(
|
365
|
+
response = loop.run_until_complete(
|
366
|
+
self._async_get_integration_daemon_status(server)
|
367
|
+
)
|
345
368
|
return response
|
346
369
|
|
347
|
-
async def _async_get_connector_config(
|
348
|
-
|
349
|
-
|
370
|
+
async def _async_get_connector_config(
|
371
|
+
self, connector_name: str, server: str = None
|
372
|
+
) -> dict | str:
|
373
|
+
"""Retrieve the configuration properties of the named integration connector running in the integration daemon
|
374
|
+
- async version"""
|
350
375
|
if server is None:
|
351
376
|
server = self.server_name
|
352
377
|
validate_name(connector_name)
|
353
378
|
|
354
|
-
url = (
|
355
|
-
|
379
|
+
url = (
|
380
|
+
f"{self.platform_url}/servers/{server}/open-metadata/integration-daemon/users/{self.user_id}/"
|
381
|
+
f"integration-connectors/{connector_name}/configuration-properties"
|
382
|
+
)
|
356
383
|
|
357
384
|
response = await self._async_make_request("GET", url)
|
358
385
|
return response.json()
|
359
386
|
|
360
|
-
def get_connector_config(
|
361
|
-
|
387
|
+
def get_connector_config(
|
388
|
+
self, connector_name: str, server: str = None
|
389
|
+
) -> dict | str:
|
390
|
+
"""Retrieve the configuration properties of the named integration connector running in the integration
|
362
391
|
daemon"""
|
363
392
|
|
364
393
|
loop = asyncio.get_event_loop()
|
365
|
-
response = loop.run_until_complete(
|
394
|
+
response = loop.run_until_complete(
|
395
|
+
self._async_get_connector_config(connector_name, server)
|
396
|
+
)
|
366
397
|
return response
|
367
398
|
|
368
399
|
def get_integration_connector_status(self, server: str = None) -> None:
|
369
|
-
"""
|
400
|
+
"""Get the current status of the integration connector. Async version."""
|
370
401
|
self.get_integration_daemon_status(server)
|
371
|
-
|
402
|
+
# todo - finish this? (and do async)
|
372
403
|
pass
|
373
404
|
|
374
|
-
async def _async_restart_integration_connector(
|
375
|
-
|
405
|
+
async def _async_restart_integration_connector(
|
406
|
+
self, connector_name: str, server: str = None
|
407
|
+
) -> str:
|
408
|
+
"""Restart the integration Connector specified by connector_name or all if not specified - async"""
|
376
409
|
|
377
410
|
if server is None:
|
378
411
|
server = self.server_name
|
379
412
|
|
380
|
-
url = (
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
}
|
413
|
+
url = (
|
414
|
+
f"{self.platform_url}/servers/{server}/open-metadata/integration-daemon/users/"
|
415
|
+
f"{self.user_id}/integration-connectors/restart"
|
416
|
+
)
|
417
|
+
body = {"class": "NameRequestBody", "name": connector_name}
|
386
418
|
response = await self._async_make_request("POST", url, body)
|
387
419
|
return response
|
388
420
|
|
389
|
-
def restart_integration_connector(
|
390
|
-
|
421
|
+
def restart_integration_connector(
|
422
|
+
self, connector_name: str, server: str = None
|
423
|
+
) -> str:
|
424
|
+
"""Restart the integration Connector specified by connector_name or all if not specified"""
|
391
425
|
loop = asyncio.get_event_loop()
|
392
|
-
response = loop.run_until_complete(
|
393
|
-
|
426
|
+
response = loop.run_until_complete(
|
427
|
+
self._async_restart_integration_connector(connector_name, server)
|
428
|
+
)
|
394
429
|
return response
|
395
430
|
|
396
|
-
async def _async_refresh_integration_connectors(
|
397
|
-
|
398
|
-
|
431
|
+
async def _async_refresh_integration_connectors(
|
432
|
+
self, connector_name: str = "all", server: str = None, time_out: int = 60
|
433
|
+
) -> None:
|
434
|
+
"""Issue a refresh request to all connectors running in the integration daemon, or a specific connector
|
399
435
|
if one is specified - async version"""
|
400
436
|
if server is None:
|
401
437
|
server = self.server_name
|
402
|
-
if connector_name ==
|
438
|
+
if connector_name == "all":
|
403
439
|
connector_name = None
|
404
440
|
|
405
|
-
url = (
|
406
|
-
|
441
|
+
url = (
|
442
|
+
f"{self.platform_url}/servers/{server}/open-metadata/integration-daemon/users/"
|
443
|
+
f"{self.user_id}/integration-connectors/refresh"
|
444
|
+
)
|
407
445
|
if connector_name:
|
408
|
-
body = {
|
409
|
-
|
410
|
-
"name": connector_name
|
411
|
-
}
|
412
|
-
await self._async_make_request("POST", url, body, time_out=time_out
|
413
|
-
)
|
446
|
+
body = {"class": "NameRequestBody", "name": connector_name}
|
447
|
+
await self._async_make_request("POST", url, body, time_out=time_out)
|
414
448
|
else:
|
415
|
-
await self._async_make_request("POST", url, time_out=
|
449
|
+
await self._async_make_request("POST", url, time_out=time_out)
|
416
450
|
|
417
451
|
return
|
418
452
|
|
419
|
-
def refresh_integration_connectors(
|
420
|
-
|
453
|
+
def refresh_integration_connectors(
|
454
|
+
self, connector_name: str, server: str = None, time_out: int = 60
|
455
|
+
) -> None:
|
456
|
+
"""Restart the integration Connector specified by connector_name"""
|
421
457
|
loop = asyncio.get_event_loop()
|
422
|
-
loop.run_until_complete(
|
458
|
+
loop.run_until_complete(
|
459
|
+
self._async_refresh_integration_connectors(connector_name, server, time_out)
|
460
|
+
)
|
423
461
|
|
424
462
|
|
425
463
|
if __name__ == "__main__":
|