pyegeria 1.5.1.1.38__py3-none-any.whl → 1.5.1.1.39__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.
- pyegeria/commands/cli/egeria.py +10 -1
- pyegeria/commands/cli/egeria_ops.py +10 -1
- pyegeria/commands/ops/monitor_engine_activity.py +45 -11
- pyegeria/commands/ops/monitor_engine_activity_c.py +17 -3
- {pyegeria-1.5.1.1.38.dist-info → pyegeria-1.5.1.1.39.dist-info}/METADATA +1 -1
- {pyegeria-1.5.1.1.38.dist-info → pyegeria-1.5.1.1.39.dist-info}/RECORD +9 -10
- pyegeria/commands/.DS_Store +0 -0
- {pyegeria-1.5.1.1.38.dist-info → pyegeria-1.5.1.1.39.dist-info}/LICENSE +0 -0
- {pyegeria-1.5.1.1.38.dist-info → pyegeria-1.5.1.1.39.dist-info}/WHEEL +0 -0
- {pyegeria-1.5.1.1.38.dist-info → pyegeria-1.5.1.1.39.dist-info}/entry_points.txt +0 -0
pyegeria/commands/cli/egeria.py
CHANGED
@@ -1184,6 +1184,13 @@ def gov_eng_status(ctx, engine_list, engine_host, list):
|
|
1184
1184
|
|
1185
1185
|
|
1186
1186
|
@engine_host.command("activity")
|
1187
|
+
@click.option(
|
1188
|
+
"--rowlimit",
|
1189
|
+
default=0,
|
1190
|
+
type=int,
|
1191
|
+
show_default=True,
|
1192
|
+
help="If non-zero, limit the number of rows returned",
|
1193
|
+
)
|
1187
1194
|
@click.option(
|
1188
1195
|
"--list", is_flag=True, default=False, help="If True, a paged list will be shown"
|
1189
1196
|
)
|
@@ -1195,11 +1202,12 @@ def gov_eng_status(ctx, engine_list, engine_host, list):
|
|
1195
1202
|
help="Compressed combines some attributes into a single column",
|
1196
1203
|
)
|
1197
1204
|
@click.pass_context
|
1198
|
-
def eng_activity_status(ctx, list, compressed):
|
1205
|
+
def eng_activity_status(ctx, rowlimit: int, list: bool, compressed: bool):
|
1199
1206
|
"""Show Governance Activity in engine-host"""
|
1200
1207
|
c = ctx.obj
|
1201
1208
|
if compressed:
|
1202
1209
|
display_engine_activity_c(
|
1210
|
+
rowlimit,
|
1203
1211
|
c.view_server,
|
1204
1212
|
c.view_server_url,
|
1205
1213
|
c.admin_user,
|
@@ -1210,6 +1218,7 @@ def eng_activity_status(ctx, list, compressed):
|
|
1210
1218
|
)
|
1211
1219
|
else:
|
1212
1220
|
display_engine_activity(
|
1221
|
+
rowlimit,
|
1213
1222
|
c.view_server,
|
1214
1223
|
c.view_server_url,
|
1215
1224
|
c.admin_user,
|
@@ -302,6 +302,13 @@ def gov_eng_status(ctx, engine_list, engine_host, list):
|
|
302
302
|
|
303
303
|
|
304
304
|
@engine_host.command("activity")
|
305
|
+
@click.option(
|
306
|
+
"--rowlimit",
|
307
|
+
default=0,
|
308
|
+
type=int,
|
309
|
+
show_default=True,
|
310
|
+
help="If non-zero, limit the number of rows returned",
|
311
|
+
)
|
305
312
|
@click.option(
|
306
313
|
"--compressed",
|
307
314
|
is_flag=True,
|
@@ -317,11 +324,12 @@ def gov_eng_status(ctx, engine_list, engine_host, list):
|
|
317
324
|
help="If True, a paged list will be shown",
|
318
325
|
)
|
319
326
|
@click.pass_context
|
320
|
-
def eng_activity_status(ctx, list, compressed):
|
327
|
+
def eng_activity_status(ctx, rowlimit: int, list: bool, compressed: bool):
|
321
328
|
"""Show Governance Activity in engine-host"""
|
322
329
|
c = ctx.obj
|
323
330
|
if compressed:
|
324
331
|
display_engine_activity_c(
|
332
|
+
rowlimit,
|
325
333
|
c.view_server,
|
326
334
|
c.view_server_url,
|
327
335
|
c.admin_user,
|
@@ -332,6 +340,7 @@ def eng_activity_status(ctx, list, compressed):
|
|
332
340
|
)
|
333
341
|
else:
|
334
342
|
display_engine_activity(
|
343
|
+
rowlimit,
|
335
344
|
c.view_server,
|
336
345
|
c.view_server_url,
|
337
346
|
c.admin_user,
|
@@ -51,20 +51,42 @@ disable_ssl_warnings = True
|
|
51
51
|
|
52
52
|
|
53
53
|
def display_engine_activity(
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
54
|
+
row_limit: int = 0,
|
55
|
+
view_server: str = EGERIA_VIEW_SERVER,
|
56
|
+
view_url: str = EGERIA_VIEW_SERVER_URL,
|
57
|
+
user: str = EGERIA_USER,
|
58
|
+
user_pass: str = EGERIA_USER_PASSWORD,
|
59
|
+
paging: bool = True,
|
59
60
|
jupyter: bool = EGERIA_JUPYTER,
|
60
|
-
width=EGERIA_WIDTH,
|
61
|
+
width: int = EGERIA_WIDTH,
|
61
62
|
):
|
62
|
-
|
63
|
+
"""Display governance engine activity as a table.
|
64
|
+
|
65
|
+
Parameters
|
66
|
+
----------
|
67
|
+
row_limit : int, opt, default = 0
|
68
|
+
If non-zero, limit the number of rows returned
|
69
|
+
view_server : str
|
70
|
+
The Egeria view server name.
|
71
|
+
view_url : str
|
72
|
+
The URL for the Egeria view server.
|
73
|
+
user : str
|
74
|
+
The user name for authenticating with the Egeria server.
|
75
|
+
user_pass : str
|
76
|
+
The user password for authenticating with the Egeria server.
|
77
|
+
paging : bool, default is True
|
78
|
+
Whether to enable paging mode when displaying the table.
|
79
|
+
jupyter : bool
|
80
|
+
Indicates if the environment is a Jupyter notebook.
|
81
|
+
width : int
|
82
|
+
The width of the console for table printing.
|
83
|
+
"""
|
84
|
+
g_client = AutomatedCuration(view_server, view_url, user, user_pwd=user_pass)
|
63
85
|
|
64
86
|
def generate_table() -> Table:
|
65
87
|
"""Make a new table."""
|
66
88
|
table = Table(
|
67
|
-
title=f"Engine Action Status for Platform {
|
89
|
+
title=f"Engine Action Status for Platform {view_url} @ {time.asctime()}",
|
68
90
|
style="bold white on black",
|
69
91
|
row_styles=["bold white on black"],
|
70
92
|
header_style="white on dark_blue",
|
@@ -72,7 +94,7 @@ def display_engine_activity(
|
|
72
94
|
caption_style="white on black",
|
73
95
|
show_lines=True,
|
74
96
|
box=box.ROUNDED,
|
75
|
-
caption=f"Engine Status for Server '{
|
97
|
+
caption=f"Engine Status for Server '{view_server}' @ Platform - {view_url}",
|
76
98
|
expand=True,
|
77
99
|
)
|
78
100
|
table.add_column("Requested Time")
|
@@ -105,7 +127,11 @@ def display_engine_activity(
|
|
105
127
|
key=lambda i: i.get("requestedTime", time.asctime()),
|
106
128
|
reverse=True,
|
107
129
|
)
|
130
|
+
row_count = 0
|
108
131
|
for action in sorted_action_status:
|
132
|
+
if row_limit > 0 and row_count >= row_limit:
|
133
|
+
break
|
134
|
+
row_count += 1
|
109
135
|
requested_time = action.get("requestedTime", " ")
|
110
136
|
start_time = action.get("startTime", " ")
|
111
137
|
completion_time = action.get("completionTime", " ")
|
@@ -193,6 +219,9 @@ def display_engine_activity(
|
|
193
219
|
|
194
220
|
def main_live():
|
195
221
|
parser = argparse.ArgumentParser()
|
222
|
+
parser.add_argument(
|
223
|
+
"--rowlimit", default=0, help="Number of rows to return; 0 for all"
|
224
|
+
)
|
196
225
|
parser.add_argument("--server", help="Name of the server to display status for")
|
197
226
|
parser.add_argument("--url", help="URL Platform to connect to")
|
198
227
|
parser.add_argument("--userid", help="User Id")
|
@@ -204,14 +233,18 @@ def main_live():
|
|
204
233
|
url = args.url if args.url is not None else EGERIA_VIEW_SERVER_URL
|
205
234
|
userid = args.userid if args.userid is not None else EGERIA_USER
|
206
235
|
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
236
|
+
rowlimit = int(args.rowlimit) if args.rowlimit is not None else 0
|
207
237
|
|
208
238
|
display_engine_activity(
|
209
|
-
server
|
239
|
+
rowlimit, server, url, user=userid, user_pass=user_pass, paging=False
|
210
240
|
)
|
211
241
|
|
212
242
|
|
213
243
|
def main_paging():
|
214
244
|
parser = argparse.ArgumentParser()
|
245
|
+
parser.add_argument(
|
246
|
+
"--rowlimit", default=0, help="Number of rows to return; 0 for all"
|
247
|
+
)
|
215
248
|
parser.add_argument("--server", help="Name of the server to display status for")
|
216
249
|
parser.add_argument("--url", help="URL Platform to connect to")
|
217
250
|
parser.add_argument("--userid", help="User Id")
|
@@ -223,9 +256,10 @@ def main_paging():
|
|
223
256
|
url = args.url if args.url is not None else EGERIA_VIEW_SERVER_URL
|
224
257
|
userid = args.userid if args.userid is not None else EGERIA_USER
|
225
258
|
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
259
|
+
rowlimit = int(args.rowlimit) if args.rowlimit is not None else 0
|
226
260
|
|
227
261
|
display_engine_activity(
|
228
|
-
server
|
262
|
+
rowlimit, server, url, user=userid, user_pass=user_pass, paging=True
|
229
263
|
)
|
230
264
|
|
231
265
|
|
@@ -54,6 +54,7 @@ disable_ssl_warnings = True
|
|
54
54
|
|
55
55
|
|
56
56
|
def display_engine_activity_c(
|
57
|
+
row_limit: int = 0,
|
57
58
|
view_server: str = EGERIA_VIEW_SERVER,
|
58
59
|
view_url: str = EGERIA_VIEW_SERVER_URL,
|
59
60
|
user: str = EGERIA_USER,
|
@@ -66,6 +67,8 @@ def display_engine_activity_c(
|
|
66
67
|
|
67
68
|
Parameters
|
68
69
|
----------
|
70
|
+
row_limit : int, opt, default = 0
|
71
|
+
If non-zero, limit the number of rows returned
|
69
72
|
view_server : str
|
70
73
|
The Egeria view server name.
|
71
74
|
view_url : str
|
@@ -125,7 +128,11 @@ def display_engine_activity_c(
|
|
125
128
|
key=lambda i: i.get("requestedTime", time.asctime()),
|
126
129
|
reverse=True,
|
127
130
|
)
|
131
|
+
row_count = 0
|
128
132
|
for action in sorted_action_status:
|
133
|
+
if row_limit > 0 and row_count >= row_limit:
|
134
|
+
break
|
135
|
+
row_count += 1
|
129
136
|
requested_time = action.get("requestedTime", " ")[:-10]
|
130
137
|
start_time = action.get("startTime", " ")[:-10]
|
131
138
|
completion_time = action.get("completionTime", " ")[:-10]
|
@@ -229,6 +236,9 @@ def display_engine_activity_c(
|
|
229
236
|
|
230
237
|
def main_live():
|
231
238
|
parser = argparse.ArgumentParser()
|
239
|
+
parser.add_argument(
|
240
|
+
"--rowlimit", default=0, help="Number of rows to return; 0 for all"
|
241
|
+
)
|
232
242
|
parser.add_argument("--server", help="Name of the server to display status for")
|
233
243
|
parser.add_argument("--url", help="URL Platform to connect to")
|
234
244
|
parser.add_argument("--userid", help="User Id")
|
@@ -240,14 +250,17 @@ def main_live():
|
|
240
250
|
url = args.url if args.url is not None else EGERIA_VIEW_SERVER_URL
|
241
251
|
userid = args.userid if args.userid is not None else EGERIA_USER
|
242
252
|
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
243
|
-
|
253
|
+
rowlimit = int(args.rowlimit) if args.rowlimit is not None else 0
|
244
254
|
display_engine_activity_c(
|
245
|
-
server
|
255
|
+
rowlimit, server, url, user=userid, user_pass=user_pass, paging=False
|
246
256
|
)
|
247
257
|
|
248
258
|
|
249
259
|
def main_paging():
|
250
260
|
parser = argparse.ArgumentParser()
|
261
|
+
parser.add_argument(
|
262
|
+
"--rowlimit", default=0, help="Number of rows to return; 0 for all"
|
263
|
+
)
|
251
264
|
parser.add_argument("--server", help="Name of the server to display status for")
|
252
265
|
parser.add_argument("--url", help="URL Platform to connect to")
|
253
266
|
parser.add_argument("--userid", help="User Id")
|
@@ -259,9 +272,10 @@ def main_paging():
|
|
259
272
|
url = args.url if args.url is not None else EGERIA_VIEW_SERVER_URL
|
260
273
|
userid = args.userid if args.userid is not None else EGERIA_USER
|
261
274
|
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
275
|
+
rowlimit = int(args.rowlimit) if args.rowlimit is not None else 0
|
262
276
|
|
263
277
|
display_engine_activity_c(
|
264
|
-
server
|
278
|
+
rowlimit, server, url, user=userid, user_pass=user_pass, paging=True
|
265
279
|
)
|
266
280
|
|
267
281
|
|
@@ -9,7 +9,6 @@ pyegeria/asset_catalog_omvs.py,sha256=Bgw5pRO8wUdVlLTRQ9ySd34Rl_FFoeDnEoybBBVNNh
|
|
9
9
|
pyegeria/automated_curation_omvs.py,sha256=BwNuF7XQJAV-POvzaWwFh0TS5yRnHZZPhlayvtIMlwY,130243
|
10
10
|
pyegeria/classification_manager_omvs.py,sha256=3yInuRy7Cf43oSFZ8BuzcIgtGSm5BfvlKYqtWKRMlPU,186678
|
11
11
|
pyegeria/collection_manager_omvs.py,sha256=kye2kjthNnmwxMZhHQKV0xoHbxcNPWjNzRAYOItj_gY,99201
|
12
|
-
pyegeria/commands/.DS_Store,sha256=nBgW7MKJ6b4wSWyEEeGYHWwC8QJAiteQaWKM9PoNRzY,6148
|
13
12
|
pyegeria/commands/README.md,sha256=zNfWZppDxoKqTJeRtcewzku9z1m6_hKacCyQUQw1iq4,1974
|
14
13
|
pyegeria/commands/__init__.py,sha256=dVtdNVBwR_n04rMwDPFmND4fZyuywAoucYeT7hJtIq4,782
|
15
14
|
pyegeria/commands/cat/README.md,sha256=-aaAnIT2fcfU63vajgB-RzQk4l4yFdhkyVfSaTPiqRY,967
|
@@ -36,10 +35,10 @@ pyegeria/commands/cat/list_terms.py,sha256=R3bp2_7RtXST1rCnzxnrWOfojEgF8N75B-tca
|
|
36
35
|
pyegeria/commands/cat/list_todos.py,sha256=iPxHRyW3X5tiREio4TUOwRPvNPjU0gxm3pVnUI79ir4,6542
|
37
36
|
pyegeria/commands/cat/list_user_ids.py,sha256=7JinL7rknPbGusIb8ikXKEaV1vvbuvx_WWtbmlfS_DY,5093
|
38
37
|
pyegeria/commands/cli/__init__.py,sha256=hpTVSMP2gnPRhcAZPdeUEsQ-eaDySlXlk239dNWYmng,292
|
39
|
-
pyegeria/commands/cli/egeria.py,sha256=
|
38
|
+
pyegeria/commands/cli/egeria.py,sha256=aZ6AM7gdfA8wp4z17URh-QF8sre9GZOPmuh1tNbT67g,33553
|
40
39
|
pyegeria/commands/cli/egeria_cat.py,sha256=xtn6q4iCKPSE4QxgyPHuprgGHJDzvbY00EIQexldz2I,16336
|
41
40
|
pyegeria/commands/cli/egeria_my.py,sha256=Memyxzhrn_i3nMNRor-5N40_SKJJMzylA4iQgBW3T4g,6235
|
42
|
-
pyegeria/commands/cli/egeria_ops.py,sha256=
|
41
|
+
pyegeria/commands/cli/egeria_ops.py,sha256=p15SOjimPAY8hv_NmsU4Ff2iPEP32p_hVMBwxlnLM_I,12214
|
43
42
|
pyegeria/commands/cli/egeria_tech.py,sha256=o6g_xwP8S-ehwgpkl-0BD_-FyGfyr90bEiKWNvHj9xk,13303
|
44
43
|
pyegeria/commands/cli/ops_config.py,sha256=m4AfPjf-fR4EBTx8Dc2mcgrfWwAxb30YGeV-v79bg4U,1450
|
45
44
|
pyegeria/commands/my/README.md,sha256=ZheFhj_VoPMhcWjW3pGchHB0vH_A9PklSmrSkzKdrcQ,844
|
@@ -55,8 +54,8 @@ pyegeria/commands/ops/gov_server_actions.py,sha256=zdawX-yfPFakc3Xf5V6j7e-csMbRL
|
|
55
54
|
pyegeria/commands/ops/list_catalog_targets.py,sha256=0FIZqZu7DSh7tnrme6EOhNiVvK8wyvN1iTZKEDuwTmw,6620
|
56
55
|
pyegeria/commands/ops/load_archive.py,sha256=ZsJmQ-2cywsiO5RYHQXFF72wrlBK18jvAkyQ8N-nSp4,2744
|
57
56
|
pyegeria/commands/ops/monitor_asset_events.py,sha256=cjdlVqE0XYnoRW3aorNbsVkjByDXefPBnllaZLelGls,3838
|
58
|
-
pyegeria/commands/ops/monitor_engine_activity.py,sha256=
|
59
|
-
pyegeria/commands/ops/monitor_engine_activity_c.py,sha256=
|
57
|
+
pyegeria/commands/ops/monitor_engine_activity.py,sha256=8RX-3znYx-4oWsI8nGFwODkWZ5Fc4qPttam_twymcjs,9856
|
58
|
+
pyegeria/commands/ops/monitor_engine_activity_c.py,sha256=eW23z4KJyZFj0OCURlFodZ8qhJwepnZQU_dB6Xggk3I,10747
|
60
59
|
pyegeria/commands/ops/monitor_gov_eng_status.py,sha256=nR0xI_8L8W6gOJm8-jp8BaAeOLf1Gd5ikYP43AbJMxo,9094
|
61
60
|
pyegeria/commands/ops/monitor_integ_daemon_status.py,sha256=NQVHJuZfRfSaO7WjZnziI6ckHLCl06ykliJCV_sICOI,11368
|
62
61
|
pyegeria/commands/ops/monitor_platform_status.py,sha256=E4Qf6m1dv8EqUV1-LAxWAlOrZRqNSXJgJ0i_cczW1aI,6578
|
@@ -109,8 +108,8 @@ pyegeria/template_manager_omvs.py,sha256=heqbKeum5hPCHap4r1RUZU8YB3QaQlxVNbq4GZi
|
|
109
108
|
pyegeria/utils.py,sha256=1h6bwveadd6GpbnGLTmqPBmBk68QvxdjGTI9RfbrgKY,5415
|
110
109
|
pyegeria/valid_metadata_omvs.py,sha256=tfCGXed5LLt59YA8uZNNtd9UJ-lRZfPU_uZxK31Yux0,65069
|
111
110
|
pyegeria/x_action_author_omvs.py,sha256=xu1IQ0YbhIKi17C5a7Aq9u1Az2czwahNPpX9czmyVxE,6454
|
112
|
-
pyegeria-1.5.1.1.
|
113
|
-
pyegeria-1.5.1.1.
|
114
|
-
pyegeria-1.5.1.1.
|
115
|
-
pyegeria-1.5.1.1.
|
116
|
-
pyegeria-1.5.1.1.
|
111
|
+
pyegeria-1.5.1.1.39.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
112
|
+
pyegeria-1.5.1.1.39.dist-info/METADATA,sha256=bayhyUrsNZqejWpbv_gSd33YIr0C9rcp2RTtecyrk3E,2998
|
113
|
+
pyegeria-1.5.1.1.39.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
114
|
+
pyegeria-1.5.1.1.39.dist-info/entry_points.txt,sha256=2aD67PkxIfXQqrZfgEwEYdfohKG9zmE5LmuDGURaIDw,5051
|
115
|
+
pyegeria-1.5.1.1.39.dist-info/RECORD,,
|
pyegeria/commands/.DS_Store
DELETED
Binary file
|
File without changes
|
File without changes
|
File without changes
|