pyegeria 0.8.4.46__py3-none-any.whl → 0.8.4.49__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.
- commands/cli/egeria.py +17 -0
- commands/cli/egeria_ops.py +16 -0
- commands/ops/monitor_server_startup.py +117 -0
- commands/tech/list_related_elements.py +6 -4
- pyegeria/automated_curation_omvs.py +3 -3
- pyegeria/runtime_manager_omvs.py +4 -2
- {pyegeria-0.8.4.46.dist-info → pyegeria-0.8.4.49.dist-info}/METADATA +1 -1
- {pyegeria-0.8.4.46.dist-info → pyegeria-0.8.4.49.dist-info}/RECORD +11 -10
- {pyegeria-0.8.4.46.dist-info → pyegeria-0.8.4.49.dist-info}/entry_points.txt +1 -0
- {pyegeria-0.8.4.46.dist-info → pyegeria-0.8.4.49.dist-info}/LICENSE +0 -0
- {pyegeria-0.8.4.46.dist-info → pyegeria-0.8.4.49.dist-info}/WHEEL +0 -0
commands/cli/egeria.py
CHANGED
@@ -57,6 +57,8 @@ from commands.ops.monitor_server_status import (
|
|
57
57
|
)
|
58
58
|
from commands.ops.refresh_integration_daemon import refresh_connector
|
59
59
|
from commands.ops.restart_integration_daemon import restart_connector
|
60
|
+
from commands.ops.monitor_server_startup import display_startup_status
|
61
|
+
|
60
62
|
from commands.tech.get_element_info import display_elements
|
61
63
|
from commands.tech.get_guid_info import display_guid
|
62
64
|
from commands.tech.get_tech_details import tech_details_viewer
|
@@ -986,6 +988,21 @@ def show_server_status(ctx, full):
|
|
986
988
|
)
|
987
989
|
|
988
990
|
|
991
|
+
@show_server.command("startup")
|
992
|
+
@click.pass_context
|
993
|
+
def show_startup_status(ctx):
|
994
|
+
"""Display a live status view of Egeria servers for the specified Egeria platform"""
|
995
|
+
c = ctx.obj
|
996
|
+
display_startup_status(
|
997
|
+
c.server,
|
998
|
+
c.url,
|
999
|
+
c.userid,
|
1000
|
+
c.password,
|
1001
|
+
c.jupyter,
|
1002
|
+
c.width,
|
1003
|
+
)
|
1004
|
+
|
1005
|
+
|
989
1006
|
@show.group("engines")
|
990
1007
|
@click.pass_context
|
991
1008
|
def engine_host(ctx):
|
commands/cli/egeria_ops.py
CHANGED
@@ -39,6 +39,7 @@ from commands.ops.monitor_server_status import (
|
|
39
39
|
)
|
40
40
|
from commands.ops.refresh_integration_daemon import refresh_connector
|
41
41
|
from commands.ops.restart_integration_daemon import restart_connector
|
42
|
+
from commands.ops.monitor_server_startup import display_startup_status
|
42
43
|
|
43
44
|
|
44
45
|
# class Config(object):
|
@@ -247,6 +248,21 @@ def show_server_status(ctx, full):
|
|
247
248
|
)
|
248
249
|
|
249
250
|
|
251
|
+
@show_server.command("startup")
|
252
|
+
@click.pass_context
|
253
|
+
def show_startup_status(ctx):
|
254
|
+
"""Display a live status view of Egeria servers for the specified Egeria platform"""
|
255
|
+
c = ctx.obj
|
256
|
+
display_startup_status(
|
257
|
+
c.server,
|
258
|
+
c.url,
|
259
|
+
c.userid,
|
260
|
+
c.password,
|
261
|
+
c.jupyter,
|
262
|
+
c.width,
|
263
|
+
)
|
264
|
+
|
265
|
+
|
250
266
|
@show.group("engines")
|
251
267
|
@click.pass_context
|
252
268
|
def engine_host(ctx):
|
@@ -0,0 +1,117 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
4
|
+
Copyright Contributors to the ODPi Egeria project.
|
5
|
+
|
6
|
+
Unit tests for the Utils helper functions using the Pytest framework.
|
7
|
+
|
8
|
+
|
9
|
+
A simple server status display using the OMAS services.
|
10
|
+
"""
|
11
|
+
import os
|
12
|
+
import time
|
13
|
+
import argparse
|
14
|
+
|
15
|
+
from pyegeria import (
|
16
|
+
InvalidParameterException,
|
17
|
+
PropertyServerException,
|
18
|
+
UserNotAuthorizedException,
|
19
|
+
print_exception_response,
|
20
|
+
ServerOps,
|
21
|
+
)
|
22
|
+
from rich.table import Table
|
23
|
+
from rich.live import Live
|
24
|
+
|
25
|
+
|
26
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
27
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
28
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
29
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
30
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
31
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
32
|
+
)
|
33
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
34
|
+
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
35
|
+
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
36
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
37
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
38
|
+
EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
39
|
+
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "220"))
|
40
|
+
|
41
|
+
|
42
|
+
def display_startup_status(
|
43
|
+
server: str,
|
44
|
+
url: str,
|
45
|
+
username: str,
|
46
|
+
password: str = EGERIA_USER_PASSWORD,
|
47
|
+
jupyter: bool = EGERIA_JUPYTER,
|
48
|
+
width: int = EGERIA_WIDTH,
|
49
|
+
):
|
50
|
+
p_client = ServerOps(server, url, username)
|
51
|
+
|
52
|
+
def generate_table() -> Table:
|
53
|
+
"""Make a new table."""
|
54
|
+
table = Table(
|
55
|
+
title=f"Server Status for Platform - {time.asctime()}",
|
56
|
+
# style = "black on grey66",
|
57
|
+
header_style="white on dark_blue",
|
58
|
+
caption=f"Server Status for Platform - '{url}'",
|
59
|
+
# show_lines=True,
|
60
|
+
)
|
61
|
+
|
62
|
+
table.add_column("Known Server")
|
63
|
+
table.add_column("Status")
|
64
|
+
|
65
|
+
known_server_list = p_client.get_known_servers()
|
66
|
+
active_server_list = p_client.get_active_server_list()
|
67
|
+
if len(known_server_list) == 0:
|
68
|
+
return table
|
69
|
+
|
70
|
+
for server in known_server_list:
|
71
|
+
if server in active_server_list:
|
72
|
+
status = "Active"
|
73
|
+
else:
|
74
|
+
status = "Inactive"
|
75
|
+
|
76
|
+
table.add_row(
|
77
|
+
server,
|
78
|
+
"[red]Inactive" if status == "Inactive" else "[green]Active",
|
79
|
+
)
|
80
|
+
# p_client.close_session()
|
81
|
+
return table
|
82
|
+
|
83
|
+
try:
|
84
|
+
with Live(generate_table(), refresh_per_second=4, screen=True) as live:
|
85
|
+
while True:
|
86
|
+
time.sleep(2)
|
87
|
+
live.update(generate_table())
|
88
|
+
# services = p_client.get_server_status(server)['serverStatus']['services']
|
89
|
+
# for service in services:
|
90
|
+
# service_name = service['serviceName']
|
91
|
+
# service_status = service['serviceStatus']
|
92
|
+
|
93
|
+
except (
|
94
|
+
InvalidParameterException,
|
95
|
+
PropertyServerException,
|
96
|
+
UserNotAuthorizedException,
|
97
|
+
) as e:
|
98
|
+
print_exception_response(e)
|
99
|
+
assert e.related_http_code != "200", "Invalid parameters"
|
100
|
+
|
101
|
+
|
102
|
+
def main():
|
103
|
+
parser = argparse.ArgumentParser()
|
104
|
+
parser.add_argument("--server", help="Name of the server to display status for")
|
105
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
106
|
+
parser.add_argument("--userid", help="User Id")
|
107
|
+
args = parser.parse_args()
|
108
|
+
|
109
|
+
server = args.server if args.server is not None else "active-metadata-store"
|
110
|
+
url = args.url if args.url is not None else "https://localhost:9443"
|
111
|
+
userid = args.userid if args.userid is not None else "garygeeke"
|
112
|
+
|
113
|
+
display_startup_status(server, url, userid)
|
114
|
+
|
115
|
+
|
116
|
+
if __name__ == "__main__":
|
117
|
+
main()
|
@@ -97,12 +97,14 @@ def list_related_elements(
|
|
97
97
|
f"* Created: {el_create_time}\n"
|
98
98
|
)
|
99
99
|
rel_header_out = Markdown(rel_header_md)
|
100
|
+
rel_props = element.get("relationshipProperties", "---")
|
100
101
|
|
101
102
|
rel_props_md = ""
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
103
|
+
if type(rel_props) is list:
|
104
|
+
for prop in rel_props.keys():
|
105
|
+
rel_props_md += (
|
106
|
+
f"* **{prop}**: {element['relationshipProperties'][prop]}\n"
|
107
|
+
)
|
106
108
|
rel_props_out = Markdown(rel_props_md)
|
107
109
|
|
108
110
|
c_md = ""
|
@@ -366,10 +366,10 @@ class AutomatedCuration(Client):
|
|
366
366
|
Returns
|
367
367
|
-------
|
368
368
|
str
|
369
|
-
The GUID of the
|
369
|
+
The GUID of the File Folder element.
|
370
370
|
"""
|
371
371
|
body = {
|
372
|
-
"templateGUID": TEMPLATE_GUIDS["
|
372
|
+
"templateGUID": TEMPLATE_GUIDS["File System Directory"],
|
373
373
|
"isOwnAnchor": "true",
|
374
374
|
"placeholderPropertyValues": {
|
375
375
|
"directoryPathName": path_name,
|
@@ -416,7 +416,7 @@ class AutomatedCuration(Client):
|
|
416
416
|
Returns
|
417
417
|
-------
|
418
418
|
str
|
419
|
-
The GUID of the
|
419
|
+
The GUID of the File Folder element.
|
420
420
|
"""
|
421
421
|
loop = asyncio.get_event_loop()
|
422
422
|
response = loop.run_until_complete(
|
pyegeria/runtime_manager_omvs.py
CHANGED
@@ -1247,7 +1247,7 @@ class RuntimeManager(Client):
|
|
1247
1247
|
return
|
1248
1248
|
|
1249
1249
|
async def _async_activate_server_with_stored_config(
|
1250
|
-
self, server_guid: str = None, server_name: str = None, timeout: int =
|
1250
|
+
self, server_guid: str = None, server_name: str = None, timeout: int = 240
|
1251
1251
|
) -> None:
|
1252
1252
|
"""Activate the named OMAG server using the appropriate configuration document found in the
|
1253
1253
|
configuration store. Async version.
|
@@ -1260,6 +1260,7 @@ class RuntimeManager(Client):
|
|
1260
1260
|
Identity of the server to act on. If not specified, server_name must be.
|
1261
1261
|
server_name: str, default = None
|
1262
1262
|
Name of server to act on. If not specified, server_guid must be.
|
1263
|
+
timeout: int, optional, default = 240 seconds
|
1263
1264
|
|
1264
1265
|
Returns
|
1265
1266
|
-------
|
@@ -1279,7 +1280,7 @@ class RuntimeManager(Client):
|
|
1279
1280
|
return
|
1280
1281
|
|
1281
1282
|
def activate_server_with_stored_config(
|
1282
|
-
self, server_guid: str = None, server_name: str = None, timeout: int =
|
1283
|
+
self, server_guid: str = None, server_name: str = None, timeout: int = 240
|
1283
1284
|
) -> None:
|
1284
1285
|
"""Activate the named OMAG server using the appropriate configuration document found in the
|
1285
1286
|
configuration store.
|
@@ -1292,6 +1293,7 @@ class RuntimeManager(Client):
|
|
1292
1293
|
Identity of the server to act on. If not specified, server_name must be.
|
1293
1294
|
server_name: str, default = None
|
1294
1295
|
Name of server to act on. If not specified, server_guid must be.
|
1296
|
+
timeout: int, optional, default = 240 seconds
|
1295
1297
|
|
1296
1298
|
Returns
|
1297
1299
|
-------
|
@@ -16,10 +16,10 @@ commands/cat/list_tech_types.py,sha256=20T4v6L5qeebSsaL1nGkFMDAIsy2W3A3SMm1RcgFo
|
|
16
16
|
commands/cat/list_todos.py,sha256=iPxHRyW3X5tiREio4TUOwRPvNPjU0gxm3pVnUI79ir4,6542
|
17
17
|
commands/cat/list_user_ids.py,sha256=7JinL7rknPbGusIb8ikXKEaV1vvbuvx_WWtbmlfS_DY,5093
|
18
18
|
commands/cli/__init__.py,sha256=hpTVSMP2gnPRhcAZPdeUEsQ-eaDySlXlk239dNWYmng,292
|
19
|
-
commands/cli/egeria.py,sha256=
|
19
|
+
commands/cli/egeria.py,sha256=o5PWNgho2cYCVR3oH1pBH2aLawgj7Kf803uuCWLMzxw,28908
|
20
20
|
commands/cli/egeria_cat.py,sha256=LWspOYRcdJIIx2n9wvhBhkNnACGDIpFTWfsoVTGeiV0,12957
|
21
21
|
commands/cli/egeria_my.py,sha256=9zIpUDLeA_R-0rgCSQfEZTtVmkxPcEAsYcCTn1wQFrE,6181
|
22
|
-
commands/cli/egeria_ops.py,sha256=
|
22
|
+
commands/cli/egeria_ops.py,sha256=fxDXYWXRhexx06PdSLCp2FhgUtS13NdDpyg7ea775fc,11531
|
23
23
|
commands/cli/egeria_tech.py,sha256=FVp7BjU706uj-lJTyTYu4zBOCdoMduU1xZpZoocFyPc,12660
|
24
24
|
commands/cli/ops_config.py,sha256=m4AfPjf-fR4EBTx8Dc2mcgrfWwAxb30YGeV-v79bg4U,1450
|
25
25
|
commands/my/README.md,sha256=ZheFhj_VoPMhcWjW3pGchHB0vH_A9PklSmrSkzKdrcQ,844
|
@@ -41,6 +41,7 @@ commands/ops/monitor_engine_activity_c.py,sha256=rSEUD3elhsiYdUhQRn613OM_R4VecFb
|
|
41
41
|
commands/ops/monitor_gov_eng_status.py,sha256=HOcPLqOqceVjxbYqAtYK0fjlJBJxsR9SxbfKzwwUz8c,7237
|
42
42
|
commands/ops/monitor_integ_daemon_status.py,sha256=BtQojoyJcEkZ69Kp8_inWedsoUKuv7x6iUjgEs8sWws,9225
|
43
43
|
commands/ops/monitor_platform_status.py,sha256=xmngiuQK9X6X4-stGSITzfMSAdqpswVk-DY7kh8M0P0,6401
|
44
|
+
commands/ops/monitor_server_startup.py,sha256=0pwnhv761uuFHGJXVANa5RhQQPPTXFldJ45TfeT7qfk,3901
|
44
45
|
commands/ops/monitor_server_status.py,sha256=eeZY4o_HwrH-csrhHPi95LLGu00j6AYl48A7fDYTG34,6061
|
45
46
|
commands/ops/orig_monitor_server_list.py,sha256=Uhtn8lv7QVXJBi9DSR3Nelmz8TB0vOsat10nFS6Nu20,4637
|
46
47
|
commands/ops/orig_monitor_server_status.py,sha256=A-8hMDfbscdcq-b1OD4wKn0tphumX8WIK-Hz8uPoFkc,3974
|
@@ -56,7 +57,7 @@ commands/tech/list_elements.py,sha256=vO4SPEhcKm0L5rHVr6r8KYX3sPazGJ78oWsO2wLcf2
|
|
56
57
|
commands/tech/list_elements_for_classification.py,sha256=oAge8RFz4z9H-jCE0fBDhS4AbIHqhQWBvZ4Dp7BZbfM,6194
|
57
58
|
commands/tech/list_elements_x.py,sha256=k5jkekB7wh6cbzjn7FnwL7pKrPFq_oE-x36c_Z1FuSo,6500
|
58
59
|
commands/tech/list_registered_services.py,sha256=QzE_ebdopNkHWMxa-xc902GG6ac4Yw-ln8i8NUsgHVA,6542
|
59
|
-
commands/tech/list_related_elements.py,sha256=
|
60
|
+
commands/tech/list_related_elements.py,sha256=I1vzNKQfD8Nrwa8JHf4yvWBawKN_vR0AjN0xL_5kWGg,7716
|
60
61
|
commands/tech/list_related_specification.py,sha256=mWrKenXOskL4cl0DHjH2Z8M9-FJzjkzK62W-tsx3WDU,5918
|
61
62
|
commands/tech/list_relationship_types.py,sha256=BlVzrPznZXqMVLN2-2vYEVRGeYsiJrqXxIJEikobyoo,5875
|
62
63
|
commands/tech/list_tech_templates.py,sha256=RiyA8a4fIL9BGeGf37Bkk471mK5ECkDJMN9QVNReC1M,6192
|
@@ -69,7 +70,7 @@ pyegeria/_exceptions.py,sha256=NJ7vAhmvusK1ENvY2MMrBB6A6TgpYjzS9QJxFH56b8c,18470
|
|
69
70
|
pyegeria/_globals.py,sha256=1Uc8392wjbiVN5L__RzxC1-U97RMXj77_iUsMSgeAjQ,638
|
70
71
|
pyegeria/_validators.py,sha256=rnZelHJnjHaLZ8UhUTDyB59MfIUJifhALtkYoHBaos4,12736
|
71
72
|
pyegeria/asset_catalog_omvs.py,sha256=fffZsSukOrG-xszD6uEPf2IX4p0IK63T0_w7_6BpG1Q,21075
|
72
|
-
pyegeria/automated_curation_omvs.py,sha256=
|
73
|
+
pyegeria/automated_curation_omvs.py,sha256=7Q87KuIPy-Er83ZnsIRqrPZ-0t8zVsf6Ki53_45pJSg,133260
|
73
74
|
pyegeria/classification_manager_omvs.py,sha256=Op6JqnJWMoIRkgzRr__P-mnROSaoWBq54cnjuAhoo5Q,180808
|
74
75
|
pyegeria/collection_manager_omvs.py,sha256=kye2kjthNnmwxMZhHQKV0xoHbxcNPWjNzRAYOItj_gY,99201
|
75
76
|
pyegeria/core_omag_server_config.py,sha256=EtHaPKyc9d6pwTgbnQqGwe5lSBMPIfJOlbJEa1zg1JA,94946
|
@@ -88,14 +89,14 @@ pyegeria/my_profile_omvs.py,sha256=DyECbUFEcgokrIbzdMMNljC3bqfqKGXAF2wZEpzvRYs,3
|
|
88
89
|
pyegeria/platform_services.py,sha256=CJIOYIFEbcIGwdWlApAQcXxZTsdrhFtpJcm4O3p7dG0,41646
|
89
90
|
pyegeria/project_manager_omvs.py,sha256=Y7Lyqh4jIujJrr_Ub7feo904FN_uz4R10T4hKhqE1Uw,67499
|
90
91
|
pyegeria/registered_info.py,sha256=y0-LgDIQXpph0lEWxIOG3_HsqX_Z2iAIb3xu4Aa4B70,6344
|
91
|
-
pyegeria/runtime_manager_omvs.py,sha256=
|
92
|
+
pyegeria/runtime_manager_omvs.py,sha256=qkMjb4Dp88-tqG47ldGR8oKGuNSIMrYiN43BCqAO4lE,74356
|
92
93
|
pyegeria/server_operations.py,sha256=ciH890hYT85YQ6OpByn4w7s3a7TtvWZpIG5rkRqbcI0,16766
|
93
94
|
pyegeria/tech_guids_26-09-2024 09:30.py,sha256=7CTmbbNQ7qfJtWNbBhSiS6yIhs17SmWxKh-JanmAOwk,5967
|
94
95
|
pyegeria/utils.py,sha256=1h6bwveadd6GpbnGLTmqPBmBk68QvxdjGTI9RfbrgKY,5415
|
95
96
|
pyegeria/valid_metadata_omvs.py,sha256=raBU_bK0oMhOqjOUTSbU_OZuGKsYqRoiFbtUwz4OtZI,29060
|
96
97
|
pyegeria/x_action_author_omvs.py,sha256=xu1IQ0YbhIKi17C5a7Aq9u1Az2czwahNPpX9czmyVxE,6454
|
97
|
-
pyegeria-0.8.4.
|
98
|
-
pyegeria-0.8.4.
|
99
|
-
pyegeria-0.8.4.
|
100
|
-
pyegeria-0.8.4.
|
101
|
-
pyegeria-0.8.4.
|
98
|
+
pyegeria-0.8.4.49.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
99
|
+
pyegeria-0.8.4.49.dist-info/METADATA,sha256=L1QD1FlCa_1ZqlIcZipXz2draY_19ZSvw-EB5LhQHn8,2868
|
100
|
+
pyegeria-0.8.4.49.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
101
|
+
pyegeria-0.8.4.49.dist-info/entry_points.txt,sha256=GZ8TCko5L5CR9Pbs4qiUnXR76q8D1iBNfHe-AggVFhM,3560
|
102
|
+
pyegeria-0.8.4.49.dist-info/RECORD,,
|
@@ -53,6 +53,7 @@ monitor_my_todos=commands.my.monitor_my_todos:main
|
|
53
53
|
monitor_open_todos=commands.my.monitor_open_todos:main
|
54
54
|
monitor_platform_status=commands.ops.monitor_platform_status:main
|
55
55
|
monitor_server_list=commands.ops.orig_monitor_server_list:main
|
56
|
+
monitor_server_startup=commands.ops.monitor_server_startup:main
|
56
57
|
monitor_server_status=commands.ops.monitor_server_status:main
|
57
58
|
reassign_todo=commands.my.todo_actions:reassign_todo
|
58
59
|
refresh_integration_daemon=commands.ops.refresh_integration_daemon:main
|
File without changes
|
File without changes
|