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/server_operations.py
CHANGED
@@ -6,20 +6,21 @@ Copyright Contributors to the ODPi Egeria project.
|
|
6
6
|
|
7
7
|
"""
|
8
8
|
|
9
|
+
import asyncio
|
10
|
+
|
9
11
|
from requests import Response
|
10
12
|
|
11
|
-
from pyegeria.exceptions import (
|
12
|
-
InvalidParameterException,
|
13
|
-
)
|
14
13
|
from pyegeria import Platform
|
15
|
-
import
|
14
|
+
from pyegeria._validators import validate_name
|
15
|
+
|
16
16
|
|
17
17
|
class ServerOps(Platform):
|
18
18
|
"""
|
19
19
|
Client to issue operations on a running OMAG server.
|
20
20
|
|
21
21
|
Attributes:
|
22
|
-
|
22
|
+
server_name: str
|
23
|
+
Name of the server to use.
|
23
24
|
platform_url : str
|
24
25
|
URL of the server platform to connect to
|
25
26
|
user_id : str
|
@@ -27,33 +28,20 @@ class ServerOps(Platform):
|
|
27
28
|
when the user doesn't pass the user_id on a method call.
|
28
29
|
user_pwd: str
|
29
30
|
The password associated with the user_id. Defaults to None
|
30
|
-
verify_flag: bool
|
31
|
-
Flag to indicate if SSL Certificates should be verified in the HTTP requests.
|
32
|
-
Defaults to False.
|
33
|
-
|
34
|
-
Methods:
|
35
|
-
__init__(self,
|
36
|
-
platform_url: str,
|
37
|
-
end_user_id: str,
|
38
|
-
)
|
39
|
-
Initializes the connection - throwing an exception if there is a problem
|
40
31
|
|
41
32
|
"""
|
42
33
|
|
43
|
-
|
44
34
|
def __init__(
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
verify_flag: bool = False,
|
35
|
+
self,
|
36
|
+
server_name: str,
|
37
|
+
platform_url: str,
|
38
|
+
user_id: str,
|
39
|
+
user_pwd: str = None,
|
51
40
|
):
|
52
|
-
Platform.__init__(self, server_name, platform_url, user_id, user_pwd
|
53
|
-
self.ops_command_root = (
|
54
|
-
|
55
|
-
|
56
|
-
|
41
|
+
Platform.__init__(self, server_name, platform_url, user_id, user_pwd)
|
42
|
+
self.ops_command_root = (
|
43
|
+
f"{self.platform_url}/open-metadata/server-operations/users/{user_id}"
|
44
|
+
)
|
57
45
|
|
58
46
|
async def _async_get_active_configuration(self, server: str = None) -> dict | str:
|
59
47
|
"""
|
@@ -97,10 +85,12 @@ class ServerOps(Platform):
|
|
97
85
|
response = loop.run_until_complete(self._async_get_active_configuration(server))
|
98
86
|
return response
|
99
87
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
async def _async_add_archive_file(
|
88
|
+
#
|
89
|
+
# Archive Files
|
90
|
+
#
|
91
|
+
async def _async_add_archive_file(
|
92
|
+
self, archive_file: str, server: str = None, timeout: int = 60
|
93
|
+
) -> None:
|
104
94
|
"""
|
105
95
|
Load the server with the contents of the indicated archive file.
|
106
96
|
|
@@ -109,7 +99,7 @@ class ServerOps(Platform):
|
|
109
99
|
archive_file: the name of the archive file to load
|
110
100
|
- note that the path is relative to the working directory of the platform.
|
111
101
|
server : Use the server if specified. If None, use the default server associated with the Platform object.
|
112
|
-
|
102
|
+
timeout: Timeout in seconds. Defaults to 30 seconds.
|
113
103
|
Returns
|
114
104
|
-------
|
115
105
|
Response object. Also throws exceptions if no viable server or endpoint errors
|
@@ -119,14 +109,17 @@ class ServerOps(Platform):
|
|
119
109
|
server = self.server_name
|
120
110
|
|
121
111
|
url = (
|
122
|
-
|
123
|
-
|
124
|
-
|
112
|
+
self.ops_command_root
|
113
|
+
+ "/servers/"
|
114
|
+
+ server
|
115
|
+
+ "/instance/open-metadata-archives/file"
|
125
116
|
)
|
126
117
|
|
127
|
-
await self._async_make_request("POST-DATA", url, archive_file)
|
118
|
+
await self._async_make_request("POST-DATA", url, archive_file, time_out=timeout)
|
128
119
|
|
129
|
-
def add_archive_file(
|
120
|
+
def add_archive_file(
|
121
|
+
self, archive_file: str, server: str = None, timeout: int = 30
|
122
|
+
) -> None:
|
130
123
|
"""
|
131
124
|
Load the server with the contents of the indicated archive file.
|
132
125
|
|
@@ -135,6 +128,7 @@ class ServerOps(Platform):
|
|
135
128
|
archive_file: the name of the archive file to load
|
136
129
|
- note that the path is relative to the working directory of the platform.
|
137
130
|
server : Use the server if specified. If None, use the default server associated with the Platform object.
|
131
|
+
timeout: Timeout in seconds. Defaults to 30 seconds.
|
138
132
|
|
139
133
|
Returns
|
140
134
|
-------
|
@@ -142,10 +136,14 @@ class ServerOps(Platform):
|
|
142
136
|
|
143
137
|
"""
|
144
138
|
loop = asyncio.get_event_loop()
|
145
|
-
loop.run_until_complete(
|
139
|
+
loop.run_until_complete(
|
140
|
+
self._async_add_archive_file(archive_file, server, timeout)
|
141
|
+
)
|
146
142
|
|
147
|
-
async def _async_add_archive(
|
148
|
-
|
143
|
+
async def _async_add_archive(
|
144
|
+
self, archive_connection: str, server: str = None
|
145
|
+
) -> None:
|
146
|
+
"""Load the server with the contents of the indicated archive file.
|
149
147
|
|
150
148
|
/open-metadata/server-operations/users/{userId}/server-platform/servers/{serverName}/instance/open-metadata-archives/connection
|
151
149
|
|
@@ -166,13 +164,13 @@ class ServerOps(Platform):
|
|
166
164
|
server = self.server_name
|
167
165
|
|
168
166
|
url = (
|
169
|
-
|
170
|
-
|
171
|
-
|
167
|
+
self.ops_command_root
|
168
|
+
+ "/servers/"
|
169
|
+
+ server
|
170
|
+
+ "/instance/open-metadata-archives/connection"
|
172
171
|
)
|
173
172
|
await self._async_make_request("POST-DATA", url, archive_connection)
|
174
173
|
|
175
|
-
|
176
174
|
def add_archive(self, archive_connection: str, server: str = None) -> None:
|
177
175
|
"""
|
178
176
|
Load the server with the contents of the indicated archive file.
|
@@ -192,10 +190,16 @@ class ServerOps(Platform):
|
|
192
190
|
|
193
191
|
"""
|
194
192
|
loop = asyncio.get_event_loop()
|
195
|
-
loop.run_until_complete(
|
193
|
+
loop.run_until_complete(
|
194
|
+
self._async_add_archive_file(archive_connection, server)
|
195
|
+
)
|
196
|
+
|
197
|
+
#
|
198
|
+
# Server Ops
|
199
|
+
#
|
196
200
|
|
197
|
-
async def _async_get_active_server_status(self, server:str = None) -> dict:
|
198
|
-
"""
|
201
|
+
async def _async_get_active_server_status(self, server: str = None) -> dict:
|
202
|
+
"""Get the status for the specified server.
|
199
203
|
|
200
204
|
Parameters
|
201
205
|
----------
|
@@ -248,7 +252,9 @@ class ServerOps(Platform):
|
|
248
252
|
response = loop.run_until_complete(self._async_get_active_server_status(server))
|
249
253
|
return response.json()
|
250
254
|
|
251
|
-
async def _async_get_active_service_list_for_server(
|
255
|
+
async def _async_get_active_service_list_for_server(
|
256
|
+
self, server: str = None
|
257
|
+
) -> Response:
|
252
258
|
"""
|
253
259
|
List all known active servers on the associated platform.
|
254
260
|
|
@@ -286,15 +292,21 @@ class ServerOps(Platform):
|
|
286
292
|
|
287
293
|
"""
|
288
294
|
loop = asyncio.get_event_loop()
|
289
|
-
response = loop.run_until_complete(
|
295
|
+
response = loop.run_until_complete(
|
296
|
+
self._async_get_active_service_list_for_server(server)
|
297
|
+
)
|
290
298
|
return response
|
291
299
|
|
300
|
+
#
|
301
|
+
# Governance Engine Ops
|
302
|
+
#
|
292
303
|
async def _async_get_governance_engine_summaries(self, server: str = None) -> dict:
|
293
|
-
"""
|
304
|
+
"""Get Governance Engine Summaries. Async version.
|
294
305
|
Parameters
|
295
306
|
----------
|
296
307
|
server : str, optional
|
297
|
-
The name of the server to get governance engine summaries from. If not provided,
|
308
|
+
The name of the server to get governance engine summaries from. If not provided,
|
309
|
+
the default server name will be used.
|
298
310
|
|
299
311
|
Returns
|
300
312
|
-------
|
@@ -305,8 +317,10 @@ class ServerOps(Platform):
|
|
305
317
|
if server is None:
|
306
318
|
server = self.server_name
|
307
319
|
|
308
|
-
url = (
|
309
|
-
|
320
|
+
url = (
|
321
|
+
f"{self.platform_url}/servers/{server}/open-metadata/engine-host/users/{self.user_id}"
|
322
|
+
f"/governance-engines/summary"
|
323
|
+
)
|
310
324
|
response = await self._async_make_request("GET", url)
|
311
325
|
return response.json().get("governanceEngineSummaries")
|
312
326
|
|
@@ -315,7 +329,8 @@ class ServerOps(Platform):
|
|
315
329
|
Parameters
|
316
330
|
----------
|
317
331
|
server : str, optional
|
318
|
-
The name of the server to get governance engine summaries from. If not provided,
|
332
|
+
The name of the server to get governance engine summaries from. If not provided,
|
333
|
+
the default server name will be used.
|
319
334
|
|
320
335
|
Returns
|
321
336
|
-------
|
@@ -324,38 +339,130 @@ class ServerOps(Platform):
|
|
324
339
|
|
325
340
|
"""
|
326
341
|
loop = asyncio.get_event_loop()
|
327
|
-
response = loop.run_until_complete(
|
342
|
+
response = loop.run_until_complete(
|
343
|
+
self._async_get_governance_engine_summaries(server)
|
344
|
+
)
|
328
345
|
return response
|
329
|
-
#
|
330
|
-
# Integration Daemon
|
331
|
-
#
|
332
|
-
async def _async_get_integration_daemon_status(self, server: str = None) -> dict | str:
|
333
|
-
""" Get the current status of the integration daemon. Async version.
|
334
346
|
|
335
|
-
|
347
|
+
#
|
348
|
+
# Integration Daemon Ops
|
349
|
+
#
|
350
|
+
async def _async_get_integration_daemon_status(
|
351
|
+
self, server: str = None
|
352
|
+
) -> dict | str:
|
353
|
+
"""Get the current status of the integration daemon. Async version."""
|
336
354
|
if server is None:
|
337
355
|
server = self.server_name
|
338
356
|
|
339
|
-
url = f"{self.platform_url}/servers/{server}/open-metadata/
|
357
|
+
url = f"{self.platform_url}/servers/{server}/open-metadata/integration_daemon/users/{self.user_id}/status"
|
340
358
|
response = await self._async_make_request("GET", url)
|
341
359
|
return response.json().get("integrationDaemonStatus", "No Integration Groups")
|
342
360
|
# return response.json()
|
343
361
|
|
344
362
|
def get_integration_daemon_status(self, server: str = None) -> dict | str:
|
345
|
-
"""
|
363
|
+
"""Get the current status of the integration daemon. Async version."""
|
364
|
+
loop = asyncio.get_event_loop()
|
365
|
+
response = loop.run_until_complete(
|
366
|
+
self._async_get_integration_daemon_status(server)
|
367
|
+
)
|
368
|
+
return response
|
369
|
+
|
370
|
+
async def _async_get_connector_config(
|
371
|
+
self, connector_name: str, server: str = None
|
372
|
+
) -> dict | str:
|
373
|
+
"""Retrieve the configuration properties of the named integration connector running in the integration daemon
|
374
|
+
- async version"""
|
375
|
+
if server is None:
|
376
|
+
server = self.server_name
|
377
|
+
validate_name(connector_name)
|
378
|
+
|
379
|
+
url = (
|
380
|
+
f"{self.platform_url}/servers/{server}/open-metadata/integration_daemon/users/{self.user_id}/"
|
381
|
+
f"integration-connectors/{connector_name}/configuration-properties"
|
382
|
+
)
|
383
|
+
|
384
|
+
response = await self._async_make_request("GET", url)
|
385
|
+
return response.json()
|
386
|
+
|
387
|
+
def get_connector_config(
|
388
|
+
self, connector_name: str, server: str = None
|
389
|
+
) -> dict | str:
|
390
|
+
"""Retrieve the configuration properties of the named integration connector running in the integration
|
391
|
+
daemon"""
|
346
392
|
|
347
|
-
"""
|
348
393
|
loop = asyncio.get_event_loop()
|
349
|
-
response = loop.run_until_complete(
|
394
|
+
response = loop.run_until_complete(
|
395
|
+
self._async_get_connector_config(connector_name, server)
|
396
|
+
)
|
350
397
|
return response
|
351
398
|
|
352
|
-
def get_integration_connector_status(self, server: str = None)->
|
353
|
-
|
399
|
+
def get_integration_connector_status(self, server: str = None) -> None:
|
400
|
+
"""Get the current status of the integration connector. Async version."""
|
401
|
+
self.get_integration_daemon_status(server)
|
402
|
+
# todo - finish this? (and do async)
|
354
403
|
pass
|
355
404
|
|
405
|
+
async def _async_restart_integration_connector(
|
406
|
+
self, connector_name: str, server: str = None
|
407
|
+
) -> str:
|
408
|
+
"""Restart the integration Connector specified by connector_name or all if not specified - async"""
|
409
|
+
|
410
|
+
if server is None:
|
411
|
+
server = self.server_name
|
412
|
+
|
413
|
+
url = (
|
414
|
+
f"{self.platform_url}/servers/{server}/open-metadata/integration_daemon/users/"
|
415
|
+
f"{self.user_id}/integration-connectors/restart"
|
416
|
+
)
|
417
|
+
body = {"class": "NameRequestBody", "name": connector_name}
|
418
|
+
response = await self._async_make_request("POST", url, body)
|
419
|
+
return response
|
420
|
+
|
421
|
+
def restart_integration_connector(
|
422
|
+
self, connector_name: str, server: str = None
|
423
|
+
) -> str:
|
424
|
+
"""Restart the integration Connector specified by connector_name or all if not specified"""
|
425
|
+
loop = asyncio.get_event_loop()
|
426
|
+
response = loop.run_until_complete(
|
427
|
+
self._async_restart_integration_connector(connector_name, server)
|
428
|
+
)
|
429
|
+
return response
|
430
|
+
|
431
|
+
async def _async_refresh_integration_connectors(
|
432
|
+
self, connector_name: str = "all", server: str = None, time_out: int = 60
|
433
|
+
) -> None:
|
434
|
+
"""Issue a refresh request to all connectors running in the integration daemon, or a specific connector
|
435
|
+
if one is specified - async version"""
|
436
|
+
if server is None:
|
437
|
+
server = self.server_name
|
438
|
+
if connector_name == "all":
|
439
|
+
connector_name = None
|
440
|
+
|
441
|
+
url = (
|
442
|
+
f"{self.platform_url}/servers/{server}/open-metadata/integration_daemon/users/"
|
443
|
+
f"{self.user_id}/integration-connectors/refresh"
|
444
|
+
)
|
445
|
+
if connector_name:
|
446
|
+
body = {"class": "NameRequestBody", "name": connector_name}
|
447
|
+
await self._async_make_request("POST", url, body, time_out=time_out)
|
448
|
+
else:
|
449
|
+
await self._async_make_request("POST", url, time_out=time_out)
|
450
|
+
|
451
|
+
return
|
452
|
+
|
453
|
+
def refresh_integration_connectors(
|
454
|
+
self, connector_name: str, server: str = None, time_out: int = 60
|
455
|
+
) -> None:
|
456
|
+
"""Restart the integration Connector specified by connector_name"""
|
457
|
+
loop = asyncio.get_event_loop()
|
458
|
+
loop.run_until_complete(
|
459
|
+
self._async_refresh_integration_connectors(connector_name, server, time_out)
|
460
|
+
)
|
461
|
+
|
356
462
|
|
357
463
|
if __name__ == "__main__":
|
358
|
-
p = ServerOps("meow", "https://127.0.0.1:9443", "garygeeke", verify_flag=False)
|
359
|
-
response = p.get_active_service_list_for_server()
|
360
|
-
out = response.json()["result"]
|
361
|
-
print(out)
|
464
|
+
# p = ServerOps("meow", "https://127.0.0.1:9443", "garygeeke", verify_flag=False)
|
465
|
+
# response = p.get_active_service_list_for_server()
|
466
|
+
# out = response.json()["result"]
|
467
|
+
# print(out)
|
468
|
+
print("Main-Server Operations")
|