pyegeria 0.7.31__py3-none-any.whl → 0.7.33__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/ops/monitor_engine_activity.py +6 -5
- examples/widgets/ops/monitor_engine_activity_c.py +6 -5
- examples/widgets/ops/monitor_platform_status.py +51 -28
- examples/widgets/ops/monitor_server_list.py +61 -30
- pyegeria/__init__.py +22 -2
- pyegeria/automated_curation_omvs.py +2197 -1399
- {pyegeria-0.7.31.dist-info → pyegeria-0.7.33.dist-info}/METADATA +1 -1
- {pyegeria-0.7.31.dist-info → pyegeria-0.7.33.dist-info}/RECORD +11 -11
- {pyegeria-0.7.31.dist-info → pyegeria-0.7.33.dist-info}/entry_points.txt +2 -0
- {pyegeria-0.7.31.dist-info → pyegeria-0.7.33.dist-info}/LICENSE +0 -0
- {pyegeria-0.7.31.dist-info → pyegeria-0.7.33.dist-info}/WHEEL +0 -0
@@ -88,11 +88,7 @@ def display_engine_activity(
|
|
88
88
|
|
89
89
|
token = g_client.create_egeria_bearer_token()
|
90
90
|
action_status = g_client.get_engine_actions()
|
91
|
-
|
92
|
-
action_status,
|
93
|
-
key=lambda i: i("requestedTime", time.asctime()),
|
94
|
-
reverse=True,
|
95
|
-
)
|
91
|
+
|
96
92
|
if type(action_status) is str:
|
97
93
|
requested_time = " "
|
98
94
|
start_time = " "
|
@@ -104,6 +100,11 @@ def display_engine_activity(
|
|
104
100
|
process_name = " "
|
105
101
|
completion_message = " "
|
106
102
|
elif type(action_status) is list:
|
103
|
+
sorted_action_status = sorted(
|
104
|
+
action_status,
|
105
|
+
key=lambda i: i.get("requestedTime", time.asctime()),
|
106
|
+
reverse=True,
|
107
|
+
)
|
107
108
|
for action in sorted_action_status:
|
108
109
|
requested_time = action.get("requestedTime", " ")
|
109
110
|
start_time = action.get("startTime", " ")
|
@@ -88,11 +88,7 @@ def display_engine_activity_c(
|
|
88
88
|
|
89
89
|
token = g_client.create_egeria_bearer_token()
|
90
90
|
action_status = g_client.get_engine_actions()
|
91
|
-
|
92
|
-
action_status,
|
93
|
-
key=lambda i: i.get("requestedTime", time.asctime()),
|
94
|
-
reverse=True,
|
95
|
-
)
|
91
|
+
|
96
92
|
if type(action_status) is str:
|
97
93
|
requested_time = " "
|
98
94
|
start_time = " "
|
@@ -104,6 +100,11 @@ def display_engine_activity_c(
|
|
104
100
|
process_name = " "
|
105
101
|
completion_message = " "
|
106
102
|
elif type(action_status) is list:
|
103
|
+
sorted_action_status = sorted(
|
104
|
+
action_status,
|
105
|
+
key=lambda i: i.get("requestedTime", time.asctime()),
|
106
|
+
reverse=True,
|
107
|
+
)
|
107
108
|
for action in sorted_action_status:
|
108
109
|
requested_time = action.get("requestedTime", " ")
|
109
110
|
start_time = action.get("startTime", " ")
|
@@ -23,25 +23,35 @@ from pyegeria._exceptions import (
|
|
23
23
|
)
|
24
24
|
|
25
25
|
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
26
|
-
EGERIA_KAFKA_ENDPOINT = os.environ.get(
|
27
|
-
EGERIA_PLATFORM_URL = os.environ.get(
|
28
|
-
EGERIA_VIEW_SERVER = os.environ.get(
|
29
|
-
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
26
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
27
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
28
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
29
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
30
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
31
|
+
)
|
32
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
33
|
+
EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
|
34
|
+
"EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
|
35
|
+
)
|
36
|
+
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
37
|
+
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
38
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
39
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
40
|
+
EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
41
|
+
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
38
42
|
|
39
43
|
disable_ssl_warnings = True
|
40
44
|
console = Console(width=200)
|
41
45
|
|
42
46
|
|
43
|
-
def display_status(
|
44
|
-
|
47
|
+
def display_status(
|
48
|
+
server: str,
|
49
|
+
url: str,
|
50
|
+
username: str,
|
51
|
+
user_pass: str,
|
52
|
+
jupyter: bool = EGERIA_JUPYTER,
|
53
|
+
width: int = EGERIA_WIDTH,
|
54
|
+
):
|
45
55
|
r_client = RuntimeManager(server, url, username)
|
46
56
|
token = r_client.create_egeria_bearer_token(username, user_pass)
|
47
57
|
|
@@ -70,7 +80,7 @@ def display_status(server: str, url: str, username: str, user_pass: str, jupyter
|
|
70
80
|
"Metadata Access Store": "Store",
|
71
81
|
"View Server": "View",
|
72
82
|
"Engine Host Server": "EngineHost",
|
73
|
-
"Integration Daemon": "Integration"
|
83
|
+
"Integration Daemon": "Integration",
|
74
84
|
}
|
75
85
|
try:
|
76
86
|
platform_list = r_client.get_platforms_by_type()
|
@@ -79,13 +89,13 @@ def display_status(server: str, url: str, username: str, user_pass: str, jupyter
|
|
79
89
|
sys.exit(1)
|
80
90
|
|
81
91
|
for platform in platform_list:
|
82
|
-
platform_name = platform[
|
83
|
-
platform_guid = platform[
|
84
|
-
platform_desc = platform[
|
92
|
+
platform_name = platform["properties"].get("displayName", "---")
|
93
|
+
platform_guid = platform["elementHeader"]["guid"]
|
94
|
+
platform_desc = platform["properties"].get("resourceDescription", "---")
|
85
95
|
server_list = ""
|
86
96
|
|
87
97
|
platform_report = r_client.get_platform_report(platform_guid)
|
88
|
-
platform_url = platform_report.get(
|
98
|
+
platform_url = platform_report.get("platformURLRoot", " ")
|
89
99
|
platform_origin = platform_report.get("platformOrigin", " ")
|
90
100
|
platform_started = platform_report.get("platformStartTime", " ")
|
91
101
|
|
@@ -104,14 +114,23 @@ def display_status(server: str, url: str, username: str, user_pass: str, jupyter
|
|
104
114
|
server_status = "UNKNOWN"
|
105
115
|
status_flag = "[bright yellow]"
|
106
116
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
117
|
+
server_list = (
|
118
|
+
f"{status_flag}{server_types[server_type]}: {server_name}\n"
|
119
|
+
)
|
120
|
+
# server_list = server_list + serv
|
121
|
+
|
122
|
+
table.add_row(
|
123
|
+
platform_name,
|
124
|
+
platform_url,
|
125
|
+
platform_origin,
|
126
|
+
platform_desc,
|
127
|
+
platform_started,
|
128
|
+
server_list,
|
129
|
+
style="bold white on black",
|
130
|
+
)
|
131
|
+
|
132
|
+
except Exception as e:
|
133
|
+
# console.print_exception(e)
|
115
134
|
platform_url = " "
|
116
135
|
platform_origin = " "
|
117
136
|
platform_started = " "
|
@@ -124,7 +143,11 @@ def display_status(server: str, url: str, username: str, user_pass: str, jupyter
|
|
124
143
|
time.sleep(2)
|
125
144
|
live.update(generate_table())
|
126
145
|
|
127
|
-
except (
|
146
|
+
except (
|
147
|
+
InvalidParameterException,
|
148
|
+
PropertyServerException,
|
149
|
+
UserNotAuthorizedException,
|
150
|
+
) as e:
|
128
151
|
print_exception_response(e)
|
129
152
|
|
130
153
|
except KeyboardInterrupt:
|
@@ -15,41 +15,60 @@ import time
|
|
15
15
|
from rich.live import Live
|
16
16
|
from rich.table import Table
|
17
17
|
|
18
|
-
from pyegeria._exceptions import (
|
19
|
-
|
18
|
+
from pyegeria._exceptions import (
|
19
|
+
InvalidParameterException,
|
20
|
+
PropertyServerException,
|
21
|
+
UserNotAuthorizedException,
|
22
|
+
print_exception_response,
|
23
|
+
)
|
20
24
|
from pyegeria.core_omag_server_config import CoreServerConfig
|
21
25
|
from pyegeria.server_operations import ServerOps
|
22
26
|
|
23
27
|
disable_ssl_warnings = True
|
24
28
|
|
25
29
|
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
26
|
-
EGERIA_KAFKA_ENDPOINT = os.environ.get(
|
27
|
-
EGERIA_PLATFORM_URL = os.environ.get(
|
28
|
-
EGERIA_VIEW_SERVER = os.environ.get(
|
29
|
-
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
30
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
31
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
32
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
33
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
34
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
35
|
+
)
|
36
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
37
|
+
EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
|
38
|
+
"EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
|
39
|
+
)
|
40
|
+
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
41
|
+
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
42
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
43
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
44
|
+
EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
45
|
+
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
46
|
+
|
47
|
+
|
48
|
+
def display_status(
|
49
|
+
server: str,
|
50
|
+
url: str,
|
51
|
+
username: str,
|
52
|
+
user_pass: str,
|
53
|
+
jupyter: bool = EGERIA_JUPYTER,
|
54
|
+
width: int = EGERIA_WIDTH,
|
55
|
+
):
|
42
56
|
p_client = ServerOps(server, url, username)
|
43
57
|
c_client = CoreServerConfig(server, url, username, user_pass)
|
44
58
|
|
45
59
|
def generate_table() -> Table:
|
46
60
|
"""Make a new table."""
|
47
|
-
table = Table(
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
61
|
+
table = Table(
|
62
|
+
title=f"Server Status for Platform - {time.asctime()}",
|
63
|
+
style="bold white on black",
|
64
|
+
row_styles=["bold white on black"],
|
65
|
+
header_style="white on dark_blue",
|
66
|
+
title_style="bold white on black",
|
67
|
+
caption_style="white on black",
|
68
|
+
caption=f"Server Status for Platform - '{url}'",
|
69
|
+
show_lines=True,
|
70
|
+
# expand=True
|
71
|
+
)
|
53
72
|
|
54
73
|
table.add_column("Known Server")
|
55
74
|
table.add_column("Status")
|
@@ -65,11 +84,19 @@ def display_status(server: str, url: str, username: str, user_pass: str, jupyter
|
|
65
84
|
status = "Active"
|
66
85
|
else:
|
67
86
|
status = "Inactive"
|
68
|
-
server_type = c_client.get_server_type_classification(server)[
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
87
|
+
server_type = c_client.get_server_type_classification(server)[
|
88
|
+
"serverTypeName"
|
89
|
+
]
|
90
|
+
description = c_client.get_basic_server_properties(server).get(
|
91
|
+
"localServerDescription", " "
|
92
|
+
)
|
93
|
+
|
94
|
+
table.add_row(
|
95
|
+
server,
|
96
|
+
"[red]Inactive" if status == "Inactive" else "[green]Active",
|
97
|
+
server_type,
|
98
|
+
description,
|
99
|
+
)
|
73
100
|
|
74
101
|
return table
|
75
102
|
|
@@ -79,7 +106,11 @@ def display_status(server: str, url: str, username: str, user_pass: str, jupyter
|
|
79
106
|
time.sleep(2)
|
80
107
|
live.update(generate_table())
|
81
108
|
|
82
|
-
except (
|
109
|
+
except (
|
110
|
+
InvalidParameterException,
|
111
|
+
PropertyServerException,
|
112
|
+
UserNotAuthorizedException,
|
113
|
+
) as e:
|
83
114
|
print_exception_response(e)
|
84
115
|
except KeyboardInterrupt:
|
85
116
|
pass
|
pyegeria/__init__.py
CHANGED
@@ -99,8 +99,10 @@ TEMPLATE_GUIDS[
|
|
99
99
|
INTEGRATION_GUIDS["JDBC"] = "70dcd0b7-9f06-48ad-ad44-ae4d7a7762aa"
|
100
100
|
TEMPLATE_GUIDS["Program File"] = "32d27e9c-1fdf-455a-ad2a-42b4d7d99108"
|
101
101
|
TEMPLATE_GUIDS["FileFolder"] = "fbdd8efd-1b69-474c-bb6d-0a304b394146"
|
102
|
-
INTEGRATION_GUIDS["
|
102
|
+
INTEGRATION_GUIDS["ContentPacksMonitor"] = "6bb2181e-7724-4515-ba3c-877cded55980"
|
103
|
+
INTEGRATION_GUIDS["GeneralFilesMonitor"] = "1b98cdac-dd0a-4621-93db-99ef5a1098bc"
|
103
104
|
INTEGRATION_GUIDS["SampleDataFilesMonitor"] = "cd6479e1-2fe7-4426-b358-8a0cf70be117"
|
105
|
+
INTEGRATION_GUIDS["OpenLineageFilePublisher"] = "6271b678-7d22-4cdf-87b1-45b366beaf4e"
|
104
106
|
TEMPLATE_GUIDS["PostgreSQL Server"] = "542134e6-b9ce-4dce-8aef-22e8daf34fdb"
|
105
107
|
INTEGRATION_GUIDS["PostgreSQLServer"] = "36f69fd0-54ba-4f59-8a44-11ccf2687a34"
|
106
108
|
TEMPLATE_GUIDS["Audio Data File"] = "39b4b670-7f15-4744-a5ba-62e8edafbcee"
|
@@ -117,6 +119,7 @@ TEMPLATE_GUIDS["Vector Data File"] = "db1bec7f-55a9-40d3-91c0-a57b76d422e2"
|
|
117
119
|
TEMPLATE_GUIDS["Apache Kafka Server"] = "5e1ff810-5418-43f7-b7c4-e6e062f9aff7"
|
118
120
|
INTEGRATION_GUIDS["KafkaTopic"] = "fa1f711c-0b34-4b57-8e6e-16162b132b0c"
|
119
121
|
TEMPLATE_GUIDS["Executable File"] = "3d99a163-7a13-4576-a212-784010a8302a"
|
122
|
+
INTEGRATION_GUIDS["OpenLineageAPIPublisher"] = "2156bc98-973a-4859-908d-4ccc96f53cc5"
|
120
123
|
TEMPLATE_GUIDS["Unity Catalog Table"] = "6cc1e5f5-4c1e-4290-a80e-e06643ffb13d"
|
121
124
|
TEMPLATE_GUIDS["JSON Data File"] = "c4836635-7e9e-446a-83b5-15e206b1aff3"
|
122
125
|
TEMPLATE_GUIDS["File System"] = "522f228c-097c-4f90-9efc-26c1f2696f87"
|
@@ -139,17 +142,34 @@ TEMPLATE_GUIDS["Script File"] = "dbd5e6bb-1ff8-46f4-a007-fb0485f68c92"
|
|
139
142
|
TEMPLATE_GUIDS["Apache Atlas Server"] = "fe6dce45-a978-4417-ab55-17f05b8bcea7"
|
140
143
|
TEMPLATE_GUIDS["Raster Data File"] = "47211156-f03f-4881-8526-015e695a3dac"
|
141
144
|
TEMPLATE_GUIDS["Data Folder"] = "372a0379-7060-4c9d-8d84-bc709b31794c"
|
145
|
+
INTEGRATION_GUIDS[
|
146
|
+
"MaintainDataFolderLastUpdateDate"
|
147
|
+
] = "fd26f07c-ae44-4bc5-b457-37b43112224f"
|
148
|
+
INTEGRATION_GUIDS["OpenLineageFilePublisher"] = "6271b678-7d22-4cdf-87b1-45b366beaf4e"
|
142
149
|
TEMPLATE_GUIDS["OMAG Server Platform"] = "9b06c4dc-ddc8-47ae-b56b-28775d3a96f0"
|
143
150
|
INTEGRATION_GUIDS["OpenAPI"] = "b89d9a5a-2ea6-49bc-a4fc-e7df9f3ca93e"
|
151
|
+
INTEGRATION_GUIDS["OMAGServerPlatform"] = "dee84e6e-7a96-4975-86c1-152fb3ab759b"
|
144
152
|
INTEGRATION_GUIDS["PostgreSQLServerCataloguer"] = "36f69fd0-54ba-4f59-8a44-11ccf2687a34"
|
145
153
|
INTEGRATION_GUIDS[
|
146
154
|
"UnityCatalogInsideCatalogSynchronizer"
|
147
155
|
] = "74dde22f-2249-4ea3-af2b-b39e73f79b81"
|
156
|
+
INTEGRATION_GUIDS["OpenLineageAPIPublisher"] = "2156bc98-973a-4859-908d-4ccc96f53cc5"
|
148
157
|
INTEGRATION_GUIDS["JDBCDatabaseCataloguer"] = "70dcd0b7-9f06-48ad-ad44-ae4d7a7762aa"
|
158
|
+
INTEGRATION_GUIDS["FilesCataloguer"] = "1b98cdac-dd0a-4621-93db-99ef5a1098bc"
|
149
159
|
INTEGRATION_GUIDS["SampleDataCataloguer"] = "cd6479e1-2fe7-4426-b358-8a0cf70be117"
|
160
|
+
INTEGRATION_GUIDS[
|
161
|
+
"OpenLineageGovernanceActionPublisher"
|
162
|
+
] = "206f8faf-04da-4b6f-8280-eeee3943afeb"
|
150
163
|
INTEGRATION_GUIDS["OpenAPICataloguer"] = "b89d9a5a-2ea6-49bc-a4fc-e7df9f3ca93e"
|
164
|
+
INTEGRATION_GUIDS[
|
165
|
+
"OMAGServerPlatformCataloguer"
|
166
|
+
] = "dee84e6e-7a96-4975-86c1-152fb3ab759b"
|
151
167
|
INTEGRATION_GUIDS["ApacheKafkaCataloguer"] = "fa1f711c-0b34-4b57-8e6e-16162b132b0c"
|
152
168
|
INTEGRATION_GUIDS[
|
153
169
|
"UnityCatalogServerSynchronizer"
|
154
170
|
] = "06d068d9-9e08-4e67-8c59-073bbf1013af"
|
155
|
-
INTEGRATION_GUIDS["
|
171
|
+
INTEGRATION_GUIDS["MaintainLastUpdateDate"] = "fd26f07c-ae44-4bc5-b457-37b43112224f"
|
172
|
+
INTEGRATION_GUIDS["OpenLineageKafkaListener"] = "980b989c-de78-4e6a-a58d-51049d7381bf"
|
173
|
+
INTEGRATION_GUIDS["OpenLineageFilePublisher"] = "6271b678-7d22-4cdf-87b1-45b366beaf4e"
|
174
|
+
INTEGRATION_GUIDS["ContentPacksCataloguer"] = "6bb2181e-7724-4515-ba3c-877cded55980"
|
175
|
+
INTEGRATION_GUIDS["OpenLineageCataloguer"] = "3347ac71-8dd2-403a-bc16-75a71be64bd7"
|