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,168 @@
|
|
1
|
+
"""This creates a templates guid file from the core metadata archive"""
|
2
|
+
from rich.markdown import Markdown
|
3
|
+
from rich.prompt import Prompt
|
4
|
+
import os
|
5
|
+
import argparse
|
6
|
+
import time
|
7
|
+
import sys
|
8
|
+
from rich import box
|
9
|
+
from rich.console import Console
|
10
|
+
from rich.table import Table
|
11
|
+
|
12
|
+
from pyegeria import (
|
13
|
+
InvalidParameterException,
|
14
|
+
PropertyServerException,
|
15
|
+
UserNotAuthorizedException,
|
16
|
+
print_exception_response,
|
17
|
+
EgeriaTech,
|
18
|
+
)
|
19
|
+
|
20
|
+
|
21
|
+
console = Console()
|
22
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
23
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
24
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
25
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
26
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
27
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
28
|
+
)
|
29
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
30
|
+
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
31
|
+
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
32
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
33
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
34
|
+
EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
35
|
+
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
36
|
+
|
37
|
+
|
38
|
+
def list_elements(
|
39
|
+
om_type: str,
|
40
|
+
server: str,
|
41
|
+
url: str,
|
42
|
+
username: str,
|
43
|
+
password: str,
|
44
|
+
jupyter: bool = EGERIA_JUPYTER,
|
45
|
+
width: int = EGERIA_WIDTH,
|
46
|
+
):
|
47
|
+
c_client = EgeriaTech(server, url, user_id=username, user_pwd=password)
|
48
|
+
token = c_client.create_egeria_bearer_token()
|
49
|
+
|
50
|
+
om_typedef = c_client.get_typedef_by_name(om_type)
|
51
|
+
if type(om_typedef) is str:
|
52
|
+
print(
|
53
|
+
f"The type name '{om_type}' is not known to the Egeria platform at {url} - {server}"
|
54
|
+
)
|
55
|
+
sys.exit(1)
|
56
|
+
elements = c_client.get_elements(om_type)
|
57
|
+
|
58
|
+
def generate_table() -> Table:
|
59
|
+
"""Make a new table."""
|
60
|
+
table = Table(
|
61
|
+
caption=f"Metadata Elements for: {url} - {server} @ {time.asctime()}",
|
62
|
+
style="bold bright_white on black",
|
63
|
+
row_styles=["bold bright_white on black"],
|
64
|
+
header_style="white on dark_blue",
|
65
|
+
title_style="bold bright_white on black",
|
66
|
+
caption_style="white on black",
|
67
|
+
show_lines=True,
|
68
|
+
box=box.ROUNDED,
|
69
|
+
title=f"Elements for Open Metadata Type: '{om_type}' ",
|
70
|
+
expand=True,
|
71
|
+
# width=500
|
72
|
+
)
|
73
|
+
|
74
|
+
table.add_column("Qualified Name")
|
75
|
+
table.add_column("Type")
|
76
|
+
table.add_column("Created")
|
77
|
+
table.add_column("Home Store")
|
78
|
+
table.add_column("GUID", width=38, no_wrap=True)
|
79
|
+
table.add_column("Properties")
|
80
|
+
table.add_column("Classifications")
|
81
|
+
|
82
|
+
if type(elements) is list:
|
83
|
+
for element in elements:
|
84
|
+
header = element["elementHeader"]
|
85
|
+
el_q_name = element["properties"].get("qualifiedName", "---")
|
86
|
+
el_type = header["type"]["typeName"]
|
87
|
+
el_home = header["origin"]["homeMetadataCollectionName"]
|
88
|
+
el_create_time = header["versions"]["createTime"][:-10]
|
89
|
+
el_guid = header["guid"]
|
90
|
+
el_class = header.get("classifications", "---")
|
91
|
+
|
92
|
+
el_props_md = ""
|
93
|
+
for prop in element["properties"].keys():
|
94
|
+
el_props_md += f"* **{prop}**: {element['properties'][prop]}\n"
|
95
|
+
el_props_out = Markdown(el_props_md)
|
96
|
+
|
97
|
+
c_md = ""
|
98
|
+
if type(el_class) is list:
|
99
|
+
for classification in el_class:
|
100
|
+
classification_name = classification.get(
|
101
|
+
"classificationName", "---"
|
102
|
+
)
|
103
|
+
c_md = f"* **{classification_name}**\n"
|
104
|
+
class_props = classification.get(
|
105
|
+
"classificationProperties", "---"
|
106
|
+
)
|
107
|
+
if type(class_props) is dict:
|
108
|
+
for prop in class_props.keys():
|
109
|
+
c_md += f" * **{prop}**: {class_props[prop]}\n"
|
110
|
+
c_md_out = Markdown(c_md)
|
111
|
+
|
112
|
+
table.add_row(
|
113
|
+
el_q_name,
|
114
|
+
el_type,
|
115
|
+
el_create_time,
|
116
|
+
el_home,
|
117
|
+
el_guid,
|
118
|
+
el_props_out,
|
119
|
+
c_md_out,
|
120
|
+
)
|
121
|
+
|
122
|
+
return table
|
123
|
+
else:
|
124
|
+
print("No instances found")
|
125
|
+
sys.exit(1)
|
126
|
+
|
127
|
+
try:
|
128
|
+
console = Console(width=width, force_terminal=not jupyter)
|
129
|
+
|
130
|
+
with console.pager(styles=True):
|
131
|
+
console.print(generate_table())
|
132
|
+
|
133
|
+
except (
|
134
|
+
InvalidParameterException,
|
135
|
+
PropertyServerException,
|
136
|
+
UserNotAuthorizedException,
|
137
|
+
) as e:
|
138
|
+
print_exception_response(e)
|
139
|
+
print("\n\nPerhaps the type name isn't known")
|
140
|
+
finally:
|
141
|
+
c_client.close_session()
|
142
|
+
|
143
|
+
|
144
|
+
def main():
|
145
|
+
parser = argparse.ArgumentParser()
|
146
|
+
parser.add_argument("--server", help="Name of the server to display status for")
|
147
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
148
|
+
parser.add_argument("--userid", help="User Id")
|
149
|
+
parser.add_argument("--password", help="Password")
|
150
|
+
|
151
|
+
args = parser.parse_args()
|
152
|
+
|
153
|
+
server = args.server if args.server is not None else EGERIA_VIEW_SERVER
|
154
|
+
url = args.url if args.url is not None else EGERIA_PLATFORM_URL
|
155
|
+
userid = args.userid if args.userid is not None else EGERIA_USER
|
156
|
+
password = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
157
|
+
|
158
|
+
try:
|
159
|
+
om_type = Prompt.ask(
|
160
|
+
"Enter the Open Metadata Type to find elements of:", default="GlossaryTerm"
|
161
|
+
)
|
162
|
+
list_elements(om_type, server, url, userid, password)
|
163
|
+
except KeyboardInterrupt:
|
164
|
+
pass
|
165
|
+
|
166
|
+
|
167
|
+
if __name__ == "__main__":
|
168
|
+
main()
|
@@ -0,0 +1,171 @@
|
|
1
|
+
"""This creates a templates guid file from the core metadata archive"""
|
2
|
+
from jedi import Project
|
3
|
+
from rich.markdown import Markdown
|
4
|
+
from rich.prompt import Prompt
|
5
|
+
import os
|
6
|
+
import argparse
|
7
|
+
import time
|
8
|
+
import sys
|
9
|
+
from rich import box
|
10
|
+
from rich.console import Console
|
11
|
+
from rich.table import Table
|
12
|
+
|
13
|
+
from pyegeria import (
|
14
|
+
InvalidParameterException,
|
15
|
+
PropertyServerException,
|
16
|
+
UserNotAuthorizedException,
|
17
|
+
print_exception_response,
|
18
|
+
EgeriaTech,
|
19
|
+
)
|
20
|
+
|
21
|
+
console = Console()
|
22
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
23
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
24
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
25
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
26
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
27
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
28
|
+
)
|
29
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
30
|
+
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
31
|
+
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
32
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
33
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
34
|
+
EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
35
|
+
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
36
|
+
|
37
|
+
|
38
|
+
def list_classified_elements(
|
39
|
+
om_type: str,
|
40
|
+
classification: str,
|
41
|
+
server: str,
|
42
|
+
url: str,
|
43
|
+
username: str,
|
44
|
+
password: str,
|
45
|
+
jupyter: bool = EGERIA_JUPYTER,
|
46
|
+
width: int = EGERIA_WIDTH,
|
47
|
+
):
|
48
|
+
c_client = EgeriaTech(server, url, user_id=username, user_pwd=password)
|
49
|
+
token = c_client.create_egeria_bearer_token()
|
50
|
+
|
51
|
+
om_typedef = c_client.get_typedef_by_name(om_type)
|
52
|
+
if type(om_typedef) is str:
|
53
|
+
print(
|
54
|
+
f"The type name '{om_type}' is not known to the Egeria platform at {url} - {server}"
|
55
|
+
)
|
56
|
+
sys.exit(1)
|
57
|
+
|
58
|
+
elements = c_client.get_elements_by_classification(classification, om_type)
|
59
|
+
|
60
|
+
def generate_table() -> Table:
|
61
|
+
"""Make a new table."""
|
62
|
+
table = Table(
|
63
|
+
caption=f"Metadata Elements for: {url} - {server} @ {time.asctime()}",
|
64
|
+
style="bold bright_white on black",
|
65
|
+
row_styles=["bold bright_white on black"],
|
66
|
+
header_style="white on dark_blue",
|
67
|
+
title_style="bold bright_white on black",
|
68
|
+
caption_style="white on black",
|
69
|
+
show_lines=True,
|
70
|
+
box=box.ROUNDED,
|
71
|
+
title=f"Elements for Open Metadata Type: '{om_type}' ",
|
72
|
+
expand=True,
|
73
|
+
# width=500
|
74
|
+
)
|
75
|
+
|
76
|
+
table.add_column("Qualified Name")
|
77
|
+
table.add_column("Type")
|
78
|
+
table.add_column("Created")
|
79
|
+
table.add_column("Home Store")
|
80
|
+
table.add_column("GUID", width=38, no_wrap=True)
|
81
|
+
table.add_column("Properties")
|
82
|
+
table.add_column("Classifications")
|
83
|
+
|
84
|
+
if type(elements) is list:
|
85
|
+
for element in elements:
|
86
|
+
header = element["elementHeader"]
|
87
|
+
el_q_name = element["properties"].get("qualifiedName", "---")
|
88
|
+
el_type = header["type"]["typeName"]
|
89
|
+
el_home = header["origin"]["homeMetadataCollectionName"]
|
90
|
+
el_create_time = header["versions"]["createTime"][:-10]
|
91
|
+
el_guid = header["guid"]
|
92
|
+
el_class = header.get("classifications", "---")
|
93
|
+
|
94
|
+
el_props_md = ""
|
95
|
+
for prop in element["properties"].keys():
|
96
|
+
el_props_md += f"* **{prop}**: {element['properties'][prop]}\n"
|
97
|
+
el_props_out = Markdown(el_props_md)
|
98
|
+
|
99
|
+
c_md = ""
|
100
|
+
if type(el_class) is list:
|
101
|
+
for classification in el_class:
|
102
|
+
classification_name = classification.get(
|
103
|
+
"classificationName", "---"
|
104
|
+
)
|
105
|
+
c_md = f"* **{classification_name}**\n"
|
106
|
+
class_props = classification.get(
|
107
|
+
"classificationProperties", "---"
|
108
|
+
)
|
109
|
+
if type(class_props) is dict:
|
110
|
+
for prop in class_props.keys():
|
111
|
+
c_md += f" * **{prop}**: {class_props[prop]}\n"
|
112
|
+
c_md_out = Markdown(c_md)
|
113
|
+
|
114
|
+
table.add_row(
|
115
|
+
el_q_name,
|
116
|
+
el_type,
|
117
|
+
el_create_time,
|
118
|
+
el_home,
|
119
|
+
el_guid,
|
120
|
+
el_props_out,
|
121
|
+
c_md_out,
|
122
|
+
)
|
123
|
+
|
124
|
+
return table
|
125
|
+
else:
|
126
|
+
print("No instances found")
|
127
|
+
sys.exit(1)
|
128
|
+
|
129
|
+
try:
|
130
|
+
console = Console(width=width, force_terminal=not jupyter)
|
131
|
+
|
132
|
+
with console.pager(styles=True):
|
133
|
+
console.print(generate_table())
|
134
|
+
|
135
|
+
except (
|
136
|
+
InvalidParameterException,
|
137
|
+
PropertyServerException,
|
138
|
+
UserNotAuthorizedException,
|
139
|
+
) as e:
|
140
|
+
print_exception_response(e)
|
141
|
+
print("\n\nPerhaps the type name isn't known")
|
142
|
+
finally:
|
143
|
+
c_client.close_session()
|
144
|
+
|
145
|
+
|
146
|
+
def main():
|
147
|
+
parser = argparse.ArgumentParser()
|
148
|
+
parser.add_argument("--server", help="Name of the server to display status for")
|
149
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
150
|
+
parser.add_argument("--userid", help="User Id")
|
151
|
+
parser.add_argument("--password", help="Password")
|
152
|
+
|
153
|
+
args = parser.parse_args()
|
154
|
+
|
155
|
+
server = args.server if args.server is not None else EGERIA_VIEW_SERVER
|
156
|
+
url = args.url if args.url is not None else EGERIA_PLATFORM_URL
|
157
|
+
userid = args.userid if args.userid is not None else EGERIA_USER
|
158
|
+
password = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
159
|
+
|
160
|
+
try:
|
161
|
+
om_type = Prompt.ask(
|
162
|
+
"Enter the Open Metadata Type to find elements of:", default="Project"
|
163
|
+
)
|
164
|
+
classification = Prompt.ask("Enter the classification to filter by: ")
|
165
|
+
list_classified_elements(om_type, classification, server, url, userid, password)
|
166
|
+
except KeyboardInterrupt:
|
167
|
+
pass
|
168
|
+
|
169
|
+
|
170
|
+
if __name__ == "__main__":
|
171
|
+
main()
|
@@ -0,0 +1,191 @@
|
|
1
|
+
"""This creates a templates guid file from the core metadata archive"""
|
2
|
+
from rich.markdown import Markdown
|
3
|
+
from rich.prompt import Prompt
|
4
|
+
import os
|
5
|
+
import argparse
|
6
|
+
import time
|
7
|
+
import sys
|
8
|
+
from rich import box
|
9
|
+
from rich.console import Console
|
10
|
+
from rich.table import Table
|
11
|
+
|
12
|
+
from pyegeria import (
|
13
|
+
InvalidParameterException,
|
14
|
+
PropertyServerException,
|
15
|
+
UserNotAuthorizedException,
|
16
|
+
print_exception_response,
|
17
|
+
# ClassificationManager,
|
18
|
+
# FeedbackManager,
|
19
|
+
EgeriaTech,
|
20
|
+
)
|
21
|
+
|
22
|
+
|
23
|
+
console = Console()
|
24
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
25
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
26
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
27
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
28
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
29
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
30
|
+
)
|
31
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
32
|
+
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
33
|
+
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
34
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
35
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
36
|
+
EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
37
|
+
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
38
|
+
|
39
|
+
|
40
|
+
def list_elements_x(
|
41
|
+
om_type: str,
|
42
|
+
server: str,
|
43
|
+
url: str,
|
44
|
+
username: str,
|
45
|
+
password: str,
|
46
|
+
jupyter: bool = EGERIA_JUPYTER,
|
47
|
+
width: int = EGERIA_WIDTH,
|
48
|
+
):
|
49
|
+
c_client = EgeriaTech(server, url, user_id=username, user_pwd=password)
|
50
|
+
token = c_client.create_egeria_bearer_token()
|
51
|
+
|
52
|
+
om_typedef = c_client.get_typedef_by_name(om_type)
|
53
|
+
if type(om_typedef) is str:
|
54
|
+
print(
|
55
|
+
f"The type name '{om_type}' is not known to the Egeria platform at {url} - {server}"
|
56
|
+
)
|
57
|
+
sys.exit(1)
|
58
|
+
elements = c_client.get_elements(om_type)
|
59
|
+
|
60
|
+
def generate_table() -> Table:
|
61
|
+
"""Make a new table."""
|
62
|
+
table = Table(
|
63
|
+
caption=f"Metadata Elements for: {url} - {server} @ {time.asctime()}",
|
64
|
+
style="bold bright_white on black",
|
65
|
+
row_styles=["bold bright_white on black"],
|
66
|
+
header_style="white on dark_blue",
|
67
|
+
title_style="bold bright_white on black",
|
68
|
+
caption_style="white on black",
|
69
|
+
show_lines=True,
|
70
|
+
box=box.ROUNDED,
|
71
|
+
title=f"Elements for Open Metadata Type: '{om_type}' ",
|
72
|
+
expand=True,
|
73
|
+
width=width,
|
74
|
+
)
|
75
|
+
|
76
|
+
table.add_column("Qualified Name")
|
77
|
+
table.add_column("Type")
|
78
|
+
table.add_column("Created")
|
79
|
+
table.add_column("Home Store")
|
80
|
+
table.add_column("GUID", width=38, no_wrap=True)
|
81
|
+
table.add_column("Properties")
|
82
|
+
table.add_column("Feedback", min_width=30)
|
83
|
+
table.add_column("Public Comments")
|
84
|
+
|
85
|
+
if type(elements) is list:
|
86
|
+
for element in elements:
|
87
|
+
header = element["elementHeader"]
|
88
|
+
el_q_name = element["properties"].get("qualifiedName", "---")
|
89
|
+
el_type = header["type"]["typeName"]
|
90
|
+
el_home = header["origin"]["homeMetadataCollectionName"]
|
91
|
+
el_create_time = header["versions"]["createTime"][:-18]
|
92
|
+
el_guid = header["guid"]
|
93
|
+
|
94
|
+
el_props_md = ""
|
95
|
+
for prop in element["properties"].keys():
|
96
|
+
el_props_md += f"* **{prop}**: {element['properties'][prop]}\n"
|
97
|
+
|
98
|
+
el_props_out = Markdown(el_props_md)
|
99
|
+
|
100
|
+
tags = c_client.get_attached_tags(el_guid)
|
101
|
+
tags_md = "Tags:\n"
|
102
|
+
if type(tags) is list:
|
103
|
+
for tag in tags:
|
104
|
+
tags_md += (
|
105
|
+
f"* tag: {tag.get('name','')}\n"
|
106
|
+
f"\t description: {tag.get('description','---')}\n"
|
107
|
+
f"\t assigned by: {tag.get('user','---')}\n"
|
108
|
+
)
|
109
|
+
|
110
|
+
else:
|
111
|
+
tags_md = ""
|
112
|
+
|
113
|
+
likes = c_client.get_attached_likes(el_guid)
|
114
|
+
likes_md = "Likes:\b"
|
115
|
+
if type(likes) is list:
|
116
|
+
for like in likes:
|
117
|
+
likes_md += (
|
118
|
+
f"* tag: {like['name']}\n"
|
119
|
+
f"* description: {like['description']}\n"
|
120
|
+
f"* assigned by: {like['user']}\n"
|
121
|
+
f"\n"
|
122
|
+
)
|
123
|
+
|
124
|
+
else:
|
125
|
+
likes_md = ""
|
126
|
+
|
127
|
+
if len(tags_md) > 0 and len(likes_md) > 0:
|
128
|
+
feedback_out = f"{tags_md}\n --- \n{likes_md}"
|
129
|
+
else:
|
130
|
+
feedback_out = ""
|
131
|
+
|
132
|
+
comments_out = " "
|
133
|
+
|
134
|
+
table.add_row(
|
135
|
+
el_q_name,
|
136
|
+
el_type,
|
137
|
+
el_create_time,
|
138
|
+
el_home,
|
139
|
+
el_guid,
|
140
|
+
el_props_out,
|
141
|
+
feedback_out,
|
142
|
+
comments_out,
|
143
|
+
)
|
144
|
+
|
145
|
+
return table
|
146
|
+
else:
|
147
|
+
print("No instances found")
|
148
|
+
sys.exit(1)
|
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
|
+
c_client.close_session()
|
165
|
+
|
166
|
+
|
167
|
+
def main():
|
168
|
+
parser = argparse.ArgumentParser()
|
169
|
+
parser.add_argument("--server", help="Name of the server to display status for")
|
170
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
171
|
+
parser.add_argument("--userid", help="User Id")
|
172
|
+
parser.add_argument("--password", help="Password")
|
173
|
+
|
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
|
+
password = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
180
|
+
|
181
|
+
try:
|
182
|
+
om_type = Prompt.ask(
|
183
|
+
"Enter the Open Metadata Type to find elements of:", default="GlossaryTerm"
|
184
|
+
)
|
185
|
+
list_elements_x(om_type, server, url, userid, password)
|
186
|
+
except KeyboardInterrupt:
|
187
|
+
pass
|
188
|
+
|
189
|
+
|
190
|
+
if __name__ == "__main__":
|
191
|
+
main()
|
@@ -0,0 +1,139 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
SPDX-Lic
|
4
|
+
ense-Identifier: Apache-2.0
|
5
|
+
Copyright Contributors to the ODPi Egeria project.
|
6
|
+
|
7
|
+
|
8
|
+
List the currently loaded Governance Action Processes.
|
9
|
+
"""
|
10
|
+
import argparse
|
11
|
+
import os
|
12
|
+
import sys
|
13
|
+
import time
|
14
|
+
|
15
|
+
from rich import box
|
16
|
+
from rich import print
|
17
|
+
from rich.console import Console
|
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
|
+
EgeriaTech,
|
27
|
+
)
|
28
|
+
from pyegeria import ValidMetadataManager
|
29
|
+
|
30
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
31
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
32
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
33
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
34
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
35
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
36
|
+
)
|
37
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
38
|
+
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
39
|
+
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
40
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
41
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
42
|
+
EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
43
|
+
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
44
|
+
|
45
|
+
|
46
|
+
def display_gov_processes(
|
47
|
+
type_name: str,
|
48
|
+
server: str,
|
49
|
+
url: str,
|
50
|
+
username: str,
|
51
|
+
user_pass: str,
|
52
|
+
jupyter: bool = EGERIA_JUPYTER,
|
53
|
+
width: int = EGERIA_WIDTH,
|
54
|
+
) -> Table:
|
55
|
+
p_client = EgeriaTech(server, url, user_id=username, user_pwd=user_pass)
|
56
|
+
token = p_client.create_egeria_bearer_token(username, user_pass)
|
57
|
+
|
58
|
+
def generate_table(type_name: str) -> Table:
|
59
|
+
"""Make a new table."""
|
60
|
+
table = Table(
|
61
|
+
title=f"Available Governance Action Processes @ {time.asctime()}",
|
62
|
+
style="bold white on black",
|
63
|
+
row_styles=["bold white on black"],
|
64
|
+
header_style="white on dark_blue",
|
65
|
+
title_style="bold white on black",
|
66
|
+
caption_style="white on black",
|
67
|
+
show_lines=True,
|
68
|
+
box=box.ROUNDED,
|
69
|
+
caption=f"list for Server '{server}' @ Platform - {url}",
|
70
|
+
expand=True,
|
71
|
+
)
|
72
|
+
|
73
|
+
table.add_column(
|
74
|
+
"Name",
|
75
|
+
no_wrap=True,
|
76
|
+
)
|
77
|
+
table.add_column("Qualified Name")
|
78
|
+
table.add_column(
|
79
|
+
"GUID",
|
80
|
+
no_wrap=True,
|
81
|
+
)
|
82
|
+
table.add_column("Description")
|
83
|
+
|
84
|
+
process_list = p_client.find_gov_action_processes(type_name)
|
85
|
+
|
86
|
+
if type(process_list) is str:
|
87
|
+
print("No Governance Processes found matching the type name\n")
|
88
|
+
sys.exit(1)
|
89
|
+
|
90
|
+
for proc in process_list:
|
91
|
+
guid = proc["elementHeader"]["guid"]
|
92
|
+
props = proc["processProperties"]
|
93
|
+
name = props[("displayName" "")]
|
94
|
+
qualified_name = props["qualifiedName"]
|
95
|
+
description = props.get("description", "---")
|
96
|
+
|
97
|
+
table.add_row(name, qualified_name, guid, description)
|
98
|
+
|
99
|
+
p_client.close_session()
|
100
|
+
return table
|
101
|
+
|
102
|
+
try:
|
103
|
+
console = Console(width=width, force_terminal=not jupyter, record=True)
|
104
|
+
with console.pager(styles=True):
|
105
|
+
console.print(generate_table(type_name))
|
106
|
+
|
107
|
+
except (
|
108
|
+
InvalidParameterException,
|
109
|
+
PropertyServerException,
|
110
|
+
UserNotAuthorizedException,
|
111
|
+
ValueError,
|
112
|
+
) as e:
|
113
|
+
if type(e) is str:
|
114
|
+
print(e)
|
115
|
+
else:
|
116
|
+
print_exception_response(e)
|
117
|
+
|
118
|
+
|
119
|
+
def main():
|
120
|
+
parser = argparse.ArgumentParser()
|
121
|
+
parser.add_argument("--server", help="Name of the server to display status for")
|
122
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
123
|
+
parser.add_argument("--userid", help="User Id")
|
124
|
+
parser.add_argument("--password", help="User Password")
|
125
|
+
parser.add_argument("--save-output", help="Save output to file?")
|
126
|
+
|
127
|
+
args = parser.parse_args()
|
128
|
+
|
129
|
+
server = args.server if args.server is not None else EGERIA_VIEW_SERVER
|
130
|
+
url = args.url if args.url is not None else EGERIA_PLATFORM_URL
|
131
|
+
userid = args.userid if args.userid is not None else EGERIA_USER
|
132
|
+
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
133
|
+
type_name = Prompt.ask("Enter the Type Name to retrieve:", default="*")
|
134
|
+
|
135
|
+
display_gov_processes(type_name, server, url, userid, user_pass)
|
136
|
+
|
137
|
+
|
138
|
+
if __name__ == "__main__":
|
139
|
+
main()
|