pyegeria 1.5.1.1.37__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/cat/glossary_actions.py +26 -2
- pyegeria/commands/cat/list_glossaries.py +4 -2
- pyegeria/commands/cat/list_servers_deployed_imp.py +9 -3
- pyegeria/commands/cat/list_terms.py +11 -8
- pyegeria/commands/cli/egeria.py +15 -2
- pyegeria/commands/cli/egeria_cat.py +5 -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/glossary_manager_omvs.py +149 -54
- {pyegeria-1.5.1.1.37.dist-info → pyegeria-1.5.1.1.39.dist-info}/METADATA +1 -1
- {pyegeria-1.5.1.1.37.dist-info → pyegeria-1.5.1.1.39.dist-info}/RECORD +15 -16
- pyegeria/commands/.DS_Store +0 -0
- {pyegeria-1.5.1.1.37.dist-info → pyegeria-1.5.1.1.39.dist-info}/LICENSE +0 -0
- {pyegeria-1.5.1.1.37.dist-info → pyegeria-1.5.1.1.39.dist-info}/WHEEL +0 -0
- {pyegeria-1.5.1.1.37.dist-info → pyegeria-1.5.1.1.39.dist-info}/entry_points.txt +0 -0
@@ -259,7 +259,7 @@ def create_term(
|
|
259
259
|
def load_terms(
|
260
260
|
glossary_name, file_name, verbose, upsert, server, url, userid, password, timeout
|
261
261
|
):
|
262
|
-
"""
|
262
|
+
"""Load terms from file into the glossary specified"""
|
263
263
|
m_client = EgeriaTech(server, url, user_id=userid, user_pwd=password)
|
264
264
|
token = m_client.create_egeria_bearer_token()
|
265
265
|
try:
|
@@ -294,7 +294,7 @@ def load_terms(
|
|
294
294
|
@click.option("--password", default=EGERIA_USER_PASSWORD, help="Egeria user password")
|
295
295
|
@click.option("--timeout", default=60, help="Number of seconds to wait")
|
296
296
|
def export_terms(glossary_guid, file_name, server, url, userid, password, timeout):
|
297
|
-
"""
|
297
|
+
"""Export the glossary specified"""
|
298
298
|
m_client = EgeriaTech(server, url, user_id=userid, user_pwd=password)
|
299
299
|
token = m_client.create_egeria_bearer_token()
|
300
300
|
try:
|
@@ -308,3 +308,27 @@ def export_terms(glossary_guid, file_name, server, url, userid, password, timeou
|
|
308
308
|
print_exception_response(e)
|
309
309
|
finally:
|
310
310
|
m_client.close_session()
|
311
|
+
|
312
|
+
|
313
|
+
@click.command("delete-term")
|
314
|
+
@click.option("--term-guid", help="Unique identity of term", required=True)
|
315
|
+
@click.option("--server", default=EGERIA_VIEW_SERVER, help="Egeria view server to use")
|
316
|
+
@click.option(
|
317
|
+
"--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
|
318
|
+
)
|
319
|
+
@click.option("--userid", default=EGERIA_USER, help="Egeria user")
|
320
|
+
@click.option("--password", default=EGERIA_USER_PASSWORD, help="Egeria user password")
|
321
|
+
@click.option("--timeout", default=60, help="Number of seconds to wait")
|
322
|
+
def delete_term(term_guid, server, url, userid, password, timeout):
|
323
|
+
"""Delete the Term specified"""
|
324
|
+
m_client = EgeriaTech(server, url, user_id=userid, user_pwd=password)
|
325
|
+
token = m_client.create_egeria_bearer_token()
|
326
|
+
try:
|
327
|
+
m_client.delete_term(term_guid)
|
328
|
+
|
329
|
+
click.echo(f"Deleted term: {term_guid}")
|
330
|
+
|
331
|
+
except (InvalidParameterException, PropertyServerException) as e:
|
332
|
+
print_exception_response(e)
|
333
|
+
finally:
|
334
|
+
m_client.close_session()
|
@@ -87,7 +87,9 @@ def display_glossaries(
|
|
87
87
|
expand=True,
|
88
88
|
)
|
89
89
|
table.add_column("Glossary Name")
|
90
|
-
table.add_column(
|
90
|
+
table.add_column(
|
91
|
+
"Qualified Name & GUID", width=38, no_wrap=True, justify="center"
|
92
|
+
)
|
91
93
|
table.add_column("Language")
|
92
94
|
table.add_column("Description")
|
93
95
|
table.add_column("Usage")
|
@@ -101,7 +103,7 @@ def display_glossaries(
|
|
101
103
|
display_name = glossary["glossaryProperties"]["displayName"]
|
102
104
|
qualified_name = glossary["glossaryProperties"]["qualifiedName"]
|
103
105
|
guid = glossary["elementHeader"]["guid"]
|
104
|
-
q_name = f"{qualified_name}\n
|
106
|
+
q_name = Text(f"{qualified_name}\n&\n{guid}", justify="center")
|
105
107
|
language = glossary["glossaryProperties"]["language"]
|
106
108
|
description = glossary["glossaryProperties"]["description"]
|
107
109
|
usage = glossary["glossaryProperties"]["usage"]
|
@@ -81,10 +81,14 @@ def display_servers_by_dep_imp(
|
|
81
81
|
table.add_column("Description")
|
82
82
|
table.add_column("Qualified Name & GUID", no_wrap=True)
|
83
83
|
|
84
|
-
|
85
|
-
if type(
|
84
|
+
unsorted_server_list = p_client.get_servers_by_dep_impl_type(filter)
|
85
|
+
if type(unsorted_server_list) is str:
|
86
86
|
print("No matching Software Servers found?")
|
87
87
|
sys.exit(1)
|
88
|
+
server_list = sorted(
|
89
|
+
unsorted_server_list,
|
90
|
+
key=lambda x: x["properties"].get("displayName", "---").lower(),
|
91
|
+
)
|
88
92
|
|
89
93
|
for server in server_list:
|
90
94
|
display_name = server["properties"].get("displayName", "---")
|
@@ -144,7 +148,9 @@ def main():
|
|
144
148
|
url = args.url if args.url is not None else EGERIA_PLATFORM_URL
|
145
149
|
userid = args.userid if args.userid is not None else EGERIA_ADMIN_USER
|
146
150
|
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
147
|
-
filter = Prompt.ask(
|
151
|
+
filter = Prompt.ask(
|
152
|
+
"Filter deployed for deployed implementation type by search string", default="*"
|
153
|
+
)
|
148
154
|
display_servers_by_dep_imp(filter, server, url, userid, user_pass)
|
149
155
|
|
150
156
|
|
@@ -88,10 +88,7 @@ def display_glossary_terms(
|
|
88
88
|
token = g_client.create_egeria_bearer_token()
|
89
89
|
if (glossary_name is not None) and (glossary_name != "*"):
|
90
90
|
glossary_guid = g_client.__get_guid__(
|
91
|
-
glossary_guid,
|
92
|
-
glossary_name,
|
93
|
-
"qualifiedName",
|
94
|
-
"Glossary",
|
91
|
+
glossary_guid, glossary_name, "qualifiedName", None, "Glossary"
|
95
92
|
)
|
96
93
|
|
97
94
|
def generate_table(search_string: str, glossary_guid: str = None) -> Table:
|
@@ -141,14 +138,20 @@ def display_glossary_terms(
|
|
141
138
|
if props == "None":
|
142
139
|
return table
|
143
140
|
|
144
|
-
display_name = Text(props["displayName"], style=style)
|
141
|
+
display_name = Text(props["displayName"], style=style, justify="center")
|
145
142
|
qualified_name = props["qualifiedName"]
|
146
143
|
term_guid = term["elementHeader"]["guid"]
|
147
|
-
q_name = Text(
|
148
|
-
|
144
|
+
q_name = Text(
|
145
|
+
f"{qualified_name}\n&\n{term_guid}", style=style, justify="center"
|
146
|
+
)
|
147
|
+
abbrev = Text(props.get("abbreviation", " "), style=style, justify="center")
|
149
148
|
summary = Text(props.get("summary", " "), style=style)
|
150
149
|
description = Text(props.get("description", " "), style=style)
|
151
|
-
version = Text(
|
150
|
+
version = Text(
|
151
|
+
props.get("publishVersionIdentifier", " "),
|
152
|
+
style=style,
|
153
|
+
justify="center",
|
154
|
+
)
|
152
155
|
|
153
156
|
classifications = term["elementHeader"]["classifications"]
|
154
157
|
glossary_guid = None
|
pyegeria/commands/cli/egeria.py
CHANGED
@@ -43,6 +43,7 @@ from pyegeria.commands.cat.glossary_actions import (
|
|
43
43
|
delete_glossary,
|
44
44
|
create_term,
|
45
45
|
load_terms,
|
46
|
+
delete_term,
|
46
47
|
export_terms,
|
47
48
|
)
|
48
49
|
from pyegeria.commands.cat.list_glossaries import display_glossaries
|
@@ -936,7 +937,9 @@ def archives(ctx):
|
|
936
937
|
|
937
938
|
@show.command("deployed-servers")
|
938
939
|
@click.option(
|
939
|
-
"--search-string",
|
940
|
+
"--search-string",
|
941
|
+
default="*",
|
942
|
+
help="Filter deployed for deployed implementation type by search string",
|
940
943
|
)
|
941
944
|
@click.pass_context
|
942
945
|
def show_deployed_servers(ctx, search_string):
|
@@ -1035,6 +1038,7 @@ tell.add_command(reassign_todo)
|
|
1035
1038
|
tell.add_command(delete_todo)
|
1036
1039
|
tell.add_command(create_todo)
|
1037
1040
|
tell.add_command(load_terms)
|
1041
|
+
tell.add_command(delete_term)
|
1038
1042
|
tell.add_command(export_terms)
|
1039
1043
|
|
1040
1044
|
|
@@ -1180,6 +1184,13 @@ def gov_eng_status(ctx, engine_list, engine_host, list):
|
|
1180
1184
|
|
1181
1185
|
|
1182
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
|
+
)
|
1183
1194
|
@click.option(
|
1184
1195
|
"--list", is_flag=True, default=False, help="If True, a paged list will be shown"
|
1185
1196
|
)
|
@@ -1191,11 +1202,12 @@ def gov_eng_status(ctx, engine_list, engine_host, list):
|
|
1191
1202
|
help="Compressed combines some attributes into a single column",
|
1192
1203
|
)
|
1193
1204
|
@click.pass_context
|
1194
|
-
def eng_activity_status(ctx, list, compressed):
|
1205
|
+
def eng_activity_status(ctx, rowlimit: int, list: bool, compressed: bool):
|
1195
1206
|
"""Show Governance Activity in engine-host"""
|
1196
1207
|
c = ctx.obj
|
1197
1208
|
if compressed:
|
1198
1209
|
display_engine_activity_c(
|
1210
|
+
rowlimit,
|
1199
1211
|
c.view_server,
|
1200
1212
|
c.view_server_url,
|
1201
1213
|
c.admin_user,
|
@@ -1206,6 +1218,7 @@ def eng_activity_status(ctx, list, compressed):
|
|
1206
1218
|
)
|
1207
1219
|
else:
|
1208
1220
|
display_engine_activity(
|
1221
|
+
rowlimit,
|
1209
1222
|
c.view_server,
|
1210
1223
|
c.view_server_url,
|
1211
1224
|
c.admin_user,
|
@@ -22,6 +22,7 @@ from pyegeria.commands.cat.glossary_actions import (
|
|
22
22
|
create_glossary,
|
23
23
|
delete_glossary,
|
24
24
|
create_term,
|
25
|
+
delete_term,
|
25
26
|
load_terms,
|
26
27
|
export_terms,
|
27
28
|
)
|
@@ -519,7 +520,9 @@ def list_archives(ctx):
|
|
519
520
|
|
520
521
|
@show.command("deployed-servers")
|
521
522
|
@click.option(
|
522
|
-
"--search-string",
|
523
|
+
"--search-string",
|
524
|
+
default="*",
|
525
|
+
help="Filter deployed for deployed implementation type by search string",
|
523
526
|
)
|
524
527
|
@click.pass_context
|
525
528
|
def show_deployed_servers(ctx, search_string):
|
@@ -615,6 +618,7 @@ tell.add_command(mark_todo_complete)
|
|
615
618
|
tell.add_command(reassign_todo)
|
616
619
|
tell.add_command(delete_todo)
|
617
620
|
tell.add_command(create_todo)
|
621
|
+
tell.add_command(delete_term)
|
618
622
|
tell.add_command(load_terms)
|
619
623
|
tell.add_command(export_terms)
|
620
624
|
|
@@ -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
|
|
@@ -2308,6 +2308,119 @@ class GlossaryManager(GlossaryBrowser):
|
|
2308
2308
|
|
2309
2309
|
return
|
2310
2310
|
|
2311
|
+
async def _async_update_term(
|
2312
|
+
self,
|
2313
|
+
glossary_term_guid: str,
|
2314
|
+
body: dict,
|
2315
|
+
is_merge_update: bool,
|
2316
|
+
) -> None:
|
2317
|
+
"""Add the data field values classification to a glossary term
|
2318
|
+
|
2319
|
+
Async Version.
|
2320
|
+
|
2321
|
+
Parameters
|
2322
|
+
----------
|
2323
|
+
glossary_term_guid: str
|
2324
|
+
Unique identifier for the source glossary term.
|
2325
|
+
body: dict
|
2326
|
+
Body containing information about the data field to add
|
2327
|
+
is_merge_update: bool
|
2328
|
+
Whether the data field values should be merged with existing definition or replace it.
|
2329
|
+
|
2330
|
+
|
2331
|
+
Returns
|
2332
|
+
-------
|
2333
|
+
None
|
2334
|
+
|
2335
|
+
Raises
|
2336
|
+
------
|
2337
|
+
InvalidParameterException
|
2338
|
+
If the client passes incorrect parameters on the request - such as bad URLs or invalid values.
|
2339
|
+
PropertyServerException
|
2340
|
+
Raised by the server when an issue arises in processing a valid request.
|
2341
|
+
NotAuthorizedException
|
2342
|
+
The principle specified by the user_id does not have authorization for the requested action.
|
2343
|
+
Notes
|
2344
|
+
-----
|
2345
|
+
An example body is:
|
2346
|
+
|
2347
|
+
{
|
2348
|
+
"class" : "ReferenceableRequestBody",
|
2349
|
+
"elementProperties" :
|
2350
|
+
{
|
2351
|
+
"class" : "GlossaryTermProperties",
|
2352
|
+
"description" : "This is the long description of the term. And this is some more text."
|
2353
|
+
},
|
2354
|
+
"updateDescription" : "Final updates based on in-house review comments."
|
2355
|
+
}
|
2356
|
+
|
2357
|
+
"""
|
2358
|
+
|
2359
|
+
validate_guid(glossary_term_guid)
|
2360
|
+
is_merge_update_s = str(is_merge_update).lower()
|
2361
|
+
|
2362
|
+
url = (
|
2363
|
+
f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/glossary-manager/terms/{glossary_term_guid}/"
|
2364
|
+
f"update?isMergeUpdate={is_merge_update_s}"
|
2365
|
+
)
|
2366
|
+
|
2367
|
+
await self._async_make_request("POST", url, body)
|
2368
|
+
return
|
2369
|
+
|
2370
|
+
def update_term(
|
2371
|
+
self,
|
2372
|
+
glossary_term_guid: str,
|
2373
|
+
body: dict,
|
2374
|
+
is_merge_update: bool,
|
2375
|
+
) -> None:
|
2376
|
+
"""Add the data field values classification to a glossary term
|
2377
|
+
|
2378
|
+
Async Version.
|
2379
|
+
|
2380
|
+
Parameters
|
2381
|
+
----------
|
2382
|
+
glossary_term_guid: str
|
2383
|
+
Unique identifier for the source glossary term.
|
2384
|
+
body: dict
|
2385
|
+
Body containing information about the data field to add
|
2386
|
+
is_merge_update: bool
|
2387
|
+
Whether the data field values should be merged with existing definition or replace it.
|
2388
|
+
|
2389
|
+
|
2390
|
+
Returns
|
2391
|
+
-------
|
2392
|
+
None
|
2393
|
+
|
2394
|
+
Raises
|
2395
|
+
------
|
2396
|
+
InvalidParameterException
|
2397
|
+
If the client passes incorrect parameters on the request - such as bad URLs or invalid values.
|
2398
|
+
PropertyServerException
|
2399
|
+
Raised by the server when an issue arises in processing a valid request.
|
2400
|
+
NotAuthorizedException
|
2401
|
+
The principle specified by the user_id does not have authorization for the requested action.
|
2402
|
+
Notes
|
2403
|
+
-----
|
2404
|
+
An example body is:
|
2405
|
+
|
2406
|
+
{
|
2407
|
+
"class" : "ReferenceableRequestBody",
|
2408
|
+
"elementProperties" :
|
2409
|
+
{
|
2410
|
+
"class" : "GlossaryTermProperties",
|
2411
|
+
"description" : "This is the long description of the term. And this is some more text."
|
2412
|
+
},
|
2413
|
+
"updateDescription" : "Final updates based on in-house review comments."
|
2414
|
+
}
|
2415
|
+
|
2416
|
+
"""
|
2417
|
+
loop = asyncio.get_event_loop()
|
2418
|
+
loop.run_until_complete(
|
2419
|
+
self._async_update_term(glossary_term_guid, body, is_merge_update)
|
2420
|
+
)
|
2421
|
+
|
2422
|
+
return
|
2423
|
+
|
2311
2424
|
async def _async_update_term_version_id(
|
2312
2425
|
self,
|
2313
2426
|
glossary_term_guid: str,
|
@@ -2512,30 +2625,26 @@ class GlossaryManager(GlossaryBrowser):
|
|
2512
2625
|
|
2513
2626
|
return response
|
2514
2627
|
|
2515
|
-
async def
|
2628
|
+
async def _async_delete_term(
|
2516
2629
|
self,
|
2517
|
-
|
2518
|
-
|
2519
|
-
|
2520
|
-
page_size: int = None,
|
2630
|
+
term_guid: str,
|
2631
|
+
for_lineage: bool = False,
|
2632
|
+
for_duplicate_processing: bool = False,
|
2521
2633
|
) -> list | str:
|
2522
|
-
"""
|
2523
|
-
|
2634
|
+
"""Delete the glossary terms associated with the specified glossary. Async version.
|
2635
|
+
|
2524
2636
|
Parameters
|
2525
2637
|
----------
|
2526
|
-
|
2527
|
-
|
2528
|
-
|
2529
|
-
|
2530
|
-
|
2531
|
-
|
2532
|
-
|
2533
|
-
page_size : int, optional defaults to None
|
2534
|
-
The number of elements to retrieve
|
2638
|
+
term_guid : str,
|
2639
|
+
The unique identifier for the term to delete.
|
2640
|
+
for_lineage: bool, opt, default = False
|
2641
|
+
Set true for lineage processing - generally false.
|
2642
|
+
for_duplicate_processing: bool, opt, default = False
|
2643
|
+
Set true if duplicate processing handled externally - generally set False.
|
2644
|
+
|
2535
2645
|
Returns
|
2536
2646
|
-------
|
2537
|
-
|
2538
|
-
The glossary definition associated with the glossary_guid
|
2647
|
+
None
|
2539
2648
|
|
2540
2649
|
Raises
|
2541
2650
|
------
|
@@ -2549,48 +2658,36 @@ class GlossaryManager(GlossaryBrowser):
|
|
2549
2658
|
-----
|
2550
2659
|
"""
|
2551
2660
|
|
2552
|
-
validate_guid(
|
2553
|
-
|
2554
|
-
if page_size is None:
|
2555
|
-
page_size = self.page_size
|
2661
|
+
validate_guid(term_guid)
|
2556
2662
|
|
2557
2663
|
url = (
|
2558
|
-
f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/glossary-
|
2559
|
-
f"{
|
2664
|
+
f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/glossary-manager/glossaries/"
|
2665
|
+
f"terms/{term_guid}/remove?forLineage={for_lineage}&forDuplicateProcessing={for_duplicate_processing}"
|
2560
2666
|
)
|
2561
2667
|
|
2562
|
-
|
2563
|
-
|
2564
|
-
response = await self._async_make_request("POST", url, body)
|
2565
|
-
else:
|
2566
|
-
response = await self._async_make_request("POST", url)
|
2567
|
-
|
2568
|
-
return response.json().get("elementList", "No terms found")
|
2668
|
+
await self._async_make_request("POST", url)
|
2669
|
+
return
|
2569
2670
|
|
2570
|
-
def
|
2671
|
+
def delete_term(
|
2571
2672
|
self,
|
2572
|
-
|
2573
|
-
|
2574
|
-
|
2575
|
-
page_size: int = None,
|
2673
|
+
term_guid: str,
|
2674
|
+
for_lineage: bool = False,
|
2675
|
+
for_duplicate_processing: bool = False,
|
2576
2676
|
) -> list | str:
|
2577
|
-
"""
|
2578
|
-
|
2677
|
+
"""Delete the glossary terms associated with the specified glossary.
|
2678
|
+
|
2579
2679
|
Parameters
|
2580
2680
|
----------
|
2581
|
-
|
2582
|
-
|
2583
|
-
|
2584
|
-
|
2585
|
-
|
2586
|
-
|
2587
|
-
|
2588
|
-
page_size : int, optional defaults to None
|
2589
|
-
The number of elements to retrieve
|
2681
|
+
term_guid : str,
|
2682
|
+
The unique identifier for the term to delete.
|
2683
|
+
for_lineage: bool, opt, default = False
|
2684
|
+
Set true for lineage processing - generally false.
|
2685
|
+
for_duplicate_processing: bool, opt, default = False
|
2686
|
+
Set true if duplicate processing handled externally - generally set False.
|
2687
|
+
|
2590
2688
|
Returns
|
2591
2689
|
-------
|
2592
|
-
|
2593
|
-
The glossary definition associated with the glossary_guid
|
2690
|
+
None
|
2594
2691
|
|
2595
2692
|
Raises
|
2596
2693
|
------
|
@@ -2604,13 +2701,11 @@ class GlossaryManager(GlossaryBrowser):
|
|
2604
2701
|
-----
|
2605
2702
|
"""
|
2606
2703
|
loop = asyncio.get_event_loop()
|
2607
|
-
|
2608
|
-
self.
|
2609
|
-
glossary_guid, effective_time, start_from, page_size
|
2610
|
-
)
|
2704
|
+
loop.run_until_complete(
|
2705
|
+
self._async_delete_term(term_guid, for_lineage, for_duplicate_processing)
|
2611
2706
|
)
|
2612
2707
|
|
2613
|
-
return
|
2708
|
+
return
|
2614
2709
|
|
2615
2710
|
async def _async_get_term_relationships(
|
2616
2711
|
self,
|
@@ -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
|
@@ -20,26 +19,26 @@ pyegeria/commands/cat/get_project_dependencies.py,sha256=B0JaMSUi0hzVgos1sTY2uUP
|
|
20
19
|
pyegeria/commands/cat/get_project_structure.py,sha256=n2GbNd07w1DTo7jTR8b2ewXRyNcat_2BcCBRyDMldwk,5969
|
21
20
|
pyegeria/commands/cat/get_tech_type_elements.py,sha256=-m3Q0BoNqkCtV8h75vMwTcOV-_ymEXmnJcr4Ec7WMAw,6180
|
22
21
|
pyegeria/commands/cat/get_tech_type_template.py,sha256=gMFVcgCIm09GQu1Vsc5ZUVH9XLhItAG1eVGZJrcnHeQ,6174
|
23
|
-
pyegeria/commands/cat/glossary_actions.py,sha256=
|
22
|
+
pyegeria/commands/cat/glossary_actions.py,sha256=BStxoGNS6hdeaws39Y-CT5mdiN7dOfMnvEnAqiOX7IA,12102
|
24
23
|
pyegeria/commands/cat/list_archives.py,sha256=FEZ2XYnQIWo2PztWqnj6unn0pbblPU0-bMbTyI3csv4,5464
|
25
24
|
pyegeria/commands/cat/list_assets.py,sha256=bNwSaBDz661hfnc2Rn4j4HPHAugKvz0XwN9L1m4FVQk,6529
|
26
25
|
pyegeria/commands/cat/list_cert_types.py,sha256=mbCls_EqC5JKG5rvS4o69k7KgZ6aNXlcqoJ3DtHsTFA,7127
|
27
26
|
pyegeria/commands/cat/list_deployed_catalogs.py,sha256=sdfhzK0Wqo59tpoX6jpjnBWl5MLdD1qzU0TcXC_QtsY,8140
|
28
27
|
pyegeria/commands/cat/list_deployed_database_schemas.py,sha256=g-O5Qk6t9mHl3yAYwHIbVWNxjy5bR4YOfvJ5YMoeMyw,9535
|
29
28
|
pyegeria/commands/cat/list_deployed_databases.py,sha256=DTpt7l2z81YsmadsHsnSgrbRGPlkBzHjg2p1TdnI-zc,7565
|
30
|
-
pyegeria/commands/cat/list_glossaries.py,sha256=
|
29
|
+
pyegeria/commands/cat/list_glossaries.py,sha256=t4p6DUd09MkIW07rCW0nc2K2ktD_YP0Qlw2z8zSayBI,5592
|
31
30
|
pyegeria/commands/cat/list_projects.py,sha256=Jzs-DtIpPhCH-gY4PYT6mnRBWnEf4m18TFfcw8UymNU,8011
|
32
31
|
pyegeria/commands/cat/list_relationships.py,sha256=U9f78cOi4HyaacqNaFSMq_7rRxVcEczvwPv468GYw3Q,5869
|
33
|
-
pyegeria/commands/cat/list_servers_deployed_imp.py,sha256=
|
32
|
+
pyegeria/commands/cat/list_servers_deployed_imp.py,sha256=gcfeDzf7QGwa5tU_WYJD4O-dZKQ7XYp_J1BXTnGy3xg,5705
|
34
33
|
pyegeria/commands/cat/list_tech_types.py,sha256=20T4v6L5qeebSsaL1nGkFMDAIsy2W3A3SMm1RcgFoh0,4609
|
35
|
-
pyegeria/commands/cat/list_terms.py,sha256=
|
34
|
+
pyegeria/commands/cat/list_terms.py,sha256=R3bp2_7RtXST1rCnzxnrWOfojEgF8N75B-tcazf0iNA,9066
|
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=
|
40
|
-
pyegeria/commands/cli/egeria_cat.py,sha256=
|
38
|
+
pyegeria/commands/cli/egeria.py,sha256=aZ6AM7gdfA8wp4z17URh-QF8sre9GZOPmuh1tNbT67g,33553
|
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
|
@@ -97,7 +96,7 @@ pyegeria/egeria_tech_client.py,sha256=7NfqpJFft5GR4NPRDVDw22L9caHbXB8fhx0TAf6qEo
|
|
97
96
|
pyegeria/feedback_manager_omvs.py,sha256=B66e3ZCaC_dirb0mcb2Nz3PYh2ZKsoMAYNOb3euNiro,152931
|
98
97
|
pyegeria/full_omag_server_config.py,sha256=LBnqUiz1ofBdlKBzECFs_pQbdJwcWigAukWHGJRR2nU,47340
|
99
98
|
pyegeria/glossary_browser_omvs.py,sha256=NcitYaZJqwVODBO5zBtWpXPNUJJ3DKzEbRaOFSAyUlg,93554
|
100
|
-
pyegeria/glossary_manager_omvs.py,sha256=
|
99
|
+
pyegeria/glossary_manager_omvs.py,sha256=Ok97uDgo2KWfrkkJ2Xjj5uh1_Z_32jCTeRE21Mo6ZMg,129493
|
101
100
|
pyegeria/mermaid_utilities.py,sha256=GXiS-subb5nJcDqlThZWX2T8WspU1neFfhf4TxRoMh4,8344
|
102
101
|
pyegeria/my_profile_omvs.py,sha256=DyECbUFEcgokrIbzdMMNljC3bqfqKGXAF2wZEpzvRYs,34666
|
103
102
|
pyegeria/platform_services.py,sha256=CJIOYIFEbcIGwdWlApAQcXxZTsdrhFtpJcm4O3p7dG0,41646
|
@@ -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
|