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
@@ -11,67 +11,54 @@ deployed to take effect.
|
|
11
11
|
|
12
12
|
import json
|
13
13
|
|
14
|
+
import psycopg2
|
15
|
+
from psycopg2 import sql
|
16
|
+
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
|
17
|
+
|
14
18
|
# import json
|
15
19
|
from pyegeria._client import Client
|
16
20
|
from pyegeria._globals import enable_ssl_check
|
17
|
-
from pyegeria._validators import
|
18
|
-
validate_name,
|
19
|
-
validate_guid,
|
20
|
-
validate_url
|
21
|
-
)
|
21
|
+
from pyegeria._validators import validate_name, validate_guid, validate_url
|
22
22
|
|
23
23
|
|
24
24
|
class CoreServerConfig(Client):
|
25
25
|
"""
|
26
26
|
CoreServerConfig is a class that extends the Client class. It provides methods to configure and interact with access
|
27
|
-
|
28
|
-
|
29
|
-
Methods:
|
30
|
-
|
31
|
-
- get_stored_configuration(server_name: str = None) -> dict:
|
32
|
-
Retrieves all the configuration documents for a server.
|
27
|
+
services in the OMAG server.
|
33
28
|
|
34
|
-
|
35
|
-
Returns the list of access services that are configured for this server.
|
29
|
+
Attributes:
|
36
30
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
31
|
+
server_name: str
|
32
|
+
The name of the OMAG server to configure.
|
33
|
+
platform_url : str
|
34
|
+
URL of the server platform to connect to
|
35
|
+
user_id : str
|
36
|
+
The identity of the user calling the method - this sets a default optionally used by the methods
|
37
|
+
when the user doesn't pass the user_id on a method call.
|
38
|
+
user_pwd: str
|
39
|
+
The password associated with the user_id. Defaults to None
|
46
40
|
|
47
|
-
|
48
|
-
Retrieves the config for an access service.
|
49
|
-
|
50
|
-
- configure_access_service(access_service_name: str, server_name: str = None) -> None:
|
51
|
-
Enables a single access service.
|
52
|
-
"""
|
41
|
+
"""
|
53
42
|
|
54
43
|
def __init__(
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
44
|
+
self,
|
45
|
+
server_name: str,
|
46
|
+
platform_url: str,
|
47
|
+
user_id: str,
|
48
|
+
user_pwd: str = None,
|
49
|
+
verify_flag: bool = enable_ssl_check,
|
61
50
|
):
|
62
|
-
self.
|
63
|
-
Client.__init__(self, server_name, platform_url, user_id, user_pwd
|
64
|
-
self.
|
65
|
-
|
66
|
-
+ "/open-metadata/admin-services/users/"
|
67
|
-
+ user_id
|
51
|
+
self.core_command_root: str
|
52
|
+
Client.__init__(self, server_name, platform_url, user_id, user_pwd)
|
53
|
+
self.core_command_root = (
|
54
|
+
self.platform_url + "/open-metadata/admin-services/users/" + user_id
|
68
55
|
)
|
69
56
|
|
70
57
|
#
|
71
58
|
# Configure Access Services
|
72
59
|
#
|
73
60
|
def get_stored_configuration(self, server_name: str = None) -> dict:
|
74
|
-
"""
|
61
|
+
"""Retrieves all the configuration documents for a server
|
75
62
|
Parameters
|
76
63
|
----------
|
77
64
|
self :
|
@@ -104,17 +91,17 @@ class CoreServerConfig(Client):
|
|
104
91
|
|
105
92
|
if server_name is None:
|
106
93
|
server_name = self.server_name
|
107
|
-
url = f"{self.
|
94
|
+
url = f"{self.core_command_root}/servers/{server_name}/configuration"
|
108
95
|
response = self.make_request("GET", url)
|
109
96
|
return response.json().get("omagserverConfig", "No configuration found")
|
110
97
|
|
111
|
-
def is_server_configured(self, server_name:str= None) -> bool:
|
112
|
-
"""
|
98
|
+
def is_server_configured(self, server_name: str = None) -> bool:
|
99
|
+
"""Check if the server has a stored configuration
|
113
100
|
|
114
101
|
Parameters
|
115
102
|
----------
|
116
103
|
server_name : str, optional
|
117
|
-
The name of the server. If not provided, it uses the default
|
104
|
+
The name of the server. If not provided, it uses the default view_server from the instance.
|
118
105
|
|
119
106
|
Returns
|
120
107
|
-------
|
@@ -126,14 +113,13 @@ class CoreServerConfig(Client):
|
|
126
113
|
|
127
114
|
response = self.get_stored_configuration(server_name=server_name)
|
128
115
|
|
129
|
-
if
|
116
|
+
if "auditTrail" in response:
|
130
117
|
return True
|
131
118
|
else:
|
132
119
|
return False
|
133
120
|
|
134
|
-
|
135
121
|
def get_configured_access_services(self, server_name: str = None) -> list | str:
|
136
|
-
"""
|
122
|
+
"""Return the list of access services that are configured for this server.
|
137
123
|
|
138
124
|
Parameters
|
139
125
|
----------
|
@@ -160,12 +146,12 @@ class CoreServerConfig(Client):
|
|
160
146
|
if server_name is None:
|
161
147
|
server_name = self.server_name
|
162
148
|
|
163
|
-
url = f"{self.
|
149
|
+
url = f"{self.core_command_root}/servers/{server_name}/access-services"
|
164
150
|
response = self.make_request("GET", url)
|
165
151
|
return response.json().get("services", "No access services found")
|
166
152
|
|
167
153
|
def configure_all_access_services(self, server_name: str = None) -> None:
|
168
|
-
"""
|
154
|
+
"""Enable all access services that are registered with this server platform.
|
169
155
|
The access services will send notifications if it is part of its implementation.
|
170
156
|
Parameters
|
171
157
|
----------
|
@@ -193,11 +179,11 @@ class CoreServerConfig(Client):
|
|
193
179
|
if server_name is None:
|
194
180
|
server_name = self.server_name
|
195
181
|
|
196
|
-
url = f"{self.
|
182
|
+
url = f"{self.core_command_root}/servers/{server_name}/access-services"
|
197
183
|
self.make_request("POST", url)
|
198
184
|
|
199
185
|
def configure_all_access_services_no_topics(self, server_name: str = None) -> None:
|
200
|
-
"""
|
186
|
+
"""Configure all access services for the specified server with no cohort/Event Bus.
|
201
187
|
Parameters
|
202
188
|
----------
|
203
189
|
server_name : str, optional
|
@@ -223,11 +209,13 @@ class CoreServerConfig(Client):
|
|
223
209
|
"""
|
224
210
|
if server_name is None:
|
225
211
|
server_name = self.server_name
|
226
|
-
url =
|
212
|
+
url = (
|
213
|
+
f"{self.core_command_root}/servers/{server_name}/access-services/no-topics"
|
214
|
+
)
|
227
215
|
self.make_request("POST", url)
|
228
216
|
|
229
217
|
def clear_all_access_services(self, server_name: str = None) -> None:
|
230
|
-
"""
|
218
|
+
"""Disable the access services. This removes all configuration for the access services and disables the
|
231
219
|
enterprise repository services.
|
232
220
|
Parameters
|
233
221
|
----------
|
@@ -256,11 +244,13 @@ class CoreServerConfig(Client):
|
|
256
244
|
if server_name is None:
|
257
245
|
server_name = self.server_name
|
258
246
|
|
259
|
-
url = f"{self.
|
247
|
+
url = f"{self.core_command_root}/servers/{server_name}/access-services"
|
260
248
|
self.make_request("DELETE", url)
|
261
249
|
|
262
|
-
def get_access_service_config(
|
263
|
-
|
250
|
+
def get_access_service_config(
|
251
|
+
self, access_service_name: str, server_name: str = None
|
252
|
+
) -> dict:
|
253
|
+
"""Retrieve the config for an access service.
|
264
254
|
|
265
255
|
Parameters
|
266
256
|
----------
|
@@ -288,18 +278,22 @@ class CoreServerConfig(Client):
|
|
288
278
|
ConfigurationErrorException
|
289
279
|
Raised when configuration parameters passed on earlier calls turn out to be
|
290
280
|
invalid or make the new call invalid.
|
291
|
-
|
281
|
+
"""
|
292
282
|
if server_name is None:
|
293
283
|
server_name = self.server_name
|
294
284
|
validate_name(access_service_name)
|
295
285
|
|
296
|
-
url = f"{self.
|
286
|
+
url = f"{self.core_command_root}/servers/{server_name}/access-services/{access_service_name}"
|
297
287
|
response = self.make_request("GET", url)
|
298
288
|
return response.json().get("config", "Access service not found")
|
299
289
|
|
300
|
-
def configure_access_service(
|
301
|
-
|
302
|
-
|
290
|
+
def configure_access_service(
|
291
|
+
self,
|
292
|
+
access_service_name: str,
|
293
|
+
access_service_options: dict = None,
|
294
|
+
server_name: str = None,
|
295
|
+
) -> None:
|
296
|
+
"""Enable a single access service. This access service will send notifications if it is part
|
303
297
|
of its implementation.
|
304
298
|
|
305
299
|
Parameters
|
@@ -338,12 +332,16 @@ class CoreServerConfig(Client):
|
|
338
332
|
if server_name is None:
|
339
333
|
server_name = self.server_name
|
340
334
|
validate_name(access_service_name)
|
341
|
-
url = f"{self.
|
335
|
+
url = f"{self.core_command_root}/servers/{server_name}/access-services/{access_service_name}"
|
342
336
|
self.make_request("POST", url, access_service_options)
|
343
337
|
|
344
|
-
def configure_access_service_no_topics(
|
345
|
-
|
346
|
-
|
338
|
+
def configure_access_service_no_topics(
|
339
|
+
self,
|
340
|
+
access_service_name: str,
|
341
|
+
access_service_options: dict = None,
|
342
|
+
server_name: str = None,
|
343
|
+
) -> None:
|
344
|
+
"""Enable a single access service. Notifications, if supported, are disabled.
|
347
345
|
|
348
346
|
Parameters
|
349
347
|
----------
|
@@ -384,11 +382,13 @@ class CoreServerConfig(Client):
|
|
384
382
|
server_name = self.server_name
|
385
383
|
validate_name(access_service_name)
|
386
384
|
|
387
|
-
url = f"{self.
|
385
|
+
url = f"{self.core_command_root}/servers/{server_name}/access-services/{access_service_name}/no-topics"
|
388
386
|
self.make_request("POST", url, access_service_options)
|
389
387
|
|
390
|
-
def clear_access_service(
|
391
|
-
|
388
|
+
def clear_access_service(
|
389
|
+
self, access_service_name: str, server_name: str = None
|
390
|
+
) -> None:
|
391
|
+
"""Remove the config for an access service.
|
392
392
|
|
393
393
|
Parameters
|
394
394
|
----------
|
@@ -421,11 +421,11 @@ class CoreServerConfig(Client):
|
|
421
421
|
server_name = self.server_name
|
422
422
|
validate_name(access_service_name)
|
423
423
|
|
424
|
-
url = f"{self.
|
424
|
+
url = f"{self.core_command_root}/servers/{server_name}/access-services/{access_service_name}"
|
425
425
|
self.make_request("DELETE", url)
|
426
426
|
|
427
427
|
def get_access_services_configuration(self, server_name: str = None) -> list:
|
428
|
-
"""
|
428
|
+
"""Return the detailed configuration for the access services in this server.
|
429
429
|
|
430
430
|
Parameters
|
431
431
|
----------
|
@@ -441,7 +441,7 @@ class CoreServerConfig(Client):
|
|
441
441
|
"""
|
442
442
|
if server_name is None:
|
443
443
|
server_name = self.server_name
|
444
|
-
url = f"{self.
|
444
|
+
url = f"{self.core_command_root}/servers/{server_name}/access-services/configuration"
|
445
445
|
response = self.make_request("GET", url)
|
446
446
|
|
447
447
|
return response.json().get("services", "No access services configured")
|
@@ -450,7 +450,7 @@ class CoreServerConfig(Client):
|
|
450
450
|
# Configure Event Bus
|
451
451
|
#
|
452
452
|
def get_event_bus(self, server_name: str = None) -> dict:
|
453
|
-
"""
|
453
|
+
"""Returns the event bus configuration for the specified server
|
454
454
|
|
455
455
|
Parameters
|
456
456
|
----------
|
@@ -474,13 +474,13 @@ class CoreServerConfig(Client):
|
|
474
474
|
"""
|
475
475
|
if server_name is None:
|
476
476
|
server_name = self.server_name
|
477
|
-
url = f"{self.
|
477
|
+
url = f"{self.core_command_root}/servers/{server_name}/event-bus"
|
478
478
|
|
479
479
|
response = self.make_request("GET", url)
|
480
480
|
return response.json().get("config", "No event bus configured")
|
481
481
|
|
482
482
|
def set_event_bus(self, event_bus_config: dict, server_name: str = None) -> None:
|
483
|
-
"""
|
483
|
+
"""Sets the event bus configuration for the server.
|
484
484
|
|
485
485
|
Parameters
|
486
486
|
----------
|
@@ -519,11 +519,11 @@ class CoreServerConfig(Client):
|
|
519
519
|
if server_name is None:
|
520
520
|
server_name = self.server_name
|
521
521
|
|
522
|
-
url = f"{self.
|
522
|
+
url = f"{self.core_command_root}/servers/{server_name}/event-bus"
|
523
523
|
self.make_request("POST", url, event_bus_config)
|
524
524
|
|
525
525
|
def clear_event_bus(self, server_name: str = None) -> None:
|
526
|
-
"""
|
526
|
+
"""Delete the event bus configuration for the given server.
|
527
527
|
|
528
528
|
Parameters
|
529
529
|
----------
|
@@ -555,45 +555,47 @@ class CoreServerConfig(Client):
|
|
555
555
|
if server_name is None:
|
556
556
|
server_name = self.server_name
|
557
557
|
|
558
|
-
url = f"{self.
|
558
|
+
url = f"{self.core_command_root}/servers/{server_name}/event-bus"
|
559
559
|
self.make_request("DELETE", url)
|
560
560
|
|
561
561
|
#
|
562
562
|
# Configure Audit Logs
|
563
563
|
#
|
564
564
|
def get_audit_log_destinations(self, server_name: str = None) -> dict:
|
565
|
-
"""
|
565
|
+
"""Get the destinations for a servers audit log
|
566
566
|
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
567
|
+
Parameters
|
568
|
+
----------
|
569
|
+
server_name : str, optional
|
570
|
+
The name of the server to retrieve the audit configuration for. If no value is provided will pull
|
571
|
+
the default from the class definition.
|
572
572
|
|
573
|
-
|
574
|
-
|
575
|
-
|
573
|
+
Returns
|
574
|
+
-------
|
575
|
+
Returns json string containing the audit log destinations configuration.
|
576
576
|
|
577
|
-
|
578
|
-
|
577
|
+
Raises
|
578
|
+
------
|
579
579
|
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
580
|
+
InvalidParameterException
|
581
|
+
If the client passes incorrect parameters on the request - such as bad URLs or invalid values
|
582
|
+
PropertyServerException
|
583
|
+
Raised by the server when an issue arises in processing a valid request
|
584
|
+
NotAuthorizedException
|
585
|
+
The principle specified by the user_id does not have authorization for the requested action
|
586
586
|
"""
|
587
587
|
|
588
588
|
if server_name is None:
|
589
589
|
server_name = self.server_name
|
590
590
|
|
591
|
-
url = f"{self.
|
591
|
+
url = f"{self.core_command_root}/servers/{server_name}/audit-log-destinations"
|
592
592
|
response = self.make_request("GET", url)
|
593
|
-
return response.json().get(
|
593
|
+
return response.json().get(
|
594
|
+
"connections", "No audit log destinations configured"
|
595
|
+
)
|
594
596
|
|
595
597
|
def clear_audit_log_destinations(self, server_name: str = None) -> None:
|
596
|
-
"""
|
598
|
+
"""Clears the audit log destination configuration for the specified server
|
597
599
|
|
598
600
|
Parameters
|
599
601
|
----------
|
@@ -619,11 +621,11 @@ class CoreServerConfig(Client):
|
|
619
621
|
if server_name is None:
|
620
622
|
server_name = self.server_name
|
621
623
|
|
622
|
-
url = f"{self.
|
624
|
+
url = f"{self.core_command_root}/servers/{server_name}/audit-log-destinations"
|
623
625
|
self.make_request("DELETE", url)
|
624
626
|
|
625
627
|
def clear_a_log_destination(self, dest_name: str, server_name: str = None) -> None:
|
626
|
-
"""
|
628
|
+
"""Clears audit log destinations for a server
|
627
629
|
|
628
630
|
Parameters
|
629
631
|
----------
|
@@ -651,11 +653,13 @@ class CoreServerConfig(Client):
|
|
651
653
|
if server_name is None:
|
652
654
|
server_name = self.server_name
|
653
655
|
validate_name(dest_name)
|
654
|
-
url = f"{self.
|
656
|
+
url = f"{self.core_command_root}/servers/{server_name}/audit-log-destinations/connection/{dest_name}"
|
655
657
|
self.make_request("DELETE", url)
|
656
658
|
|
657
|
-
def add_console_log_destinations(
|
658
|
-
|
659
|
+
def add_console_log_destinations(
|
660
|
+
self, severities: [str], server_name: str = None
|
661
|
+
) -> None:
|
662
|
+
"""Adds a console log destination to a server
|
659
663
|
|
660
664
|
Parameters
|
661
665
|
----------
|
@@ -686,11 +690,11 @@ class CoreServerConfig(Client):
|
|
686
690
|
server_name = self.server_name
|
687
691
|
if severities is None:
|
688
692
|
severities = []
|
689
|
-
url = f"{self.
|
693
|
+
url = f"{self.core_command_root}/servers/{server_name}/audit-log-destinations/console"
|
690
694
|
self.make_request("POST", url, severities)
|
691
695
|
|
692
696
|
def add_default_log_destinations(self, server_name: str = None) -> None:
|
693
|
-
"""
|
697
|
+
"""Adds the default log destination to a server
|
694
698
|
|
695
699
|
Parameters
|
696
700
|
----------
|
@@ -715,11 +719,13 @@ class CoreServerConfig(Client):
|
|
715
719
|
"""
|
716
720
|
if server_name is None:
|
717
721
|
server_name = self.server_name
|
718
|
-
url = f"{self.
|
722
|
+
url = f"{self.core_command_root}/servers/{server_name}/audit-log-destinations/default"
|
719
723
|
self.make_request("POST", url)
|
720
724
|
|
721
|
-
def add_event_topic_log_destinations(
|
722
|
-
|
725
|
+
def add_event_topic_log_destinations(
|
726
|
+
self, topic_name: str, severities: [str], server_name: str = None
|
727
|
+
) -> None:
|
728
|
+
"""Adds an event topic log destination to a server
|
723
729
|
|
724
730
|
Parameters
|
725
731
|
----------
|
@@ -758,12 +764,16 @@ class CoreServerConfig(Client):
|
|
758
764
|
if severities is None:
|
759
765
|
severities = []
|
760
766
|
|
761
|
-
url = (
|
762
|
-
|
767
|
+
url = (
|
768
|
+
f"{self.core_command_root}/servers/{server_name}/audit-log-destinations/event-topic?topicName="
|
769
|
+
f"{topic_name}"
|
770
|
+
)
|
763
771
|
self.make_request("POST", url, severities)
|
764
772
|
|
765
|
-
def add_file_log_destinations(
|
766
|
-
|
773
|
+
def add_file_log_destinations(
|
774
|
+
self, directory_name: str, severities=None, server_name: str = None
|
775
|
+
) -> None:
|
776
|
+
"""Adds a file log destination to a server. Each message is a separate file in the directory
|
767
777
|
indicated by the directory name.
|
768
778
|
|
769
779
|
Parameters
|
@@ -793,6 +803,8 @@ class CoreServerConfig(Client):
|
|
793
803
|
invalid or make the new call invalid.
|
794
804
|
|
795
805
|
"""
|
806
|
+
if severities is None:
|
807
|
+
severities = ["Error", "Exception"]
|
796
808
|
if server_name is None:
|
797
809
|
server_name = self.server_name
|
798
810
|
|
@@ -800,12 +812,52 @@ class CoreServerConfig(Client):
|
|
800
812
|
|
801
813
|
if severities is None:
|
802
814
|
severities = []
|
803
|
-
url = (
|
804
|
-
|
815
|
+
url = (
|
816
|
+
f"{self.core_command_root}/servers/{server_name}/audit-log-destinations/files?directoryName="
|
817
|
+
f"{directory_name}"
|
818
|
+
)
|
805
819
|
self.make_request("POST", url, severities)
|
806
820
|
|
807
|
-
def
|
808
|
-
|
821
|
+
def add_postgres_log_destinations(
|
822
|
+
self, config_body: dict, server_name: str = None
|
823
|
+
) -> None:
|
824
|
+
"""Adds a postgres log destination to a server.
|
825
|
+
|
826
|
+
Parameters
|
827
|
+
----------
|
828
|
+
config_body : str
|
829
|
+
Configuration of the postgres database for the audit log destination.
|
830
|
+
server_name : str
|
831
|
+
Name of the server to update.
|
832
|
+
|
833
|
+
Returns
|
834
|
+
-------
|
835
|
+
Void
|
836
|
+
|
837
|
+
Raises
|
838
|
+
------
|
839
|
+
|
840
|
+
InvalidParameterException:
|
841
|
+
If the client passes incorrect parameters on the request - such as bad URLs or invalid values
|
842
|
+
PropertyServerException:
|
843
|
+
Raised by the server when an issue arises in processing a valid request
|
844
|
+
NotAuthorizedException:
|
845
|
+
The principle specified by the user_id does not have authorization for the requested action
|
846
|
+
ConfigurationErrorException:
|
847
|
+
Raised when configuration parameters passed on earlier calls turn out to be
|
848
|
+
invalid or make the new call invalid.
|
849
|
+
|
850
|
+
"""
|
851
|
+
if server_name is None:
|
852
|
+
server_name = self.server_name
|
853
|
+
|
854
|
+
url = f"{self.core_command_root}/servers/{server_name}/audit-log-destinations/postgres"
|
855
|
+
self.make_request("POST", url, config_body)
|
856
|
+
|
857
|
+
def add_slf4j_log_destination(
|
858
|
+
self, severities: [str] = None, server_name: str = None
|
859
|
+
) -> None:
|
860
|
+
"""Adds an SLF4J log destination to a server
|
809
861
|
|
810
862
|
Parameters
|
811
863
|
----------
|
@@ -832,19 +884,19 @@ class CoreServerConfig(Client):
|
|
832
884
|
server_name = self.server_name
|
833
885
|
if severities is None:
|
834
886
|
severities = []
|
835
|
-
url = f"{self.
|
887
|
+
url = f"{self.core_command_root}/servers/{server_name}/audit-log-destinations/slf4j"
|
836
888
|
self.make_request("POST", url, severities)
|
837
889
|
|
838
890
|
#
|
839
891
|
# Basic Repository Configuration
|
840
892
|
#
|
841
893
|
def set_no_repository_mode(self, server_name: str = None) -> None:
|
842
|
-
"""
|
894
|
+
"""Disable the local repository for this server
|
843
895
|
|
844
896
|
Parameters
|
845
897
|
----------
|
846
898
|
server_name : str, optional
|
847
|
-
The name of the server. If not provided, the method uses the value stored in `self.
|
899
|
+
The name of the server. If not provided, the method uses the value stored in `self.view_server`.
|
848
900
|
|
849
901
|
Returns
|
850
902
|
-------
|
@@ -862,11 +914,11 @@ class CoreServerConfig(Client):
|
|
862
914
|
if server_name is None:
|
863
915
|
server_name = self.server_name
|
864
916
|
|
865
|
-
url = f"{self.
|
917
|
+
url = f"{self.core_command_root}/servers/{server_name}/local-repository"
|
866
918
|
self.make_request("DELETE", url)
|
867
919
|
|
868
920
|
def get_local_repository_config(self, server_name: str = None) -> dict:
|
869
|
-
"""
|
921
|
+
"""Retrieve the local repository configuration as a JSON dictionary
|
870
922
|
|
871
923
|
Parameters
|
872
924
|
----------
|
@@ -891,7 +943,12 @@ class CoreServerConfig(Client):
|
|
891
943
|
"""
|
892
944
|
if server_name is None:
|
893
945
|
server_name = self.server_name
|
894
|
-
url =
|
946
|
+
url = (
|
947
|
+
self.core_command_root
|
948
|
+
+ "/servers/"
|
949
|
+
+ server_name
|
950
|
+
+ "/local-repository/configuration"
|
951
|
+
)
|
895
952
|
response = self.make_request("GET", url)
|
896
953
|
|
897
954
|
# return response.json().get("config")
|
@@ -899,7 +956,7 @@ class CoreServerConfig(Client):
|
|
899
956
|
return response.json().get("config", "No configuration found")
|
900
957
|
|
901
958
|
def clear_local_repository_config(self, server_name: str = None) -> None:
|
902
|
-
"""
|
959
|
+
"""Clear the configuration of the local repository
|
903
960
|
|
904
961
|
Parameters
|
905
962
|
----------
|
@@ -923,11 +980,18 @@ class CoreServerConfig(Client):
|
|
923
980
|
"""
|
924
981
|
if server_name is None:
|
925
982
|
server_name = self.server_name
|
926
|
-
url =
|
983
|
+
url = (
|
984
|
+
self.core_command_root
|
985
|
+
+ "/servers/"
|
986
|
+
+ server_name
|
987
|
+
+ "/local-repository/configuration"
|
988
|
+
)
|
927
989
|
self.make_request("DELETE", url)
|
928
990
|
|
929
|
-
def set_local_metadata_collection_id(
|
930
|
-
|
991
|
+
def set_local_metadata_collection_id(
|
992
|
+
self, metadata_collection_id: str, server_name: str = None
|
993
|
+
) -> None:
|
994
|
+
"""set the metadata collection id of the local repository
|
931
995
|
|
932
996
|
Parameters
|
933
997
|
----------
|
@@ -954,11 +1018,11 @@ class CoreServerConfig(Client):
|
|
954
1018
|
server_name = self.server_name
|
955
1019
|
validate_guid(metadata_collection_id)
|
956
1020
|
|
957
|
-
url = f"{self.
|
1021
|
+
url = f"{self.core_command_root}/servers/{server_name}/local-repository/metadata-collection-id"
|
958
1022
|
self.make_request("POST", url, metadata_collection_id)
|
959
1023
|
|
960
1024
|
def get_local_metadata_collection_id(self, server_name: str = None) -> str:
|
961
|
-
"""
|
1025
|
+
"""get the local metadata collection id
|
962
1026
|
Parameters
|
963
1027
|
----------
|
964
1028
|
server_name : str, optional
|
@@ -984,12 +1048,15 @@ class CoreServerConfig(Client):
|
|
984
1048
|
if server_name is None:
|
985
1049
|
server_name = self.server_name
|
986
1050
|
|
987
|
-
url = f"{self.
|
988
|
-
response = self.make_request(
|
989
|
-
|
1051
|
+
url = f"{self.core_command_root}/servers/{server_name}/local-repository/metadata-collection-id"
|
1052
|
+
response = self.make_request(
|
1053
|
+
"GET",
|
1054
|
+
url,
|
1055
|
+
)
|
1056
|
+
return response.json().get("guid", "No ID found")
|
990
1057
|
|
991
1058
|
def get_local_metadata_collection_name(self, server_name: str = None) -> str:
|
992
|
-
"""
|
1059
|
+
"""get the local metadata collection name
|
993
1060
|
Parameters
|
994
1061
|
----------
|
995
1062
|
server_name : str, optional
|
@@ -1015,12 +1082,17 @@ class CoreServerConfig(Client):
|
|
1015
1082
|
if server_name is None:
|
1016
1083
|
server_name = self.server_name
|
1017
1084
|
|
1018
|
-
url = f"{self.
|
1019
|
-
response = self.make_request(
|
1085
|
+
url = f"{self.core_command_root}/servers/{server_name}/local-repository/metadata-collection-name"
|
1086
|
+
response = self.make_request(
|
1087
|
+
"GET",
|
1088
|
+
url,
|
1089
|
+
)
|
1020
1090
|
return response.json().get("resultString", "No name found")
|
1021
1091
|
|
1022
|
-
def set_local_metadata_collection_name(
|
1023
|
-
|
1092
|
+
def set_local_metadata_collection_name(
|
1093
|
+
self, metadata_collection_name: str, server_name: str = None
|
1094
|
+
) -> None:
|
1095
|
+
"""Set local metadata collection name
|
1024
1096
|
|
1025
1097
|
Parameters
|
1026
1098
|
----------
|
@@ -1049,12 +1121,14 @@ class CoreServerConfig(Client):
|
|
1049
1121
|
server_name = self.server_name
|
1050
1122
|
validate_name(metadata_collection_name)
|
1051
1123
|
|
1052
|
-
url = (
|
1053
|
-
|
1124
|
+
url = (
|
1125
|
+
f"{self.core_command_root}/servers/{server_name}/local-repository/"
|
1126
|
+
f"metadata-collection-name/{metadata_collection_name}"
|
1127
|
+
)
|
1054
1128
|
self.make_request("POST", url)
|
1055
1129
|
|
1056
1130
|
def set_in_mem_local_repository(self, server_name: str = None) -> None:
|
1057
|
-
"""
|
1131
|
+
"""Sets the local repository to use the native in-memory repository
|
1058
1132
|
|
1059
1133
|
Parameters
|
1060
1134
|
----------
|
@@ -1076,11 +1150,11 @@ class CoreServerConfig(Client):
|
|
1076
1150
|
"""
|
1077
1151
|
if server_name is None:
|
1078
1152
|
server_name = self.server_name
|
1079
|
-
url = f"{self.
|
1153
|
+
url = f"{self.core_command_root}/servers/{server_name}/local-repository/mode/in-memory-repository"
|
1080
1154
|
self.make_request("POST", url)
|
1081
1155
|
|
1082
1156
|
def set_graph_local_repository(self, server_name: str = None) -> None:
|
1083
|
-
"""
|
1157
|
+
"""Sets the local repository to use JanusGraph file based repository
|
1084
1158
|
|
1085
1159
|
Parameters
|
1086
1160
|
----------
|
@@ -1104,14 +1178,46 @@ class CoreServerConfig(Client):
|
|
1104
1178
|
"""
|
1105
1179
|
if server_name is None:
|
1106
1180
|
server_name = self.server_name
|
1107
|
-
url = f"{self.
|
1181
|
+
url = f"{self.core_command_root}/servers/{server_name}/local-repository/mode/local-graph-repository"
|
1108
1182
|
self.make_request("POST", url)
|
1109
1183
|
|
1110
1184
|
def set_read_only_local_repository(self, server_name: str = None) -> None:
|
1111
|
-
"""
|
1185
|
+
"""Sets the local repository to be read-only
|
1186
|
+
|
1187
|
+
Parameters
|
1188
|
+
----------
|
1189
|
+
server_name : str, optional
|
1190
|
+
The name of the server. If not provided, the default server name of the instance will be used.
|
1191
|
+
|
1192
|
+
Returns
|
1193
|
+
-------
|
1194
|
+
None
|
1195
|
+
This method does not return anything.
|
1196
|
+
|
1197
|
+
Raises
|
1198
|
+
------
|
1199
|
+
InvalidParameterException
|
1200
|
+
If the response code is not 200.
|
1201
|
+
PropertyServerException:
|
1202
|
+
Raised by the server when an issue arises in processing a valid request
|
1203
|
+
NotAuthorizedException:
|
1204
|
+
The principle specified by the user_id does not have authorization for the requested action
|
1205
|
+
|
1206
|
+
"""
|
1207
|
+
if server_name is None:
|
1208
|
+
server_name = self.server_name
|
1209
|
+
url = f"{self.core_command_root}/servers/{server_name}/local-repository/mode/read-only-repository"
|
1210
|
+
self.make_request("POST", url)
|
1211
|
+
|
1212
|
+
def set_repository_proxy_details(
|
1213
|
+
self, connector_provider: str, server_name: str = None
|
1214
|
+
) -> None:
|
1215
|
+
"""Sets the local repository to use the proxy repository specified by the connection.
|
1112
1216
|
|
1113
1217
|
Parameters
|
1114
1218
|
----------
|
1219
|
+
connector_provider: str
|
1220
|
+
Specifies the class of the proxy connector provider.
|
1115
1221
|
server_name : str, optional
|
1116
1222
|
The name of the server. If not provided, the default server name of the instance will be used.
|
1117
1223
|
|
@@ -1132,16 +1238,24 @@ class CoreServerConfig(Client):
|
|
1132
1238
|
"""
|
1133
1239
|
if server_name is None:
|
1134
1240
|
server_name = self.server_name
|
1135
|
-
|
1241
|
+
|
1242
|
+
validate_name(connector_provider)
|
1243
|
+
|
1244
|
+
url = (
|
1245
|
+
f"{self.core_command_root}/servers/{server_name}/local-repository/mode/repository-proxy/"
|
1246
|
+
f"details?connectorProvider={connector_provider}"
|
1247
|
+
)
|
1136
1248
|
self.make_request("POST", url)
|
1137
1249
|
|
1138
|
-
def
|
1139
|
-
|
1250
|
+
def set_postgres_local_repository(
|
1251
|
+
self, config_body: dict, server_name: str = None
|
1252
|
+
) -> None:
|
1253
|
+
"""Set up the local repository to use the PostgreSQL Repository implementation.
|
1140
1254
|
|
1141
1255
|
Parameters
|
1142
1256
|
----------
|
1143
1257
|
config_body : dict
|
1144
|
-
The configuration body for the
|
1258
|
+
The configuration body for the repository. This should contain the necessary parameters for
|
1145
1259
|
connecting to the repository.
|
1146
1260
|
|
1147
1261
|
server_name : str, optional
|
@@ -1160,16 +1274,61 @@ class CoreServerConfig(Client):
|
|
1160
1274
|
Raised by the server when an issue arises in processing a valid request
|
1161
1275
|
NotAuthorizedException:
|
1162
1276
|
The principle specified by the user_id does not have authorization for the requested action
|
1277
|
+
|
1278
|
+
Notes
|
1279
|
+
-----
|
1280
|
+
|
1281
|
+
Sample body:
|
1282
|
+
{
|
1283
|
+
"databaseURL": "{{postgreSQLDatabaseURL}}",
|
1284
|
+
"databaseSchema": "repository_{{server}}",
|
1285
|
+
"secretsStore": "{{secretsStore}}",
|
1286
|
+
"secretsCollectionName": "{{postgreSQLServerCollectionName}}"
|
1287
|
+
}
|
1288
|
+
|
1163
1289
|
"""
|
1164
1290
|
if server_name is None:
|
1165
1291
|
server_name = self.server_name
|
1166
1292
|
|
1167
|
-
url = f"{self.
|
1293
|
+
url = f"{self.core_command_root}/servers/{server_name}/local-repository/mode/postgres-repository"
|
1168
1294
|
self.make_request("POST", url, config_body)
|
1169
1295
|
|
1296
|
+
def set_plug_in_repository(
|
1297
|
+
self, config_body: dict, server_name: str = None
|
1298
|
+
) -> None:
|
1299
|
+
"""Configure the metadata repository using a full repository connection body.
|
1300
|
+
|
1301
|
+
Parameters
|
1302
|
+
----------
|
1303
|
+
config_body : dict
|
1304
|
+
The configuration body for the plug-in repository. This should contain the necessary parameters for
|
1305
|
+
connecting to the repository.
|
1306
|
+
|
1307
|
+
server_name : str, optional
|
1308
|
+
The name of the server. If not provided, the default server name will be used.
|
1309
|
+
|
1310
|
+
Returns
|
1311
|
+
-------
|
1312
|
+
None
|
1313
|
+
This method does not return anything.
|
1314
|
+
|
1315
|
+
Raises
|
1316
|
+
------
|
1317
|
+
InvalidParameterException
|
1318
|
+
If the response code is not 200.
|
1319
|
+
PropertyServerException:
|
1320
|
+
Raised by the server when an issue arises in processing a valid request
|
1321
|
+
NotAuthorizedException:
|
1322
|
+
The principle specified by the user_id does not have authorization for the requested action
|
1323
|
+
"""
|
1324
|
+
if server_name is None:
|
1325
|
+
server_name = self.server_name
|
1326
|
+
|
1327
|
+
url = f"{self.core_command_root}/servers/{server_name}/local-repository/mode/plugin-repository/connection"
|
1328
|
+
self.make_request("POST", url, config_body)
|
1170
1329
|
|
1171
1330
|
def set_xtdb_in_mem_repository(self, server_name: str = None) -> None:
|
1172
|
-
"""
|
1331
|
+
"""Set xtdb local repository connection to be XTDB with an in memory repository
|
1173
1332
|
|
1174
1333
|
Parameters
|
1175
1334
|
----------
|
@@ -1193,11 +1352,11 @@ class CoreServerConfig(Client):
|
|
1193
1352
|
"""
|
1194
1353
|
if server_name is None:
|
1195
1354
|
server_name = self.server_name
|
1196
|
-
url = f"{self.
|
1355
|
+
url = f"{self.core_command_root}/servers/{server_name}/local-repository/mode/xtdb-in-memory-repository"
|
1197
1356
|
self.make_request("POST", url)
|
1198
1357
|
|
1199
1358
|
def set_xtdb_local_kv_repository(self, server_name: str = None) -> None:
|
1200
|
-
"""
|
1359
|
+
"""Set xtdb local repository connection to be XTDB with a local file based key-value store
|
1201
1360
|
|
1202
1361
|
Parameters
|
1203
1362
|
----------
|
@@ -1226,11 +1385,13 @@ class CoreServerConfig(Client):
|
|
1226
1385
|
"""
|
1227
1386
|
if server_name is None:
|
1228
1387
|
server_name = self.server_name
|
1229
|
-
url = f"{self.
|
1388
|
+
url = f"{self.core_command_root}/servers/{server_name}/local-repository/mode/xtdb-local-kv-repository"
|
1230
1389
|
self.make_request("POST", url)
|
1231
1390
|
|
1232
|
-
def set_xtdb_local_repository(
|
1233
|
-
|
1391
|
+
def set_xtdb_local_repository(
|
1392
|
+
self, xtdb_config_body: dict, server_name: str = None
|
1393
|
+
) -> None:
|
1394
|
+
"""Set the local repository connection to be XTDB with a potentially complex XTDB configuration
|
1234
1395
|
|
1235
1396
|
Parameters
|
1236
1397
|
----------
|
@@ -1261,17 +1422,22 @@ class CoreServerConfig(Client):
|
|
1261
1422
|
if server_name is None:
|
1262
1423
|
server_name = self.server_name
|
1263
1424
|
|
1264
|
-
url = f"{self.
|
1425
|
+
url = f"{self.core_command_root}/servers/{server_name}/local-repository/mode/xtdb-local-repository"
|
1265
1426
|
self.make_request("POST", url, xtdb_config_body)
|
1266
1427
|
|
1267
|
-
def set_xtdb_pg_repository(
|
1268
|
-
|
1428
|
+
def set_xtdb_pg_repository(
|
1429
|
+
self, host: str, port: str, pg_user: str, pg_pwd: str, server_name: str = None
|
1430
|
+
) -> None:
|
1431
|
+
"""Set the local repository connection to be XTDB using PostgresSQL Server, passing in basic parameters.
|
1432
|
+
A postgres database with the name of the metadata server will be created if it doesn't exist.
|
1433
|
+
|
1269
1434
|
|
1270
1435
|
Parameters
|
1271
1436
|
----------
|
1272
1437
|
host : str
|
1273
|
-
the full hostname
|
1274
|
-
|
1438
|
+
the full hostname of the postgres server
|
1439
|
+
port: str
|
1440
|
+
the port number of the postgres server
|
1275
1441
|
pg_user : str
|
1276
1442
|
postgresql user name
|
1277
1443
|
|
@@ -1302,30 +1468,62 @@ class CoreServerConfig(Client):
|
|
1302
1468
|
"""
|
1303
1469
|
if server_name is None:
|
1304
1470
|
server_name = self.server_name
|
1471
|
+
|
1305
1472
|
validate_name(pg_pwd)
|
1306
1473
|
validate_name(pg_user)
|
1307
1474
|
validate_name(host)
|
1308
1475
|
pg_db = server_name.lower()
|
1309
1476
|
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1477
|
+
# Connect to the PostgreSQL server
|
1478
|
+
conn = psycopg2.connect(
|
1479
|
+
host=host,
|
1480
|
+
port=port,
|
1481
|
+
user=pg_user,
|
1482
|
+
password=pg_pwd,
|
1483
|
+
dbname="postgres", # Connect to the default 'postgres' database to perform operations
|
1484
|
+
)
|
1485
|
+
conn.set_isolation_level(ISOLATION_LEVEL_AUTOCOMMIT) # Enable autocommit mode
|
1486
|
+
|
1487
|
+
cursor = conn.cursor()
|
1488
|
+
|
1489
|
+
# Check if database exists
|
1490
|
+
cursor.execute(sql.SQL("SELECT 1 FROM pg_database WHERE datname = %s"), [pg_db])
|
1491
|
+
database_exists = cursor.fetchone()
|
1492
|
+
|
1493
|
+
# If the database does not exist, create it
|
1494
|
+
if not database_exists:
|
1495
|
+
cursor.execute(sql.SQL("CREATE DATABASE { }").format(sql.Identifier(pg_db)))
|
1496
|
+
print(f"Database '{pg_db}' created.")
|
1497
|
+
else:
|
1498
|
+
print(f"Database '{pg_db}' already exists.")
|
1313
1499
|
|
1314
|
-
|
1315
|
-
|
1500
|
+
# Close the connection to the server
|
1501
|
+
cursor.close()
|
1502
|
+
conn.close()
|
1316
1503
|
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1504
|
+
jdbc_url = f'"jdbc:postgresql://{host}:{port}/{pg_db}?user={pg_user}&password={pg_pwd}"'
|
1505
|
+
index_dir = f'"data/servers/{server_name}/repository/{server_name}/rdb-index"'
|
1506
|
+
lucene_dir = f'"data/servers/{server_name}/repository/{server_name}/lucene"'
|
1320
1507
|
|
1321
|
-
|
1322
|
-
|
1508
|
+
index_str = "{:xtdb/index-store {:kv-store {:xtdb/module xtdb.rocksdb/->kv-store :db-dir "
|
1509
|
+
index_str2 = index_str + index_dir + "}}"
|
1323
1510
|
|
1324
|
-
|
1511
|
+
lucene_str = ":xtdb.lucene/lucene-store {:db-dir " + lucene_dir
|
1512
|
+
lucene_str2 = (
|
1513
|
+
lucene_str + " :indexer {:xtdb/module xtdb.lucene.egeria/->egeria-indexer} "
|
1514
|
+
)
|
1515
|
+
lucene_str3 = (
|
1516
|
+
lucene_str2 + ":analyzer {:xtdb/module xtdb.lucene.egeria/->ci-analyzer}} "
|
1517
|
+
)
|
1518
|
+
|
1519
|
+
conn_pool_str = ":xtdb.jdbc/connection-pool {:dialect {:xtdb/module xtdb.jdbc.psql/->dialect} "
|
1520
|
+
conn_pool_str2 = f"{conn_pool_str} :db-spec {{:jdbcUrl {jdbc_url} }} }}"
|
1521
|
+
|
1522
|
+
tx_str = ":xtdb/tx-log {:xtdb/module xtdb.jdbc/->tx-log :connection-pool "
|
1325
1523
|
tx_str2 = tx_str + ':xtdb.jdbc/connection-pool :poll-sleep-duration "PT1S"}'
|
1326
1524
|
|
1327
|
-
doc_str =
|
1328
|
-
doc_str2 = doc_str +
|
1525
|
+
doc_str = ":xtdb/document-store {:xtdb/module xtdb.jdbc/->document-store :connection-pool"
|
1526
|
+
doc_str2 = doc_str + " :xtdb.jdbc/connection-pool}}"
|
1329
1527
|
|
1330
1528
|
edn = f"{index_str2} {lucene_str3} {conn_pool_str2} {tx_str2} {doc_str2}"
|
1331
1529
|
body = {
|
@@ -1333,11 +1531,11 @@ class CoreServerConfig(Client):
|
|
1333
1531
|
}
|
1334
1532
|
|
1335
1533
|
print(json.dumps(body, indent=4))
|
1336
|
-
url = f
|
1534
|
+
url = f"{self.core_command_root}/servers/{server_name}/local-repository/mode/xtdb-local-repository"
|
1337
1535
|
self.make_request("POST", url, body)
|
1338
1536
|
|
1339
1537
|
def get_open_metadata_archives(self, server_name: str = None) -> dict:
|
1340
|
-
"""
|
1538
|
+
"""Return the list of open metadata archives configured to load on startup.
|
1341
1539
|
|
1342
1540
|
Parameters
|
1343
1541
|
----------
|
@@ -1361,13 +1559,13 @@ class CoreServerConfig(Client):
|
|
1361
1559
|
"""
|
1362
1560
|
if server_name is None:
|
1363
1561
|
server_name = self.server_name
|
1364
|
-
url = f"{self.
|
1562
|
+
url = f"{self.core_command_root}/servers/{server_name}/open-metadata-archives"
|
1365
1563
|
response = self.make_request("GET", url)
|
1366
1564
|
|
1367
1565
|
return response.json().get("connections", "No archives found")
|
1368
1566
|
|
1369
1567
|
def clear_open_metadata_archives(self, server_name: str = None) -> None:
|
1370
|
-
"""
|
1568
|
+
"""Clear open metadata archives from being loaded at startup
|
1371
1569
|
|
1372
1570
|
Parameters
|
1373
1571
|
----------
|
@@ -1390,11 +1588,13 @@ class CoreServerConfig(Client):
|
|
1390
1588
|
"""
|
1391
1589
|
if server_name is None:
|
1392
1590
|
server_name = self.server_name
|
1393
|
-
url = f"{self.
|
1591
|
+
url = f"{self.core_command_root}/servers/{server_name}/open-metadata-archives"
|
1394
1592
|
self.make_request("DELETE", url)
|
1395
1593
|
|
1396
|
-
def add_startup_open_metadata_archive_file(
|
1397
|
-
|
1594
|
+
def add_startup_open_metadata_archive_file(
|
1595
|
+
self, archive_file: str, server_name: str = None
|
1596
|
+
) -> None:
|
1597
|
+
"""Add a metadata archive file to be loaded on startup
|
1398
1598
|
Parameters
|
1399
1599
|
----------
|
1400
1600
|
|
@@ -1422,16 +1622,23 @@ class CoreServerConfig(Client):
|
|
1422
1622
|
server_name = self.server_name
|
1423
1623
|
validate_name(archive_file)
|
1424
1624
|
|
1425
|
-
url = f"{self.
|
1625
|
+
url = f"{self.core_command_root}/servers/{server_name}/open-metadata-archives/file"
|
1426
1626
|
self.make_request("POST", url, archive_file)
|
1427
1627
|
|
1428
1628
|
#
|
1429
1629
|
# Basic settings and security
|
1430
1630
|
#
|
1431
|
-
def set_basic_server_properties(
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1631
|
+
def set_basic_server_properties(
|
1632
|
+
self,
|
1633
|
+
local_server_description: str,
|
1634
|
+
organization_name: str,
|
1635
|
+
local_server_url: str,
|
1636
|
+
local_server_user_id: str,
|
1637
|
+
local_server_password: str,
|
1638
|
+
max_page_size: int = 0,
|
1639
|
+
server_name: str = None,
|
1640
|
+
):
|
1641
|
+
"""Sets the basic server properties.
|
1435
1642
|
Parameters
|
1436
1643
|
----------
|
1437
1644
|
local_server_description : str
|
@@ -1472,14 +1679,14 @@ class CoreServerConfig(Client):
|
|
1472
1679
|
"localServerURL": local_server_url,
|
1473
1680
|
"localServerUserId": local_server_user_id,
|
1474
1681
|
"localServerPassword": local_server_password,
|
1475
|
-
"maxPageSize": max_page_size
|
1682
|
+
"maxPageSize": max_page_size,
|
1476
1683
|
}
|
1477
|
-
url = self.
|
1478
|
-
|
1684
|
+
url = self.core_command_root + "/servers/" + server_name + "/server-properties"
|
1685
|
+
|
1479
1686
|
self.make_request("POST", url, basic_props)
|
1480
1687
|
|
1481
1688
|
def get_basic_server_properties(self, server_name: str = None) -> dict | str:
|
1482
|
-
"""
|
1689
|
+
"""Retrieve the basic properties associated with this server
|
1483
1690
|
|
1484
1691
|
Parameters
|
1485
1692
|
----------
|
@@ -1504,13 +1711,15 @@ class CoreServerConfig(Client):
|
|
1504
1711
|
"""
|
1505
1712
|
if server_name is None:
|
1506
1713
|
server_name = self.server_name
|
1507
|
-
url = self.
|
1714
|
+
url = self.core_command_root + "/servers/" + server_name + "/server-properties"
|
1508
1715
|
response = self.make_request("GET", url)
|
1509
1716
|
|
1510
|
-
return response.json().get(
|
1717
|
+
return response.json().get(
|
1718
|
+
"basicServerProperties", "No server properties found"
|
1719
|
+
)
|
1511
1720
|
|
1512
1721
|
def get_server_type_classification(self, server_name: str = None) -> dict | str:
|
1513
|
-
"""
|
1722
|
+
"""Clears the server type for the given server
|
1514
1723
|
|
1515
1724
|
Parameters
|
1516
1725
|
----------
|
@@ -1534,13 +1743,15 @@ class CoreServerConfig(Client):
|
|
1534
1743
|
"""
|
1535
1744
|
if server_name is None:
|
1536
1745
|
server_name = self.server_name
|
1537
|
-
url =
|
1746
|
+
url = (
|
1747
|
+
f"{self.core_command_root}/servers/{server_name}/server-type-classification"
|
1748
|
+
)
|
1538
1749
|
response = self.make_request("GET", url)
|
1539
1750
|
|
1540
1751
|
return response.json().get("serverTypeClassification", "No server type found")
|
1541
1752
|
|
1542
1753
|
def get_server_security_connection(self, server_name: str = None) -> dict | str:
|
1543
|
-
"""
|
1754
|
+
"""Retrieve the security connection configuration for a server.
|
1544
1755
|
|
1545
1756
|
Parameters
|
1546
1757
|
----------
|
@@ -1565,12 +1776,14 @@ class CoreServerConfig(Client):
|
|
1565
1776
|
"""
|
1566
1777
|
if server_name is None:
|
1567
1778
|
server_name = self.server_name
|
1568
|
-
url = f"{self.
|
1779
|
+
url = f"{self.core_command_root}/servers/{server_name}/security/connection"
|
1569
1780
|
response = self.make_request("GET", url)
|
1570
1781
|
return response.json()
|
1571
1782
|
|
1572
|
-
def set_server_security_connection(
|
1573
|
-
|
1783
|
+
def set_server_security_connection(
|
1784
|
+
self, security_connection_body: dict, server_name: str = None
|
1785
|
+
) -> None:
|
1786
|
+
"""Set the server security configuration
|
1574
1787
|
|
1575
1788
|
Parameters
|
1576
1789
|
----------
|
@@ -1597,45 +1810,45 @@ class CoreServerConfig(Client):
|
|
1597
1810
|
"""
|
1598
1811
|
if server_name is None:
|
1599
1812
|
server_name = self.server_name
|
1600
|
-
url = f"{self.
|
1813
|
+
url = f"{self.core_command_root}/servers/{server_name}/security/connection"
|
1601
1814
|
self.make_request("POST", url, security_connection_body)
|
1602
1815
|
|
1603
1816
|
def clear_server_security_connection(self, server_name: str = None) -> None:
|
1604
|
-
"""
|
1817
|
+
"""Clears the server security configuration
|
1605
1818
|
|
1606
|
-
|
1607
|
-
|
1819
|
+
Parameters
|
1820
|
+
----------
|
1608
1821
|
|
1609
|
-
|
1610
|
-
|
1611
|
-
|
1822
|
+
server_name : str (optional)
|
1823
|
+
The name of the server for which the security connection should be set.
|
1824
|
+
If not provided, the default server name will be used.
|
1612
1825
|
|
1613
|
-
|
1614
|
-
|
1615
|
-
|
1826
|
+
Returns
|
1827
|
+
-------
|
1828
|
+
None
|
1616
1829
|
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1830
|
+
Raises
|
1831
|
+
------
|
1832
|
+
InvalidParameterException
|
1833
|
+
If the response code is not 200.
|
1834
|
+
PropertyServerException:
|
1835
|
+
Raised by the server when an issue arises in processing a valid request
|
1836
|
+
NotAuthorizedException:
|
1837
|
+
The principle specified by the user_id does not have authorization for the requested action
|
1625
1838
|
|
1626
|
-
|
1839
|
+
"""
|
1627
1840
|
if server_name is None:
|
1628
1841
|
server_name = self.server_name
|
1629
|
-
url = f"{self.
|
1842
|
+
url = f"{self.core_command_root}/servers/{server_name}/security/connection"
|
1630
1843
|
self.make_request("DELETE", url)
|
1631
1844
|
|
1632
1845
|
def get_server_classification(self, server_name: str = None) -> dict:
|
1633
|
-
"""
|
1846
|
+
"""Get server classification
|
1634
1847
|
|
1635
1848
|
Parameters
|
1636
1849
|
----------
|
1637
1850
|
server_name : str, optional
|
1638
|
-
The name of the server. If not provided, the value from `self.
|
1851
|
+
The name of the server. If not provided, the value from `self.view_server` will be used.
|
1639
1852
|
|
1640
1853
|
Returns
|
1641
1854
|
-------
|
@@ -1654,7 +1867,9 @@ class CoreServerConfig(Client):
|
|
1654
1867
|
"""
|
1655
1868
|
if server_name is None:
|
1656
1869
|
server_name = self.server_name
|
1657
|
-
url =
|
1870
|
+
url = (
|
1871
|
+
f"{self.core_command_root}/servers/{server_name}/server-type-classification"
|
1872
|
+
)
|
1658
1873
|
response = self.make_request("GET", url)
|
1659
1874
|
|
1660
1875
|
return response.json().get("serverTypeClassification")
|
@@ -1664,7 +1879,7 @@ class CoreServerConfig(Client):
|
|
1664
1879
|
#
|
1665
1880
|
|
1666
1881
|
def get_configured_view_svcs(self, server_name: str = None) -> dict:
|
1667
|
-
"""
|
1882
|
+
"""Get the list of view services configured for the specified server
|
1668
1883
|
|
1669
1884
|
Parameters
|
1670
1885
|
----------
|
@@ -1688,14 +1903,18 @@ class CoreServerConfig(Client):
|
|
1688
1903
|
"""
|
1689
1904
|
if server_name is None:
|
1690
1905
|
server_name = self.server_name
|
1691
|
-
url = f"{self.
|
1906
|
+
url = f"{self.core_command_root}/servers/{server_name}/view-services"
|
1692
1907
|
response = self.make_request("GET", url)
|
1693
1908
|
|
1694
1909
|
return response.json().get("services", "No view services found")
|
1695
1910
|
|
1696
|
-
def config_all_view_services(
|
1697
|
-
|
1698
|
-
|
1911
|
+
def config_all_view_services(
|
1912
|
+
self,
|
1913
|
+
mdr_server_name: str,
|
1914
|
+
mdr_server_platform_root_url: str,
|
1915
|
+
server_name: str = None,
|
1916
|
+
) -> None:
|
1917
|
+
"""Enable all view services that are registered with this OMAG server platform.
|
1699
1918
|
|
1700
1919
|
Parameters
|
1701
1920
|
----------
|
@@ -1738,14 +1957,16 @@ class CoreServerConfig(Client):
|
|
1738
1957
|
view_service_body = {
|
1739
1958
|
"class": "ViewServiceRequestBody",
|
1740
1959
|
"omagserverName": mdr_server_name,
|
1741
|
-
"omagserverPlatformRootURL": mdr_server_platform_root_url
|
1960
|
+
"omagserverPlatformRootURL": mdr_server_platform_root_url,
|
1742
1961
|
}
|
1743
1962
|
|
1744
|
-
url = f"{self.
|
1963
|
+
url = f"{self.core_command_root}/servers/{server_name}/view-services"
|
1745
1964
|
self.make_request("POST", url, view_service_body)
|
1746
1965
|
|
1747
|
-
def config_all_view_services_w_body(
|
1748
|
-
|
1966
|
+
def config_all_view_services_w_body(
|
1967
|
+
self, view_services_request_body, server_name: str = None
|
1968
|
+
) -> None:
|
1969
|
+
"""Configure all view services for the specified view server with a simple configuration.
|
1749
1970
|
|
1750
1971
|
Parameters
|
1751
1972
|
----------
|
@@ -1777,11 +1998,11 @@ class CoreServerConfig(Client):
|
|
1777
1998
|
if server_name is None:
|
1778
1999
|
server_name = self.server_name
|
1779
2000
|
|
1780
|
-
url = f"{self.
|
2001
|
+
url = f"{self.core_command_root}/servers/{server_name}/view-services"
|
1781
2002
|
self.make_request("POST", url, view_services_request_body)
|
1782
2003
|
|
1783
2004
|
def clear_all_view_services(self, server_name: str = None) -> None:
|
1784
|
-
"""
|
2005
|
+
"""Clears all the view services for the given server
|
1785
2006
|
|
1786
2007
|
Parameters
|
1787
2008
|
----------
|
@@ -1804,11 +2025,13 @@ class CoreServerConfig(Client):
|
|
1804
2025
|
"""
|
1805
2026
|
if server_name is None:
|
1806
2027
|
server_name = self.server_name
|
1807
|
-
url = f"{self.
|
2028
|
+
url = f"{self.core_command_root}/servers/{server_name}/view-services"
|
1808
2029
|
self.make_request("DELETE", url)
|
1809
2030
|
|
1810
|
-
def get_view_svc_config(
|
1811
|
-
|
2031
|
+
def get_view_svc_config(
|
2032
|
+
self, service_url_marker: str, server_name: str = None
|
2033
|
+
) -> dict | str:
|
2034
|
+
"""Retrieves the view service configuration for the given view server.
|
1812
2035
|
Parameters
|
1813
2036
|
----------
|
1814
2037
|
service_url_marker : str
|
@@ -1843,13 +2066,18 @@ class CoreServerConfig(Client):
|
|
1843
2066
|
server_name = self.server_name
|
1844
2067
|
validate_name(service_url_marker)
|
1845
2068
|
|
1846
|
-
url = f"{self.
|
2069
|
+
url = f"{self.core_command_root}/servers/{server_name}/view-services/{service_url_marker}"
|
1847
2070
|
response = self.make_request("GET", url)
|
1848
2071
|
return response.json().get("config", "No view services found")
|
1849
2072
|
|
1850
|
-
def config_view_service(
|
1851
|
-
|
1852
|
-
|
2073
|
+
def config_view_service(
|
2074
|
+
self,
|
2075
|
+
service_url_marker: str,
|
2076
|
+
mdr_server_name: str,
|
2077
|
+
mdr_server_platform_root_url: str,
|
2078
|
+
server_name: str = None,
|
2079
|
+
) -> None:
|
2080
|
+
"""Configure a view service specified by the service_url_marker with basic properties.
|
1853
2081
|
|
1854
2082
|
Parameters
|
1855
2083
|
----------
|
@@ -1895,14 +2123,16 @@ class CoreServerConfig(Client):
|
|
1895
2123
|
view_service_body = {
|
1896
2124
|
"class": "ViewServiceRequestBody",
|
1897
2125
|
"omagserverName": mdr_server_name,
|
1898
|
-
"omagserverPlatformRootURL": mdr_server_platform_root_url
|
2126
|
+
"omagserverPlatformRootURL": mdr_server_platform_root_url,
|
1899
2127
|
}
|
1900
2128
|
|
1901
|
-
url = f"{self.
|
2129
|
+
url = f"{self.core_command_root}/servers/{server_name}/view-services/{service_url_marker}"
|
1902
2130
|
self.make_request("POST", url, view_service_body)
|
1903
2131
|
|
1904
|
-
def clear_view_service(
|
1905
|
-
|
2132
|
+
def clear_view_service(
|
2133
|
+
self, service_url_marker: str, server_name: str = None
|
2134
|
+
) -> None:
|
2135
|
+
"""Remove the view service specified by the service_url_marker.
|
1906
2136
|
|
1907
2137
|
Parameters
|
1908
2138
|
----------
|
@@ -1937,11 +2167,11 @@ class CoreServerConfig(Client):
|
|
1937
2167
|
server_name = self.server_name
|
1938
2168
|
validate_name(service_url_marker)
|
1939
2169
|
|
1940
|
-
url = f"{self.
|
2170
|
+
url = f"{self.core_command_root}/servers/{server_name}/view-services/{service_url_marker}"
|
1941
2171
|
self.make_request("DELETE", url)
|
1942
2172
|
|
1943
2173
|
def get_view_svcs_config(self, server_name: str = None) -> str | list:
|
1944
|
-
"""
|
2174
|
+
"""Retrieves the view services configuration for the specified view server.
|
1945
2175
|
Parameters
|
1946
2176
|
----------
|
1947
2177
|
server_name : str, optional
|
@@ -1972,7 +2202,7 @@ class CoreServerConfig(Client):
|
|
1972
2202
|
if server_name is None:
|
1973
2203
|
server_name = self.server_name
|
1974
2204
|
|
1975
|
-
url = f"{self.
|
2205
|
+
url = f"{self.core_command_root}/servers/{server_name}/view-services/configuration"
|
1976
2206
|
response = self.make_request("GET", url)
|
1977
2207
|
|
1978
2208
|
return response.json().get("services", "No services found")
|
@@ -1980,8 +2210,15 @@ class CoreServerConfig(Client):
|
|
1980
2210
|
#
|
1981
2211
|
# Cohort Configuration, etc.
|
1982
2212
|
#
|
1983
|
-
def add_cohort_registration(
|
1984
|
-
|
2213
|
+
def add_cohort_registration(
|
2214
|
+
self, cohort_name: str, server_name: str = None
|
2215
|
+
) -> None:
|
2216
|
+
"""Enable registration of server to an open metadata repository cohort using the default topic structure
|
2217
|
+
(DEDICATED_TOPICS). A cohort is a group of open metadata repositories that are sharing metadata.
|
2218
|
+
An OMAG server can connect to zero, one or more cohorts. Each cohort needs a unique name.
|
2219
|
+
The members of the cohort use a shared topic to exchange registration information and events
|
2220
|
+
related to the changes in their supported metadata types and instances. They are also able to query
|
2221
|
+
each other's metadata directly through REST calls.
|
1985
2222
|
|
1986
2223
|
Parameters
|
1987
2224
|
----------
|
@@ -2005,11 +2242,11 @@ class CoreServerConfig(Client):
|
|
2005
2242
|
server_name = self.server_name
|
2006
2243
|
validate_name(cohort_name)
|
2007
2244
|
|
2008
|
-
url = f"{self.
|
2245
|
+
url = f"{self.core_command_root}/servers/{server_name}/cohorts/{cohort_name}"
|
2009
2246
|
self.make_request("POST", url)
|
2010
2247
|
|
2011
2248
|
def get_cohort_config(self, cohort_name: str, server_name: str = None) -> dict:
|
2012
|
-
"""
|
2249
|
+
"""Get the cohort configuration for the given cohort.
|
2013
2250
|
|
2014
2251
|
Parameters
|
2015
2252
|
----------
|
@@ -2037,13 +2274,21 @@ class CoreServerConfig(Client):
|
|
2037
2274
|
|
2038
2275
|
validate_name(cohort_name)
|
2039
2276
|
|
2040
|
-
url =
|
2277
|
+
url = (
|
2278
|
+
self.core_command_root
|
2279
|
+
+ "/servers/"
|
2280
|
+
+ server_name
|
2281
|
+
+ "/cohorts/"
|
2282
|
+
+ cohort_name
|
2283
|
+
)
|
2041
2284
|
response = self.make_request("GET", url)
|
2042
2285
|
|
2043
2286
|
return response.json().get("config", "No cohort configuration found")
|
2044
2287
|
|
2045
|
-
def deploy_server_config(
|
2046
|
-
|
2288
|
+
def deploy_server_config(
|
2289
|
+
self, target_platform_body: dict, server_name: str = None
|
2290
|
+
) -> None:
|
2291
|
+
"""Add a metadata archive file to be loaded on startup
|
2047
2292
|
Parameters
|
2048
2293
|
----------
|
2049
2294
|
|
@@ -2070,14 +2315,14 @@ class CoreServerConfig(Client):
|
|
2070
2315
|
if server_name is None:
|
2071
2316
|
server_name = self.server_name
|
2072
2317
|
|
2073
|
-
url = f"{self.
|
2318
|
+
url = f"{self.core_command_root}/servers/{server_name}/configuration/deploy"
|
2074
2319
|
self.make_request("POST", url, target_platform_body)
|
2075
2320
|
|
2076
2321
|
#
|
2077
2322
|
# Integration Groups
|
2078
2323
|
#
|
2079
2324
|
def clear_all_integration_groups(self, server_name: str = None) -> None:
|
2080
|
-
"""
|
2325
|
+
"""Remove all the integration groups associated with the server.
|
2081
2326
|
|
2082
2327
|
Parameters
|
2083
2328
|
----------
|
@@ -2106,11 +2351,13 @@ class CoreServerConfig(Client):
|
|
2106
2351
|
if server_name is None:
|
2107
2352
|
server_name = self.server_name
|
2108
2353
|
|
2109
|
-
url = f"{self.
|
2354
|
+
url = f"{self.core_command_root}/servers/{server_name}/integration-groups"
|
2110
2355
|
self.make_request("DELETE", url)
|
2111
2356
|
|
2112
|
-
def clear_an_integration_group(
|
2113
|
-
|
2357
|
+
def clear_an_integration_group(
|
2358
|
+
self, group_qualified_name: str, server_name: str = None
|
2359
|
+
) -> None:
|
2360
|
+
"""Remove the integration group specified by the group_qualified_name parameter.
|
2114
2361
|
|
2115
2362
|
Parameters
|
2116
2363
|
----------
|
@@ -2141,11 +2388,11 @@ class CoreServerConfig(Client):
|
|
2141
2388
|
server_name = self.server_name
|
2142
2389
|
validate_name(group_qualified_name)
|
2143
2390
|
|
2144
|
-
url = f"{self.
|
2391
|
+
url = f"{self.core_command_root}/servers/{server_name}/view-services/{group_qualified_name}"
|
2145
2392
|
self.make_request("DELETE", url)
|
2146
2393
|
|
2147
2394
|
def get_integration_groups_config(self, server_name: str = None) -> list | str:
|
2148
|
-
"""
|
2395
|
+
"""Get the Integration Groups configuration server specified by the view_server parameter.
|
2149
2396
|
|
2150
2397
|
Parameters
|
2151
2398
|
----------
|
@@ -2170,14 +2417,24 @@ class CoreServerConfig(Client):
|
|
2170
2417
|
if server_name is None:
|
2171
2418
|
server_name = self.server_name
|
2172
2419
|
|
2173
|
-
url =
|
2420
|
+
url = (
|
2421
|
+
self.core_command_root
|
2422
|
+
+ "/servers/"
|
2423
|
+
+ server_name
|
2424
|
+
+ "/integration-groups/configuration"
|
2425
|
+
)
|
2174
2426
|
response = self.make_request("GET", url)
|
2175
2427
|
|
2176
2428
|
return response.json().get("groups", "No Integration Group configuration found")
|
2177
2429
|
|
2178
|
-
def config_integration_group(
|
2179
|
-
|
2180
|
-
|
2430
|
+
def config_integration_group(
|
2431
|
+
self,
|
2432
|
+
omag_server_name: str,
|
2433
|
+
omag_server_platform_root_url: str,
|
2434
|
+
qualified_name: str,
|
2435
|
+
server_name: str = None,
|
2436
|
+
) -> None:
|
2437
|
+
"""Add configuration for a single integration group to the server's config document.
|
2181
2438
|
|
2182
2439
|
Parameters
|
2183
2440
|
----------
|
@@ -2223,10 +2480,10 @@ class CoreServerConfig(Client):
|
|
2223
2480
|
"class": "IntegrationGroupConfig",
|
2224
2481
|
"omagserverName": omag_server_name,
|
2225
2482
|
"omagserverPlatformRootURL": omag_server_platform_root_url,
|
2226
|
-
"integrationGroupQualifiedName": qualified_name
|
2483
|
+
"integrationGroupQualifiedName": qualified_name,
|
2227
2484
|
}
|
2228
2485
|
|
2229
|
-
url = f"{self.
|
2486
|
+
url = f"{self.core_command_root}/servers/{server_name}/integration-groups/configuration"
|
2230
2487
|
self.make_request("POST", url, integration_group_service_body)
|
2231
2488
|
|
2232
2489
|
#
|
@@ -2234,7 +2491,7 @@ class CoreServerConfig(Client):
|
|
2234
2491
|
#
|
2235
2492
|
|
2236
2493
|
def clear_engine_definitions_client_config(self, server_name: str = None) -> None:
|
2237
|
-
"""
|
2494
|
+
"""Remove the configuration for the Governance Engine OMAS Engine client configuration in a single call.
|
2238
2495
|
This overrides the current values.
|
2239
2496
|
|
2240
2497
|
Parameters
|
@@ -2263,12 +2520,16 @@ class CoreServerConfig(Client):
|
|
2263
2520
|
if server_name is None:
|
2264
2521
|
server_name = self.server_name
|
2265
2522
|
|
2266
|
-
url = f"{self.
|
2523
|
+
url = f"{self.core_command_root}/servers/{server_name}/engine-definitions/client-config"
|
2267
2524
|
self.make_request("DELETE", url)
|
2268
2525
|
|
2269
|
-
def set_engine_definitions_client_config(
|
2270
|
-
|
2271
|
-
|
2526
|
+
def set_engine_definitions_client_config(
|
2527
|
+
self,
|
2528
|
+
mdr_server_name: str,
|
2529
|
+
mdr_server_platform_root_url: str,
|
2530
|
+
server_name: str = None,
|
2531
|
+
) -> None:
|
2532
|
+
"""Set up the name and platform URL root for the metadata server running the Governance Engine OMAS that
|
2272
2533
|
provides the governance engine definitions used by the engine services.
|
2273
2534
|
|
2274
2535
|
Parameters
|
@@ -2313,11 +2574,11 @@ class CoreServerConfig(Client):
|
|
2313
2574
|
"omagserverPlatformRootURL": mdr_server_platform_root_url,
|
2314
2575
|
}
|
2315
2576
|
|
2316
|
-
url = f"{self.
|
2577
|
+
url = f"{self.core_command_root}/servers/{server_name}/engine-definitions/client-config"
|
2317
2578
|
self.make_request("POST", url, body)
|
2318
2579
|
|
2319
2580
|
def clear_engine_list(self, server_name: str = None) -> None:
|
2320
|
-
"""
|
2581
|
+
"""Remove the configuration for the Governance Engine OMAS Engine client configuration in a single call.
|
2321
2582
|
This overrides the current values.
|
2322
2583
|
|
2323
2584
|
Parameters
|
@@ -2346,43 +2607,11 @@ class CoreServerConfig(Client):
|
|
2346
2607
|
if server_name is None:
|
2347
2608
|
server_name = self.server_name
|
2348
2609
|
|
2349
|
-
url = f"{self.
|
2610
|
+
url = f"{self.core_command_root}/servers/{server_name}/engine-list"
|
2350
2611
|
self.make_request("DELETE", url)
|
2351
2612
|
|
2352
|
-
# def get_engine_list(self, server_name: str = None) -> list | str:
|
2353
|
-
# """ Get the list of engines from the specified by the server_name parameter.
|
2354
|
-
#
|
2355
|
-
# Parameters
|
2356
|
-
# ----------
|
2357
|
-
#
|
2358
|
-
# server_name : str, optional
|
2359
|
-
# The name of the server. If None, the default server name will be used.
|
2360
|
-
#
|
2361
|
-
# Returns
|
2362
|
-
# -------
|
2363
|
-
# List containing the JSON structure of the Integration Groups configuration.
|
2364
|
-
#
|
2365
|
-
# Raises
|
2366
|
-
# ------
|
2367
|
-
# InvalidParameterException
|
2368
|
-
# If the response code is not 200.
|
2369
|
-
# PropertyServerException:
|
2370
|
-
# Raised by the server when an issue arises in processing a valid request
|
2371
|
-
# NotAuthorizedException:
|
2372
|
-
# The principle specified by the user_id does not have authorization for the requested action
|
2373
|
-
#
|
2374
|
-
# """
|
2375
|
-
# if server_name is None:
|
2376
|
-
# server_name = self.server_name
|
2377
|
-
#
|
2378
|
-
# url = self.admin_command_root + "/servers/" + server_name + "/engine-list"
|
2379
|
-
# response = self.make_request("GET", url)
|
2380
|
-
#
|
2381
|
-
# # return response.json().get("config", "No engine definitions client configuration found")
|
2382
|
-
# return response.json()
|
2383
|
-
|
2384
2613
|
def set_engine_list(self, engine_list: [dict], server_name: str = None) -> None:
|
2385
|
-
"""
|
2614
|
+
"""Set up the list of governance engine that will use the metadata from the same metadata access server
|
2386
2615
|
as the engine host uses for retrieving the engine configuration.
|
2387
2616
|
|
2388
2617
|
Parameters
|
@@ -2428,11 +2657,11 @@ class CoreServerConfig(Client):
|
|
2428
2657
|
if server_name is None:
|
2429
2658
|
server_name = self.server_name
|
2430
2659
|
|
2431
|
-
url = f"{self.
|
2660
|
+
url = f"{self.core_command_root}/servers/{server_name}/engine-list"
|
2432
2661
|
self.make_request("POST", url, engine_list)
|
2433
2662
|
|
2434
2663
|
def get_engine_host_services_config(self, server_name: str = None) -> dict | str:
|
2435
|
-
"""
|
2664
|
+
"""Return the configuration for the complete engine host services in this server.
|
2436
2665
|
|
2437
2666
|
Parameters
|
2438
2667
|
----------
|
@@ -2457,14 +2686,19 @@ class CoreServerConfig(Client):
|
|
2457
2686
|
if server_name is None:
|
2458
2687
|
server_name = self.server_name
|
2459
2688
|
|
2460
|
-
url =
|
2689
|
+
url = (
|
2690
|
+
self.core_command_root
|
2691
|
+
+ "/servers/"
|
2692
|
+
+ server_name
|
2693
|
+
+ "/engine-host-services/configuration"
|
2694
|
+
)
|
2461
2695
|
response = self.make_request("GET", url)
|
2462
2696
|
|
2463
2697
|
# return response.json().get("config", "No engine definitions client configuration found")
|
2464
2698
|
return response.json().get("services", "No engine host services")
|
2465
2699
|
|
2466
2700
|
def get_placeholder_variables(self) -> dict:
|
2467
|
-
"""
|
2701
|
+
"""get placeholder variables
|
2468
2702
|
|
2469
2703
|
Get the placeholder variables from the platform.
|
2470
2704
|
|
@@ -2483,13 +2717,13 @@ class CoreServerConfig(Client):
|
|
2483
2717
|
|
2484
2718
|
|
2485
2719
|
"""
|
2486
|
-
url = self.
|
2720
|
+
url = self.core_command_root + "/stores/placeholder-variables"
|
2487
2721
|
response = self.make_request("GET", url)
|
2488
2722
|
|
2489
2723
|
return response.json().get("stringMap")
|
2490
2724
|
|
2491
2725
|
def set_placeholder_variables(self, placeholder_variables: dict) -> None:
|
2492
|
-
"""
|
2726
|
+
"""Set placeholder variables - replaces previous placeholders with the new list
|
2493
2727
|
|
2494
2728
|
Parameters
|
2495
2729
|
----------
|
@@ -2510,7 +2744,7 @@ class CoreServerConfig(Client):
|
|
2510
2744
|
The principle specified by the user_id does not have authorization for the requested action
|
2511
2745
|
|
2512
2746
|
"""
|
2513
|
-
url = f"{self.
|
2747
|
+
url = f"{self.core_command_root}/stores/placeholder-variables"
|
2514
2748
|
self.make_request("POST", url, placeholder_variables)
|
2515
2749
|
|
2516
2750
|
def clear_placeholder_variables(self) -> None:
|
@@ -2533,6 +2767,9 @@ class CoreServerConfig(Client):
|
|
2533
2767
|
The principle specified by the user_id does not have authorization for the requested action
|
2534
2768
|
|
2535
2769
|
"""
|
2536
|
-
url = f"{self.
|
2770
|
+
url = f"{self.core_command_root}/stores/placeholder-variables"
|
2537
2771
|
self.make_request("DELETE", url)
|
2538
2772
|
|
2773
|
+
|
2774
|
+
if __name__ == "__main__":
|
2775
|
+
print("Main-Core OMAG server config")
|