pyegeria 5.2.0.20__py3-none-any.whl → 5.2.0.42.3__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/README.md +2 -1
- pyegeria/commands/cat/__init__.py +1 -5
- pyegeria/commands/cat/get_tech_type_elements.py +1 -1
- pyegeria/commands/cat/glossary_actions.py +8 -2
- pyegeria/commands/cat/list_deployed_catalogs.py +4 -2
- pyegeria/commands/cat/list_deployed_databases.py +2 -3
- pyegeria/commands/cat/list_tech_type_elements.py +190 -0
- pyegeria/commands/cat/list_tech_types.py +36 -24
- pyegeria/commands/cat/list_terms.py +4 -2
- pyegeria/commands/cli/egeria.py +71 -63
- pyegeria/commands/cli/egeria_cat.py +44 -44
- pyegeria/commands/cli/egeria_my.py +24 -28
- pyegeria/commands/cli/egeria_ops.py +37 -39
- pyegeria/commands/cli/egeria_tech.py +49 -35
- pyegeria/commands/cli/ops_config.py +3 -1
- pyegeria/commands/doc/{command-overview.md → README.md} +50 -5
- pyegeria/commands/doc/Visual Command Reference/README.md +511 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs 2024-12-17 at 15.43.27@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-12-17 at 15.48.38@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-12-17 at 15.52.16@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed_databases 2024-12-16 at 16.40.31@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_dependencies 2024-12-14 at 16.24.39@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_structure 2024-12-14 at 16.21.35@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/projects 2024-12-14 at 16.18.10@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/hey_egeria tui 2024-12-16 at 16.58.22@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_profile 2024-12-14 at 16.29.27@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_roles 2024-12-14 at 16.32.10@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_todos 2024-12-15 at 16.24.13@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/open_todos 2024-12-14 at 16.36.12@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/list_engine_activity compressed 2024-12-15 at 16.48.48@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity 2024-12-15 at 16.32.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity compressed 2024-12-15 at 16.38.29@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_status 2024-12-15 at 16.51.26.jpeg +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_daemon_status 2024-12-15 at 16.57.12@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_targets 2024-12-15 at 17.02.19@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/platforms/monitor_platform_status 2024-12-15 at 19.53.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status 2024-12-15 at 19.59.39@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status full 2024-12-15 at 20.01.57@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_startup_servers 2024-12-15 at 19.56.07@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_anchored_elements 2024-12-15 at 21.25.41@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_elements_of_om_type 2024-12-16 at 14.39.59@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/info_for_guid 2024-12-16 at 11.35.29@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type 2024-12-16 at 14.24.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type extended 2024-12-16 at 14.28.46@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_of_om_type_by_classification 2024-12-16 at 14.35.26@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/related_elements 2024-12-16 at 14.55.01@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/show_related_specifications 2024-12-16 at 15.04.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/asset_types 2024-12-16 at 15.10.16@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/detailed_governance_action_processes 2024-12-16 at 15.16.26@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/governance_action_processes 2024-12-16 at 15.13.01@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/registered_services 2024-12-16 at 16.44.54@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-16 at 16.20.34@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-19 at 10.51.54@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/valid_metadata_values 2024-12-16 at 15.31.56@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_tech_type_template_specs 2024-12-16 at 16.03.22@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_technology_types 2024-12-16 at 15.39.20@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_details 2024-12-16 at 15.37.21@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_templates 2024-12-16 at 16.11.48@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/{hey_egeria: overview.md → README.md } +1 -1
- pyegeria/commands/my/monitor_my_todos.py +17 -5
- pyegeria/commands/my/monitor_open_todos.py +1 -1
- pyegeria/commands/ops/monitor_asset_events.py +27 -22
- pyegeria/commands/ops/monitor_engine_activity_c.py +1 -1
- pyegeria/commands/ops/monitor_gov_eng_status.py +31 -4
- pyegeria/commands/ops/monitor_integ_daemon_status.py +16 -13
- pyegeria/commands/ops/monitor_platform_status.py +1 -1
- pyegeria/commands/ops/orig_monitor_server_status.py +36 -21
- pyegeria/commands/ops/refresh_integration_daemon.py +1 -1
- pyegeria/commands/ops/restart_integration_daemon.py +1 -1
- pyegeria/commands/tech/get_tech_details.py +79 -42
- pyegeria/commands/tech/get_tech_type_template.py +69 -53
- pyegeria/commands/tech/list_anchored_elements.py +18 -15
- pyegeria/commands/tech/list_elements_x.py +7 -4
- pyegeria/commands/tech/list_registered_services.py +1 -1
- pyegeria/commands/tech/list_relationship_types.py +19 -21
- pyegeria/commands/tech/list_relationships.py +7 -3
- pyegeria/create_tech_guid_lists.py +2 -2
- pyegeria/glossary_manager_omvs.py +64 -1
- pyegeria/metadata_explorer_omvs.py +94 -45
- pyegeria/server_operations.py +4 -4
- {pyegeria-5.2.0.20.dist-info → pyegeria-5.2.0.42.3.dist-info}/METADATA +1 -1
- {pyegeria-5.2.0.20.dist-info → pyegeria-5.2.0.42.3.dist-info}/RECORD +87 -45
- {pyegeria-5.2.0.20.dist-info → pyegeria-5.2.0.42.3.dist-info}/entry_points.txt +1 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/get-Collection 2024-12-12 at 09.29.25.png +0 -0
- /pyegeria/commands/doc/Visual Command Reference/cat/show/assets/{Asset-graph 2024-11-20 at 15.56.42.png → asset-graph 2024-11-20 at 15.56.42.png} +0 -0
- /pyegeria/commands/doc/Visual Command Reference/cat/show/assets/{Assets-in-domain 2024-11-20 at 15.49.55@2x.png → assets-in-domain 2024-11-20 at 15.49.55@2x.png} +0 -0
- {pyegeria-5.2.0.20.dist-info → pyegeria-5.2.0.42.3.dist-info}/LICENSE +0 -0
- {pyegeria-5.2.0.20.dist-info → pyegeria-5.2.0.42.3.dist-info}/WHEEL +0 -0
@@ -20,21 +20,23 @@ from pyegeria import (
|
|
20
20
|
PropertyServerException,
|
21
21
|
UserNotAuthorizedException,
|
22
22
|
print_exception_response,
|
23
|
-
AutomatedCuration
|
23
|
+
AutomatedCuration,
|
24
24
|
)
|
25
25
|
|
26
26
|
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
27
|
-
EGERIA_KAFKA_ENDPOINT = os.environ.get(
|
28
|
-
EGERIA_PLATFORM_URL = os.environ.get(
|
29
|
-
EGERIA_VIEW_SERVER = os.environ.get(
|
30
|
-
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
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", "200"))
|
38
40
|
|
39
41
|
|
40
42
|
disable_ssl_warnings = True
|
@@ -42,12 +44,18 @@ console = Console(width=200)
|
|
42
44
|
|
43
45
|
guid_list = []
|
44
46
|
|
45
|
-
def template_viewer(tech_name: str, server_name:str, platform_url:str, user:str, user_pass:str,
|
46
|
-
jupyter: bool = EGERIA_JUPYTER, width: int = EGERIA_WIDTH):
|
47
47
|
|
48
|
+
def template_viewer(
|
49
|
+
tech_name: str,
|
50
|
+
server_name: str,
|
51
|
+
platform_url: str,
|
52
|
+
user: str,
|
53
|
+
user_pass: str,
|
54
|
+
jupyter: bool = EGERIA_JUPYTER,
|
55
|
+
width: int = EGERIA_WIDTH,
|
56
|
+
):
|
48
57
|
def build_classifications(classification: dict) -> Markdown:
|
49
|
-
|
50
|
-
class_md = ("\n")
|
58
|
+
class_md = "\n"
|
51
59
|
for c in classification:
|
52
60
|
c_type = c["classificationName"]
|
53
61
|
if c_type == "Anchors":
|
@@ -65,53 +73,59 @@ def template_viewer(tech_name: str, server_name:str, platform_url:str, user:str,
|
|
65
73
|
return output
|
66
74
|
|
67
75
|
try:
|
68
|
-
|
69
76
|
console = Console(width=width, force_terminal=not jupyter)
|
70
77
|
|
71
|
-
a_client = AutomatedCuration(server_name, platform_url,
|
72
|
-
user_id=user)
|
78
|
+
a_client = AutomatedCuration(server_name, platform_url, user_id=user)
|
73
79
|
|
74
80
|
token = a_client.create_egeria_bearer_token(user, user_pass)
|
75
|
-
tech_elements = a_client.get_technology_type_elements(
|
81
|
+
tech_elements = a_client.get_technology_type_elements(
|
82
|
+
tech_name, get_templates=True
|
83
|
+
)
|
76
84
|
if (len(tech_elements) >= 1) and (type(tech_elements) is list):
|
77
|
-
tree = Tree(
|
78
|
-
|
85
|
+
tree = Tree(
|
86
|
+
f"Deployed Technology Type: {tech_name}",
|
87
|
+
style="bold bright_white",
|
88
|
+
guide_style="bold bright_blue",
|
89
|
+
)
|
90
|
+
note: str = " "
|
79
91
|
for element in tech_elements:
|
80
|
-
header = element[
|
92
|
+
header = element["elementHeader"]
|
81
93
|
tech_type = header["type"]["typeName"]
|
82
|
-
tech_collection = header["origin"][
|
83
|
-
tech_created_by = header[
|
84
|
-
tech_created_at = header[
|
85
|
-
tech_guid = header[
|
86
|
-
tech_classifications = header[
|
94
|
+
tech_collection = header["origin"]["homeMetadataCollectionName"]
|
95
|
+
tech_created_by = header["versions"]["createdBy"]
|
96
|
+
tech_created_at = header["versions"]["createTime"]
|
97
|
+
tech_guid = header["guid"]
|
98
|
+
tech_classifications = header["classifications"]
|
87
99
|
class_md = build_classifications(tech_classifications)
|
88
100
|
|
89
|
-
referenceables = element[
|
90
|
-
tech_qualified_name = referenceables[
|
91
|
-
extended = referenceables[
|
92
|
-
ex_md:str = ""
|
101
|
+
referenceables = element["referenceableProperties"]
|
102
|
+
tech_qualified_name = referenceables["qualifiedName"]
|
103
|
+
extended = referenceables["extendedProperties"]
|
104
|
+
ex_md: str = ""
|
93
105
|
for key, value in extended.items():
|
94
106
|
ex_md += f"* {key}: {value}\n"
|
95
107
|
|
96
|
-
note = (
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
108
|
+
note = (
|
109
|
+
f"* Qualified Name: {tech_qualified_name}\n"
|
110
|
+
f"* GUID: {tech_guid}\n"
|
111
|
+
f"* Createdy by: {tech_created_by}\n"
|
112
|
+
f"* Created at: {tech_created_at}\n"
|
113
|
+
f"* Home Collection: {tech_collection}\n"
|
114
|
+
f"{class_md}\n"
|
115
|
+
f"{ex_md}\n"
|
116
|
+
)
|
117
|
+
|
118
|
+
interfaces = extended.get("connectorInterfaces", None)
|
106
119
|
if interfaces is not None:
|
107
|
-
interface_type_name = interfaces[
|
108
|
-
interface_array_cnt = interfaces[
|
120
|
+
interface_type_name = interfaces["typeName"]
|
121
|
+
interface_array_cnt = interfaces["arrayCount"]
|
109
122
|
note += f"* Interface Type: {interface_type_name}\n"
|
110
123
|
for i in range(0, int(interface_array_cnt)):
|
111
|
-
note += (
|
112
|
-
|
113
|
-
|
114
|
-
|
124
|
+
note += (
|
125
|
+
f"\t* Type: {interfaces['arrayValues']['propertyValueMap'][str(i)]['typeName']}"
|
126
|
+
f"\tName: {interfaces['arrayValues']['propertiesAsStrings'][str(i)]}\n"
|
127
|
+
)
|
128
|
+
note_md = Panel.fit(Markdown(note), style="bold bright_white on black")
|
115
129
|
t = tree.add(note_md)
|
116
130
|
|
117
131
|
else:
|
@@ -120,7 +134,7 @@ def template_viewer(tech_name: str, server_name:str, platform_url:str, user:str,
|
|
120
134
|
except (
|
121
135
|
InvalidParameterException,
|
122
136
|
PropertyServerException,
|
123
|
-
UserNotAuthorizedException
|
137
|
+
UserNotAuthorizedException,
|
124
138
|
) as e:
|
125
139
|
print_exception_response(e)
|
126
140
|
|
@@ -140,11 +154,13 @@ def main():
|
|
140
154
|
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
141
155
|
|
142
156
|
try:
|
143
|
-
tech_name = Prompt.ask(
|
144
|
-
|
145
|
-
|
157
|
+
tech_name = Prompt.ask(
|
158
|
+
"Enter the Asset Name to view:", default="Apache Kafka Server"
|
159
|
+
)
|
160
|
+
template_viewer(tech_name, server, url, userid, user_pass)
|
161
|
+
except KeyboardInterrupt:
|
146
162
|
pass
|
147
163
|
|
148
164
|
|
149
165
|
if __name__ == "__main__":
|
150
|
-
main()
|
166
|
+
main()
|
@@ -3,8 +3,6 @@
|
|
3
3
|
SPDX-License-Identifier: Apache-2.0
|
4
4
|
Copyright Contributors to the ODPi Egeria project.
|
5
5
|
|
6
|
-
Unit tests for the Utils helper functions using the Pytest framework.
|
7
|
-
|
8
6
|
|
9
7
|
Retrieve elements based on a search of a specified properties.
|
10
8
|
"""
|
@@ -48,7 +46,7 @@ disable_ssl_warnings = True
|
|
48
46
|
|
49
47
|
def display_anchored_elements(
|
50
48
|
search_string: str,
|
51
|
-
prop_list: [str],
|
49
|
+
prop_list: list[str],
|
52
50
|
server: str,
|
53
51
|
url: str,
|
54
52
|
username: str,
|
@@ -59,16 +57,18 @@ def display_anchored_elements(
|
|
59
57
|
):
|
60
58
|
console = Console(width=width, force_terminal=not jupyter, soft_wrap=True)
|
61
59
|
if (search_string is None) or (len(search_string) < 3):
|
62
|
-
|
63
|
-
"Invalid Search String - must be greater than four characters long"
|
60
|
+
print(
|
61
|
+
"\nError --> Invalid Search String - must be greater than four characters long"
|
64
62
|
)
|
63
|
+
sys.exit(3)
|
65
64
|
g_client = EgeriaTech(server, url, username, user_password)
|
66
65
|
token = g_client.create_egeria_bearer_token()
|
66
|
+
print(f"search string is {search_string} and prop_list is {prop_list}\n")
|
67
67
|
|
68
68
|
def generate_table(search_string: str, prop_list: [str]) -> Table:
|
69
69
|
"""Make a new table."""
|
70
70
|
table = Table(
|
71
|
-
title=f"
|
71
|
+
title=f"Elements containing the string {search_string} @ {time.asctime()}",
|
72
72
|
header_style="white on dark_blue",
|
73
73
|
style="bold white on black",
|
74
74
|
row_styles=["bold white on black"],
|
@@ -89,6 +89,7 @@ def display_anchored_elements(
|
|
89
89
|
classification = "Anchors"
|
90
90
|
open_type_name = None
|
91
91
|
property_value = search_string
|
92
|
+
|
92
93
|
property_names = prop_list
|
93
94
|
|
94
95
|
elements = g_client.find_elements_by_classification_with_property_value(
|
@@ -148,11 +149,6 @@ def display_anchored_elements(
|
|
148
149
|
return table
|
149
150
|
|
150
151
|
try:
|
151
|
-
# with Live(generate_table(), refresh_per_second=4, screen=True) as live:
|
152
|
-
# while True:
|
153
|
-
# time.sleep(2)
|
154
|
-
# live.update(generate_table())
|
155
|
-
|
156
152
|
with console.pager(styles=True):
|
157
153
|
console.print(generate_table(search_string, prop_list), soft_wrap=True)
|
158
154
|
|
@@ -164,7 +160,7 @@ def display_anchored_elements(
|
|
164
160
|
console.print_exception()
|
165
161
|
sys.exit(1)
|
166
162
|
|
167
|
-
except
|
163
|
+
except Exception as e:
|
168
164
|
console.print(
|
169
165
|
f"\n\n====> Invalid Search String - must be greater than four characters long"
|
170
166
|
)
|
@@ -191,9 +187,16 @@ def main():
|
|
191
187
|
prop_list = Prompt.ask(
|
192
188
|
"Enter the list of properties to search", default="anchorTypeName"
|
193
189
|
)
|
194
|
-
|
195
|
-
|
196
|
-
|
190
|
+
if search_string == "":
|
191
|
+
print("\nError --> Search string can't be empty")
|
192
|
+
sys.exit(1)
|
193
|
+
elif len(search_string) <= 4:
|
194
|
+
print("\nError --> Search string must be greater than four characters long")
|
195
|
+
sys.exit(2)
|
196
|
+
else:
|
197
|
+
display_anchored_elements(
|
198
|
+
search_string, [prop_list], server, url, userid, user_pass, time_out
|
199
|
+
)
|
197
200
|
except KeyboardInterrupt:
|
198
201
|
pass
|
199
202
|
|
@@ -102,13 +102,13 @@ def list_elements_x(
|
|
102
102
|
if type(tags) is list:
|
103
103
|
for tag in tags:
|
104
104
|
tags_md += (
|
105
|
-
f"* tag: {tag.get('name','
|
105
|
+
f"* tag: {tag.get('name','')}\n"
|
106
106
|
f"\t description: {tag.get('description','---')}\n"
|
107
107
|
f"\t assigned by: {tag.get('user','---')}\n"
|
108
108
|
)
|
109
109
|
|
110
110
|
else:
|
111
|
-
tags_md = "
|
111
|
+
tags_md = ""
|
112
112
|
|
113
113
|
likes = c_client.get_attached_likes(el_guid)
|
114
114
|
likes_md = "Likes:\b"
|
@@ -122,9 +122,12 @@ def list_elements_x(
|
|
122
122
|
)
|
123
123
|
|
124
124
|
else:
|
125
|
-
likes_md = "
|
125
|
+
likes_md = ""
|
126
126
|
|
127
|
-
|
127
|
+
if len(tags_md) > 0 and len(likes_md) > 0:
|
128
|
+
feedback_out = f"{tags_md}\n --- \n{likes_md}"
|
129
|
+
else:
|
130
|
+
feedback_out = ""
|
128
131
|
|
129
132
|
comments_out = " "
|
130
133
|
|
@@ -71,7 +71,7 @@ def display_registered_svcs(
|
|
71
71
|
def generate_table(svc_list) -> Table:
|
72
72
|
"""Make a new table."""
|
73
73
|
table = Table(
|
74
|
-
title=f"
|
74
|
+
title=f"Services for: {url} @ {time.asctime()}",
|
75
75
|
style="bold bright_white on black",
|
76
76
|
row_styles=["bold bright_white on black"],
|
77
77
|
header_style="white on dark_blue",
|
@@ -14,6 +14,7 @@ import time
|
|
14
14
|
from rich import box
|
15
15
|
from rich import print
|
16
16
|
from rich.console import Console
|
17
|
+
from rich.markdown import Markdown
|
17
18
|
from rich.prompt import Prompt
|
18
19
|
from rich.table import Table
|
19
20
|
|
@@ -69,16 +70,11 @@ def display_relationship_types(
|
|
69
70
|
expand=True,
|
70
71
|
)
|
71
72
|
|
72
|
-
table.add_column("Status")
|
73
73
|
table.add_column("Name")
|
74
|
-
|
75
|
-
|
74
|
+
table.add_column("Status")
|
76
75
|
table.add_column("Description")
|
77
|
-
table.add_column("Attrib Name")
|
78
|
-
table.add_column("Attrib Status")
|
79
|
-
table.add_column("Attrib Type")
|
80
|
-
table.add_column("Attrib Description")
|
81
76
|
table.add_column("Description Wiki", no_wrap=True)
|
77
|
+
table.add_column("Attributes", min_width=50)
|
82
78
|
|
83
79
|
types_list = p_client.get_valid_relationship_types(type_name)
|
84
80
|
|
@@ -99,27 +95,27 @@ def display_relationship_types(
|
|
99
95
|
description = types["description"]
|
100
96
|
description_wiki = types.get("descriptionWiki", " ")
|
101
97
|
attribute_defs = types.get("attributeDefinitions")
|
98
|
+
|
99
|
+
att_table = Table(show_lines=True)
|
100
|
+
att_table.add_column("Name")
|
101
|
+
att_table.add_column("Description")
|
102
|
+
att_table.add_column("Status")
|
103
|
+
att_table.add_column("Type")
|
104
|
+
|
102
105
|
if attribute_defs:
|
106
|
+
att_md = True
|
103
107
|
for attr in attribute_defs:
|
104
108
|
attr_name = attr["attributeName"]
|
105
109
|
attr_desc = attr["attributeDescription"]
|
106
110
|
attr_status = attr["attributeStatus"]
|
107
111
|
attr_type = attr["attributeType"]["name"]
|
108
|
-
|
109
|
-
|
110
|
-
name,
|
111
|
-
description,
|
112
|
-
attr_name,
|
113
|
-
attr_status,
|
114
|
-
attr_type,
|
115
|
-
attr_desc,
|
116
|
-
description_wiki,
|
117
|
-
)
|
112
|
+
att_table.add_row(attr_name, attr_desc, attr_status, attr_type)
|
113
|
+
|
118
114
|
else:
|
119
|
-
|
120
|
-
|
121
|
-
)
|
115
|
+
att_md = False
|
116
|
+
att_out = att_table if att_md else " "
|
122
117
|
|
118
|
+
table.add_row(name, status, description, description_wiki, att_out)
|
123
119
|
p_client.close_session()
|
124
120
|
return table
|
125
121
|
|
@@ -157,7 +153,9 @@ def main():
|
|
157
153
|
userid = args.userid if args.userid is not None else EGERIA_USER
|
158
154
|
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
159
155
|
save_output = args.save_output if args.save_output is not None else False
|
160
|
-
type_name = Prompt.ask(
|
156
|
+
type_name = Prompt.ask(
|
157
|
+
"Enter the OM Type Name to retrieve relationships for:", default="AssetOwner"
|
158
|
+
)
|
161
159
|
|
162
160
|
display_relationship_types(type_name, server, url, userid, user_pass, save_output)
|
163
161
|
|
@@ -16,6 +16,7 @@ import time
|
|
16
16
|
from rich import box
|
17
17
|
from rich.console import Console
|
18
18
|
from rich.markdown import Markdown
|
19
|
+
from rich.prompt import Prompt
|
19
20
|
from rich.table import Table
|
20
21
|
|
21
22
|
from pyegeria import (
|
@@ -23,6 +24,7 @@ from pyegeria import (
|
|
23
24
|
PropertyServerException,
|
24
25
|
UserNotAuthorizedException,
|
25
26
|
ClassificationManager,
|
27
|
+
max_paging_size,
|
26
28
|
)
|
27
29
|
|
28
30
|
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
@@ -87,7 +89,7 @@ def list_relationships(
|
|
87
89
|
table.add_column("Properties", min_width=40)
|
88
90
|
|
89
91
|
rel_list = g_client.get_relationships(
|
90
|
-
search_string, page_size=
|
92
|
+
search_string, page_size=max_paging_size, time_out=time_out
|
91
93
|
)
|
92
94
|
if type(rel_list) is str:
|
93
95
|
return table
|
@@ -164,8 +166,10 @@ def main():
|
|
164
166
|
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
165
167
|
time_out = args.time_out if args.time_out is not None else 60
|
166
168
|
try:
|
167
|
-
|
168
|
-
|
169
|
+
search_string = Prompt.ask(
|
170
|
+
"Enter an asset search string:", default="Certification"
|
171
|
+
)
|
172
|
+
|
169
173
|
list_relationships(search_string, server, url, userid, user_pass, time_out)
|
170
174
|
except KeyboardInterrupt:
|
171
175
|
pass
|
@@ -82,10 +82,10 @@ def build_global_guid_lists(
|
|
82
82
|
)
|
83
83
|
#
|
84
84
|
# Ok - now lets harvest integration connectors using get_integration_daemon_status from ServerOps
|
85
|
-
# Assume that integration daemon called
|
85
|
+
# Assume that integration daemon called integration_daemon
|
86
86
|
#
|
87
87
|
s_client = ServerOps(
|
88
|
-
"
|
88
|
+
"integration_daemon", url, user_id=user_id, user_pwd=user_pwd
|
89
89
|
)
|
90
90
|
integ_status = s_client.get_integration_daemon_status()
|
91
91
|
|
@@ -2470,7 +2470,70 @@ class GlossaryManager(GlossaryBrowser):
|
|
2470
2470
|
)
|
2471
2471
|
)
|
2472
2472
|
|
2473
|
-
|
2473
|
+
async def _async_undo_term_update(self, glossary_term_guid: str) -> None:
|
2474
|
+
"""Undo an update to a glossary term
|
2475
|
+
|
2476
|
+
Async Version.
|
2477
|
+
|
2478
|
+
Parameters
|
2479
|
+
----------
|
2480
|
+
glossary_term_guid: str
|
2481
|
+
Unique identifier for the source glossary term.
|
2482
|
+
|
2483
|
+
Returns
|
2484
|
+
-------
|
2485
|
+
None
|
2486
|
+
|
2487
|
+
Raises
|
2488
|
+
------
|
2489
|
+
InvalidParameterException
|
2490
|
+
If the client passes incorrect parameters on the request - such as bad URLs or invalid values.
|
2491
|
+
PropertyServerException
|
2492
|
+
Raised by the server when an issue arises in processing a valid request.
|
2493
|
+
NotAuthorizedException
|
2494
|
+
The principle specified by the user_id does not have authorization for the requested action.
|
2495
|
+
Notes
|
2496
|
+
-----
|
2497
|
+
This creates a new version with the state of the term before the last update.
|
2498
|
+
|
2499
|
+
"""
|
2500
|
+
|
2501
|
+
validate_guid(glossary_term_guid)
|
2502
|
+
|
2503
|
+
url = (
|
2504
|
+
f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/glossary-manager/glossaries/terms/"
|
2505
|
+
f"{glossary_term_guid}/undo"
|
2506
|
+
)
|
2507
|
+
|
2508
|
+
await self._async_make_request("POST", url)
|
2509
|
+
|
2510
|
+
def undo_term_update(self, glossary_term_guid: str) -> None:
|
2511
|
+
"""Undo an update to a glossary term
|
2512
|
+
|
2513
|
+
Parameters
|
2514
|
+
----------
|
2515
|
+
glossary_term_guid: str
|
2516
|
+
Unique identifier for the source glossary term.
|
2517
|
+
|
2518
|
+
Returns
|
2519
|
+
-------
|
2520
|
+
None
|
2521
|
+
|
2522
|
+
Raises
|
2523
|
+
------
|
2524
|
+
InvalidParameterException
|
2525
|
+
If the client passes incorrect parameters on the request - such as bad URLs or invalid values.
|
2526
|
+
PropertyServerException
|
2527
|
+
Raised by the server when an issue arises in processing a valid request.
|
2528
|
+
NotAuthorizedException
|
2529
|
+
The principle specified by the user_id does not have authorization for the requested action.
|
2530
|
+
Notes
|
2531
|
+
-----
|
2532
|
+
This creates a new version with the state of the term before the last update.
|
2533
|
+
|
2534
|
+
"""
|
2535
|
+
loop = asyncio.get_event_loop()
|
2536
|
+
loop.run_until_complete(self._async_undo_term_update(glossary_term_guid))
|
2474
2537
|
|
2475
2538
|
async def _async_get_terms_for_category(
|
2476
2539
|
self,
|