pyegeria 5.2.0.20__py3-none-any.whl → 5.2.0.42.2__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/exp_list_glossaries.py +1 -1
- pyegeria/commands/cat/get_asset_graph.py +1 -1
- pyegeria/commands/cat/get_collection.py +1 -1
- pyegeria/commands/cat/get_project_dependencies.py +1 -1
- pyegeria/commands/cat/get_project_structure.py +1 -1
- pyegeria/commands/cat/get_tech_type_elements.py +2 -2
- pyegeria/commands/cat/glossary_actions.py +9 -3
- pyegeria/commands/cat/list_assets.py +1 -1
- pyegeria/commands/cat/list_cert_types.py +1 -1
- pyegeria/commands/cat/list_collections.py +1 -1
- pyegeria/commands/cat/list_deployed_catalogs.py +5 -3
- pyegeria/commands/cat/list_deployed_database_schemas.py +1 -1
- pyegeria/commands/cat/list_deployed_databases.py +3 -4
- pyegeria/commands/cat/list_glossaries.py +1 -1
- pyegeria/commands/cat/list_projects.py +1 -1
- pyegeria/commands/cat/list_servers_deployed_imp.py +1 -1
- 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 +5 -3
- pyegeria/commands/cat/list_todos.py +1 -1
- pyegeria/commands/cat/list_user_ids.py +1 -1
- pyegeria/commands/cli/egeria.py +71 -63
- pyegeria/commands/cli/egeria_cat.py +44 -44
- pyegeria/commands/cli/egeria_login_tui.py +1 -1
- 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/CleanShot 2024-12-19 at 13.23.11.mov +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/CleanShot 2024-12-19 at 19.56.26.mp4 +0 -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/list_my_profile.py +1 -1
- pyegeria/commands/my/list_my_roles.py +1 -1
- pyegeria/commands/my/monitor_my_todos.py +18 -6
- pyegeria/commands/my/monitor_open_todos.py +2 -2
- pyegeria/commands/my/todo_actions.py +1 -1
- pyegeria/commands/ops/list_archives.py +1 -1
- pyegeria/commands/ops/list_catalog_targets.py +1 -1
- pyegeria/commands/ops/load_archive.py +1 -1
- pyegeria/commands/ops/monitor_asset_events.py +27 -22
- pyegeria/commands/ops/monitor_engine_activity.py +1 -1
- 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 +11 -8
- pyegeria/commands/ops/monitor_platform_status.py +2 -2
- pyegeria/commands/ops/monitor_server_startup.py +1 -1
- pyegeria/commands/ops/monitor_server_status.py +1 -1
- pyegeria/commands/ops/orig_monitor_server_list.py +1 -1
- pyegeria/commands/ops/orig_monitor_server_status.py +36 -21
- pyegeria/commands/ops/refresh_integration_daemon.py +2 -2
- pyegeria/commands/ops/restart_integration_daemon.py +2 -2
- pyegeria/commands/ops/table_integ_daemon_status.py +1 -1
- pyegeria/commands/tech/get_element_info.py +1 -1
- pyegeria/commands/tech/get_guid_info.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 +19 -16
- pyegeria/commands/tech/list_asset_types.py +1 -1
- pyegeria/commands/tech/list_elements.py +1 -1
- pyegeria/commands/tech/list_elements_for_classification.py +1 -1
- pyegeria/commands/tech/list_elements_x.py +8 -5
- pyegeria/commands/tech/list_gov_action_processes.py +1 -1
- pyegeria/commands/tech/list_registered_services.py +2 -2
- pyegeria/commands/tech/list_related_elements.py +1 -1
- pyegeria/commands/tech/list_related_specification.py +1 -1
- pyegeria/commands/tech/list_relationship_types.py +20 -22
- pyegeria/commands/tech/list_relationships.py +8 -4
- pyegeria/commands/tech/list_tech_templates.py +1 -1
- pyegeria/commands/tech/list_valid_metadata_values.py +1 -1
- pyegeria/commands/tech/table_tech_templates.py +1 -1
- pyegeria/commands/tech/x_list_related_elements.py +1 -1
- pyegeria/create_tech_guid_lists.py +2 -2
- pyegeria/glossary_manager_omvs.py +64 -1
- pyegeria/mermaid_utilities.py +1 -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.2.dist-info}/METADATA +1 -1
- pyegeria-5.2.0.42.2.dist-info/RECORD +234 -0
- {pyegeria-5.2.0.20.dist-info → pyegeria-5.2.0.42.2.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-5.2.0.20.dist-info/RECORD +0 -190
- /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.2.dist-info}/LICENSE +0 -0
- {pyegeria-5.2.0.20.dist-info → pyegeria-5.2.0.42.2.dist-info}/WHEEL +0 -0
@@ -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
|
|
@@ -32,7 +33,7 @@ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
|
32
33
|
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
33
34
|
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
34
35
|
)
|
35
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "
|
36
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration_daemon")
|
36
37
|
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
37
38
|
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
38
39
|
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
@@ -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")
|
@@ -32,7 +34,7 @@ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
|
32
34
|
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
33
35
|
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
34
36
|
)
|
35
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "
|
37
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration_daemon")
|
36
38
|
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
37
39
|
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
38
40
|
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
@@ -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
|
@@ -29,7 +29,7 @@ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
|
29
29
|
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
30
30
|
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
31
31
|
)
|
32
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "
|
32
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration_daemon")
|
33
33
|
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
34
34
|
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
35
35
|
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
@@ -35,7 +35,7 @@ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
|
35
35
|
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
36
36
|
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
37
37
|
)
|
38
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "
|
38
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration_daemon")
|
39
39
|
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
40
40
|
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
41
41
|
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
@@ -31,7 +31,7 @@ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
|
31
31
|
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
32
32
|
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
33
33
|
)
|
34
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "
|
34
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration_daemon")
|
35
35
|
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
36
36
|
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
37
37
|
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
@@ -34,7 +34,7 @@ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
|
34
34
|
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
35
35
|
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
36
36
|
)
|
37
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "
|
37
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration_daemon")
|
38
38
|
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
39
39
|
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
40
40
|
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
@@ -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,
|
pyegeria/mermaid_utilities.py
CHANGED
@@ -33,7 +33,7 @@ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
|
33
33
|
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
34
34
|
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
35
35
|
)
|
36
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "
|
36
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration_daemon")
|
37
37
|
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
38
38
|
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
39
39
|
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
@@ -17,6 +17,8 @@ from pyegeria import body_slimmer
|
|
17
17
|
from pyegeria._client import Client, max_paging_size
|
18
18
|
from pyegeria._globals import default_time_out
|
19
19
|
|
20
|
+
NO_ELEMENTS_FOUND = "No_elements_found"
|
21
|
+
|
20
22
|
|
21
23
|
def query_seperator(current_string):
|
22
24
|
if current_string == "":
|
@@ -40,26 +42,38 @@ def base_path(client, view_server: str):
|
|
40
42
|
return f"{client.platform_url}/servers/{view_server}/api/open-metadata/metadata-explorer"
|
41
43
|
|
42
44
|
|
43
|
-
def process_related_element_list(
|
45
|
+
def process_related_element_list(
|
46
|
+
response: Response, mermaid_only: bool, relationship_list: bool = False
|
47
|
+
) -> str | dict:
|
44
48
|
"""Process the result payload
|
45
49
|
|
46
50
|
Parameters
|
47
51
|
----------
|
48
|
-
response
|
49
|
-
|
52
|
+
response: Response
|
53
|
+
- the response payload from the API call
|
54
|
+
mermaid_only: bool
|
55
|
+
- if true, only return the Mermaid graph
|
56
|
+
relationship_list: bool
|
57
|
+
- if True, look for "relationshipList" otherwise look for "relatedElementList"
|
50
58
|
|
51
59
|
Returns
|
52
60
|
-------
|
53
61
|
|
54
62
|
"""
|
55
|
-
|
63
|
+
if relationship_list:
|
64
|
+
elements = response.json().get("relationshipList", "No relationship list found")
|
65
|
+
else:
|
66
|
+
elements = response.json().get("relatedElementList", NO_ELEMENTS_FOUND)
|
67
|
+
|
56
68
|
if isinstance(elements, str):
|
57
|
-
return
|
58
|
-
el_list = elements.get("elementList", "No elements found")
|
59
|
-
if isinstance(el_list, str):
|
60
|
-
return el_list
|
69
|
+
return NO_ELEMENTS_FOUND
|
61
70
|
if mermaid_only:
|
62
71
|
return elements.get("mermaidGraph", "No mermaid graph found")
|
72
|
+
|
73
|
+
el_list = elements.get("elementList", NO_ELEMENTS_FOUND)
|
74
|
+
if isinstance(el_list, str):
|
75
|
+
return el_list
|
76
|
+
|
63
77
|
if len(el_list) == 0:
|
64
78
|
return "No elements returned"
|
65
79
|
return elements
|
@@ -174,7 +188,7 @@ class MetadataExplorer(Client):
|
|
174
188
|
response: Response = await self._async_make_request(
|
175
189
|
"POST", url, body_slimmer(body)
|
176
190
|
)
|
177
|
-
return response.json().get("guid",
|
191
|
+
return response.json().get("guid", NO_ELEMENTS_FOUND)
|
178
192
|
|
179
193
|
def get_metadata_guid_by_unique_name(
|
180
194
|
self,
|
@@ -288,7 +302,7 @@ class MetadataExplorer(Client):
|
|
288
302
|
response: Response = await self._async_make_request(
|
289
303
|
"POST", url, body_slimmer(body)
|
290
304
|
)
|
291
|
-
return response.json().get("element",
|
305
|
+
return response.json().get("element", NO_ELEMENTS_FOUND)
|
292
306
|
|
293
307
|
def get_metadata_element_by_guid(
|
294
308
|
self,
|
@@ -403,13 +417,13 @@ class MetadataExplorer(Client):
|
|
403
417
|
)
|
404
418
|
# if mermaid_only:
|
405
419
|
# return response.json()["elementGraph"].get(
|
406
|
-
# "mermaidGraph",
|
420
|
+
# "mermaidGraph", NO_ELEMENTS_FOUND
|
407
421
|
# )
|
408
422
|
# else:
|
409
|
-
# return response.json().get("elementGraph",
|
423
|
+
# return response.json().get("elementGraph", NO_ELEMENTS_FOUND)
|
410
424
|
if isinstance(response, str):
|
411
|
-
return
|
412
|
-
el_list = response.json().get("elementGraph",
|
425
|
+
return NO_ELEMENTS_FOUND
|
426
|
+
el_list = response.json().get("elementGraph", NO_ELEMENTS_FOUND)
|
413
427
|
if isinstance(el_list, str):
|
414
428
|
return el_list
|
415
429
|
if mermaid_only:
|
@@ -517,7 +531,7 @@ class MetadataExplorer(Client):
|
|
517
531
|
# response = self.get_metadata_element_graph(
|
518
532
|
# guid, effective_time, as_of_time, for_lineage, for_duplicate_processing
|
519
533
|
# )
|
520
|
-
# return response.get("mermaidGraph",
|
534
|
+
# return response.get("mermaidGraph", NO_ELEMENTS_FOUND)
|
521
535
|
|
522
536
|
async def _async_get_metadata_element_by_unique_name(
|
523
537
|
self,
|
@@ -580,7 +594,7 @@ class MetadataExplorer(Client):
|
|
580
594
|
response: Response = await self._async_make_request(
|
581
595
|
"POST", url, body_slimmer(body)
|
582
596
|
)
|
583
|
-
return response.json().get("element",
|
597
|
+
return response.json().get("element", NO_ELEMENTS_FOUND)
|
584
598
|
|
585
599
|
def get_metadata_element_by_unique_name(
|
586
600
|
self,
|
@@ -647,6 +661,7 @@ class MetadataExplorer(Client):
|
|
647
661
|
start_from: int = 0,
|
648
662
|
page_size: int = max_paging_size,
|
649
663
|
time_out: int = default_time_out,
|
664
|
+
mermaid_only: bool = False,
|
650
665
|
) -> list | str:
|
651
666
|
"""
|
652
667
|
Retrieve all the versions of a metadata element. Async version.
|
@@ -676,7 +691,9 @@ class MetadataExplorer(Client):
|
|
676
691
|
Returns
|
677
692
|
-------
|
678
693
|
[dict] | str
|
679
|
-
|
694
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
695
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
696
|
+
If no elements found, string "No element found".
|
680
697
|
|
681
698
|
Raises
|
682
699
|
------
|
@@ -714,10 +731,10 @@ class MetadataExplorer(Client):
|
|
714
731
|
"POST", url, body_slimmer(body), time_out=time_out
|
715
732
|
)
|
716
733
|
|
717
|
-
elements = response.json().get("elementList",
|
734
|
+
elements = response.json().get("elementList", NO_ELEMENTS_FOUND)
|
718
735
|
if type(elements) is list:
|
719
736
|
if len(elements) == 0:
|
720
|
-
return
|
737
|
+
return NO_ELEMENTS_FOUND
|
721
738
|
return elements
|
722
739
|
|
723
740
|
def get_metadata_element_history(
|
@@ -732,6 +749,7 @@ class MetadataExplorer(Client):
|
|
732
749
|
start_from: int = 0,
|
733
750
|
page_size: int = max_paging_size,
|
734
751
|
time_out: int = default_time_out,
|
752
|
+
mermaid_only: bool = False,
|
735
753
|
) -> list | str:
|
736
754
|
"""
|
737
755
|
Retrieve all the versions of a metadata element.
|
@@ -761,7 +779,9 @@ class MetadataExplorer(Client):
|
|
761
779
|
Returns
|
762
780
|
-------
|
763
781
|
[dict] | str
|
764
|
-
|
782
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
783
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
784
|
+
If no elements found, string "No element found".
|
765
785
|
|
766
786
|
Raises
|
767
787
|
------
|
@@ -786,6 +806,7 @@ class MetadataExplorer(Client):
|
|
786
806
|
start_from,
|
787
807
|
page_size,
|
788
808
|
time_out,
|
809
|
+
mermaid_only,
|
789
810
|
)
|
790
811
|
)
|
791
812
|
return response
|
@@ -866,10 +887,10 @@ class MetadataExplorer(Client):
|
|
866
887
|
"POST", url, body_slimmer(body), time_out=time_out
|
867
888
|
)
|
868
889
|
|
869
|
-
elements = response.json().get("elementList",
|
890
|
+
elements = response.json().get("elementList", NO_ELEMENTS_FOUND)
|
870
891
|
if type(elements) is list:
|
871
892
|
if len(elements) == 0:
|
872
|
-
return
|
893
|
+
return NO_ELEMENTS_FOUND
|
873
894
|
return elements
|
874
895
|
|
875
896
|
def find_metadata_elements_with_string(
|
@@ -983,8 +1004,9 @@ class MetadataExplorer(Client):
|
|
983
1004
|
Returns
|
984
1005
|
-------
|
985
1006
|
[dict] | str
|
986
|
-
|
987
|
-
|
1007
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
1008
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
1009
|
+
If no elements found, string "No element found".
|
988
1010
|
Raises
|
989
1011
|
------
|
990
1012
|
InvalidParameterException
|
@@ -1068,7 +1090,9 @@ class MetadataExplorer(Client):
|
|
1068
1090
|
Returns
|
1069
1091
|
-------
|
1070
1092
|
[dict] | str
|
1071
|
-
|
1093
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
1094
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
1095
|
+
If no elements found, string "No element found".
|
1072
1096
|
|
1073
1097
|
Raises
|
1074
1098
|
------
|
@@ -1151,7 +1175,9 @@ class MetadataExplorer(Client):
|
|
1151
1175
|
Returns
|
1152
1176
|
-------
|
1153
1177
|
[dict] | str
|
1154
|
-
|
1178
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
1179
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
1180
|
+
If no elements found, string "No element found".
|
1155
1181
|
|
1156
1182
|
Raises
|
1157
1183
|
------
|
@@ -1239,7 +1265,9 @@ class MetadataExplorer(Client):
|
|
1239
1265
|
Returns
|
1240
1266
|
-------
|
1241
1267
|
[dict] | str
|
1242
|
-
|
1268
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
1269
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
1270
|
+
If no elements found, string "No element found".
|
1243
1271
|
|
1244
1272
|
Raises
|
1245
1273
|
------
|
@@ -1324,7 +1352,9 @@ class MetadataExplorer(Client):
|
|
1324
1352
|
Returns
|
1325
1353
|
-------
|
1326
1354
|
[dict] | str
|
1327
|
-
|
1355
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
1356
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
1357
|
+
If no elements found, string "No element found".
|
1328
1358
|
|
1329
1359
|
Raises
|
1330
1360
|
------
|
@@ -1413,7 +1443,9 @@ class MetadataExplorer(Client):
|
|
1413
1443
|
Returns
|
1414
1444
|
-------
|
1415
1445
|
[dict] | str
|
1416
|
-
|
1446
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
1447
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
1448
|
+
If no elements found, string "No element found".
|
1417
1449
|
|
1418
1450
|
Raises
|
1419
1451
|
------
|
@@ -1500,7 +1532,9 @@ class MetadataExplorer(Client):
|
|
1500
1532
|
Returns
|
1501
1533
|
-------
|
1502
1534
|
[dict] | str
|
1503
|
-
|
1535
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
1536
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
1537
|
+
If no elements found, string "No element found".
|
1504
1538
|
|
1505
1539
|
Raises
|
1506
1540
|
------
|
@@ -1593,7 +1627,9 @@ class MetadataExplorer(Client):
|
|
1593
1627
|
Returns
|
1594
1628
|
-------
|
1595
1629
|
[dict] | str
|
1596
|
-
|
1630
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
1631
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
1632
|
+
If no elements found, string "No element found".
|
1597
1633
|
|
1598
1634
|
Raises
|
1599
1635
|
------
|
@@ -1750,10 +1786,10 @@ class MetadataExplorer(Client):
|
|
1750
1786
|
"POST", url, body_slimmer(body), time_out=time_out
|
1751
1787
|
)
|
1752
1788
|
|
1753
|
-
elements = response.json().get("elementList",
|
1789
|
+
elements = response.json().get("elementList", NO_ELEMENTS_FOUND)
|
1754
1790
|
if type(elements) is list:
|
1755
1791
|
if len(elements) == 0:
|
1756
|
-
return
|
1792
|
+
return NO_ELEMENTS_FOUND
|
1757
1793
|
return elements
|
1758
1794
|
|
1759
1795
|
def find_metadata_elements(
|
@@ -1874,6 +1910,7 @@ class MetadataExplorer(Client):
|
|
1874
1910
|
start_from: int = 0,
|
1875
1911
|
page_size: int = max_paging_size,
|
1876
1912
|
time_out: int = default_time_out,
|
1913
|
+
mermaid_only: bool = False,
|
1877
1914
|
) -> list | str:
|
1878
1915
|
"""Return a list of relationships that match the requested conditions.
|
1879
1916
|
The results can be received as a series of pages. Async version.
|
@@ -1892,11 +1929,15 @@ class MetadataExplorer(Client):
|
|
1892
1929
|
- maximum number of elements to return.
|
1893
1930
|
time_out: int, default = default_time_out
|
1894
1931
|
- http request timeout for this request
|
1932
|
+
mermaid_only: bool, default is False
|
1933
|
+
- if true only a string representing the mermaid graph will be returned
|
1895
1934
|
|
1896
1935
|
Returns
|
1897
1936
|
-------
|
1898
1937
|
[dict] | str
|
1899
|
-
|
1938
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
1939
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
1940
|
+
If no elements found, string "No element found".
|
1900
1941
|
|
1901
1942
|
Raises
|
1902
1943
|
------
|
@@ -1959,11 +2000,9 @@ class MetadataExplorer(Client):
|
|
1959
2000
|
"POST", url, body_slimmer(body), time_out=time_out
|
1960
2001
|
)
|
1961
2002
|
|
1962
|
-
|
1963
|
-
|
1964
|
-
|
1965
|
-
return "No elements found"
|
1966
|
-
return elements
|
2003
|
+
return process_related_element_list(
|
2004
|
+
response, mermaid_only, relationship_list=True
|
2005
|
+
)
|
1967
2006
|
|
1968
2007
|
def find_relationships_between_elements(
|
1969
2008
|
self,
|
@@ -1973,6 +2012,7 @@ class MetadataExplorer(Client):
|
|
1973
2012
|
start_from: int = 0,
|
1974
2013
|
page_size: int = max_paging_size,
|
1975
2014
|
time_out: int = default_time_out,
|
2015
|
+
mermaid_only: bool = False,
|
1976
2016
|
) -> list | str:
|
1977
2017
|
"""Return a list of relationships that match the requested conditions.
|
1978
2018
|
The results can be received as a series of pages.
|
@@ -1991,11 +2031,15 @@ class MetadataExplorer(Client):
|
|
1991
2031
|
- maximum number of elements to return.
|
1992
2032
|
time_out: int, default = default_time_out
|
1993
2033
|
- http request timeout for this request
|
2034
|
+
mermaid_only: bool, default is False
|
2035
|
+
- if true only a string representing the mermaid graph will be returned
|
1994
2036
|
|
1995
2037
|
Returns
|
1996
2038
|
-------
|
1997
2039
|
[dict] | str
|
1998
|
-
|
2040
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
2041
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
2042
|
+
If no elements found, string "No element found".
|
1999
2043
|
|
2000
2044
|
Raises
|
2001
2045
|
------
|
@@ -2049,6 +2093,7 @@ class MetadataExplorer(Client):
|
|
2049
2093
|
start_from,
|
2050
2094
|
page_size,
|
2051
2095
|
time_out,
|
2096
|
+
mermaid_only,
|
2052
2097
|
)
|
2053
2098
|
)
|
2054
2099
|
return response
|
@@ -2110,7 +2155,7 @@ class MetadataExplorer(Client):
|
|
2110
2155
|
response: Response = await self._async_make_request(
|
2111
2156
|
"POST", url, body_slimmer(body)
|
2112
2157
|
)
|
2113
|
-
return response.json().get("element",
|
2158
|
+
return response.json().get("element", NO_ELEMENTS_FOUND)
|
2114
2159
|
|
2115
2160
|
def get_relationship_by_guid(
|
2116
2161
|
self,
|
@@ -2200,7 +2245,9 @@ class MetadataExplorer(Client):
|
|
2200
2245
|
Returns
|
2201
2246
|
-------
|
2202
2247
|
[dict] | str
|
2203
|
-
|
2248
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
2249
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
2250
|
+
If no elements found, string "No element found".
|
2204
2251
|
|
2205
2252
|
Raises
|
2206
2253
|
------
|
@@ -2237,9 +2284,9 @@ class MetadataExplorer(Client):
|
|
2237
2284
|
response: Response = await self._async_make_request(
|
2238
2285
|
"POST", url, body_slimmer(body), time_out=time_out
|
2239
2286
|
)
|
2240
|
-
rel = response.json().get("relationshipList",
|
2287
|
+
rel = response.json().get("relationshipList", NO_ELEMENTS_FOUND)
|
2241
2288
|
if isinstance(rel, (list, dict)):
|
2242
|
-
return rel.get("elementList",
|
2289
|
+
return rel.get("elementList", NO_ELEMENTS_FOUND)
|
2243
2290
|
else:
|
2244
2291
|
return rel
|
2245
2292
|
|
@@ -2287,7 +2334,9 @@ class MetadataExplorer(Client):
|
|
2287
2334
|
Returns
|
2288
2335
|
-------
|
2289
2336
|
[dict] | str
|
2290
|
-
|
2337
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
2338
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
2339
|
+
If no elements found, string "No element found".
|
2291
2340
|
|
2292
2341
|
Raises
|
2293
2342
|
------
|