pyegeria 0.2.3__py3-none-any.whl → 5.3.0.dev2__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 +319 -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 +615 -264
- 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.dev2.dist-info/METADATA +70 -0
- pyegeria-5.3.0.dev2.dist-info/RECORD +232 -0
- {pyegeria-0.2.3.dist-info → pyegeria-5.3.0.dev2.dist-info}/WHEEL +1 -1
- pyegeria-5.3.0.dev2.dist-info/entry_points.txt +81 -0
- pyegeria/_client-orig.py +0 -480
- pyegeria/automated_curation.py +0 -446
- 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.3.dist-info/METADATA +0 -57
- pyegeria-0.2.3.dist-info/RECORD +0 -22
- {pyegeria-0.2.3.dist-info/licenses → pyegeria-5.3.0.dev2.dist-info}/LICENSE +0 -0
@@ -2,18 +2,20 @@
|
|
2
2
|
SPDX-License-Identifier: Apache-2.0
|
3
3
|
Copyright Contributors to the ODPi Egeria project.
|
4
4
|
|
5
|
-
OMAG Server configuration functions. These functions add definitions to an OMAG server's configuration document
|
5
|
+
OMAG Server configuration functions. These functions add definitions to an OMAG server's configuration document.
|
6
|
+
This class encompasses the full set of configuration methods.
|
6
7
|
"""
|
7
8
|
|
8
|
-
|
9
|
-
from .exceptions import (
|
10
|
-
InvalidParameterException,
|
11
|
-
)
|
12
|
-
from ._globals import enable_ssl_check
|
13
|
-
from ._client import Client
|
9
|
+
import json
|
14
10
|
|
11
|
+
from pyegeria import Client
|
12
|
+
from pyegeria import InvalidParameterException
|
13
|
+
from pyegeria._globals import enable_ssl_check
|
14
|
+
from pyegeria._validators import validate_name, validate_url
|
15
|
+
from .core_omag_server_config import CoreServerConfig
|
15
16
|
|
16
|
-
|
17
|
+
|
18
|
+
class FullServerConfig(CoreServerConfig):
|
17
19
|
"""
|
18
20
|
This class represents a client for configuring the OMAG Server.
|
19
21
|
|
@@ -33,99 +35,154 @@ class FullServerConfig(Client):
|
|
33
35
|
"""
|
34
36
|
|
35
37
|
def __init__(
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
verify_flag: bool = enable_ssl_check,
|
38
|
+
self,
|
39
|
+
server_name: str,
|
40
|
+
platform_url: str,
|
41
|
+
user_id: str,
|
42
|
+
user_pwd: str = None,
|
42
43
|
):
|
43
|
-
self.
|
44
|
-
|
45
|
-
self.
|
46
|
-
|
47
|
-
+ "/open-metadata/admin-services/users/"
|
48
|
-
+ user_id
|
44
|
+
self.full_config_command_root: str
|
45
|
+
CoreServerConfig.__init__(self, server_name, platform_url, user_id, user_pwd)
|
46
|
+
self.full_config_command_root = (
|
47
|
+
self.platform_url + "/open-metadata/admin-services/users/" + user_id
|
49
48
|
)
|
50
49
|
|
51
|
-
def get_access_services_topic_names(
|
50
|
+
def get_access_services_topic_names(
|
51
|
+
self, access_service_name: str, server_name: str = None
|
52
|
+
) -> list[str]:
|
53
|
+
"""Retrieve the topic names for this access service.
|
54
|
+
Parameters
|
55
|
+
----------
|
56
|
+
access_service_name : str
|
57
|
+
The name of the access service.
|
58
|
+
|
59
|
+
server_name : str, optional
|
60
|
+
The name of the server. If not provided, the server name of the instance is used.
|
61
|
+
|
62
|
+
Returns
|
63
|
+
-------
|
64
|
+
list[str]
|
65
|
+
A list of topic names associated with the specified access service.
|
66
|
+
|
67
|
+
"""
|
52
68
|
if server_name is None:
|
53
69
|
server_name = self.server_name
|
54
70
|
validate_name(access_service_name)
|
55
|
-
url = (
|
56
|
-
|
71
|
+
url = (
|
72
|
+
self.full_config_command_root
|
73
|
+
+ "/servers/"
|
74
|
+
+ server_name
|
75
|
+
+ "/access-services/"
|
76
|
+
+ access_service_name
|
77
|
+
+ "/topic-names"
|
78
|
+
)
|
57
79
|
response = self.make_request("GET", url)
|
58
80
|
|
59
|
-
|
60
|
-
if related_code == 200:
|
61
|
-
return response.json() # todo fix
|
62
|
-
else:
|
63
|
-
raise InvalidParameterException(response.content)
|
81
|
+
return response.json() # todo fix
|
64
82
|
|
65
|
-
def get_all_access_services_topic_names(self, server_name: str = None) ->
|
83
|
+
def get_all_access_services_topic_names(self, server_name: str = None) -> list:
|
84
|
+
"""Retrieve the topic names for all access services.
|
85
|
+
Parameters
|
86
|
+
----------
|
87
|
+
server_name : str, optional
|
88
|
+
The name of the server. If not provided, the default server name will be used.
|
89
|
+
|
90
|
+
Returns
|
91
|
+
-------
|
92
|
+
list
|
93
|
+
The JSON response containing the access services topic names.
|
94
|
+
|
95
|
+
"""
|
66
96
|
if server_name is None:
|
67
97
|
server_name = self.server_name
|
68
98
|
|
69
|
-
url = (
|
99
|
+
url = (
|
100
|
+
self.full_config_command_root
|
101
|
+
+ "/servers/"
|
102
|
+
+ server_name
|
103
|
+
+ "/access-services/topic-names"
|
104
|
+
)
|
70
105
|
response = self.make_request("GET", url)
|
71
106
|
|
72
|
-
|
73
|
-
if related_code == 200:
|
74
|
-
return response.json() # todo fix
|
75
|
-
else:
|
76
|
-
raise InvalidParameterException(response.content)
|
107
|
+
return response.json() # todo fix
|
77
108
|
|
78
|
-
def set_access_services_configuration(
|
79
|
-
|
80
|
-
|
109
|
+
def set_access_services_configuration(
|
110
|
+
self, access_services_body: str, server_name: str = None
|
111
|
+
) -> None:
|
112
|
+
"""Set up the configuration for selected open metadata access services (OMASs).
|
113
|
+
This overrides the current configured values.
|
81
114
|
|
82
|
-
|
83
|
-
|
115
|
+
Parameters
|
116
|
+
----------
|
117
|
+
access_services_body: str
|
118
|
+
The body of the access services configuration. This should be a string representation of the desired
|
119
|
+
configuration.
|
84
120
|
|
85
|
-
|
86
|
-
|
87
|
-
return
|
88
|
-
else:
|
89
|
-
raise InvalidParameterException(response.content)
|
121
|
+
server_name: str, optional
|
122
|
+
The name of the server. If not provided, the default server will be used.
|
90
123
|
|
91
|
-
|
92
|
-
|
124
|
+
Returns
|
125
|
+
-------
|
126
|
+
None
|
127
|
+
|
128
|
+
"""
|
93
129
|
if server_name is None:
|
94
130
|
server_name = self.server_name
|
95
131
|
|
96
|
-
url = (
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
raise InvalidParameterException(response.content)
|
132
|
+
url = (
|
133
|
+
self.full_config_command_root
|
134
|
+
+ "/servers/"
|
135
|
+
+ server_name
|
136
|
+
+ "/access-services/configuration"
|
137
|
+
)
|
138
|
+
self.make_request("POST", url, access_services_body)
|
139
|
+
return
|
105
140
|
|
106
|
-
def
|
107
|
-
|
141
|
+
def override_access_service_in_topic_name(
|
142
|
+
self, access_service_name: str, new_topic_name: str, server_name: str = None
|
143
|
+
) -> None:
|
144
|
+
"""override the in topic for the access service"""
|
108
145
|
if server_name is None:
|
109
146
|
server_name = self.server_name
|
110
147
|
|
111
|
-
url = (
|
112
|
-
|
113
|
-
|
148
|
+
url = (
|
149
|
+
self.full_config_command_root
|
150
|
+
+ "/servers/"
|
151
|
+
+ server_name
|
152
|
+
+ "/access-services/"
|
153
|
+
+ access_service_name
|
154
|
+
+ "/topic-names/in-topic"
|
155
|
+
)
|
156
|
+
self.make_request("POST", url, new_topic_name)
|
157
|
+
return
|
114
158
|
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
159
|
+
def override_access_service_out_topic_name(
|
160
|
+
self, access_service_name: str, new_topic_name: str, server_name: str = None
|
161
|
+
) -> None:
|
162
|
+
"""override the out topic for the access service"""
|
163
|
+
if server_name is None:
|
164
|
+
server_name = self.server_name
|
120
165
|
|
121
|
-
|
122
|
-
|
166
|
+
url = (
|
167
|
+
self.full_config_command_root
|
168
|
+
+ "/servers/"
|
169
|
+
+ server_name
|
170
|
+
+ "/access-services/"
|
171
|
+
+ access_service_name
|
172
|
+
+ "/topic-names/out-topic"
|
173
|
+
)
|
174
|
+
self.make_request("POST", url, new_topic_name)
|
175
|
+
return
|
176
|
+
|
177
|
+
def set_audit_log_destinations(
|
178
|
+
self, audit_dest_body: str, server_name: str = None
|
179
|
+
) -> None:
|
180
|
+
"""Sets the audit log destinations for a server
|
123
181
|
|
124
182
|
/open-metadata/admin-services/users/{userId}/servers/{serverName}/audit-log-destinations
|
125
183
|
|
126
184
|
Parameters
|
127
185
|
----------
|
128
|
-
|
129
186
|
audit_dest_body : str
|
130
187
|
A JSON document describing the audit destinations for this server.
|
131
188
|
|
@@ -134,7 +191,7 @@ class FullServerConfig(Client):
|
|
134
191
|
|
135
192
|
Returns
|
136
193
|
-------
|
137
|
-
|
194
|
+
None
|
138
195
|
|
139
196
|
Raises
|
140
197
|
------
|
@@ -150,17 +207,20 @@ class FullServerConfig(Client):
|
|
150
207
|
if server_name is None:
|
151
208
|
server_name = self.server_name
|
152
209
|
|
153
|
-
url =
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
def update_audit_log_destination(
|
163
|
-
|
210
|
+
url = (
|
211
|
+
self.full_config_command_root
|
212
|
+
+ "/servers/"
|
213
|
+
+ server_name
|
214
|
+
+ "/audit-log-destinations"
|
215
|
+
)
|
216
|
+
self.make_request("POST", url, audit_dest_body)
|
217
|
+
return
|
218
|
+
|
219
|
+
def update_audit_log_destination(
|
220
|
+
self, connection_name: str, audit_dest_body: str, server_name: str = None
|
221
|
+
) -> None:
|
222
|
+
"""Update an audit log destination that is identified with the supplied destination name
|
223
|
+
with the supplied connection object.
|
164
224
|
Parameters
|
165
225
|
----------
|
166
226
|
connection_name : str
|
@@ -183,17 +243,20 @@ class FullServerConfig(Client):
|
|
183
243
|
if server_name is None:
|
184
244
|
server_name = self.server_name
|
185
245
|
|
186
|
-
url =
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
246
|
+
url = (
|
247
|
+
self.full_config_command_root
|
248
|
+
+ "/servers/"
|
249
|
+
+ server_name
|
250
|
+
+ "/audit-log-destinations/connection/"
|
251
|
+
+ connection_name
|
252
|
+
)
|
253
|
+
self.make_request("POST", url, audit_dest_body)
|
254
|
+
return
|
194
255
|
|
195
|
-
def add_audit_log_destination(
|
196
|
-
|
256
|
+
def add_audit_log_destination(
|
257
|
+
self, connection_body: str, server_name: str = None
|
258
|
+
) -> None:
|
259
|
+
"""Adds an audit log destination to a server.
|
197
260
|
|
198
261
|
/open-metadata/admin-services/users/{userId}/servers/{serverName}/audit-log-destinations/connection
|
199
262
|
|
@@ -206,7 +269,7 @@ class FullServerConfig(Client):
|
|
206
269
|
|
207
270
|
Returns
|
208
271
|
-------
|
209
|
-
|
272
|
+
None
|
210
273
|
|
211
274
|
Raises
|
212
275
|
------
|
@@ -224,31 +287,60 @@ class FullServerConfig(Client):
|
|
224
287
|
if server_name is None:
|
225
288
|
server_name = self.server_name
|
226
289
|
|
227
|
-
url =
|
228
|
-
|
290
|
+
url = (
|
291
|
+
self.full_config_command_root
|
292
|
+
+ "/servers/"
|
293
|
+
+ server_name
|
294
|
+
+ "/audit-log-destinations/connection"
|
295
|
+
)
|
296
|
+
self.make_request("POST", url, connection_body)
|
297
|
+
return
|
298
|
+
|
299
|
+
def set_cohort_config(
|
300
|
+
self, cohort_name: str, cohort_config_body: str, server_name: str = None
|
301
|
+
) -> None:
|
302
|
+
"""Set up the configuration properties for a cohort. This may reconfigure an existing cohort or
|
303
|
+
create a cohort. Use setCohortMode to delete a cohort.
|
304
|
+
Parameters
|
305
|
+
----------
|
306
|
+
cohort_name : str
|
307
|
+
The name of the cohort for which the configuration is being set.
|
308
|
+
cohort_config_body : str
|
309
|
+
The body of the cohort configuration.
|
310
|
+
server_name : str, optional
|
311
|
+
The name of the server. If not provided, the method will use the server name that is already set.
|
229
312
|
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
313
|
+
Returns
|
314
|
+
-------
|
315
|
+
None
|
316
|
+
|
317
|
+
Raises
|
318
|
+
------
|
319
|
+
InvalidParameterException
|
320
|
+
If the cohort_config_body is None.
|
235
321
|
|
236
|
-
|
322
|
+
"""
|
237
323
|
if server_name is None:
|
238
324
|
server_name = self.server_name
|
239
325
|
validate_name(cohort_name)
|
240
326
|
if cohort_config_body is None:
|
241
327
|
raise InvalidParameterException(cohort_config_body)
|
242
328
|
|
243
|
-
url =
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
329
|
+
url = (
|
330
|
+
self.full_config_command_root
|
331
|
+
+ "/servers/"
|
332
|
+
+ server_name
|
333
|
+
+ "/cohorts/"
|
334
|
+
+ cohort_name
|
335
|
+
+ "/configuration"
|
336
|
+
)
|
337
|
+
self.make_request("POST", url, cohort_config_body)
|
338
|
+
return
|
249
339
|
|
250
|
-
def clear_cohort_configuration(
|
251
|
-
|
340
|
+
def clear_cohort_configuration(
|
341
|
+
self, cohort_name: str, server_name: str = None
|
342
|
+
) -> None:
|
343
|
+
"""Retrieves the stored configurations for a server
|
252
344
|
Parameters
|
253
345
|
----------
|
254
346
|
cohort_name : str
|
@@ -270,133 +362,259 @@ class FullServerConfig(Client):
|
|
270
362
|
"""
|
271
363
|
if server_name is None:
|
272
364
|
server_name = self.server_name
|
273
|
-
url = f"{self.
|
365
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/cohorts/{cohort_name}"
|
274
366
|
validate_name(cohort_name)
|
275
367
|
|
276
368
|
self.make_request("DELETE", url)
|
277
369
|
|
278
|
-
def get_dedicated_cohort_topic_names(
|
370
|
+
def get_dedicated_cohort_topic_names(
|
371
|
+
self, cohort_name: str, server_name: str = None
|
372
|
+
) -> list:
|
373
|
+
"""Retrieve the current topic name for the cohort. This call can only be made once the cohort is set up with
|
374
|
+
add_cohort_registration().
|
375
|
+
|
376
|
+
Parameters
|
377
|
+
----------
|
378
|
+
cohort_name : str
|
379
|
+
The name of the cohort for which to retrieve the dedicated topic names.
|
380
|
+
|
381
|
+
server_name : str, optional
|
382
|
+
The name of the server on which the cohort resides. If not provided, the default server name will be used.
|
383
|
+
|
384
|
+
Returns
|
385
|
+
-------
|
386
|
+
list
|
387
|
+
A list of topic names that are dedicated to the specified cohort.
|
388
|
+
|
389
|
+
"""
|
279
390
|
if server_name is None:
|
280
391
|
server_name = self.server_name
|
281
392
|
|
282
393
|
validate_name(cohort_name)
|
283
394
|
|
284
|
-
url =
|
395
|
+
url = (
|
396
|
+
self.full_config_command_root
|
397
|
+
+ "/servers/"
|
398
|
+
+ server_name
|
399
|
+
+ "/cohorts/"
|
400
|
+
+ cohort_name
|
401
|
+
+ "/dedicated-topic-names"
|
402
|
+
)
|
285
403
|
response = self.make_request("POST", url)
|
286
|
-
|
287
|
-
related_code = response.json().get("relatedHTTPCode")
|
288
|
-
if related_code != 200:
|
289
|
-
raise InvalidParameterException(response.content)
|
290
|
-
else:
|
291
|
-
return (response.json().get("topicNames"))
|
404
|
+
return response.json().get("topicNames")
|
292
405
|
|
293
406
|
def get_cohort_topic_name(self, cohort_name: str, server_name: str = None) -> str:
|
407
|
+
"""Retrieve the current topic name for the cohort. This call can only be made once the
|
408
|
+
cohort is set up with add_cohort_registration().
|
409
|
+
Parameters
|
410
|
+
----------
|
411
|
+
cohort_name : str
|
412
|
+
The name of the cohort for which to retrieve the topic name.
|
413
|
+
server_name : str, optional
|
414
|
+
The name of the server on which the cohort is located. If not provided, the default server name will be used.
|
415
|
+
|
416
|
+
Returns
|
417
|
+
-------
|
418
|
+
str
|
419
|
+
The topic name associated with the specified cohort.
|
420
|
+
|
421
|
+
Raises
|
422
|
+
------
|
423
|
+
InvalidParameterException
|
424
|
+
If the request to retrieve the topic name fails or returns an invalid parameter code.
|
425
|
+
|
426
|
+
"""
|
294
427
|
if server_name is None:
|
295
428
|
server_name = self.server_name
|
296
429
|
validate_name(cohort_name)
|
297
430
|
|
298
|
-
url = f"{self.
|
431
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/cohorts/{cohort_name}/topic-name"
|
299
432
|
response = self.make_request("GET", url)
|
433
|
+
return response.json().get("topicName")
|
300
434
|
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
435
|
+
def override_cohort_topic_name(
|
436
|
+
self, cohort_name: str, topic_override: str, server_name: str = None
|
437
|
+
) -> None:
|
438
|
+
"""Override the current name for the single topic for the cohort. This call can only be made once the
|
439
|
+
cohort is set up with add_cohort_registration().
|
440
|
+
Parameters
|
441
|
+
----------
|
442
|
+
cohort_name : str
|
443
|
+
The name of the cohort for which the topic name is to be overridden.
|
444
|
+
|
445
|
+
topic_override : str
|
446
|
+
The new topic name to override the original topic name.
|
306
447
|
|
307
|
-
|
448
|
+
server_name : str, optional
|
449
|
+
The name of the server. If not provided, the default server name will be used.
|
450
|
+
|
451
|
+
"""
|
308
452
|
if server_name is None:
|
309
453
|
server_name = self.server_name
|
310
454
|
validate_name(cohort_name)
|
311
455
|
validate_name(topic_override)
|
312
456
|
|
313
|
-
url =
|
314
|
-
|
457
|
+
url = (
|
458
|
+
self.full_config_command_root
|
459
|
+
+ "/servers/"
|
460
|
+
+ server_name
|
461
|
+
+ "/cohorts/"
|
462
|
+
+ cohort_name
|
463
|
+
+ "/topic-name-override"
|
464
|
+
)
|
465
|
+
self.make_request("POST", url, topic_override)
|
466
|
+
return
|
467
|
+
|
468
|
+
def override_instances_cohort_topic_name(
|
469
|
+
self, cohort_name: str, topic_override: str, server_name: str = None
|
470
|
+
) -> None:
|
471
|
+
"""Override the current name for the "instances" topic for the cohort. This call can only be made once
|
472
|
+
the cohort is set up with add_cohort_registration().
|
473
|
+
Parameters
|
474
|
+
----------
|
475
|
+
cohort_name : str
|
476
|
+
The name of the cohort to override the topic name for.
|
477
|
+
|
478
|
+
topic_override : str
|
479
|
+
The new topic name to override for the cohort.
|
315
480
|
|
316
|
-
|
317
|
-
|
318
|
-
|
481
|
+
server_name : str, optional
|
482
|
+
The name of the server where the cohort is located. If not specified,
|
483
|
+
the default server name will be used.
|
319
484
|
|
320
|
-
|
321
|
-
server_name: str = None) -> None:
|
485
|
+
"""
|
322
486
|
if server_name is None:
|
323
487
|
server_name = self.server_name
|
324
488
|
validate_name(cohort_name)
|
325
489
|
validate_name(topic_override)
|
326
490
|
|
327
|
-
url =
|
328
|
-
|
491
|
+
url = (
|
492
|
+
self.full_config_command_root
|
493
|
+
+ "/servers/"
|
494
|
+
+ server_name
|
495
|
+
+ "/cohorts/"
|
496
|
+
+ cohort_name
|
497
|
+
+ "/topic-name-override/instances"
|
498
|
+
)
|
499
|
+
self.make_request("POST", url, topic_override)
|
500
|
+
return
|
501
|
+
|
502
|
+
def override_registration_cohort_topic_name(
|
503
|
+
self, cohort_name: str, topic_override: str, server_name: str = None
|
504
|
+
) -> None:
|
505
|
+
"""Override the current name for the registration topic for the cohort. This call can only be made once
|
506
|
+
the cohort is set up with add_cohort_registration().
|
507
|
+
Parameters
|
508
|
+
----------
|
509
|
+
cohort_name : str
|
510
|
+
Name of the cohort to override the topic name for.
|
511
|
+
topic_override : str
|
512
|
+
The overriding topic name for the cohort.
|
513
|
+
server_name : str, optional
|
514
|
+
Name of the server. If not provided, the default server name will be used.
|
329
515
|
|
330
|
-
|
331
|
-
|
332
|
-
|
516
|
+
Returns
|
517
|
+
-------
|
518
|
+
None
|
519
|
+
This method does not return any value.
|
333
520
|
|
334
|
-
|
335
|
-
server_name: str = None) -> None:
|
521
|
+
"""
|
336
522
|
if server_name is None:
|
337
523
|
server_name = self.server_name
|
338
524
|
validate_name(cohort_name)
|
339
525
|
validate_name(topic_override)
|
340
526
|
|
341
|
-
url =
|
342
|
-
|
527
|
+
url = (
|
528
|
+
self.full_config_command_root
|
529
|
+
+ "/servers/"
|
530
|
+
+ server_name
|
531
|
+
+ "/cohorts/"
|
532
|
+
+ cohort_name
|
533
|
+
+ "/topic-name-override/registration"
|
534
|
+
)
|
535
|
+
self.make_request("POST", url, topic_override)
|
536
|
+
return
|
537
|
+
|
538
|
+
def override_types_cohort_topic_name(
|
539
|
+
self, cohort_name: str, topic_override: str, server_name: str = None
|
540
|
+
) -> None:
|
541
|
+
"""Override the current name for the "types" topic for the cohort. This call can only be made once
|
542
|
+
the cohort is set up with add_cohort_registration().
|
543
|
+
Parameters
|
544
|
+
----------
|
545
|
+
cohort_name : str
|
546
|
+
The name of the cohort.
|
547
|
+
topic_override : str
|
548
|
+
The topic override to be set for the cohort.
|
549
|
+
server_name : str, optional
|
550
|
+
The name of the server. If not provided, it will use the default server name from the class.
|
343
551
|
|
344
|
-
|
345
|
-
|
346
|
-
|
552
|
+
Raises
|
553
|
+
------
|
554
|
+
InvalidParameterException
|
555
|
+
If the response from the server has a relatedHTTPCode other than 200.
|
347
556
|
|
348
|
-
|
557
|
+
"""
|
349
558
|
if server_name is None:
|
350
559
|
server_name = self.server_name
|
351
560
|
validate_name(cohort_name)
|
352
561
|
validate_name(topic_override)
|
353
562
|
|
354
|
-
url =
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
563
|
+
url = (
|
564
|
+
self.full_config_command_root
|
565
|
+
+ "/servers/"
|
566
|
+
+ server_name
|
567
|
+
+ "/cohorts/"
|
568
|
+
+ cohort_name
|
569
|
+
+ "/topic-name-override/types"
|
570
|
+
)
|
571
|
+
self.make_request("POST", url, topic_override)
|
572
|
+
return
|
360
573
|
|
361
|
-
def
|
362
|
-
|
574
|
+
def add_full_cohort_registration(
|
575
|
+
self, cohort_name: str, topic_structure: str, server_name: str = None
|
576
|
+
) -> None:
|
577
|
+
"""add a full cohort registration
|
363
578
|
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
579
|
+
Parameters
|
580
|
+
----------
|
581
|
+
cohort_name : str
|
582
|
+
Name of the cohort to be registered.
|
583
|
+
topic_structure : str
|
584
|
+
Topic structure for the cohort. This is a string from an enumerated list.
|
585
|
+
'Dedicated Cohort Topics', description='The cohort members use three topics to exchange information.
|
586
|
+
One for registration requests, one for type validation and one for exchange of instances stored by the
|
587
|
+
cohort members.
|
588
|
+
This is the preferred and optimal approach
|
589
|
+
'Single Topic', description='All asynchronous communication between cohort members is via a single topic.
|
590
|
+
This is the original design and may still be used when communicating with back level cohort members.
|
591
|
+
'Both Single and Dedicated Topics', description='Both the single cohort topic and the dedicated topics are
|
592
|
+
set up and used. This is necessary when the cohort has members with different capabilities.
|
593
|
+
This configuration may cause some events to be processed twice.'
|
594
|
+
server_name : str, optional
|
595
|
+
Name of the server to which the cohort should be added. Defaults to None.
|
380
596
|
|
381
|
-
|
382
|
-
|
383
|
-
|
597
|
+
Returns
|
598
|
+
-------
|
599
|
+
None
|
384
600
|
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
601
|
+
Raises
|
602
|
+
------
|
603
|
+
InvalidParameterException
|
604
|
+
If the response code is not 200 after making the POST request.
|
389
605
|
|
390
|
-
|
606
|
+
"""
|
391
607
|
if server_name is None:
|
392
608
|
server_name = self.server_name
|
393
609
|
validate_name(cohort_name)
|
394
610
|
|
395
|
-
url = f"{self.
|
611
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/cohorts/{cohort_name}/topic-structure/{topic_structure}"
|
396
612
|
self.make_request("POST", url)
|
397
613
|
|
398
|
-
def set_server_configuration(
|
399
|
-
|
614
|
+
def set_server_configuration(
|
615
|
+
self, config_body: str, server_name: str = None
|
616
|
+
) -> None | str:
|
617
|
+
"""Sets the configurations for a server
|
400
618
|
Parameters
|
401
619
|
----------
|
402
620
|
|
@@ -420,7 +638,9 @@ class FullServerConfig(Client):
|
|
420
638
|
"""
|
421
639
|
if server_name is None:
|
422
640
|
server_name = self.server_name
|
423
|
-
url =
|
641
|
+
url = (
|
642
|
+
self.full_config_command_root + "/servers/" + server_name + "/configuration"
|
643
|
+
)
|
424
644
|
response = self.make_request("POST", url, config_body)
|
425
645
|
if response.status_code != 200:
|
426
646
|
return str(response.status_code) # should never get here?
|
@@ -432,7 +652,7 @@ class FullServerConfig(Client):
|
|
432
652
|
raise InvalidParameterException(response.content)
|
433
653
|
|
434
654
|
def clear_stored_configuration(self, server_name: str = None) -> None | str:
|
435
|
-
"""
|
655
|
+
"""Retrieves the stored configurations for a server
|
436
656
|
Parameters
|
437
657
|
----------
|
438
658
|
|
@@ -456,7 +676,9 @@ class FullServerConfig(Client):
|
|
456
676
|
"""
|
457
677
|
if server_name is None:
|
458
678
|
server_name = self.server_name
|
459
|
-
url =
|
679
|
+
url = (
|
680
|
+
self.full_config_command_root + "/servers/" + server_name + "/configuration"
|
681
|
+
)
|
460
682
|
response = self.make_request("DELETE", url)
|
461
683
|
if response.status_code != 200:
|
462
684
|
return str(response.status_code) # should never get here?
|
@@ -467,8 +689,10 @@ class FullServerConfig(Client):
|
|
467
689
|
else:
|
468
690
|
raise InvalidParameterException(response.content)
|
469
691
|
|
470
|
-
def deploy_stored_configurations(
|
471
|
-
|
692
|
+
def deploy_stored_configurations(
|
693
|
+
self, target_url_root: str, server_name: str = None
|
694
|
+
) -> None:
|
695
|
+
"""Push the configuration for the server to another OMAG Server Platform.
|
472
696
|
Parameters
|
473
697
|
----------
|
474
698
|
target_url_root : str
|
@@ -490,13 +714,12 @@ class FullServerConfig(Client):
|
|
490
714
|
if server_name is None:
|
491
715
|
server_name = self.server_name
|
492
716
|
|
493
|
-
url = f"{self.
|
717
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/configuration/deploy"
|
494
718
|
|
495
719
|
self.make_request("POST", url, target_url_root)
|
496
720
|
|
497
|
-
|
498
721
|
def get_event_bus(self, server_name: str = None) -> dict:
|
499
|
-
"""
|
722
|
+
"""Returns the event bus configuration for the specified server
|
500
723
|
|
501
724
|
Parameters
|
502
725
|
----------
|
@@ -520,12 +743,14 @@ class FullServerConfig(Client):
|
|
520
743
|
"""
|
521
744
|
if server_name is None:
|
522
745
|
server_name = self.server_name
|
523
|
-
url = f"{self.
|
746
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/event-bus"
|
524
747
|
|
525
748
|
response = self.make_request("GET", url)
|
526
749
|
return response.json().get("config")
|
527
750
|
|
528
|
-
def
|
751
|
+
def set_event_bus_detailed(
|
752
|
+
self, connector_provider: str, topic_url_root: str, server_name: str = None
|
753
|
+
) -> None:
|
529
754
|
"""
|
530
755
|
Parameters
|
531
756
|
----------
|
@@ -562,12 +787,14 @@ class FullServerConfig(Client):
|
|
562
787
|
if server_name is None:
|
563
788
|
server_name = self.server_name
|
564
789
|
|
565
|
-
url = (
|
566
|
-
|
790
|
+
url = (
|
791
|
+
f"{self.full_config_command_root}/servers/{server_name}/event-bus?connectorProvider="
|
792
|
+
f"{connector_provider}&topicURLRoot={topic_url_root}"
|
793
|
+
)
|
567
794
|
self.make_request("POST", url)
|
568
795
|
|
569
796
|
def delete_event_bus(self, server_name: str = None) -> None:
|
570
|
-
"""
|
797
|
+
"""Delete the event bus configuration for the given server.
|
571
798
|
|
572
799
|
Parameters
|
573
800
|
----------
|
@@ -593,14 +820,15 @@ class FullServerConfig(Client):
|
|
593
820
|
if server_name is None:
|
594
821
|
server_name = self.server_name
|
595
822
|
|
596
|
-
url = f"{self.
|
823
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/event-bus"
|
597
824
|
self.make_request("DELETE", url)
|
598
825
|
|
599
826
|
def set_server_url_root(self, url_root: str, server_name: str = None) -> None:
|
600
827
|
if server_name is None:
|
601
828
|
server_name = self.server_name
|
602
|
-
url = f"{self.
|
603
|
-
|
829
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/server-url-root-for-caller"
|
830
|
+
body = {"urlRoot": url_root}
|
831
|
+
response = self.make_request("POST", url, payload=body)
|
604
832
|
related_code = response.json().get("relatedHTTPCode")
|
605
833
|
if related_code != 200:
|
606
834
|
raise InvalidParameterException(response.content)
|
@@ -616,7 +844,8 @@ class FullServerConfig(Client):
|
|
616
844
|
max_page_size : int
|
617
845
|
The maximum page size to set.
|
618
846
|
server_name : str, optional
|
619
|
-
The name of the server for which to set the maximum page size. If not specified, the default server name
|
847
|
+
The name of the server for which to set the maximum page size. If not specified, the default server name
|
848
|
+
will be used.
|
620
849
|
|
621
850
|
Returns
|
622
851
|
-------
|
@@ -636,13 +865,13 @@ class FullServerConfig(Client):
|
|
636
865
|
"""
|
637
866
|
if server_name is None:
|
638
867
|
server_name = self.server_name
|
639
|
-
url = f"{self.
|
868
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/max-page-size?limit={max_page_size}"
|
640
869
|
self.make_request("POST", url)
|
641
870
|
|
642
871
|
def set_server_user_id(self, server_user_id: str, server_name: str = None) -> None:
|
643
872
|
if server_name is None:
|
644
873
|
server_name = self.server_name
|
645
|
-
url = f"{self.
|
874
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/server-user-id?id={server_user_id}"
|
646
875
|
response = self.make_request("POST", url)
|
647
876
|
related_code = response.json().get("relatedHTTPCode")
|
648
877
|
if related_code != 200:
|
@@ -650,10 +879,12 @@ class FullServerConfig(Client):
|
|
650
879
|
else:
|
651
880
|
return
|
652
881
|
|
653
|
-
def set_server_user_password(
|
882
|
+
def set_server_user_password(
|
883
|
+
self, server_user_pwd: str, server_name: str = None
|
884
|
+
) -> None:
|
654
885
|
if server_name is None:
|
655
886
|
server_name = self.server_name
|
656
|
-
url = f"{self.
|
887
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/server-user-password?password={server_user_pwd}"
|
657
888
|
response = self.make_request("POST", url)
|
658
889
|
related_code = response.json().get("relatedHTTPCode")
|
659
890
|
if related_code != 200:
|
@@ -664,7 +895,7 @@ class FullServerConfig(Client):
|
|
664
895
|
def set_organization_name(self, org_name: str, server_name: str = None) -> None:
|
665
896
|
if server_name is None:
|
666
897
|
server_name = self.server_name
|
667
|
-
url = f"{self.
|
898
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/organization-name?name={org_name}"
|
668
899
|
response = self.make_request("POST", url)
|
669
900
|
related_code = response.json().get("relatedHTTPCode")
|
670
901
|
if related_code != 200:
|
@@ -672,10 +903,17 @@ class FullServerConfig(Client):
|
|
672
903
|
else:
|
673
904
|
return
|
674
905
|
|
675
|
-
def set_local_repository_config(
|
906
|
+
def set_local_repository_config(
|
907
|
+
self, repository_body: str, server_name: str = None
|
908
|
+
) -> None:
|
676
909
|
if server_name is None:
|
677
910
|
server_name = self.server_name
|
678
|
-
url =
|
911
|
+
url = (
|
912
|
+
self.full_config_command_root
|
913
|
+
+ "/servers/"
|
914
|
+
+ server_name
|
915
|
+
+ "/local-repository/configuration"
|
916
|
+
)
|
679
917
|
response = self.make_request("POST", url, payload=repository_body)
|
680
918
|
related_code = response.json().get("relatedHTTPCode")
|
681
919
|
if related_code != 200:
|
@@ -683,15 +921,18 @@ class FullServerConfig(Client):
|
|
683
921
|
else:
|
684
922
|
return
|
685
923
|
|
686
|
-
def set_plug_in_repository_connection(
|
924
|
+
def set_plug_in_repository_connection(
|
925
|
+
self, repository_connection_body: str, server_name: str = None
|
926
|
+
) -> None:
|
687
927
|
if server_name is None:
|
688
928
|
server_name = self.server_name
|
689
|
-
url = f"{self.
|
929
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/local-repository/mode/plugin-repository/connection"
|
690
930
|
self.make_request("POST", url, payload=repository_connection_body)
|
691
931
|
|
692
|
-
def set_plug_in_repository_connection_provider(
|
693
|
-
|
694
|
-
|
932
|
+
def set_plug_in_repository_connection_provider(
|
933
|
+
self, repository_connection_provider: str, server_name: str = None
|
934
|
+
) -> None:
|
935
|
+
"""Set the local repository connection with a user specified connection provider
|
695
936
|
|
696
937
|
Parameters
|
697
938
|
----------
|
@@ -717,14 +958,18 @@ class FullServerConfig(Client):
|
|
717
958
|
"""
|
718
959
|
if server_name is None:
|
719
960
|
server_name = self.server_name
|
720
|
-
url = (
|
721
|
-
|
961
|
+
url = (
|
962
|
+
f"{self.full_config_command_root}/servers/{server_name}/local-repository/mode/plugin-repository/"
|
963
|
+
f"details?connectionProvider={repository_connection_provider}"
|
964
|
+
)
|
722
965
|
self.make_request("POST", url)
|
723
966
|
|
724
|
-
def set_open_metadata_archives(
|
967
|
+
def set_open_metadata_archives(
|
968
|
+
self, archives_list_body: str, server_name: str = None
|
969
|
+
) -> None:
|
725
970
|
if server_name is None:
|
726
971
|
server_name = self.server_name
|
727
|
-
url = f"{self.
|
972
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/open-metadata-archives"
|
728
973
|
response = self.make_request("POST", url, payload=archives_list_body)
|
729
974
|
related_code = response.json().get("relatedHTTPCode")
|
730
975
|
if related_code != 200:
|
@@ -732,41 +977,45 @@ class FullServerConfig(Client):
|
|
732
977
|
else:
|
733
978
|
return
|
734
979
|
|
735
|
-
def set_descriptive_server_type(
|
736
|
-
|
980
|
+
def set_descriptive_server_type(
|
981
|
+
self, type_name: str, server_name: str = None
|
982
|
+
) -> None:
|
983
|
+
"""Set descriptiveServerType for this OMAG server
|
737
984
|
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
985
|
+
Parameters
|
986
|
+
----------
|
987
|
+
type_name : str
|
988
|
+
The name of the descriptive server type to set.
|
742
989
|
|
743
|
-
|
744
|
-
|
745
|
-
|
990
|
+
server_name : str, optional
|
991
|
+
The name of the server for which the descriptive server type is being set. If not provided, the
|
992
|
+
default server name associated with the object is used.
|
746
993
|
|
747
|
-
|
748
|
-
|
749
|
-
|
994
|
+
Returns
|
995
|
+
-------
|
996
|
+
None
|
750
997
|
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
998
|
+
Raises
|
999
|
+
------
|
1000
|
+
InvalidParameterException
|
1001
|
+
If the response code is not 200.
|
1002
|
+
PropertyServerException:
|
1003
|
+
Raised by the server when an issue arises in processing a valid request
|
1004
|
+
NotAuthorizedException:
|
1005
|
+
The principle specified by the user_id does not have authorization for the requested action
|
759
1006
|
|
760
|
-
|
1007
|
+
"""
|
761
1008
|
if server_name is None:
|
762
1009
|
server_name = self.server_name
|
763
|
-
url = f"{self.
|
1010
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/server-type?typeName={type_name}"
|
764
1011
|
self.make_request("POST", url)
|
765
1012
|
|
766
1013
|
def set_server_description(self, server_desc: str, server_name: str = None) -> None:
|
767
1014
|
if server_name is None:
|
768
1015
|
server_name = self.server_name
|
769
|
-
url =
|
1016
|
+
url = (
|
1017
|
+
f"{self.full_config_command_root}/servers/{server_name}/server-description"
|
1018
|
+
)
|
770
1019
|
response = self.make_request("POST", url, server_desc)
|
771
1020
|
related_code = response.json().get("relatedHTTPCode")
|
772
1021
|
if related_code != 200:
|
@@ -775,7 +1024,7 @@ class FullServerConfig(Client):
|
|
775
1024
|
return
|
776
1025
|
|
777
1026
|
def set_server_type(self, server_type: str, server_name: str = None) -> None:
|
778
|
-
"""
|
1027
|
+
"""Sets the server type for the given server
|
779
1028
|
|
780
1029
|
Parameters
|
781
1030
|
----------
|
@@ -807,12 +1056,14 @@ class FullServerConfig(Client):
|
|
807
1056
|
if server_name is None:
|
808
1057
|
server_name = self.server_name
|
809
1058
|
|
810
|
-
url = (
|
811
|
-
|
1059
|
+
url = (
|
1060
|
+
f"{self.full_config_command_root}/servers/{server_name}/"
|
1061
|
+
f"server-type?typename={server_type}"
|
1062
|
+
)
|
812
1063
|
self.make_request("POST", url)
|
813
1064
|
|
814
1065
|
def clear_server_type(self, server_name: str = None) -> None:
|
815
|
-
"""
|
1066
|
+
"""Clears the server type for the given server
|
816
1067
|
|
817
1068
|
Parameters
|
818
1069
|
----------
|
@@ -835,11 +1086,13 @@ class FullServerConfig(Client):
|
|
835
1086
|
"""
|
836
1087
|
if server_name is None:
|
837
1088
|
server_name = self.server_name
|
838
|
-
url = f"{self.
|
1089
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/server-type?typeName="
|
839
1090
|
self.make_request("POST", url)
|
840
1091
|
|
841
|
-
def config_view_service(
|
842
|
-
|
1092
|
+
def config_view_service(
|
1093
|
+
self, service_url_marker: str, view_service_body: dict, server_name: str = None
|
1094
|
+
) -> None:
|
1095
|
+
"""Configure a the view service specified by the service_url_marker using the view_service_body.
|
843
1096
|
|
844
1097
|
Parameters
|
845
1098
|
----------
|
@@ -851,7 +1104,7 @@ class FullServerConfig(Client):
|
|
851
1104
|
The body of the view service request.
|
852
1105
|
|
853
1106
|
server_name : str, optional
|
854
|
-
The name of the server. If not provided, the value of `self.
|
1107
|
+
The name of the server. If not provided, the value of `self.view_server` will be used.
|
855
1108
|
|
856
1109
|
Returns
|
857
1110
|
-------
|
@@ -878,11 +1131,14 @@ class FullServerConfig(Client):
|
|
878
1131
|
server_name = self.server_name
|
879
1132
|
validate_name(service_url_marker)
|
880
1133
|
|
881
|
-
url = f"{self.
|
1134
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/view-services/{service_url_marker}"
|
882
1135
|
self.make_request("POST", url, view_service_body)
|
1136
|
+
|
883
1137
|
# todo - this may not be used anymore - old
|
884
|
-
def set_view_svcs_config(
|
885
|
-
|
1138
|
+
def set_view_svcs_config(
|
1139
|
+
self, view_svcs_config_body: dict, server_name: str = None
|
1140
|
+
) -> None:
|
1141
|
+
"""Set up the configuration for all the open metadata integration groups. This overrides the current values.
|
886
1142
|
|
887
1143
|
Parameters
|
888
1144
|
----------
|
@@ -915,11 +1171,13 @@ class FullServerConfig(Client):
|
|
915
1171
|
"""
|
916
1172
|
if server_name is None:
|
917
1173
|
server_name = self.server_name
|
918
|
-
url = f"{self.
|
1174
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/view-services/configuration"
|
919
1175
|
self.make_request("POST", url, view_svcs_config_body)
|
920
1176
|
|
921
|
-
def set_integration_groups_config(
|
922
|
-
|
1177
|
+
def set_integration_groups_config(
|
1178
|
+
self, integration_groups_config_body: dict, server_name: str = None
|
1179
|
+
) -> None:
|
1180
|
+
"""Set up the configuration for all the open metadata integration groups. This overrides the current values.
|
923
1181
|
Parameters
|
924
1182
|
----------
|
925
1183
|
integration_groups_config_body : dict
|
@@ -959,28 +1217,121 @@ class FullServerConfig(Client):
|
|
959
1217
|
"""
|
960
1218
|
if server_name is None:
|
961
1219
|
server_name = self.server_name
|
962
|
-
url = f"{self.
|
1220
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/integration-groups/configuration/all"
|
963
1221
|
self.make_request("POST", url, integration_groups_config_body)
|
964
1222
|
|
965
|
-
# def set_plug_in_repository_connection_from_provider(self, repository_connection: str, server_name: str = None) -> None:
|
966
|
-
# if server_name is None:
|
967
|
-
# server_name = self.server_name
|
968
|
-
# url = f"{self.admin_command_root}/servers/{server_name}/local-repository/mode/plugin-repository/connection"
|
969
|
-
# response = self.make_request("POST", url, json= repository_connection)
|
970
|
-
# related_code = response.json().get("relatedHTTPCode")
|
971
|
-
# if related_code != 200:
|
972
|
-
# raise InvalidParameterException(response.content)
|
973
|
-
# else:
|
974
|
-
# return
|
975
|
-
|
976
|
-
#
|
977
|
-
#
|
978
|
-
# %% Repository configurations
|
979
1223
|
def set_engine_host_services(self):
|
980
1224
|
# handles an array of engine list - pass in JSON
|
981
1225
|
|
982
1226
|
pass
|
1227
|
+
|
983
1228
|
def set_integration_daemon_services_configuration(self):
|
984
1229
|
# pass a json list
|
985
1230
|
pass
|
986
1231
|
|
1232
|
+
def config_integration_service(
|
1233
|
+
self,
|
1234
|
+
remote_omag_server: str,
|
1235
|
+
remote_omag_platform_url: str,
|
1236
|
+
service_url_marker: str,
|
1237
|
+
integration_service_options: dict,
|
1238
|
+
connector_configs: list,
|
1239
|
+
server_name: str = None,
|
1240
|
+
) -> None:
|
1241
|
+
if server_name is None:
|
1242
|
+
server_name = self.server_name
|
1243
|
+
|
1244
|
+
if not isinstance(connector_configs, list):
|
1245
|
+
exc_msg = " ==> connector_configs must be a list of dictionaries"
|
1246
|
+
raise Exception(exc_msg)
|
1247
|
+
|
1248
|
+
validate_name(remote_omag_server)
|
1249
|
+
validate_url(remote_omag_platform_url)
|
1250
|
+
|
1251
|
+
validate_name(service_url_marker)
|
1252
|
+
|
1253
|
+
request_body = {
|
1254
|
+
"class": "IntegrationServiceRequestBody",
|
1255
|
+
"omagserverPlatformRootURL": remote_omag_platform_url,
|
1256
|
+
"omagserverName": remote_omag_server,
|
1257
|
+
"integrationServiceOptions": integration_service_options,
|
1258
|
+
"integrationConnectorConfigs": connector_configs,
|
1259
|
+
}
|
1260
|
+
|
1261
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/integration-services/{service_url_marker}"
|
1262
|
+
# print(f"URL is : {url}")
|
1263
|
+
# print(f"body is : \n{json.dumps(request_body, indent=4)}")
|
1264
|
+
|
1265
|
+
self.make_request("POST", url, request_body)
|
1266
|
+
return
|
1267
|
+
|
1268
|
+
def config_all_integration_services(
|
1269
|
+
self,
|
1270
|
+
remote_omag_server: str,
|
1271
|
+
remote_omag_platform_url: str,
|
1272
|
+
integration_service_options: dict,
|
1273
|
+
connector_configs: dict,
|
1274
|
+
server_name: str = None,
|
1275
|
+
) -> None:
|
1276
|
+
if server_name is None:
|
1277
|
+
server_name = self.server_name
|
1278
|
+
validate_name(remote_omag_server)
|
1279
|
+
validate_url(remote_omag_platform_url)
|
1280
|
+
|
1281
|
+
request_body = {
|
1282
|
+
"IntegrationConnectorConfigs": [
|
1283
|
+
{
|
1284
|
+
"class": "IntegrationServiceRequestBody",
|
1285
|
+
"omagserverPlatformRootURL": remote_omag_platform_url,
|
1286
|
+
"omagserverName": remote_omag_server,
|
1287
|
+
"integrationServiceOptions": integration_service_options,
|
1288
|
+
"integrationConnectorConfigs": connector_configs,
|
1289
|
+
}
|
1290
|
+
]
|
1291
|
+
}
|
1292
|
+
|
1293
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/integration-services"
|
1294
|
+
print(f"URL is : {url}")
|
1295
|
+
print(f"body is : \n{json.dumps(request_body, indent=4)}")
|
1296
|
+
|
1297
|
+
self.make_request("POST", url, request_body)
|
1298
|
+
|
1299
|
+
def clear_integration_service(
|
1300
|
+
self, service_url_marker: str, server_name: str = None
|
1301
|
+
) -> None:
|
1302
|
+
if server_name is None:
|
1303
|
+
server_name = self.server_name
|
1304
|
+
validate_name(service_url_marker)
|
1305
|
+
|
1306
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/integration-services/{service_url_marker}"
|
1307
|
+
self.make_request("DELETE", url)
|
1308
|
+
|
1309
|
+
def get_integration_service_config(
|
1310
|
+
self, service_url_marker: str, server_name: str = None
|
1311
|
+
) -> dict | str:
|
1312
|
+
if server_name is None:
|
1313
|
+
server_name = self.server_name
|
1314
|
+
validate_name(service_url_marker)
|
1315
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/integration-services/{service_url_marker}/configuration"
|
1316
|
+
response = self.make_request("GET", url)
|
1317
|
+
return response.json().get("config", "No configuration found")
|
1318
|
+
|
1319
|
+
def get_integration_services_configs(self, server_name: str = None) -> dict | str:
|
1320
|
+
if server_name is None:
|
1321
|
+
server_name = self.server_name
|
1322
|
+
|
1323
|
+
url = f"{self.full_config_command_root}/servers/{server_name}/integration-services/configuration"
|
1324
|
+
response = self.make_request("GET", url)
|
1325
|
+
return response.json().get("services", "No configuration found")
|
1326
|
+
|
1327
|
+
def set_lineage_warehouse_services(self, body: dict, lineage_server: str) -> None:
|
1328
|
+
url = f"{self.full_config_command_root}/servers/{lineage_server}/lineage-warehouse/configuration"
|
1329
|
+
self.make_request("POST", url, body)
|
1330
|
+
|
1331
|
+
def remove_lineage_warehouse_services(self, lineage_server: str = None) -> None:
|
1332
|
+
url = f"{self.full_config_command_root}/servers/{lineage_server}/lineage-warehouse/configuration"
|
1333
|
+
self.make_request("DELETE", url)
|
1334
|
+
|
1335
|
+
|
1336
|
+
if __name__ == "__main__":
|
1337
|
+
print("Main-Full OMAG Server Config")
|