pyegeria 0.2.4__py3-none-any.whl → 5.3.0.dev3__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/README.md +35 -0
- pyegeria/__init__.py +345 -14
- pyegeria/_client.py +376 -126
- pyegeria/_deprecated_gov_engine.py +451 -0
- pyegeria/_exceptions.py +6 -6
- pyegeria/_globals.py +7 -1
- pyegeria/_validators.py +9 -6
- pyegeria/asset_catalog_omvs.py +807 -0
- pyegeria/automated_curation_omvs.py +3760 -0
- pyegeria/classification_manager_omvs.py +5238 -0
- pyegeria/collection_manager_omvs.py +2727 -0
- pyegeria/commands/README.md +47 -0
- pyegeria/commands/__init__.py +22 -0
- pyegeria/commands/cat/README.md +16 -0
- pyegeria/commands/cat/__init__.py +1 -0
- pyegeria/commands/cat/exp_list_glossaries.py +156 -0
- pyegeria/commands/cat/get_asset_graph.py +319 -0
- pyegeria/commands/cat/get_collection.py +148 -0
- pyegeria/commands/cat/get_project_dependencies.py +168 -0
- pyegeria/commands/cat/get_project_structure.py +168 -0
- pyegeria/commands/cat/get_tech_type_elements.py +174 -0
- pyegeria/commands/cat/glossary_actions.py +362 -0
- pyegeria/commands/cat/list_assets.py +176 -0
- pyegeria/commands/cat/list_cert_types.py +194 -0
- pyegeria/commands/cat/list_collections.py +162 -0
- pyegeria/commands/cat/list_deployed_catalogs.py +217 -0
- pyegeria/commands/cat/list_deployed_database_schemas.py +251 -0
- pyegeria/commands/cat/list_deployed_databases.py +202 -0
- pyegeria/commands/cat/list_glossaries.py +150 -0
- pyegeria/commands/cat/list_projects.py +221 -0
- pyegeria/commands/cat/list_servers_deployed_imp.py +158 -0
- pyegeria/commands/cat/list_tech_type_elements.py +190 -0
- pyegeria/commands/cat/list_tech_types.py +140 -0
- pyegeria/commands/cat/list_terms.py +242 -0
- pyegeria/commands/cat/list_todos.py +189 -0
- pyegeria/commands/cat/list_user_ids.py +145 -0
- pyegeria/commands/cli/__init__.py +13 -0
- pyegeria/commands/cli/egeria.py +1844 -0
- pyegeria/commands/cli/egeria_cat.py +638 -0
- pyegeria/commands/cli/egeria_login_tui.py +313 -0
- pyegeria/commands/cli/egeria_my.py +248 -0
- pyegeria/commands/cli/egeria_ops.py +502 -0
- pyegeria/commands/cli/egeria_tech.py +618 -0
- pyegeria/commands/cli/ops_config.py +45 -0
- pyegeria/commands/cli/txt_custom_v2.tcss +19 -0
- pyegeria/commands/doc/README.md +145 -0
- pyegeria/commands/doc/Visual Command Reference/README.md +511 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/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 +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/elements-of-type 2024-11-20 at 16.01.35.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/tech-type-elements 2024-11-20 at 16.05.05.png +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-data-catalogs-2024-11-20 at 16.17.43@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-11-25 at 20.14.50@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-11-25 at 20.21.25@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/glossary/list-glossaries 2024-11-25 at 20.30.02.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-terms 2024-11-25 at 20.32.11.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/asset-types 2024-11-25 at 20.34.19@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/certification-types 2024-11-25 at 20.37.07.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/glossary/basic-glossary-tui.md +109 -0
- pyegeria/commands/doc/glossary/images/delete-glossary-step1 2024-11-06 at 15.47.23@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/delete-glossary-step2 2024-11-06 at 15.51.29@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/delete-glossary-step3 2024-11-06 at 15.53.19@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/delete-glossary-step4 2024-11-06 at 15.55.11@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-create-glossary example 2024-11-05 at 20.38.04@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-create-term 2024-11-06 at 20.48.29.png +0 -0
- pyegeria/commands/doc/glossary/images/out-delete-term 2024-11-07 at 03.57.25.png +0 -0
- pyegeria/commands/doc/glossary/images/out-display-terms-for-glossary-test 2024-11-06 at 20.51.28.png +0 -0
- pyegeria/commands/doc/glossary/images/out-export-example 2024-11-07 at 09.54.57.png +0 -0
- pyegeria/commands/doc/glossary/images/out-exported-terms 2024-11-06 at 21.06.32.png +0 -0
- pyegeria/commands/doc/glossary/images/out-glossary-list example 2024-11-05 at 20.41.02@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-import-terms 2024-11-07 at 08.15.18.png +0 -0
- pyegeria/commands/doc/glossary/images/out-list-all-terms 2024-11-06 at 16.22.20@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-list-terms-for-example 2024-11-06 at 16.40.12.png +0 -0
- pyegeria/commands/doc/glossary/images/out-list-terms-second 2024-11-06 at 16.45.13.png +0 -0
- pyegeria/commands/doc/glossary/images/out-pipx install pyegeria 2024-11-10 at 18.12.21.png +0 -0
- pyegeria/commands/doc/glossary/images/out-server-status-full 2024-11-10 at 18.25.14.png +0 -0
- pyegeria/commands/doc/glossary/images/out-servers-status 2024-11-10 at 18.15.42.png +0 -0
- pyegeria/commands/doc/glossary/images/out-upsert-import 2024-11-07 at 19.37.00.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-2024-11-10 at 18.26.29.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-create-glossary example 2024-11-05 at 20.34.24@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-create-term 2024-11-06 at 20.46.35.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-delete-term 2024-11-07 at 03.51.57.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-display-terms-for-example 2024-11-06 at 20.56.49.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-export-example 2024-11-07 at 09.52.59.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-hey-egeria 2024-11-10 at 18.31.01.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-import-upsert-example 2024-11-07 at 10.08.37.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-list-terms-second 2024-11-06 at 16.46.34.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-load-archive.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-server-status-full 2024-11-10 at 19.14.36.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-show-glossaries 2024-11-07 at 20.00.05.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-show-glossary-terms 2024-11-05 at 19.37.53@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-upsert 2024-11-07 at 11.49.04.png +0 -0
- pyegeria/commands/doc/glossary/images/upsert-example.om-terms 2024-11-07 at 11.44.05.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/README.md +346 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/CleanShot 2024-11-18 at 21.32.03@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/Xmind 1731421782704.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/Xmind 1731422134920.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/hey_egeria 2024-11-12 at 20.38.43.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/hey_egeria cat 2024-11-12 at 21.41.43.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-integ-status-list 2024-11-12 at 16.45.26.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-integ-status-live 2024-11-12 at 16.44.12@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-server-status 2024-11-10 at 18.15.42@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-server-status-full 2024-11-10 at 18.25.14@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/short-cut commands 2024-11-12 at 22.22.13.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-hey-egeria.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-integration-status-paging.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-load-archive 2024-11-10 at 19.19.09@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-show-server-status 2024-11-10 at 18.52.01@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-show-server-status-full 2024-11-10.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-status-paging 2024-11-12 at 16.26.14@2x.png +0 -0
- pyegeria/commands/my/README.md +17 -0
- pyegeria/commands/my/__init__.py +0 -0
- pyegeria/commands/my/list_my_profile.py +163 -0
- pyegeria/commands/my/list_my_roles.py +151 -0
- pyegeria/commands/my/monitor_my_todos.py +205 -0
- pyegeria/commands/my/monitor_open_todos.py +175 -0
- pyegeria/commands/my/todo_actions.py +242 -0
- pyegeria/commands/ops/README.md +24 -0
- pyegeria/commands/ops/__init__.py +22 -0
- pyegeria/commands/ops/gov_server_actions.py +177 -0
- pyegeria/commands/ops/list_archives.py +161 -0
- pyegeria/commands/ops/list_catalog_targets.py +203 -0
- pyegeria/commands/ops/load_archive.py +75 -0
- pyegeria/commands/ops/monitor_asset_events.py +107 -0
- pyegeria/commands/ops/monitor_engine_activity.py +270 -0
- pyegeria/commands/ops/monitor_engine_activity_c.py +286 -0
- pyegeria/commands/ops/monitor_gov_eng_status.py +288 -0
- pyegeria/commands/ops/monitor_integ_daemon_status.py +321 -0
- pyegeria/commands/ops/monitor_platform_status.py +188 -0
- pyegeria/commands/ops/monitor_server_startup.py +117 -0
- pyegeria/commands/ops/monitor_server_status.py +182 -0
- pyegeria/commands/ops/orig_monitor_server_list.py +140 -0
- pyegeria/commands/ops/orig_monitor_server_status.py +124 -0
- pyegeria/commands/ops/refresh_integration_daemon.py +83 -0
- pyegeria/commands/ops/restart_integration_daemon.py +82 -0
- pyegeria/commands/ops/table_integ_daemon_status.py +237 -0
- pyegeria/commands/ops/x_engine_actions.py +76 -0
- pyegeria/commands/tech/README.md +24 -0
- pyegeria/commands/tech/__init__.py +0 -0
- pyegeria/commands/tech/get_element_info.py +144 -0
- pyegeria/commands/tech/get_guid_info.py +134 -0
- pyegeria/commands/tech/get_tech_details.py +173 -0
- pyegeria/commands/tech/get_tech_type_template.py +166 -0
- pyegeria/commands/tech/list_anchored_elements.py +205 -0
- pyegeria/commands/tech/list_asset_types.py +123 -0
- pyegeria/commands/tech/list_elements.py +168 -0
- pyegeria/commands/tech/list_elements_for_classification.py +171 -0
- pyegeria/commands/tech/list_elements_x.py +191 -0
- pyegeria/commands/tech/list_gov_action_processes.py +139 -0
- pyegeria/commands/tech/list_registered_services.py +180 -0
- pyegeria/commands/tech/list_related_elements.py +207 -0
- pyegeria/commands/tech/list_related_specification.py +169 -0
- pyegeria/commands/tech/list_relationship_types.py +164 -0
- pyegeria/commands/tech/list_relationships.py +179 -0
- pyegeria/commands/tech/list_tech_templates.py +360 -0
- pyegeria/commands/tech/list_valid_metadata_values.py +178 -0
- pyegeria/commands/tech/table_tech_templates.py +238 -0
- pyegeria/commands/tech/x_list_related_elements.py +165 -0
- pyegeria/core_omag_server_config.py +550 -313
- pyegeria/create_tech_guid_lists.py +105 -0
- pyegeria/egeria_cat_client.py +78 -0
- pyegeria/egeria_client.py +117 -0
- pyegeria/egeria_config_client.py +45 -0
- pyegeria/egeria_my_client.py +56 -0
- pyegeria/egeria_tech_client.py +93 -0
- pyegeria/feedback_manager_omvs.py +4573 -0
- pyegeria/full_omag_server_config.py +1337 -0
- pyegeria/glossary_browser_omvs.py +2507 -0
- pyegeria/glossary_manager_omvs.py +3597 -0
- pyegeria/mermaid_utilities.py +218 -0
- pyegeria/metadata_explorer_omvs.py +2371 -0
- pyegeria/my_profile_omvs.py +1021 -0
- pyegeria/platform_services.py +259 -218
- pyegeria/project_manager_omvs.py +1854 -0
- pyegeria/registered_info.py +111 -108
- pyegeria/runtime_manager_omvs.py +2299 -0
- pyegeria/server_operations.py +178 -71
- pyegeria/template_manager_omvs.py +1414 -0
- pyegeria/utils.py +75 -85
- pyegeria/valid_metadata_omvs.py +1911 -0
- pyegeria/x_action_author_omvs.py +200 -0
- pyegeria-5.3.0.dev3.dist-info/METADATA +70 -0
- pyegeria-5.3.0.dev3.dist-info/RECORD +232 -0
- {pyegeria-0.2.4.dist-info → pyegeria-5.3.0.dev3.dist-info}/WHEEL +1 -1
- pyegeria-5.3.0.dev3.dist-info/entry_points.txt +81 -0
- pyegeria/config.toml +0 -11
- pyegeria/curation_omvs.py +0 -458
- pyegeria/exceptions.py +0 -382
- pyegeria/glossary_omvs.py +0 -639
- pyegeria/gov_engine.py +0 -573
- pyegeria-0.2.4.dist-info/METADATA +0 -57
- pyegeria-0.2.4.dist-info/RECORD +0 -19
- {pyegeria-0.2.4.dist-info/licenses → pyegeria-5.3.0.dev3.dist-info}/LICENSE +0 -0
@@ -0,0 +1,47 @@
|
|
1
|
+
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
|
2
|
+
<!-- Copyright Contributors to the Egeria project. -->
|
3
|
+
|
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**. More detailed documentation can be
|
6
|
+
found in the `doc` folder.
|
7
|
+
|
8
|
+
The commands can either be invoked from one of the command line interfaces or executed directly as python scripts.
|
9
|
+
To invoke the commands directly, install them with pipx by invoking:
|
10
|
+
|
11
|
+
`pipx install pyegeria`
|
12
|
+
|
13
|
+
Some of the widgets are "live" - that is running continuously until ctrl-c is issued to interrupt it. Other widgets are
|
14
|
+
**paged** to allow you to page through long lists of content. Paged interfaces have a similar behaviour to the unix
|
15
|
+
`more` command - so, for example you type `q` to quit.
|
16
|
+
|
17
|
+
As the number of widgets has grown, they have been organized by role into different sub-directories:
|
18
|
+
|
19
|
+
* cat (catalog_user) - for users of the Egeria environment
|
20
|
+
* cli - command line interfaces to simplify finding and using the commands
|
21
|
+
* my - for visualizing work and individual items
|
22
|
+
* ops - for configuring and operating Egeria
|
23
|
+
* tech - for technical users to configure and use Egeria
|
24
|
+
|
25
|
+
The command line interfaces (CLIs) can be invoked with:
|
26
|
+
|
27
|
+
hey_egeria - provides access to all commands
|
28
|
+
hey_egeria_cat - access for commands used by catalog users
|
29
|
+
hey_egeria_my - access to personal information commands for all users
|
30
|
+
hey_egeria_ops - access to operations commands
|
31
|
+
hey_egeria_tech - access to commands for technical users
|
32
|
+
|
33
|
+
Each of these CLIs have a textual user interface (TUI) that provides a forms based approach
|
34
|
+
to utilizing each command. You invoke the TUI by adding `tui` to the cli command. For instance:
|
35
|
+
|
36
|
+
`hey_egeria_cat tui`
|
37
|
+
|
38
|
+
To execute a command from the TUI type ctrl-R.
|
39
|
+
|
40
|
+
|
41
|
+
To upgrade the CLI commands you can type:
|
42
|
+
|
43
|
+
`pipx upgrade pyegeria`
|
44
|
+
|
45
|
+
----
|
46
|
+
License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
|
47
|
+
Copyright Contributors to the Egeria project.
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"""
|
2
|
+
SPDX-License-Identifier: Apache-2.0
|
3
|
+
Copyright Contributors to the ODPi Egeria project.
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
pyegeria commands available also from python.
|
8
|
+
"""
|
9
|
+
|
10
|
+
from .ops.monitor_gov_eng_status import display_gov_eng_status
|
11
|
+
from .ops.monitor_integ_daemon_status import display_integration_daemon_status
|
12
|
+
from .ops.table_integ_daemon_status import (
|
13
|
+
display_integration_daemon_status as table_integ_daemon_status,
|
14
|
+
)
|
15
|
+
from .ops.monitor_engine_activity_c import display_engine_activity_c
|
16
|
+
from .ops.list_catalog_targets import display_catalog_targets
|
17
|
+
|
18
|
+
from .cat.list_glossaries import display_glossaries
|
19
|
+
from .cat.list_terms import display_glossary_terms
|
20
|
+
from .cat.list_deployed_catalogs import list_deployed_catalogs
|
21
|
+
from .cat.list_deployed_database_schemas import list_deployed_database_schemas
|
22
|
+
from .cat.list_deployed_databases import list_deployed_databases
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
|
2
|
+
<!-- Copyright Contributors to the Egeria project. -->
|
3
|
+
|
4
|
+
# Catalog User
|
5
|
+
|
6
|
+
These widgets display different kinds of information useful to a typical catalog user. Widgets
|
7
|
+
will continue to be added over time to cover more facets of catalog use.
|
8
|
+
|
9
|
+
* list_assets.py - lists assets containing the user provided search string in the display name or qualified name. Search string must be a minimum of three characters.
|
10
|
+
* view_asset_graph.py - shows a tree view of an asset with its nested elements and relationships.
|
11
|
+
* view_collection.py - provides a tree view of a collection with all nested collections and items within the collection.
|
12
|
+
* view_glossary.py - provides a simple glossary viewer showing terms and related information.
|
13
|
+
* get_asset_graph.py - shows an asset with all its relationships as a tree graph.
|
14
|
+
----
|
15
|
+
License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
|
16
|
+
Copyright Contributors to the Egeria project.
|
@@ -0,0 +1 @@
|
|
1
|
+
""" Placeholder """
|
@@ -0,0 +1,156 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
4
|
+
Copyright Contributors to the ODPi Egeria project.
|
5
|
+
|
6
|
+
Unit tests for the Utils helper functions using the Pytest framework.
|
7
|
+
|
8
|
+
|
9
|
+
A simple display for glossary terms
|
10
|
+
"""
|
11
|
+
import argparse
|
12
|
+
import os
|
13
|
+
import sys
|
14
|
+
import time
|
15
|
+
|
16
|
+
from rich import box, print
|
17
|
+
from rich.console import Console
|
18
|
+
from rich.markdown import Markdown
|
19
|
+
from rich.prompt import Prompt
|
20
|
+
from rich.table import Table
|
21
|
+
from rich.text import Text
|
22
|
+
from rich_pixels import Pixels
|
23
|
+
|
24
|
+
|
25
|
+
from pyegeria import (
|
26
|
+
InvalidParameterException,
|
27
|
+
PropertyServerException,
|
28
|
+
UserNotAuthorizedException,
|
29
|
+
EgeriaTech,
|
30
|
+
print_exception_response,
|
31
|
+
)
|
32
|
+
|
33
|
+
disable_ssl_warnings = True
|
34
|
+
|
35
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
36
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
37
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
38
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
39
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
40
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
41
|
+
)
|
42
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
43
|
+
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
44
|
+
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
45
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
46
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
47
|
+
EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
48
|
+
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
49
|
+
|
50
|
+
|
51
|
+
def display_glossaries(
|
52
|
+
search_string: str = "*",
|
53
|
+
view_server: str = EGERIA_VIEW_SERVER,
|
54
|
+
view_url: str = EGERIA_VIEW_SERVER_URL,
|
55
|
+
user: str = EGERIA_USER,
|
56
|
+
user_pass: str = EGERIA_USER_PASSWORD,
|
57
|
+
jupyter: bool = EGERIA_JUPYTER,
|
58
|
+
width: int = EGERIA_WIDTH,
|
59
|
+
):
|
60
|
+
"""Display either a specified glossary or all glossaries if the search_string is '*'.
|
61
|
+
Parameters
|
62
|
+
----------
|
63
|
+
search_string : str, default is '*'
|
64
|
+
The string used to search for glossaries.
|
65
|
+
view_server : str
|
66
|
+
The view server name or address where the Egeria services are hosted.
|
67
|
+
view_url : str
|
68
|
+
The URL of the platform the view server is on.
|
69
|
+
user : str
|
70
|
+
The user ID for authentication with the Egeria server.
|
71
|
+
user_pass : str
|
72
|
+
The password for authentication with the Egeria server.
|
73
|
+
jupyter : bool, optional
|
74
|
+
A boolean indicating whether the output is intended for a Jupyter notebook (default is EGERIA_JUPYTER).
|
75
|
+
width : int, optional
|
76
|
+
The width of the console output (default is EGERIA_WIDTH).
|
77
|
+
"""
|
78
|
+
m_client = EgeriaTech(view_server, view_url, user_id=user, user_pwd=user_pass)
|
79
|
+
token = m_client.create_egeria_bearer_token()
|
80
|
+
try:
|
81
|
+
table = Table(
|
82
|
+
title=f"Glossary List @ {time.asctime()}",
|
83
|
+
style="bright_white on black",
|
84
|
+
header_style="bright_white on dark_blue",
|
85
|
+
title_style="bold white on black",
|
86
|
+
caption_style="white on black",
|
87
|
+
show_lines=True,
|
88
|
+
box=box.ROUNDED,
|
89
|
+
caption=f"View Server '{view_server}' @ Platform - {view_url}",
|
90
|
+
expand=True,
|
91
|
+
)
|
92
|
+
table.add_column("Glossary Name")
|
93
|
+
table.add_column(
|
94
|
+
"Qualified Name & GUID", width=38, no_wrap=True, justify="center"
|
95
|
+
)
|
96
|
+
table.add_column("Language")
|
97
|
+
|
98
|
+
table.add_column("Usage", width=50, justify="center")
|
99
|
+
|
100
|
+
glossaries = m_client.find_glossaries(search_string)
|
101
|
+
if type(glossaries) is list:
|
102
|
+
sorted_glossary_list = sorted(
|
103
|
+
glossaries, key=lambda k: k["glossaryProperties"]["displayName"]
|
104
|
+
)
|
105
|
+
for glossary in sorted_glossary_list:
|
106
|
+
display_name = glossary["glossaryProperties"]["displayName"]
|
107
|
+
qualified_name = glossary["glossaryProperties"]["qualifiedName"]
|
108
|
+
guid = glossary["elementHeader"]["guid"]
|
109
|
+
q_name = Text(f"{qualified_name}\n&\n{guid}", justify="center")
|
110
|
+
language = glossary["glossaryProperties"]["language"]
|
111
|
+
description = glossary["glossaryProperties"]["description"]
|
112
|
+
usage = glossary["glossaryProperties"]["usage"]
|
113
|
+
text = "http://100.83.199.62:8088/superset/dashboard/p/xOgE56dLNaY/"
|
114
|
+
|
115
|
+
table.add_row(display_name, q_name, language, text)
|
116
|
+
console = Console(
|
117
|
+
style="bold bright_white on black",
|
118
|
+
width=width,
|
119
|
+
force_terminal=not jupyter,
|
120
|
+
)
|
121
|
+
console.print(table)
|
122
|
+
print("Visit my [link=https://www.willmcgugan.com]blog[/link]!")
|
123
|
+
|
124
|
+
except (InvalidParameterException, PropertyServerException) as e:
|
125
|
+
print_exception_response(e)
|
126
|
+
finally:
|
127
|
+
m_client.close_session()
|
128
|
+
|
129
|
+
|
130
|
+
def main():
|
131
|
+
parser = argparse.ArgumentParser()
|
132
|
+
parser.add_argument("--server", help="Name of the server to display status for")
|
133
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
134
|
+
parser.add_argument("--userid", help="User Id")
|
135
|
+
parser.add_argument("--password", help="User Password")
|
136
|
+
|
137
|
+
args = parser.parse_args()
|
138
|
+
|
139
|
+
server = args.server if args.server is not None else EGERIA_VIEW_SERVER
|
140
|
+
url = args.url if args.url is not None else EGERIA_PLATFORM_URL
|
141
|
+
userid = args.userid if args.userid is not None else EGERIA_USER
|
142
|
+
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
143
|
+
|
144
|
+
try:
|
145
|
+
search_string = Prompt.ask(
|
146
|
+
"Enter the glossary you are searching for or '*' for all:", default="*"
|
147
|
+
)
|
148
|
+
|
149
|
+
display_glossaries(search_string, server, url, userid, user_pass)
|
150
|
+
|
151
|
+
except KeyboardInterrupt:
|
152
|
+
pass
|
153
|
+
|
154
|
+
|
155
|
+
if __name__ == "__main__":
|
156
|
+
main()
|
@@ -0,0 +1,319 @@
|
|
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
|
+
|
12
|
+
from rich.console import Console
|
13
|
+
from rich.markdown import Markdown
|
14
|
+
from rich.panel import Panel
|
15
|
+
from rich.prompt import Prompt
|
16
|
+
from rich.tree import Tree
|
17
|
+
from rich import print
|
18
|
+
|
19
|
+
from pyegeria import (
|
20
|
+
InvalidParameterException,
|
21
|
+
PropertyServerException,
|
22
|
+
UserNotAuthorizedException,
|
23
|
+
AssetCatalog,
|
24
|
+
)
|
25
|
+
|
26
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
27
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
28
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
29
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
30
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
31
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
32
|
+
)
|
33
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
34
|
+
EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
|
35
|
+
"EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
|
36
|
+
)
|
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
|
+
disable_ssl_warnings = True
|
45
|
+
|
46
|
+
guid_list = []
|
47
|
+
|
48
|
+
console = Console(width=EGERIA_WIDTH, force_terminal=(not EGERIA_JUPYTER))
|
49
|
+
|
50
|
+
|
51
|
+
def asset_viewer(
|
52
|
+
asset_guid: 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
|
+
def build_classifications(classification: dict) -> Markdown:
|
61
|
+
class_md = ""
|
62
|
+
for c in classification:
|
63
|
+
c_type = c["classificationName"]
|
64
|
+
if c_type == "Anchors":
|
65
|
+
continue
|
66
|
+
class_md += f"\n* Classification: {c_type}\n"
|
67
|
+
class_props = c.get("classificationProperties", "---")
|
68
|
+
if type(class_props) is dict:
|
69
|
+
for prop in class_props.keys():
|
70
|
+
class_md += f"\t* {prop}: {class_props[prop]}\n"
|
71
|
+
if class_md == "":
|
72
|
+
output = None
|
73
|
+
else:
|
74
|
+
output = class_md
|
75
|
+
return output
|
76
|
+
|
77
|
+
def build_nested_elements(nested_element: dict) -> Markdown:
|
78
|
+
ne_md = " "
|
79
|
+
ne_header = nested_element["elementHeader"]
|
80
|
+
ne_created_by = ne_header["versions"]["createdBy"]
|
81
|
+
ne_created_at = ne_header["versions"]["createTime"]
|
82
|
+
ne_guid = ne_header["guid"]
|
83
|
+
guid_list.append(ne_guid)
|
84
|
+
|
85
|
+
ne_type = ne_header["type"]["typeName"]
|
86
|
+
ne_classifications = ne_header["classifications"]
|
87
|
+
ne_class_md = build_classifications(ne_classifications)
|
88
|
+
# ne_class_md = " " if ne_class_md is None else ne_class_md
|
89
|
+
ne_props = nested_element.get("properties", "---")
|
90
|
+
ne_prop_md = "\n"
|
91
|
+
if type(ne_props) is dict:
|
92
|
+
for prop in ne_props.keys():
|
93
|
+
ne_prop_md += f"\t* {prop}: {ne_props[prop]}\n"
|
94
|
+
ne_md = (
|
95
|
+
f"Nested Element of Type: {ne_type} with GUID: {ne_guid} \n "
|
96
|
+
f"* created by {ne_created_by} at time {ne_created_at}\n"
|
97
|
+
f"\n* Properties:\n{ne_prop_md}\n"
|
98
|
+
)
|
99
|
+
|
100
|
+
if ne_class_md is not None:
|
101
|
+
ne_md += f"* {ne_class_md}"
|
102
|
+
|
103
|
+
output = Markdown(ne_md)
|
104
|
+
return output
|
105
|
+
|
106
|
+
try:
|
107
|
+
a_client = AssetCatalog(server_name, platform_url, user_id=user)
|
108
|
+
|
109
|
+
token = a_client.create_egeria_bearer_token(user, user_pass)
|
110
|
+
# asset_info = a_client.find_assets_in_domain(asset_name)
|
111
|
+
# if type(asset_info) is str:
|
112
|
+
# print("\n No Assets Found - Exiting\n")
|
113
|
+
# sys.exit(1)
|
114
|
+
#
|
115
|
+
# asset_guid = asset_info[0]['guid']
|
116
|
+
|
117
|
+
guid_list.append(asset_guid)
|
118
|
+
|
119
|
+
asset_graph = a_client.get_asset_graph(asset_guid)
|
120
|
+
if type(asset_graph) is not dict:
|
121
|
+
print(f"\n No Asset found for {asset_guid}")
|
122
|
+
sys.exit(1)
|
123
|
+
|
124
|
+
# print(f"\n{json.dumps(asset_graph, indent =2)}\n")
|
125
|
+
|
126
|
+
asset_display_name = asset_graph["properties"].get("displayName", "---")
|
127
|
+
asset_display_description = asset_graph["properties"].get(
|
128
|
+
"displayDescription", "---"
|
129
|
+
)
|
130
|
+
asset_name = asset_graph["properties"].get("name", "---")
|
131
|
+
asset_resource_name = asset_graph["properties"].get("resourceName", "---")
|
132
|
+
asset_resource_description = asset_graph["properties"].get(
|
133
|
+
"resourceDescription", "---"
|
134
|
+
)
|
135
|
+
qualified_name = asset_graph["properties"].get("qualifiedName", "---")
|
136
|
+
|
137
|
+
tree = Tree(
|
138
|
+
f"{asset_name} ({asset_guid})",
|
139
|
+
style="bold bright_white on black",
|
140
|
+
guide_style="bold bright_blue",
|
141
|
+
)
|
142
|
+
style = ""
|
143
|
+
asset_elements = asset_graph["elementHeader"]
|
144
|
+
asset_type = asset_elements["type"]["typeName"]
|
145
|
+
asset_deployed_imp_type = asset_graph["properties"].get(
|
146
|
+
"deployedImplementationType", "---"
|
147
|
+
)
|
148
|
+
|
149
|
+
asset_origin = asset_elements["origin"]["homeMetadataCollectionName"]
|
150
|
+
asset_creation = asset_elements["versions"]["createTime"]
|
151
|
+
asset_created_by = asset_elements["versions"]["createdBy"]
|
152
|
+
asset_classifications = asset_elements["classifications"]
|
153
|
+
asset_nested_elements = asset_graph.get("anchoredElements", "----")
|
154
|
+
asset_relationships = asset_graph["relationships"]
|
155
|
+
asset_class_md = build_classifications(asset_classifications)
|
156
|
+
|
157
|
+
additional_properties = asset_graph["properties"].get(
|
158
|
+
"additionalProperties", None
|
159
|
+
)
|
160
|
+
if additional_properties is not None:
|
161
|
+
add_prop_md = "\n* Additional Properties:\n"
|
162
|
+
for prop in additional_properties:
|
163
|
+
add_prop_md = (
|
164
|
+
f"{add_prop_md}\n\t* {prop}: {additional_properties[prop]}\n"
|
165
|
+
)
|
166
|
+
else:
|
167
|
+
add_prop_md = ""
|
168
|
+
|
169
|
+
extended_properties = asset_graph["properties"].get("extendedProperties", None)
|
170
|
+
if extended_properties is not None:
|
171
|
+
prop_md = "\n* Extended Properties:\n"
|
172
|
+
for prop in extended_properties:
|
173
|
+
prop_md = f"{prop_md}\n\t* {prop}: {extended_properties[prop]}\n"
|
174
|
+
else:
|
175
|
+
prop_md = ""
|
176
|
+
core_md = (
|
177
|
+
f"**Type: {asset_type} Created by: {asset_created_by} on {asset_creation}**\n"
|
178
|
+
f"* Deployed Implementation Type: {asset_deployed_imp_type}\n"
|
179
|
+
f"* Name: {asset_name}\n "
|
180
|
+
f"* Asset Resource Name: {asset_resource_name}\n"
|
181
|
+
f"* Asset Resource Description: {asset_resource_description}\n "
|
182
|
+
f"* Asset Display Name: {asset_display_name}\n"
|
183
|
+
f"* Asset Display Description: {asset_display_description}\n "
|
184
|
+
f"* Qualified Name: {qualified_name}\n "
|
185
|
+
f"* Asset Origin: {asset_origin}\n"
|
186
|
+
f" {prop_md}\n"
|
187
|
+
f" {add_prop_md}\n"
|
188
|
+
)
|
189
|
+
core_md = Markdown(core_md)
|
190
|
+
|
191
|
+
p1 = Panel.fit(core_md, style="bold bright_white")
|
192
|
+
l2 = tree.add(p1)
|
193
|
+
if asset_class_md is not None:
|
194
|
+
p2 = Panel.fit(
|
195
|
+
Markdown(asset_class_md),
|
196
|
+
style="bold bright_white",
|
197
|
+
title="Classifications",
|
198
|
+
)
|
199
|
+
l2 = tree.add(p2)
|
200
|
+
|
201
|
+
#
|
202
|
+
# Nested Assets
|
203
|
+
#
|
204
|
+
if type(asset_nested_elements) is list:
|
205
|
+
l2 = tree.add("Nested Elements", style="bold white")
|
206
|
+
for el in asset_nested_elements:
|
207
|
+
asset_ne_md = build_nested_elements(el)
|
208
|
+
p3 = Panel.fit(
|
209
|
+
asset_ne_md, style="bold bright_white", title="Nested Elements"
|
210
|
+
)
|
211
|
+
l2.add(p3)
|
212
|
+
|
213
|
+
#
|
214
|
+
# Now work on the Relationships
|
215
|
+
#
|
216
|
+
for relationship in asset_relationships:
|
217
|
+
# Find the end guids - if one isn't in our list then display
|
218
|
+
rel_end1 = relationship["end1"]
|
219
|
+
rel_end1_type = rel_end1["type"]["typeName"]
|
220
|
+
rel_end1_guid = rel_end1["guid"]
|
221
|
+
rel_end1_unique_name = rel_end1.get("uniqueName", "---")
|
222
|
+
|
223
|
+
rel_end2 = relationship["end2"]
|
224
|
+
rel_end2_type = rel_end2["type"]["typeName"]
|
225
|
+
rel_end2_guid = rel_end2["guid"]
|
226
|
+
rel_end2_unique_name = rel_end2.get("uniqueName", "---")
|
227
|
+
|
228
|
+
if (rel_end1_guid not in guid_list) or (rel_end2_guid not in guid_list):
|
229
|
+
# rel_end1_class_md = build_classifications(rel_end1["classifications"])
|
230
|
+
# rel_end2_class_md = build_classifications(rel_end2["classifications"])
|
231
|
+
|
232
|
+
relationship_guid = relationship["guid"]
|
233
|
+
relationship_type = relationship["type"]["typeName"]
|
234
|
+
relationship_created_by = relationship["versions"]["createdBy"]
|
235
|
+
relationship_creation_time = relationship["versions"]["createTime"]
|
236
|
+
relationship_properties = relationship.get("properties", "--- ")
|
237
|
+
relationship_md = (
|
238
|
+
f"Relationship Type {relationship_type}\n"
|
239
|
+
f"* GUID: {relationship_guid}\n* Created by: {relationship_created_by} \n"
|
240
|
+
f"* Creation Time: {relationship_creation_time}\n"
|
241
|
+
f"* Properties: {relationship_properties}\n"
|
242
|
+
)
|
243
|
+
|
244
|
+
rel_md = (
|
245
|
+
f"* Relationship Type: {relationship_type}\n"
|
246
|
+
f"* Relationship GUID: {relationship_guid}\n"
|
247
|
+
f"* Created by: {relationship_created_by} at time {relationship_creation_time}\n"
|
248
|
+
)
|
249
|
+
rel_end1_md = (
|
250
|
+
f"* End1:\n"
|
251
|
+
f"\t* Type: {rel_end1_type}\n"
|
252
|
+
f"\t* GUID: {rel_end1_guid}\n"
|
253
|
+
f"\t* Unique Name: {rel_end1_unique_name}\n"
|
254
|
+
)
|
255
|
+
|
256
|
+
# if rel_end1_class_md is not None:
|
257
|
+
# rel_end1_md = rel_end1_class_md + rel_end1_md
|
258
|
+
|
259
|
+
rel_end2_md = (
|
260
|
+
f"* End2:\n"
|
261
|
+
f"\t* Type: {rel_end2_type}\n"
|
262
|
+
f"\t* GUID: {rel_end2_guid}\n"
|
263
|
+
f"\t* Unique Name: {rel_end2_unique_name}\n"
|
264
|
+
)
|
265
|
+
|
266
|
+
# if rel_end2_class_md is not None:
|
267
|
+
# rel_end1_md = rel_end2_class_md + rel_end1_md
|
268
|
+
#
|
269
|
+
# for prop in relationship_properties.keys():
|
270
|
+
# relationship_md += f"* {prop}: {relationship_properties[prop]}\n"
|
271
|
+
|
272
|
+
relationship_md += rel_end1_md + rel_end2_md
|
273
|
+
|
274
|
+
relationship_panel = Panel.fit(
|
275
|
+
Markdown(relationship_md),
|
276
|
+
style="bold bright_white",
|
277
|
+
title="Asset Relationships",
|
278
|
+
)
|
279
|
+
tree.add(relationship_panel)
|
280
|
+
with console.screen():
|
281
|
+
print("\n\n")
|
282
|
+
print(tree)
|
283
|
+
|
284
|
+
except (
|
285
|
+
InvalidParameterException,
|
286
|
+
PropertyServerException,
|
287
|
+
UserNotAuthorizedException,
|
288
|
+
) as e:
|
289
|
+
console.print_exception()
|
290
|
+
console.print(
|
291
|
+
"\n\n ======> Most likely the GUID you provided is either incorrect or not an asset\n[red bold]"
|
292
|
+
)
|
293
|
+
|
294
|
+
|
295
|
+
def main():
|
296
|
+
parser = argparse.ArgumentParser()
|
297
|
+
|
298
|
+
parser.add_argument("--server", help="Name of the server to display status for")
|
299
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
300
|
+
parser.add_argument("--userid", help="User Id")
|
301
|
+
parser.add_argument("--password", help="User Password")
|
302
|
+
args = parser.parse_args()
|
303
|
+
|
304
|
+
server = args.server if args.server is not None else EGERIA_VIEW_SERVER
|
305
|
+
url = args.url if args.url is not None else EGERIA_PLATFORM_URL
|
306
|
+
userid = args.userid if args.userid is not None else EGERIA_USER
|
307
|
+
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
308
|
+
try:
|
309
|
+
asset_guid = Prompt.ask("Enter the Asset GUID to view:", default="")
|
310
|
+
asset_viewer(asset_guid, server, url, userid, user_pass)
|
311
|
+
except KeyboardInterrupt as e:
|
312
|
+
# console.print_exception()
|
313
|
+
pass
|
314
|
+
except Exception as e:
|
315
|
+
console.print_exception()
|
316
|
+
|
317
|
+
|
318
|
+
if __name__ == "__main__":
|
319
|
+
main()
|