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
pyegeria/glossary_omvs.py
DELETED
@@ -1,639 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
|
3
|
-
This module contains the core OMAG configuration class and its methods.
|
4
|
-
|
5
|
-
"""
|
6
|
-
import json
|
7
|
-
from datetime import datetime
|
8
|
-
import asyncio
|
9
|
-
|
10
|
-
# import json
|
11
|
-
from pyegeria._client import Client, max_paging_size
|
12
|
-
from pyegeria._globals import enable_ssl_check
|
13
|
-
from pyegeria._validators import (
|
14
|
-
validate_name,
|
15
|
-
validate_guid,
|
16
|
-
validate_url, validate_search_string,
|
17
|
-
)
|
18
|
-
from pyegeria.utils import body_slimmer
|
19
|
-
|
20
|
-
|
21
|
-
class GlossaryBrowser(Client):
|
22
|
-
"""
|
23
|
-
CoreServerConfig is a class that extends the Client class. It provides methods to configure and interact with access
|
24
|
-
services in the OMAG server.
|
25
|
-
|
26
|
-
Methods:
|
27
|
-
|
28
|
-
- get_stored_configuration(server_name: str = None) -> dict:
|
29
|
-
Retrieves all the configuration documents for a server.
|
30
|
-
|
31
|
-
- get_configured_access_services(server_name: str = None) -> dict:
|
32
|
-
Returns the list of access services that are configured for this server.
|
33
|
-
|
34
|
-
- configure_all_access_services(server_name: str = None) -> None:
|
35
|
-
Enables all access services that are registered with this server platform.
|
36
|
-
|
37
|
-
- configure_all_access_services_no_topics(server_name: str = None) -> None:
|
38
|
-
Configures all access services for the specified server with no cohort/Event Bus.
|
39
|
-
|
40
|
-
- clear_all_access_services(server_name: str = None) -> None:
|
41
|
-
Disables the access services. This removes all configuration for the access services and disables the
|
42
|
-
enterprise repository services.
|
43
|
-
|
44
|
-
- get_access_service_config(access_service_name: str, server_name: str = None) -> dict:
|
45
|
-
Retrieves the config for an access service.
|
46
|
-
|
47
|
-
- configure_access_service(access_service_name: str, server_name: str = None) -> None:
|
48
|
-
Enables a single access service.
|
49
|
-
"""
|
50
|
-
|
51
|
-
def __init__(
|
52
|
-
self,
|
53
|
-
server_name: str,
|
54
|
-
platform_url: str,
|
55
|
-
token: str = None,
|
56
|
-
user_id: str = None,
|
57
|
-
user_pwd: str = None,
|
58
|
-
verify_flag: bool = enable_ssl_check,
|
59
|
-
sync_mode: bool = True
|
60
|
-
):
|
61
|
-
self.admin_command_root: str
|
62
|
-
Client.__init__(self, server_name, platform_url, user_id=user_id, token=token, async_mode=sync_mode)
|
63
|
-
|
64
|
-
#
|
65
|
-
# Glossaries
|
66
|
-
#
|
67
|
-
async def _async_find_glossaries(self, search_string: str, effective_time: str = None, starts_with: bool = False,
|
68
|
-
ends_with: bool = False, ignore_case: bool = False, for_lineage: bool = False,
|
69
|
-
for_duplicate_processing: bool = False, type_name: str = None,
|
70
|
-
server_name: str = None,
|
71
|
-
start_from: int = 0, page_size: int = None) -> list | str:
|
72
|
-
""" Retrieve the list of glossary metadata elements that contain the search string. Async version.
|
73
|
-
The search string is located in the request body and is interpreted as a plain string.
|
74
|
-
The request parameters, startsWith, endsWith and ignoreCase can be used to allow a fuzzy search.
|
75
|
-
|
76
|
-
Parameters
|
77
|
-
----------
|
78
|
-
search_string: str,
|
79
|
-
Search string to use to find matching glossaries. If the search string is '*' then all glossaries returned.
|
80
|
-
|
81
|
-
effective_time: str, [default=None], optional
|
82
|
-
Effective time of the query. If not specified will default to any time.
|
83
|
-
server_name : str, optional
|
84
|
-
The name of the server to configure.
|
85
|
-
If not provided, the server name associated with the instance is used.
|
86
|
-
starts_with : bool, [default=False], optional
|
87
|
-
Starts with the supplied string.
|
88
|
-
ends_with : bool, [default=False], optional
|
89
|
-
Ends with the supplied string
|
90
|
-
ignore_case : bool, [default=False], optional
|
91
|
-
Ignore case when searching
|
92
|
-
for_lineage : bool, [default=False], optional
|
93
|
-
|
94
|
-
for_duplicate_processing : bool, [default=False], optional
|
95
|
-
type_name: str, [default=None], optional
|
96
|
-
An optional parameter indicating the subtype of the glossary to filter by.
|
97
|
-
Values include 'ControlledGlossary', 'EditingGlossary', and 'StagingGlossary'
|
98
|
-
Returns
|
99
|
-
-------
|
100
|
-
List | str
|
101
|
-
|
102
|
-
A list of glossary definitions active in the server.
|
103
|
-
|
104
|
-
Raises
|
105
|
-
------
|
106
|
-
|
107
|
-
InvalidParameterException
|
108
|
-
If the client passes incorrect parameters on the request - such as bad URLs or invalid values
|
109
|
-
PropertyServerException
|
110
|
-
Raised by the server when an issue arises in processing a valid request
|
111
|
-
NotAuthorizedException
|
112
|
-
The principle specified by the user_id does not have authorization for the requested action
|
113
|
-
|
114
|
-
"""
|
115
|
-
if server_name is None:
|
116
|
-
server_name = self.server_name
|
117
|
-
if page_size is None:
|
118
|
-
page_size = self.page_size
|
119
|
-
starts_with_s = str(starts_with).lower()
|
120
|
-
ends_with_s = str(ends_with).lower()
|
121
|
-
ignore_case_s = str(ignore_case).lower()
|
122
|
-
for_lineage_s = str(for_lineage).lower()
|
123
|
-
for_duplicate_processing_s = str(for_duplicate_processing).lower()
|
124
|
-
|
125
|
-
validate_search_string(search_string)
|
126
|
-
|
127
|
-
if search_string is '*':
|
128
|
-
search_string = None
|
129
|
-
|
130
|
-
body = {
|
131
|
-
"class": "SearchStringRequestBody",
|
132
|
-
"searchString": search_string,
|
133
|
-
"effectiveTime": effective_time,
|
134
|
-
"typeName": type_name
|
135
|
-
}
|
136
|
-
body = body_slimmer(body)
|
137
|
-
# print(f"\n\nBody is: \n{body}")
|
138
|
-
|
139
|
-
url = (f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/"
|
140
|
-
f"by-search-string?startFrom={start_from}&pageSize={page_size}&startsWith={starts_with_s}&"
|
141
|
-
f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}&forLineage={for_lineage_s}&"
|
142
|
-
f"forDuplicateProcessing={for_duplicate_processing_s}")
|
143
|
-
|
144
|
-
response = await self._async_make_request("POST", url, body)
|
145
|
-
return response
|
146
|
-
|
147
|
-
def find_glossaries(self, search_string: str, effective_time: str = None, starts_with: bool = False,
|
148
|
-
ends_with: bool = False, ignore_case: bool = False, for_lineage: bool = False,
|
149
|
-
for_duplicate_processing: bool = False, type_name: str = None, server_name: str = None,
|
150
|
-
start_from: int = 0, page_size: int = None) -> list | str:
|
151
|
-
""" Retrieve the list of glossary metadata elements that contain the search string.
|
152
|
-
The search string is located in the request body and is interpreted as a plain string.
|
153
|
-
The request parameters, startsWith, endsWith and ignoreCase can be used to allow a fuzzy search.
|
154
|
-
|
155
|
-
Parameters
|
156
|
-
----------
|
157
|
-
search_string: str,
|
158
|
-
Search string to use to find matching glossaries. If the search string is '*' then all glossaries returned.
|
159
|
-
|
160
|
-
effective_time: str, [default=None], optional
|
161
|
-
Effective time of the query. If not specified will default to any time.
|
162
|
-
server_name : str, optional
|
163
|
-
The name of the server to configure.
|
164
|
-
If not provided, the server name associated with the instance is used.
|
165
|
-
starts_with : bool, [default=False], optional
|
166
|
-
Starts with the supplied string.
|
167
|
-
ends_with : bool, [default=False], optional
|
168
|
-
Ends with the supplied string
|
169
|
-
ignore_case : bool, [default=False], optional
|
170
|
-
Ignore case when searching
|
171
|
-
for_lineage : bool, [default=False], optional
|
172
|
-
|
173
|
-
for_duplicate_processing : bool, [default=False], optional
|
174
|
-
type_name: str, [default=None], optional
|
175
|
-
An optional parameter indicating the subtype of the glossary to filter by.
|
176
|
-
Values include 'ControlledGlossary', 'EditingGlossary', and 'StagingGlossary'
|
177
|
-
Returns
|
178
|
-
-------
|
179
|
-
List | str
|
180
|
-
|
181
|
-
A list of glossary definitions active in the server.
|
182
|
-
|
183
|
-
Raises
|
184
|
-
------
|
185
|
-
|
186
|
-
InvalidParameterException
|
187
|
-
If the client passes incorrect parameters on the request - such as bad URLs or invalid values
|
188
|
-
PropertyServerException
|
189
|
-
Raised by the server when an issue arises in processing a valid request
|
190
|
-
NotAuthorizedException
|
191
|
-
The principle specified by the user_id does not have authorization for the requested action
|
192
|
-
|
193
|
-
"""
|
194
|
-
loop = asyncio.get_event_loop()
|
195
|
-
response = loop.run_until_complete(self._async_find_glossaries(search_string, effective_time, starts_with,
|
196
|
-
ends_with, ignore_case, for_lineage))
|
197
|
-
|
198
|
-
return response.json().get("elementList", "No Glossaries found")
|
199
|
-
|
200
|
-
async def _async_get_glossary_by_guid(self, glossary_guid: str, server_name: str = None,
|
201
|
-
effective_time: str = None) -> dict:
|
202
|
-
""" Retrieves information about a glossary
|
203
|
-
Parameters
|
204
|
-
----------
|
205
|
-
glossary_guid : str
|
206
|
-
Unique idetifier for the glossary
|
207
|
-
server_name : str, optional
|
208
|
-
The name of the server to get the configured access services for.
|
209
|
-
If not provided, the server name associated with the instance is used.
|
210
|
-
effective_time: str, optional
|
211
|
-
Effective time of the query. If not specified will default to any time.
|
212
|
-
Returns
|
213
|
-
-------
|
214
|
-
dict
|
215
|
-
The glossary definition associated with the glossary_guid
|
216
|
-
|
217
|
-
Raises
|
218
|
-
------
|
219
|
-
InvalidParameterException
|
220
|
-
If the client passes incorrect parameters on the request - such as bad URLs or invalid values.
|
221
|
-
PropertyServerException
|
222
|
-
Raised by the server when an issue arises in processing a valid request.
|
223
|
-
NotAuthorizedException
|
224
|
-
The principle specified by the user_id does not have authorization for the requested action.
|
225
|
-
Notes
|
226
|
-
-----
|
227
|
-
"""
|
228
|
-
if server_name is None:
|
229
|
-
server_name = self.server_name
|
230
|
-
validate_guid(glossary_guid)
|
231
|
-
|
232
|
-
body = {
|
233
|
-
"class": "EffectiveTimeQueryRequestBody",
|
234
|
-
"effectiveTime": effective_time
|
235
|
-
}
|
236
|
-
|
237
|
-
url = (f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/"
|
238
|
-
f"{glossary_guid}/retrieve")
|
239
|
-
print(url)
|
240
|
-
response = await self._async_make_request("POST", url, payload=body)
|
241
|
-
return response
|
242
|
-
|
243
|
-
def get_glossary_by_guid(self, glossary_guid: str, server_name: str = None) -> dict:
|
244
|
-
""" Retrieves information about a glossary
|
245
|
-
Parameters
|
246
|
-
----------
|
247
|
-
glossary_guid : str
|
248
|
-
Unique idetifier for the glossary
|
249
|
-
server_name : str, optional
|
250
|
-
The name of the server to get the configured access services for.
|
251
|
-
If not provided, the server name associated with the instance is used.
|
252
|
-
Returns
|
253
|
-
-------
|
254
|
-
dict
|
255
|
-
The glossary definition associated with the glossary_guid
|
256
|
-
|
257
|
-
Raises
|
258
|
-
------
|
259
|
-
InvalidParameterException
|
260
|
-
If the client passes incorrect parameters on the request - such as bad URLs or invalid values.
|
261
|
-
PropertyServerException
|
262
|
-
Raised by the server when an issue arises in processing a valid request.
|
263
|
-
NotAuthorizedException
|
264
|
-
The principle specified by the user_id does not have authorization for the requested action.
|
265
|
-
Notes
|
266
|
-
-----
|
267
|
-
"""
|
268
|
-
loop = asyncio.get_event_loop()
|
269
|
-
response = loop.run_until_complete(self._async_get_glossary_by_guid(glossary_guid, server_name))
|
270
|
-
return response
|
271
|
-
|
272
|
-
async def _async_get_glossaries_by_name(self, glossary_name: str, effective_time: datetime = None,
|
273
|
-
server_name: str = None,
|
274
|
-
start_from: int = 0, page_size: int = None) -> dict | str:
|
275
|
-
""" Retrieve the list of glossary metadata elements with an exactly matching qualified or display name.
|
276
|
-
There are no wildcards supported on this request.
|
277
|
-
|
278
|
-
Parameters
|
279
|
-
----------
|
280
|
-
glossary_name: str,
|
281
|
-
Name of the glossary to be retrieved
|
282
|
-
effective_time: datetime, [default=None], optional
|
283
|
-
Effective time of the query. If not specified will default to any effective time.
|
284
|
-
server_name : str, optional
|
285
|
-
The name of the server to configure.
|
286
|
-
If not provided, the server name associated with the instance is used.
|
287
|
-
|
288
|
-
Returns
|
289
|
-
-------
|
290
|
-
None
|
291
|
-
|
292
|
-
Raises
|
293
|
-
------
|
294
|
-
|
295
|
-
InvalidParameterException
|
296
|
-
If the client passes incorrect parameters on the request - such as bad URLs or invalid values
|
297
|
-
PropertyServerException
|
298
|
-
Raised by the server when an issue arises in processing a valid request
|
299
|
-
NotAuthorizedException
|
300
|
-
The principle specified by the user_id does not have authorization for the requested action
|
301
|
-
ConfigurationErrorException
|
302
|
-
Raised when configuration parameters passed on earlier calls turn out to be
|
303
|
-
invalid or make the new call invalid.
|
304
|
-
"""
|
305
|
-
if server_name is None:
|
306
|
-
server_name = self.server_name
|
307
|
-
if page_size is None:
|
308
|
-
page_size = self.page_size
|
309
|
-
validate_name(glossary_name)
|
310
|
-
|
311
|
-
if effective_time is None:
|
312
|
-
body = {"name": glossary_name}
|
313
|
-
else:
|
314
|
-
body = {"name": glossary_name, "effectiveTime": effective_time}
|
315
|
-
|
316
|
-
url = (f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/"
|
317
|
-
f"by-name?startFrom={start_from}&pageSize={page_size}")
|
318
|
-
|
319
|
-
response = await self._async_make_request("POST", url, body)
|
320
|
-
return response.json()
|
321
|
-
|
322
|
-
def get_glossaries_by_name(self, glossary_name: str, effective_time: datetime = None, server_name: str = None,
|
323
|
-
start_from: int = 0, page_size: int = None) -> dict | str:
|
324
|
-
""" Retrieve the list of glossary metadata elements with an exactly matching qualified or display name.
|
325
|
-
There are no wildcards supported on this request.
|
326
|
-
|
327
|
-
Parameters
|
328
|
-
----------
|
329
|
-
glossary_name: str,
|
330
|
-
Name of the glossary to be retrieved
|
331
|
-
effective_time: datetime, [default=None], optional
|
332
|
-
Effective time of the query. If not specified will default to any effective time.
|
333
|
-
server_name : str, optional
|
334
|
-
The name of the server to configure.
|
335
|
-
If not provided, the server name associated with the instance is used.
|
336
|
-
|
337
|
-
Returns
|
338
|
-
-------
|
339
|
-
None
|
340
|
-
|
341
|
-
Raises
|
342
|
-
------
|
343
|
-
|
344
|
-
InvalidParameterException
|
345
|
-
If the client passes incorrect parameters on the request - such as bad URLs or invalid values
|
346
|
-
PropertyServerException
|
347
|
-
Raised by the server when an issue arises in processing a valid request
|
348
|
-
NotAuthorizedException
|
349
|
-
The principle specified by the user_id does not have authorization for the requested action
|
350
|
-
ConfigurationErrorException
|
351
|
-
Raised when configuration parameters passed on earlier calls turn out to be
|
352
|
-
invalid or make the new call invalid.
|
353
|
-
"""
|
354
|
-
loop = asyncio.get_event_loop()
|
355
|
-
response = loop.run_until_complete(self._async_get_glossaries_by_name(glossary_name, effective_time,
|
356
|
-
server_name, start_from, page_size))
|
357
|
-
return response
|
358
|
-
|
359
|
-
async def _async_get_terms_for_glossary(self, glossary_guid: str, server_name: str = None,
|
360
|
-
effective_time: datetime = None,
|
361
|
-
start_from: int = 0, page_size: int = None) -> list | str:
|
362
|
-
""" Retrieve the list of glossary terms associated with a glossary.
|
363
|
-
The request body also supports the specification of an effective time for the query.
|
364
|
-
Parameters
|
365
|
-
----------
|
366
|
-
glossary_guid : str
|
367
|
-
Unique identifier for the glossary
|
368
|
-
server_name : str, optional
|
369
|
-
The name of the server to get the configured access services for.
|
370
|
-
If not provided, the server name associated with the instance is used.
|
371
|
-
effective_time : str, optional
|
372
|
-
If specified, the query is performed as of the `effective_time`
|
373
|
-
start_from: int, optional defaults to 0
|
374
|
-
The page number to start retrieving elements from
|
375
|
-
page_size : int, optional defaults to None
|
376
|
-
The number of elements to retrieve
|
377
|
-
Returns
|
378
|
-
-------
|
379
|
-
dict
|
380
|
-
The glossary definition associated with the glossary_guid
|
381
|
-
|
382
|
-
Raises
|
383
|
-
------
|
384
|
-
InvalidParameterException
|
385
|
-
If the client passes incorrect parameters on the request - such as bad URLs or invalid values.
|
386
|
-
PropertyServerException
|
387
|
-
Raised by the server when an issue arises in processing a valid request.
|
388
|
-
NotAuthorizedException
|
389
|
-
The principle specified by the user_id does not have authorization for the requested action.
|
390
|
-
Notes
|
391
|
-
-----
|
392
|
-
"""
|
393
|
-
|
394
|
-
if server_name is None:
|
395
|
-
server_name = self.server_name
|
396
|
-
validate_guid(glossary_guid)
|
397
|
-
|
398
|
-
if page_size is None:
|
399
|
-
page_size = self.page_size
|
400
|
-
|
401
|
-
url = (f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/"
|
402
|
-
f"{glossary_guid}/terms/retrieve?startFrom={start_from}&pageSize={page_size}")
|
403
|
-
|
404
|
-
if effective_time is not None:
|
405
|
-
body = {
|
406
|
-
"effectiveTime": str(effective_time)
|
407
|
-
}
|
408
|
-
response = await self._async_make_request("POST", url, body)
|
409
|
-
else:
|
410
|
-
response = await self._async_make_request("POST", url)
|
411
|
-
|
412
|
-
return response.json().get("elementList", "No terms found")
|
413
|
-
|
414
|
-
def get_terms_for_glossary(self, glossary_guid: str, server_name: str = None, effective_time: datetime = None,
|
415
|
-
start_from: int = 0, page_size: int = None) -> list | str:
|
416
|
-
""" Retrieve the list of glossary terms associated with a glossary.
|
417
|
-
The request body also supports the specification of an effective time for the query.
|
418
|
-
Parameters
|
419
|
-
----------
|
420
|
-
glossary_guid : str
|
421
|
-
Unique identifier for the glossary
|
422
|
-
server_name : str, optional
|
423
|
-
The name of the server to get the configured access services for.
|
424
|
-
If not provided, the server name associated with the instance is used.
|
425
|
-
effective_time : str, optional
|
426
|
-
If specified, the query is performed as of the `effective_time`
|
427
|
-
start_from: int, optional defaults to 0
|
428
|
-
The page number to start retrieving elements from
|
429
|
-
page_size : int, optional defaults to None
|
430
|
-
The number of elements to retrieve
|
431
|
-
Returns
|
432
|
-
-------
|
433
|
-
dict
|
434
|
-
The glossary definition associated with the glossary_guid
|
435
|
-
|
436
|
-
Raises
|
437
|
-
------
|
438
|
-
InvalidParameterException
|
439
|
-
If the client passes incorrect parameters on the request - such as bad URLs or invalid values.
|
440
|
-
PropertyServerException
|
441
|
-
Raised by the server when an issue arises in processing a valid request.
|
442
|
-
NotAuthorizedException
|
443
|
-
The principle specified by the user_id does not have authorization for the requested action.
|
444
|
-
Notes
|
445
|
-
-----
|
446
|
-
"""
|
447
|
-
loop = asyncio.get_event_loop()
|
448
|
-
response = loop.run_until_complete(self._async_get_terms_for_glossary(glossary_guid, server_name,
|
449
|
-
effective_time, start_from,
|
450
|
-
page_size))
|
451
|
-
|
452
|
-
return response
|
453
|
-
|
454
|
-
async def _async_get_glossary_for_term(self, term_guid: str, server_name: str = None,
|
455
|
-
effective_time: datetime = None,
|
456
|
-
for_lineage: bool = False, for_duplicate_processing: bool = False) -> dict:
|
457
|
-
if server_name is None:
|
458
|
-
server_name = self.server_name
|
459
|
-
validate_guid(term_guid)
|
460
|
-
for_lineage_s = str(for_lineage).lower()
|
461
|
-
for_duplicate_processing_s = str(for_duplicate_processing).lower()
|
462
|
-
|
463
|
-
body = {
|
464
|
-
"class": "EffectiveTimeQueryRequestBody",
|
465
|
-
"effectiveTime": effective_time
|
466
|
-
}
|
467
|
-
url = (f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/"
|
468
|
-
f"for-term/{term_guid}/retrieve?forLineage={for_lineage_s}&"
|
469
|
-
f"forDuplicateProcessing={for_duplicate_processing_s}"
|
470
|
-
|
471
|
-
)
|
472
|
-
|
473
|
-
response = await self._async_make_request("POST", url, body)
|
474
|
-
return json.loads(response.text)
|
475
|
-
|
476
|
-
def get_glossary_for_term(self, term_guid: str, server_name: str = None, effective_time: datetime = None,
|
477
|
-
for_lineage: bool = False, for_duplicate_processing: bool = False) -> dict:
|
478
|
-
loop = asyncio.get_event_loop()
|
479
|
-
response = loop.run_until_complete(self._async_get_glossary_for_term(term_guid, server_name,
|
480
|
-
effective_time, for_lineage,
|
481
|
-
for_duplicate_processing))
|
482
|
-
return response
|
483
|
-
|
484
|
-
async def _async_get_terms_by_name(self, term: str, glossary_guid: str = None, status_filter: list = [],
|
485
|
-
server_name: str = None,
|
486
|
-
effective_time: datetime = None, for_lineage: bool = False,
|
487
|
-
for_duplicate_processing: bool = False,
|
488
|
-
start_from: int = 0, page_size: int = None) -> list:
|
489
|
-
if server_name is None:
|
490
|
-
server_name = self.server_name
|
491
|
-
if page_size is None:
|
492
|
-
page_size = self.page_size
|
493
|
-
|
494
|
-
validate_name(term)
|
495
|
-
|
496
|
-
for_lineage_s = str(for_lineage).lower()
|
497
|
-
for_duplicate_processing_s = str(for_duplicate_processing).lower()
|
498
|
-
|
499
|
-
body = {
|
500
|
-
"class": "GlossaryNameRequestBody",
|
501
|
-
"glossaryGUID": glossary_guid,
|
502
|
-
"name": term,
|
503
|
-
"effectiveTime": effective_time,
|
504
|
-
"limitResultsByStatus": status_filter
|
505
|
-
}
|
506
|
-
# body = body_slimmer(body)
|
507
|
-
|
508
|
-
url = (f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/"
|
509
|
-
f"terms/by-name?startFrom={start_from}&pageSize={page_size}&"
|
510
|
-
f"&forLineage={for_lineage_s}&forDuplicateProcessing={for_duplicate_processing_s}")
|
511
|
-
|
512
|
-
# print(f"\n\nURL is: \n {url}\n\nBody is: \n{body}")
|
513
|
-
|
514
|
-
response = await self._async_make_request("POST", url, body)
|
515
|
-
return response.json().get("elementList", "No terms found")
|
516
|
-
|
517
|
-
def get_terms_by_name(self, term: str, glossary_guid: str = None, status_filter: list = [], server_name: str = None,
|
518
|
-
effective_time: datetime = None, for_lineage: bool = False,
|
519
|
-
for_duplicate_processing: bool = False,
|
520
|
-
start_from: int = 0, page_size: int = None) -> list:
|
521
|
-
loop = asyncio.get_event_loop()
|
522
|
-
response = loop.run_until_complete(self._async_get_terms_by_name(term, glossary_guid, status_filter,
|
523
|
-
server_name, effective_time, for_lineage,
|
524
|
-
for_duplicate_processing, start_from, page_size))
|
525
|
-
return response
|
526
|
-
|
527
|
-
async def _async_find_glossary_terms(self, search_string: str, glossary_guid: str = None, status_filter: list = [],
|
528
|
-
effective_time: str = None, starts_with: bool = False,
|
529
|
-
ends_with: bool = False, ignore_case: bool = False, for_lineage: bool = False,
|
530
|
-
for_duplicate_processing: bool = False, server_name: str = None,
|
531
|
-
start_from: int = 0, page_size: int = None) -> list | str:
|
532
|
-
|
533
|
-
""" Retrieve the list of glossary term metadata elements that contain the search string.
|
534
|
-
|
535
|
-
Parameters
|
536
|
-
----------
|
537
|
-
search_string: str
|
538
|
-
Search string to use to find matching glossaries. If the search string is '*' then all glossaries returned.
|
539
|
-
glossary_guid str
|
540
|
-
Identifier of the glossary to search within. If None, then all glossaries are searched.
|
541
|
-
status_filter: list, default = [], optional
|
542
|
-
Filters the results by the included Term statuses (such as 'ACTIVE', 'DRAFT'). If not specified,
|
543
|
-
the results will not be filtered.
|
544
|
-
effective_time: str, [default=None], optional
|
545
|
-
Effective time of the query. If not specified will default to any time.
|
546
|
-
If the effective time is not in the right format then it will be considered any.
|
547
|
-
server_name : str, optional
|
548
|
-
The name of the server to configure.
|
549
|
-
If not provided, the server name associated with the instance is used.
|
550
|
-
starts_with : bool, [default=False], optional
|
551
|
-
Starts with the supplied string.
|
552
|
-
ends_with : bool, [default=False], optional
|
553
|
-
Ends with the supplied string
|
554
|
-
ignore_case : bool, [default=False], optional
|
555
|
-
Ignore case when searching
|
556
|
-
for_lineage : bool, [default=False], optional
|
557
|
-
|
558
|
-
for_duplicate_processing : bool, [default=False], optional
|
559
|
-
|
560
|
-
start_from: str, [default=0], optional
|
561
|
-
Page of results to start from
|
562
|
-
page_size : int, optional
|
563
|
-
Number of elements to return per page - if None, then default for class will be used.
|
564
|
-
|
565
|
-
Returns
|
566
|
-
-------
|
567
|
-
List | str
|
568
|
-
|
569
|
-
A list of term definitions
|
570
|
-
|
571
|
-
Raises
|
572
|
-
------
|
573
|
-
InvalidParameterException
|
574
|
-
If the client passes incorrect parameters on the request - such as bad URLs or invalid values
|
575
|
-
PropertyServerException
|
576
|
-
Raised by the server when an issue arises in processing a valid request
|
577
|
-
NotAuthorizedException
|
578
|
-
The principle specified by the user_id does not have authorization for the requested action
|
579
|
-
|
580
|
-
Notes
|
581
|
-
-----
|
582
|
-
The search string is located in the request body and is interpreted as a plain string.
|
583
|
-
The request parameters, startsWith, endsWith and ignoreCase can be used to allow a fuzzy search.
|
584
|
-
The request body also supports the specification of a glossaryGUID to restrict the search to within a single glossary.
|
585
|
-
"""
|
586
|
-
if server_name is None:
|
587
|
-
server_name = self.server_name
|
588
|
-
if page_size is None:
|
589
|
-
page_size = self.page_size
|
590
|
-
if effective_time is None:
|
591
|
-
effective_time = datetime.now().isoformat()
|
592
|
-
starts_with_s = str(starts_with).lower()
|
593
|
-
ends_with_s = str(ends_with).lower()
|
594
|
-
ignore_case_s = str(ignore_case).lower()
|
595
|
-
for_lineage_s = str(for_lineage).lower()
|
596
|
-
for_duplicate_processing_s = str(for_duplicate_processing).lower()
|
597
|
-
if search_string is '*':
|
598
|
-
search_string = None
|
599
|
-
|
600
|
-
# validate_search_string(search_string)
|
601
|
-
|
602
|
-
body = {
|
603
|
-
"class": "GlossarySearchStringRequestBody",
|
604
|
-
"glossaryGUID": glossary_guid,
|
605
|
-
"searchString": search_string,
|
606
|
-
"effectiveTime": effective_time,
|
607
|
-
"limitResultsByStatus": status_filter
|
608
|
-
}
|
609
|
-
# body = body_slimmer(body)
|
610
|
-
|
611
|
-
url = (f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/"
|
612
|
-
f"terms/by-search-string?startFrom={start_from}&pageSize={page_size}&startsWith={starts_with_s}&"
|
613
|
-
f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}&forLineage={for_lineage_s}&"
|
614
|
-
f"forDuplicateProcessing={for_duplicate_processing_s}")
|
615
|
-
|
616
|
-
# print(f"\n\nURL is: \n {url}\n\nBody is: \n{body}")
|
617
|
-
|
618
|
-
response = await self._async_make_request("POST", url, body)
|
619
|
-
return response.json().get("elementList", "No terms found")
|
620
|
-
# return response.text
|
621
|
-
|
622
|
-
def find_glossary_terms(self, search_string: str, glossary_guid: str = None, status_filter: list = [],
|
623
|
-
effective_time: str = None, starts_with: bool = False,
|
624
|
-
ends_with: bool = False, ignore_case: bool = False, for_lineage: bool = False,
|
625
|
-
for_duplicate_processing: bool = False, server_name: str = None,
|
626
|
-
start_from: int = 0, page_size: int = None) -> list | str:
|
627
|
-
|
628
|
-
loop = asyncio.get_event_loop()
|
629
|
-
response = loop.run_until_complete(self._async_find_glossary_terms(search_string, glossary_guid, status_filter,
|
630
|
-
effective_time, starts_with,
|
631
|
-
ends_with, ignore_case, for_lineage,
|
632
|
-
for_duplicate_processing, server_name,
|
633
|
-
start_from, page_size))
|
634
|
-
|
635
|
-
return response
|
636
|
-
|
637
|
-
#
|
638
|
-
# Catagories
|
639
|
-
#
|