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
@@ -2646,8 +2646,8 @@ class CollectionManager(Client):
|
|
2646
2646
|
|
2647
2647
|
Returns
|
2648
2648
|
-------
|
2649
|
-
list |
|
2650
|
-
The list of member information if successful, otherwise
|
2649
|
+
list | str
|
2650
|
+
The list of member information if successful, otherwise the string "No members found"
|
2651
2651
|
|
2652
2652
|
Raises
|
2653
2653
|
------
|
@@ -2663,14 +2663,17 @@ class CollectionManager(Client):
|
|
2663
2663
|
members = await self._async_get_collection_members(
|
2664
2664
|
collection_guid, collection_name, collection_qname
|
2665
2665
|
)
|
2666
|
-
if type(members) is str:
|
2667
|
-
return
|
2666
|
+
if (type(members) is str) or (len(members) == 0):
|
2667
|
+
return "No members found"
|
2668
2668
|
# finally, construct a list of member information
|
2669
2669
|
for member_rel in members:
|
2670
2670
|
member_guid = member_rel["elementHeader"]["guid"]
|
2671
2671
|
member_resp = await self._async_get_collection(member_guid)
|
2672
|
-
member = member_resp
|
2672
|
+
member = member_resp.get("element", None)
|
2673
|
+
if member is None:
|
2674
|
+
continue
|
2673
2675
|
# print(json.dumps(member, indent = 4))
|
2676
|
+
|
2674
2677
|
member_instance = {
|
2675
2678
|
"name": member["properties"]["name"],
|
2676
2679
|
"qualifiedName": member["properties"]["qualifiedName"],
|
@@ -2680,7 +2683,7 @@ class CollectionManager(Client):
|
|
2680
2683
|
}
|
2681
2684
|
member_list.append(member_instance)
|
2682
2685
|
|
2683
|
-
return member_list
|
2686
|
+
return member_list if len(member_list) > 0 else "No members found"
|
2684
2687
|
|
2685
2688
|
def get_member_list(
|
2686
2689
|
self,
|
pyegeria/commands/README.md
CHANGED
@@ -2,7 +2,8 @@
|
|
2
2
|
<!-- Copyright Contributors to the Egeria project. -->
|
3
3
|
|
4
4
|
The Commands in this directory provide a simple but useful command line interface for the Egeria environment. They
|
5
|
-
are built with the **Rich** python package and demonstrate the use of **pyegeria
|
5
|
+
are built with the **Rich** python package and demonstrate the use of **pyegeria**. More detailed documentation can be
|
6
|
+
found in the `doc` folder.
|
6
7
|
|
7
8
|
The commands can either be invoked from one of the command line interfaces or executed directly as python scripts.
|
8
9
|
To invoke the commands directly, install them with pipx by invoking:
|
@@ -1,5 +1 @@
|
|
1
|
-
|
2
|
-
# from .list_terms import display_glossary_terms
|
3
|
-
# from .list_deployed_catalogs import list_deployed_catalogs
|
4
|
-
# from .list_deployed_database_schemas import list_deployed_database_schemas
|
5
|
-
# from .list_deployed_databases import list_deployed_databases
|
1
|
+
""" Placeholder """
|
@@ -39,7 +39,7 @@ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
|
39
39
|
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
40
40
|
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
41
41
|
)
|
42
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "
|
42
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration_daemon")
|
43
43
|
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
44
44
|
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
45
45
|
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
@@ -30,7 +30,7 @@ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
|
30
30
|
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
31
31
|
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
32
32
|
)
|
33
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "
|
33
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration_daemon")
|
34
34
|
EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
|
35
35
|
"EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
|
36
36
|
)
|
@@ -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")
|
@@ -96,7 +96,7 @@ def collection_viewer(
|
|
96
96
|
walk_collection_hierarchy(branch, collection_client, member["guid"])
|
97
97
|
else:
|
98
98
|
tt = tree.add(
|
99
|
-
f"[bold magenta on black]No collections
|
99
|
+
f"[bold magenta on black]No collections found in {root_collection_name}"
|
100
100
|
)
|
101
101
|
|
102
102
|
try:
|
@@ -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")
|
@@ -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")
|
@@ -37,7 +37,7 @@ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
|
37
37
|
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
38
38
|
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
39
39
|
)
|
40
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "
|
40
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration_daemon")
|
41
41
|
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
42
42
|
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
43
43
|
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
@@ -163,7 +163,7 @@ def main():
|
|
163
163
|
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
164
164
|
try:
|
165
165
|
tech_name = Prompt.ask(
|
166
|
-
"Enter the Asset Name to view:", default="
|
166
|
+
"Enter the Asset Name to view:", default="PostgreSQL Server"
|
167
167
|
)
|
168
168
|
tech_viewer(tech_name, server, url, userid, user_pass)
|
169
169
|
except KeyboardInterrupt:
|
@@ -37,7 +37,7 @@ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
|
37
37
|
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
38
38
|
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
39
39
|
)
|
40
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "
|
40
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration_daemon")
|
41
41
|
EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
|
42
42
|
"EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
|
43
43
|
)
|
@@ -47,6 +47,7 @@ EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
|
47
47
|
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
48
48
|
EGERIA_WIDTH = os.environ.get("EGERIA_WIDTH", 200)
|
49
49
|
EGERIA_JUPYTER = os.environ.get("EGERIA_JUPYTER", False)
|
50
|
+
EGERIA_HOME_GLOSSARY_GUID = os.environ.get("EGERIA_HOME_GLOSSARY_GUID", None)
|
50
51
|
|
51
52
|
|
52
53
|
@click.command("create-glossary")
|
@@ -125,7 +126,7 @@ def create_glossary(
|
|
125
126
|
@click.option("--userid", default=EGERIA_USER, help="Egeria user")
|
126
127
|
@click.option("--password", default=EGERIA_USER_PASSWORD, help="Egeria user password")
|
127
128
|
@click.option("--timeout", default=60, help="Number of seconds to wait")
|
128
|
-
@click.argument("glossary-guid")
|
129
|
+
@click.argument("glossary-guid", default=EGERIA_HOME_GLOSSARY_GUID)
|
129
130
|
def delete_glossary(server, url, userid, password, timeout, glossary_guid):
|
130
131
|
"""Delete the glossary specified"""
|
131
132
|
m_client = EgeriaTech(server, url, user_id=userid, user_pwd=password)
|
@@ -317,7 +318,12 @@ def import_terms(
|
|
317
318
|
|
318
319
|
|
319
320
|
@click.command("export-terms")
|
320
|
-
@click.option(
|
321
|
+
@click.option(
|
322
|
+
"--glossary-guid",
|
323
|
+
default=EGERIA_HOME_GLOSSARY_GUID,
|
324
|
+
help="GUID of Glossary to export",
|
325
|
+
required=True,
|
326
|
+
)
|
321
327
|
@click.option("--file-name", help="Path of CSV file", required=True)
|
322
328
|
@click.option("--server", default=EGERIA_VIEW_SERVER, help="Egeria view server to use")
|
323
329
|
@click.option(
|
@@ -3,10 +3,8 @@
|
|
3
3
|
SPDX-License-Identifier: Apache-2.0
|
4
4
|
Copyright Contributors to the ODPi Egeria project.
|
5
5
|
|
6
|
-
|
6
|
+
List assets
|
7
7
|
|
8
|
-
|
9
|
-
A simple display for glossary terms
|
10
8
|
"""
|
11
9
|
import argparse
|
12
10
|
import os
|
@@ -18,6 +16,7 @@ from rich.console import Console
|
|
18
16
|
from rich.prompt import Prompt
|
19
17
|
from rich.markdown import Markdown
|
20
18
|
from rich.table import Table
|
19
|
+
from rich.text import Text
|
21
20
|
|
22
21
|
from pyegeria import (
|
23
22
|
InvalidParameterException,
|
@@ -34,7 +33,7 @@ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
|
34
33
|
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
35
34
|
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
36
35
|
)
|
37
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "
|
36
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration_daemon")
|
38
37
|
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
39
38
|
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
40
39
|
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
@@ -78,9 +77,8 @@ def display_assets(
|
|
78
77
|
caption=f"View Server '{server}' @ Platform - {url}",
|
79
78
|
expand=True,
|
80
79
|
)
|
81
|
-
table.add_column("Display Name",
|
80
|
+
table.add_column("Display Name / Qualified Name / GUID", width=36)
|
82
81
|
table.add_column("Type Name")
|
83
|
-
table.add_column("GUID", no_wrap=True)
|
84
82
|
table.add_column("Technology Type")
|
85
83
|
# table.add_column("Qualified Name",max_width=15)
|
86
84
|
table.add_column("Matching Elements")
|
@@ -100,23 +98,16 @@ def display_assets(
|
|
100
98
|
properties = element["properties"]
|
101
99
|
header = element["elementHeader"]
|
102
100
|
nested = element.get("matchingElements", "---")
|
101
|
+
qualified_name = properties["qualifiedName"]
|
102
|
+
display_name = Text(f"{properties.get("displayName", "---")}\n\n{qualified_name}\n\n"
|
103
|
+
f"{header['guid']}", justify="center")
|
103
104
|
|
104
|
-
display_name = properties.get("displayName", "---")
|
105
|
-
# qualified_name = properties["qualifiedName"] # we decided that qualified name wasn't useful
|
106
105
|
type_name = header["type"]["typeName"]
|
107
106
|
tech_type = properties.get("deployedImplementationType", "---")
|
108
|
-
guid = header["guid"]
|
109
|
-
#### We decided that path wasn't useful
|
110
|
-
# path_name = element.get("extendedProperties", None)
|
111
|
-
# if path_name:
|
112
|
-
# path = path_name.get("pathName"," ")
|
113
|
-
# else:
|
114
|
-
# path = " "
|
115
|
-
match_md = ""
|
116
107
|
|
117
108
|
match_tab = Table(expand=True)
|
118
109
|
match_tab.add_column("Type Name")
|
119
|
-
match_tab.add_column("GUID",
|
110
|
+
match_tab.add_column("GUID", width=36)
|
120
111
|
match_tab.add_column("Properties")
|
121
112
|
|
122
113
|
for match_t in nested:
|
@@ -130,7 +121,7 @@ def display_assets(
|
|
130
121
|
match_details_out = Markdown(match_details_md)
|
131
122
|
match_tab.add_row(match_type_name, matching_guid, match_details_out)
|
132
123
|
|
133
|
-
table.add_row(display_name, type_name,
|
124
|
+
table.add_row(display_name, type_name, tech_type, match_tab)
|
134
125
|
|
135
126
|
g_client.close_session()
|
136
127
|
return table
|
@@ -36,7 +36,7 @@ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
|
36
36
|
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
37
37
|
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
38
38
|
)
|
39
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "
|
39
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration_daemon")
|
40
40
|
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
41
41
|
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
42
42
|
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
@@ -32,7 +32,7 @@ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
|
32
32
|
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
33
33
|
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
34
34
|
)
|
35
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "
|
35
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration_daemon")
|
36
36
|
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
37
37
|
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
38
38
|
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
@@ -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")
|
@@ -101,11 +101,13 @@ def list_deployed_catalogs(
|
|
101
101
|
table.add_column("Catalog Schemas")
|
102
102
|
|
103
103
|
if catalog_server in [None, "*"]:
|
104
|
-
cats = c_client.get_elements_by_classification(
|
104
|
+
cats = c_client.get_elements_by_classification(
|
105
|
+
"Anchors", "DataAccessManager"
|
106
|
+
)
|
105
107
|
else:
|
106
108
|
server_guid = c_client.get_guid_for_name(catalog_server)
|
107
109
|
cats = c_client.get_elements_by_classification_with_property_value(
|
108
|
-
"Anchors", server_guid, ["anchorGUID"], "
|
110
|
+
"Anchors", server_guid, ["anchorGUID"], "DataAccessManager"
|
109
111
|
)
|
110
112
|
if type(cats) is list:
|
111
113
|
for cat in cats:
|
@@ -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")
|
@@ -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")
|
@@ -93,7 +93,6 @@ def list_deployed_databases(
|
|
93
93
|
table.add_column("Qualified Name")
|
94
94
|
table.add_column("Type")
|
95
95
|
table.add_column("Created", width=23)
|
96
|
-
table.add_column("Home Store")
|
97
96
|
table.add_column("GUID", width=38, no_wrap=True)
|
98
97
|
table.add_column("Properties")
|
99
98
|
table.add_column("Schemas")
|
@@ -114,7 +113,8 @@ def list_deployed_databases(
|
|
114
113
|
el_created_by = header["versions"]["createdBy"]
|
115
114
|
el_created_md = (
|
116
115
|
f"* **Created By**: {el_created_by}\n"
|
117
|
-
f"* **Created Time**: {el_create_time}"
|
116
|
+
f"* **Created Time**: {el_create_time}\n"
|
117
|
+
f"* **Home Store**: {el_home}"
|
118
118
|
)
|
119
119
|
el_created_out = Markdown(el_created_md)
|
120
120
|
|
@@ -151,7 +151,6 @@ def list_deployed_databases(
|
|
151
151
|
el_q_name,
|
152
152
|
el_type,
|
153
153
|
el_created_out,
|
154
|
-
el_home,
|
155
154
|
el_guid,
|
156
155
|
el_props_out,
|
157
156
|
rel_el_out,
|
@@ -36,7 +36,7 @@ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
|
36
36
|
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
37
37
|
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
38
38
|
)
|
39
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "
|
39
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration_daemon")
|
40
40
|
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
41
41
|
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
42
42
|
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_INTEGRATION_DAEMON_URL = os.environ.get(
|
40
40
|
"EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
|
41
41
|
)
|
@@ -37,7 +37,7 @@ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
|
37
37
|
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
38
38
|
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
39
39
|
)
|
40
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "
|
40
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration_daemon")
|
41
41
|
EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
|
42
42
|
"EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
|
43
43
|
)
|
@@ -0,0 +1,190 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
4
|
+
Copyright Contributors to the ODPi Egeria project.
|
5
|
+
|
6
|
+
Display the status of cataloged platforms and servers.
|
7
|
+
"""
|
8
|
+
import argparse
|
9
|
+
import os
|
10
|
+
import sys
|
11
|
+
import time
|
12
|
+
|
13
|
+
import rich.box as box
|
14
|
+
from rich import print
|
15
|
+
from rich.console import Console
|
16
|
+
from rich.markdown import Markdown
|
17
|
+
from rich.panel import Panel
|
18
|
+
from rich.prompt import Prompt
|
19
|
+
from rich.table import Table
|
20
|
+
|
21
|
+
from pyegeria import (
|
22
|
+
InvalidParameterException,
|
23
|
+
PropertyServerException,
|
24
|
+
UserNotAuthorizedException,
|
25
|
+
print_exception_response,
|
26
|
+
AutomatedCuration,
|
27
|
+
)
|
28
|
+
|
29
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
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"))
|
43
|
+
|
44
|
+
|
45
|
+
disable_ssl_warnings = True
|
46
|
+
console = Console(width=200)
|
47
|
+
|
48
|
+
guid_list = []
|
49
|
+
|
50
|
+
|
51
|
+
def list_tech_elements(
|
52
|
+
tech_name: str,
|
53
|
+
server_name: str,
|
54
|
+
platform_url: str,
|
55
|
+
user: str,
|
56
|
+
user_pass: str,
|
57
|
+
jupyter: bool = EGERIA_JUPYTER,
|
58
|
+
width: int = EGERIA_WIDTH,
|
59
|
+
):
|
60
|
+
console = Console(width=width, force_terminal=not jupyter)
|
61
|
+
|
62
|
+
a_client = AutomatedCuration(server_name, platform_url, user_id=user)
|
63
|
+
token = a_client.create_egeria_bearer_token(user, user_pass)
|
64
|
+
|
65
|
+
def build_classifications(classification: dict) -> Markdown:
|
66
|
+
class_md = "\n"
|
67
|
+
for c in classification:
|
68
|
+
c_type = c["classificationName"]
|
69
|
+
if c_type == "Anchors":
|
70
|
+
continue
|
71
|
+
class_md += f"* Classification: {c_type}\n"
|
72
|
+
class_props = c.get("classificationProperties", None)
|
73
|
+
if class_props is None:
|
74
|
+
continue
|
75
|
+
for prop in class_props.keys():
|
76
|
+
class_md += f"\t* {prop}: {class_props[prop]}\n"
|
77
|
+
if class_md == "-":
|
78
|
+
output = None
|
79
|
+
else:
|
80
|
+
output = class_md
|
81
|
+
return output
|
82
|
+
|
83
|
+
def generate_table() -> Table:
|
84
|
+
"""Make a new table."""
|
85
|
+
table = Table(
|
86
|
+
title=f"Tech Type Elements for {tech_name} @ {time.asctime()}",
|
87
|
+
caption=f"{platform_url} - {server_name} @ {time.asctime()}",
|
88
|
+
style="bold bright_white on black",
|
89
|
+
row_styles=["bold bright_white on black"],
|
90
|
+
header_style="white on dark_blue",
|
91
|
+
title_style="bold bright_white on black",
|
92
|
+
caption_style="white on black",
|
93
|
+
show_lines=True,
|
94
|
+
box=box.ROUNDED,
|
95
|
+
expand=True,
|
96
|
+
)
|
97
|
+
|
98
|
+
table.add_column("Qualified Name/GUID", width=38, no_wrap=True)
|
99
|
+
table.add_column("Properties", width=40)
|
100
|
+
table.add_column("Classifications", width=50)
|
101
|
+
|
102
|
+
tech_elements = a_client.get_technology_type_elements(
|
103
|
+
tech_name, get_templates=False
|
104
|
+
)
|
105
|
+
if type(tech_elements) is str:
|
106
|
+
console.print(f"No elements found for {tech_name}")
|
107
|
+
sys.exit(1)
|
108
|
+
|
109
|
+
note: str = " "
|
110
|
+
for element in tech_elements:
|
111
|
+
header = element["elementHeader"]
|
112
|
+
tech_type = header["type"]["typeName"]
|
113
|
+
tech_collection = header["origin"]["homeMetadataCollectionName"]
|
114
|
+
tech_created_by = header["versions"]["createdBy"]
|
115
|
+
tech_created_at = header["versions"]["createTime"]
|
116
|
+
tech_guid = header["guid"]
|
117
|
+
tech_classifications = header["classifications"]
|
118
|
+
class_md = build_classifications(tech_classifications)
|
119
|
+
|
120
|
+
referenceables = element["referenceableProperties"]
|
121
|
+
tech_qualified_name = referenceables["qualifiedName"]
|
122
|
+
extended = referenceables["extendedProperties"]
|
123
|
+
ex_md: str = ""
|
124
|
+
for key, value in extended.items():
|
125
|
+
ex_md += f"* {key}: {value}\n"
|
126
|
+
|
127
|
+
note = (
|
128
|
+
f"{ex_md}\n"
|
129
|
+
f"* Created by: {tech_created_by}\n"
|
130
|
+
f"* Created at: {tech_created_at}\n"
|
131
|
+
f"* Home Collection: {tech_collection}\n"
|
132
|
+
)
|
133
|
+
|
134
|
+
interfaces = extended.get("connectorInterfaces", None)
|
135
|
+
if interfaces is not None:
|
136
|
+
interface_type_name = interfaces["typeName"]
|
137
|
+
interface_array_cnt = interfaces["arrayCount"]
|
138
|
+
note += f"* Interface Type: {interface_type_name}\n"
|
139
|
+
for i in range(0, int(interface_array_cnt)):
|
140
|
+
note += (
|
141
|
+
f"\t* Type: {interfaces['arrayValues']['propertyValueMap'][str(i)]['typeName']}"
|
142
|
+
f"\tName: {interfaces['arrayValues']['propertiesAsStrings'][str(i)]}\n"
|
143
|
+
)
|
144
|
+
note_md = Markdown(note)
|
145
|
+
qn = Markdown(f"\n{tech_qualified_name}\n \n--- \n\n\n{tech_guid}")
|
146
|
+
cm = Markdown(class_md)
|
147
|
+
table.add_row(qn, note_md, cm)
|
148
|
+
return table
|
149
|
+
|
150
|
+
try:
|
151
|
+
console = Console(width=width, force_terminal=not jupyter)
|
152
|
+
|
153
|
+
with console.pager(styles=True):
|
154
|
+
console.print(generate_table())
|
155
|
+
|
156
|
+
except (
|
157
|
+
InvalidParameterException,
|
158
|
+
PropertyServerException,
|
159
|
+
UserNotAuthorizedException,
|
160
|
+
) as e:
|
161
|
+
print_exception_response(e)
|
162
|
+
print("\n\nPerhaps the type name isn't known")
|
163
|
+
finally:
|
164
|
+
a_client.close_session()
|
165
|
+
|
166
|
+
|
167
|
+
def main():
|
168
|
+
parser = argparse.ArgumentParser()
|
169
|
+
|
170
|
+
parser.add_argument("--server", help="Name of the server to display status for")
|
171
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
172
|
+
parser.add_argument("--userid", help="User Id")
|
173
|
+
parser.add_argument("--password", help="User Password")
|
174
|
+
args = parser.parse_args()
|
175
|
+
|
176
|
+
server = args.server if args.server is not None else EGERIA_VIEW_SERVER
|
177
|
+
url = args.url if args.url is not None else EGERIA_PLATFORM_URL
|
178
|
+
userid = args.userid if args.userid is not None else EGERIA_USER
|
179
|
+
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
180
|
+
try:
|
181
|
+
tech_name = Prompt.ask(
|
182
|
+
"Enter the tech type to view:", default="PostgreSQL Server"
|
183
|
+
)
|
184
|
+
list_tech_elements(tech_name, server, url, userid, user_pass)
|
185
|
+
except KeyboardInterrupt:
|
186
|
+
pass
|
187
|
+
|
188
|
+
|
189
|
+
if __name__ == "__main__":
|
190
|
+
main()
|