pyegeria 5.2.0.13__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/collection_manager_omvs.py +9 -6
- 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 +2 -2
- 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 +9 -18
- 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 +75 -77
- pyegeria/commands/cli/egeria_cat.py +44 -44
- pyegeria/commands/cli/egeria_login_tui.py +12 -4
- 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/info/collection-graph 2024-12-12 at 11.33.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-collections 2024-12-10 at 14.25.51@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-todos 2024-12-12 at 11.46.30@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-user-ids 2024-12-12 at 11.51.09@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/tech-types 2024-12-12 at 11.37.20@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 +12 -9
- 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 +96 -47
- pyegeria/server_operations.py +4 -4
- {pyegeria-5.2.0.13.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.13.dist-info → pyegeria-5.2.0.42.2.dist-info}/entry_points.txt +2 -1
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/deployed-catalogs 2024-11-20 at 16.17.43@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/CleanShot 2024-11-25 at 20.30.02@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/CleanShot 2024-11-25 at 20.31.47@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/CleanShot 2024-11-25 at 20.32.11@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/CleanShot 2024-11-25 at 20.34.19@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/CleanShot 2024-11-25 at 20.36.42@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/CleanShot 2024-11-25 at 20.36.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/CleanShot 2024-11-25 at 20.37.07@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/CleanShot 2024-12-06 at 08.46.30@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/CleanShot 2024-12-06 at 11.27.56@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/catalogs 2024-11-25 at 16.28.53@2x.png +0 -0
- pyegeria-5.2.0.13.dist-info/RECORD +0 -195
- /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.13.dist-info → pyegeria-5.2.0.42.2.dist-info}/LICENSE +0 -0
- {pyegeria-5.2.0.13.dist-info → pyegeria-5.2.0.42.2.dist-info}/WHEEL +0 -0
@@ -23,28 +23,37 @@ from pyegeria import (
|
|
23
23
|
PropertyServerException,
|
24
24
|
UserNotAuthorizedException,
|
25
25
|
print_exception_response,
|
26
|
-
AutomatedCuration
|
26
|
+
AutomatedCuration,
|
27
27
|
)
|
28
28
|
|
29
29
|
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
30
|
-
EGERIA_KAFKA_ENDPOINT = os.environ.get(
|
31
|
-
EGERIA_PLATFORM_URL = os.environ.get(
|
32
|
-
EGERIA_VIEW_SERVER = os.environ.get(
|
33
|
-
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
30
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
31
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
32
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
33
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
34
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
35
|
+
)
|
36
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration_daemon")
|
37
|
+
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
38
|
+
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
39
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
40
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
41
|
+
EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
42
|
+
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
41
43
|
|
42
44
|
|
43
45
|
disable_ssl_warnings = True
|
44
46
|
|
45
47
|
|
46
|
-
def display_tech_types(
|
47
|
-
|
48
|
+
def display_tech_types(
|
49
|
+
search_string: str,
|
50
|
+
server: str,
|
51
|
+
url: str,
|
52
|
+
username: str,
|
53
|
+
user_pass: str,
|
54
|
+
jupyter: bool = EGERIA_JUPYTER,
|
55
|
+
width: int = EGERIA_WIDTH,
|
56
|
+
):
|
48
57
|
a_client = AutomatedCuration(server, url, username)
|
49
58
|
token = a_client.create_egeria_bearer_token(username, user_pass)
|
50
59
|
tech_list = a_client.find_technology_types(search_string, page_size=0)
|
@@ -61,7 +70,7 @@ def display_tech_types(search_string:str, server: str, url: str, username: str,
|
|
61
70
|
show_lines=True,
|
62
71
|
box=box.ROUNDED,
|
63
72
|
caption=f"Technology Types from Server '{server}' @ Platform - {url}",
|
64
|
-
expand=True
|
73
|
+
expand=True,
|
65
74
|
)
|
66
75
|
|
67
76
|
table.add_column("Name")
|
@@ -69,23 +78,20 @@ def display_tech_types(search_string:str, server: str, url: str, username: str,
|
|
69
78
|
table.add_column("Category")
|
70
79
|
table.add_column("Description")
|
71
80
|
|
72
|
-
|
73
81
|
name = " "
|
74
82
|
description = " "
|
75
83
|
version = " "
|
76
84
|
super_type = " "
|
77
85
|
if type(tech_list) is list:
|
78
86
|
for item in tech_list:
|
79
|
-
if
|
87
|
+
if "deployedImplementationType" not in item["qualifiedName"]:
|
80
88
|
continue
|
81
89
|
qualified_name = item.get("qualifiedName", " ")
|
82
90
|
name = item.get("name", "none")
|
83
91
|
category = item.get("category", "none")
|
84
92
|
description = item.get("description", "none")
|
85
93
|
|
86
|
-
table.add_row(
|
87
|
-
name, qualified_name, category, description
|
88
|
-
)
|
94
|
+
table.add_row(name, qualified_name, category, description)
|
89
95
|
return table
|
90
96
|
else:
|
91
97
|
print("Unknown technology type")
|
@@ -96,7 +102,11 @@ def display_tech_types(search_string:str, server: str, url: str, username: str,
|
|
96
102
|
with console.pager(styles=True):
|
97
103
|
console.print(generate_table())
|
98
104
|
|
99
|
-
except (
|
105
|
+
except (
|
106
|
+
InvalidParameterException,
|
107
|
+
PropertyServerException,
|
108
|
+
UserNotAuthorizedException,
|
109
|
+
) as e:
|
100
110
|
print_exception_response(e)
|
101
111
|
assert e.related_http_code != "200", "Invalid parameters"
|
102
112
|
finally:
|
@@ -118,11 +128,13 @@ def main():
|
|
118
128
|
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
119
129
|
|
120
130
|
try:
|
121
|
-
search_string = Prompt.ask(
|
131
|
+
search_string = Prompt.ask(
|
132
|
+
"Enter the technology you are searching for:", default="*"
|
133
|
+
)
|
122
134
|
display_tech_types(search_string, server, url, userid, user_pass)
|
123
|
-
except
|
135
|
+
except KeyboardInterrupt:
|
124
136
|
pass
|
125
137
|
|
126
138
|
|
127
139
|
if __name__ == "__main__":
|
128
|
-
main()
|
140
|
+
main()
|
@@ -25,6 +25,7 @@ from pyegeria import (
|
|
25
25
|
UserNotAuthorizedException,
|
26
26
|
EgeriaTech,
|
27
27
|
)
|
28
|
+
from pyegeria.commands.cat.glossary_actions import EGERIA_HOME_GLOSSARY_GUID
|
28
29
|
|
29
30
|
disable_ssl_warnings = True
|
30
31
|
|
@@ -35,18 +36,19 @@ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
|
35
36
|
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
36
37
|
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
37
38
|
)
|
38
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "
|
39
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration_daemon")
|
39
40
|
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
40
41
|
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
41
42
|
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
42
43
|
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
43
44
|
EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
44
45
|
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
46
|
+
EGERIA_HOME_GLOSSARY_GUID = os.environ.get("EGERIA_HOME_GLOSSARY_GUID", None)
|
45
47
|
|
46
48
|
|
47
49
|
def display_glossary_terms(
|
48
50
|
search_string: str = "*",
|
49
|
-
glossary_guid: str =
|
51
|
+
glossary_guid: str = EGERIA_HOME_GLOSSARY_GUID,
|
50
52
|
glossary_name: str = None,
|
51
53
|
view_server: str = EGERIA_VIEW_SERVER,
|
52
54
|
view_url: str = EGERIA_VIEW_SERVER_URL,
|
@@ -220,7 +222,7 @@ def main():
|
|
220
222
|
url = args.url if args.url is not None else EGERIA_PLATFORM_URL
|
221
223
|
userid = args.userid if args.userid is not None else EGERIA_USER
|
222
224
|
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
223
|
-
guid = args.guid if args.guid is not None else
|
225
|
+
guid = args.guid if args.guid is not None else EGERIA_HOME_GLOSSARY_GUID
|
224
226
|
|
225
227
|
try:
|
226
228
|
search_string = Prompt.ask("Enter the term you are searching for:", default="*")
|
@@ -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_INTEGRATION_DAEMON_URL = os.environ.get(
|
39
39
|
"EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
|
40
40
|
)
|
@@ -26,7 +26,7 @@ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
|
26
26
|
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
27
27
|
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
28
28
|
)
|
29
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "
|
29
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration_daemon")
|
30
30
|
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
31
31
|
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
32
32
|
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
pyegeria/commands/cli/egeria.py
CHANGED
@@ -9,14 +9,19 @@ A command line interface for Egeria Users - all commands
|
|
9
9
|
This is an emerging capability based on the **click** package. Feedback welcome!
|
10
10
|
|
11
11
|
"""
|
12
|
+
import os
|
13
|
+
import sys
|
14
|
+
|
12
15
|
import click
|
13
16
|
from trogon import tui
|
17
|
+
|
14
18
|
from pyegeria.commands.cli.egeria_login_tui import login
|
15
19
|
from pyegeria.commands.cat.get_asset_graph import asset_viewer
|
16
20
|
from pyegeria.commands.cat.get_collection import collection_viewer
|
17
21
|
from pyegeria.commands.cat.get_project_dependencies import project_dependency_viewer
|
18
22
|
from pyegeria.commands.cat.get_project_structure import project_structure_viewer
|
19
23
|
from pyegeria.commands.cat.get_tech_type_elements import tech_viewer
|
24
|
+
from pyegeria.commands.cat.list_tech_type_elements import list_tech_elements
|
20
25
|
from pyegeria.commands.cli.egeria_ops import show_server
|
21
26
|
from pyegeria.commands.tech.get_tech_type_template import template_viewer
|
22
27
|
from pyegeria.commands.cat.list_assets import display_assets
|
@@ -113,87 +118,83 @@ from pyegeria.commands.tech.list_gov_action_processes import display_gov_process
|
|
113
118
|
@click.group()
|
114
119
|
@click.option(
|
115
120
|
"--server",
|
116
|
-
default="active-metadata-store",
|
117
|
-
envvar="EGERIA_METADATA_STORE",
|
121
|
+
default=os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store"),
|
118
122
|
help="Egeria metadata store to work with",
|
119
123
|
)
|
120
124
|
@click.option(
|
121
125
|
"--url",
|
122
|
-
default="https://localhost:9443",
|
123
|
-
envvar="EGERIA_PLATFORM_URL",
|
126
|
+
default=os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443"),
|
124
127
|
help="URL of Egeria metadata store platform to connect to",
|
125
128
|
)
|
126
129
|
@click.option(
|
127
|
-
"--
|
128
|
-
default="integration-daemon",
|
129
|
-
envvar="EGERIA_INTEGRATION_DAEMON",
|
130
|
+
"--integration_daemon",
|
131
|
+
default=os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon"),
|
130
132
|
help="Egeria integration daemon to work with",
|
131
133
|
)
|
132
134
|
@click.option(
|
133
135
|
"--integration_daemon_url",
|
134
|
-
default="https://localhost:9443",
|
135
|
-
envvar="EGERIA_INTEGRATION_DAEMON_URL",
|
136
|
+
default=os.environ.get("EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"),
|
136
137
|
help="URL of Egeria integration daemon platform to connect to",
|
137
138
|
)
|
138
139
|
@click.option(
|
139
140
|
"--view_server",
|
140
|
-
default="view-server",
|
141
|
-
envvar="EGERIA_VIEW_SERVER",
|
141
|
+
default=os.environ.get("EGERIA_VIEW_SERVER", "view-server"),
|
142
142
|
help="Egeria view server to work with",
|
143
143
|
)
|
144
144
|
@click.option(
|
145
145
|
"--view_server_url",
|
146
|
-
default="https://localhost:9443",
|
147
|
-
envvar="EGERIA_VIEW_SERVER_URL",
|
146
|
+
default=os.environ.get("EGERIA_VIEW_SERVER_URL", "https://localhost:9443"),
|
148
147
|
help="URL of Egeria view server platform to connect to",
|
149
148
|
)
|
150
149
|
@click.option(
|
151
150
|
"--engine_host",
|
152
|
-
default="engine-host",
|
153
|
-
envvar="EGERIA_ENGINE_HOST",
|
151
|
+
default=os.environ.get("EGERIA_ENGINE_HOST", "engine-host"),
|
154
152
|
help="Egeria engine host to work with",
|
155
153
|
)
|
156
154
|
@click.option(
|
157
155
|
"--engine_host_url",
|
158
|
-
default="https://localhost:9443",
|
159
|
-
envvar="EGERIA_ENGINE_HOST_URL",
|
156
|
+
default=os.environ.get("EGERIA_ENGINE_HOST_URL", "https://localhost:9443"),
|
160
157
|
help="URL of Egeria engine host platform to connect to",
|
161
158
|
)
|
162
159
|
@click.option(
|
163
160
|
"--admin_user",
|
164
|
-
default="garygeeke",
|
165
|
-
envvar="EGERIA_ADMIN_USER",
|
161
|
+
default=os.environ.get("EGERIA_ADMIN_USER", "garygeeke"),
|
166
162
|
help="Egeria admin user",
|
167
163
|
)
|
168
164
|
@click.option(
|
169
165
|
"--admin_user_password",
|
170
|
-
default="secret",
|
171
|
-
envvar="EGERIA_ADMIN_PASSWORD",
|
166
|
+
default=os.environ.get("EGERIA_ADMIN_PASSWORD", "secret"),
|
172
167
|
help="Egeria admin password",
|
173
168
|
)
|
174
169
|
@click.option(
|
175
|
-
"--userid",
|
170
|
+
"--userid",
|
171
|
+
default=os.environ.get("EGERIA_USER", "erinoverview"),
|
172
|
+
help="Egeria user",
|
176
173
|
)
|
177
174
|
@click.option(
|
178
175
|
"--password",
|
179
|
-
default="secret",
|
180
|
-
envvar="EGERIA_PASSWORD",
|
176
|
+
default=os.environ.get("EGERIA_USER_PASSWORD", "secret"),
|
181
177
|
help="Egeria user password",
|
182
178
|
)
|
183
179
|
@click.option("--timeout", default=60, help="Number of seconds to wait")
|
184
180
|
@click.option(
|
185
181
|
"--jupyter",
|
186
182
|
is_flag=True,
|
187
|
-
|
188
|
-
|
183
|
+
type=bool,
|
184
|
+
default=os.environ.get("EGERIA_JUPYTER", False),
|
189
185
|
help="Enable for rendering in a Jupyter terminal",
|
190
186
|
)
|
191
187
|
@click.option(
|
192
188
|
"--width",
|
193
|
-
default=200,
|
194
|
-
|
189
|
+
default=os.environ.get("EGERIA_WIDTH", 200),
|
190
|
+
type=int,
|
195
191
|
help="Screen width, in characters, to use",
|
196
192
|
)
|
193
|
+
@click.option(
|
194
|
+
"--home_glossary_guid",
|
195
|
+
default=os.environ.get("EGERIA_HOME_GLOSSARY_GUID", None),
|
196
|
+
help="Glossary guid to use as the home glossary",
|
197
|
+
)
|
197
198
|
@click.pass_context
|
198
199
|
def cli(
|
199
200
|
ctx,
|
@@ -212,6 +213,7 @@ def cli(
|
|
212
213
|
timeout,
|
213
214
|
jupyter,
|
214
215
|
width,
|
216
|
+
home_glossary_guid,
|
215
217
|
):
|
216
218
|
"""An Egeria Command Line interface for Operations"""
|
217
219
|
ctx.obj = Config(
|
@@ -230,16 +232,12 @@ def cli(
|
|
230
232
|
timeout,
|
231
233
|
jupyter,
|
232
234
|
width,
|
235
|
+
home_glossary_guid,
|
233
236
|
)
|
234
|
-
ctx.max_content_width =
|
237
|
+
ctx.max_content_width = 250
|
235
238
|
ctx.ensure_object(Config)
|
236
239
|
|
237
240
|
|
238
|
-
@cli.command("alogin")
|
239
|
-
def login():
|
240
|
-
login()
|
241
|
-
|
242
|
-
|
243
241
|
#
|
244
242
|
# my: Show
|
245
243
|
#
|
@@ -374,22 +372,37 @@ def show_guid_info(ctx, guid):
|
|
374
372
|
display_guid(guid, c.server, c.url, c.userid, c.password, c.jupyter, c.width)
|
375
373
|
|
376
374
|
|
377
|
-
@show_elements.command("
|
375
|
+
@show_elements.command("anchored_elements")
|
378
376
|
@click.pass_context
|
379
|
-
@click.option("--search-string", help="value we are searching for")
|
380
377
|
@click.option(
|
381
|
-
"--
|
378
|
+
"--search-string",
|
379
|
+
default="DeployedDatabaseSchema",
|
380
|
+
help="value we are searching for",
|
381
|
+
)
|
382
|
+
@click.option(
|
383
|
+
"--prop-list",
|
384
|
+
default="anchorTypeName",
|
385
|
+
help="List of properties we are searching",
|
382
386
|
)
|
383
387
|
def list_anchored_elements(ctx, search_string: str, prop_list: str):
|
384
388
|
"""List elements with the specified properties"""
|
385
389
|
c = ctx.obj
|
390
|
+
if type(prop_list) is str:
|
391
|
+
property_names = prop_list.split(",")
|
392
|
+
elif type(prop_list) is list:
|
393
|
+
property_names = prop_list
|
394
|
+
else:
|
395
|
+
property_names = []
|
396
|
+
print(f"\nError --> Invalid property list - must be a string or list")
|
397
|
+
sys.exit(4)
|
386
398
|
display_anchored_elements(
|
387
399
|
search_string,
|
388
|
-
prop_list,
|
400
|
+
[prop_list],
|
389
401
|
c.view_server,
|
390
402
|
c.view_server_url,
|
391
403
|
c.userid,
|
392
404
|
c.password,
|
405
|
+
c.timeout,
|
393
406
|
c.jupyter,
|
394
407
|
c.width,
|
395
408
|
)
|
@@ -513,16 +526,16 @@ def show_registered_services(ctx, services):
|
|
513
526
|
|
514
527
|
@show_tech_info.command("relationship-types")
|
515
528
|
@click.option(
|
516
|
-
"--
|
529
|
+
"--om-type",
|
517
530
|
default="AssetOwner",
|
518
531
|
help="Relationship type to get information about",
|
519
532
|
)
|
520
533
|
@click.pass_context
|
521
|
-
def show_relationship_types(ctx,
|
534
|
+
def show_relationship_types(ctx, om_type):
|
522
535
|
"""Show information about the specified relationship types"""
|
523
536
|
c = ctx.obj
|
524
537
|
display_relationship_types(
|
525
|
-
|
538
|
+
om_type,
|
526
539
|
c.view_server,
|
527
540
|
c.view_server_url,
|
528
541
|
c.userid,
|
@@ -745,7 +758,7 @@ def get_element_info(ctx, om_type):
|
|
745
758
|
@cli.group("cat")
|
746
759
|
@click.pass_context
|
747
760
|
def cat(ctx):
|
748
|
-
"""Commands for
|
761
|
+
"""Commands for all users"""
|
749
762
|
pass
|
750
763
|
|
751
764
|
|
@@ -792,7 +805,7 @@ def asset_group(ctx):
|
|
792
805
|
pass
|
793
806
|
|
794
807
|
|
795
|
-
@asset_group.command("elements-of-type")
|
808
|
+
@asset_group.command("elements-of-tech-type")
|
796
809
|
@click.option(
|
797
810
|
"--tech_type",
|
798
811
|
default="PostgreSQL Server",
|
@@ -1312,30 +1325,11 @@ def show_asset_graph(ctx, asset_guid):
|
|
1312
1325
|
help="Specific tech type to get elements for",
|
1313
1326
|
)
|
1314
1327
|
@click.pass_context
|
1315
|
-
def
|
1328
|
+
def list_tech_type_elements(ctx, tech_type):
|
1316
1329
|
"""List technology type elements"""
|
1317
1330
|
c = ctx.obj
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
@show_cat_info.command("collection")
|
1322
|
-
@click.option(
|
1323
|
-
"--root-collection",
|
1324
|
-
default="Coco Pharmaceuticals Governance Domains",
|
1325
|
-
help="View of tree of collections from a given root",
|
1326
|
-
)
|
1327
|
-
@click.pass_context
|
1328
|
-
def show_collection(ctx, root_collection):
|
1329
|
-
"""Display information about a collection"""
|
1330
|
-
c = ctx.obj
|
1331
|
-
collection_viewer(
|
1332
|
-
root_collection,
|
1333
|
-
c.view_server,
|
1334
|
-
c.view_server_url,
|
1335
|
-
c.userid,
|
1336
|
-
c.password,
|
1337
|
-
c.jupyter,
|
1338
|
-
c.width,
|
1331
|
+
list_tech_elements(
|
1332
|
+
tech_type, c.view_server, c.view_server_url, c.userid, c.password
|
1339
1333
|
)
|
1340
1334
|
|
1341
1335
|
|
@@ -1625,14 +1619,14 @@ def gov_eng_status(ctx, engine_list, engine_host, list):
|
|
1625
1619
|
c = ctx.obj
|
1626
1620
|
display_gov_eng_status(
|
1627
1621
|
[engine_list],
|
1628
|
-
engine_host,
|
1629
|
-
c.view_server,
|
1630
|
-
c.view_server_url,
|
1631
|
-
c.userid,
|
1632
|
-
c.password,
|
1633
|
-
list,
|
1634
|
-
c.jupyter,
|
1635
|
-
c.width,
|
1622
|
+
engine_host=engine_host,
|
1623
|
+
view_server=c.view_server,
|
1624
|
+
url=c.view_server_url,
|
1625
|
+
username=c.userid,
|
1626
|
+
user_pass=c.password,
|
1627
|
+
paging=list,
|
1628
|
+
jupyter=c.jupyter,
|
1629
|
+
width=c.width,
|
1636
1630
|
)
|
1637
1631
|
|
1638
1632
|
|
@@ -1703,7 +1697,7 @@ def integrations(ctx):
|
|
1703
1697
|
)
|
1704
1698
|
@click.pass_context
|
1705
1699
|
def integrations_status(ctx, connector_list, list, sorted):
|
1706
|
-
"""Display
|
1700
|
+
"""Display integration_daemon status information"""
|
1707
1701
|
c = ctx.obj
|
1708
1702
|
display_integration_daemon_status(
|
1709
1703
|
[connector_list],
|
@@ -1722,7 +1716,7 @@ def integrations_status(ctx, connector_list, list, sorted):
|
|
1722
1716
|
|
1723
1717
|
@integrations.command("targets")
|
1724
1718
|
@click.pass_context
|
1725
|
-
@click.argument("connector", nargs=1)
|
1719
|
+
@click.argument("--connector", nargs=1)
|
1726
1720
|
def integrations_status(ctx, connector):
|
1727
1721
|
"""Display Catalog Targets for a connector"""
|
1728
1722
|
c = ctx.obj
|
@@ -1752,7 +1746,7 @@ def tell_ops(ctx):
|
|
1752
1746
|
@tell_ops.group("integration-daemon")
|
1753
1747
|
@click.pass_context
|
1754
1748
|
def tell_integration_daemon(ctx):
|
1755
|
-
"""Group of commands to an
|
1749
|
+
"""Group of commands to an integration_daemon"""
|
1756
1750
|
pass
|
1757
1751
|
|
1758
1752
|
|
@@ -1836,4 +1830,8 @@ def repository(ctx):
|
|
1836
1830
|
repository.add_command(load_archive)
|
1837
1831
|
|
1838
1832
|
if __name__ == "__main__":
|
1839
|
-
|
1833
|
+
while True:
|
1834
|
+
try:
|
1835
|
+
cli()
|
1836
|
+
except Exception as e:
|
1837
|
+
click.echo(f"Error: {e}")
|