pyegeria 0.8.4.48__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
- pyegeria/automated_curation_omvs.py +3 -3
- {pyegeria-0.8.4.48.dist-info → pyegeria-0.8.4.49.dist-info}/METADATA +1 -1
- {pyegeria-0.8.4.48.dist-info → pyegeria-0.8.4.49.dist-info}/RECORD +9 -8
- {pyegeria-0.8.4.48.dist-info → pyegeria-0.8.4.49.dist-info}/entry_points.txt +1 -0
- {pyegeria-0.8.4.48.dist-info → pyegeria-0.8.4.49.dist-info}/LICENSE +0 -0
- {pyegeria-0.8.4.48.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()
|
@@ -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(
|
@@ -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
|
@@ -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
|
@@ -94,8 +95,8 @@ pyegeria/tech_guids_26-09-2024 09:30.py,sha256=7CTmbbNQ7qfJtWNbBhSiS6yIhs17SmWxK
|
|
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
|