pyegeria 0.2.4__py3-none-any.whl → 5.3.0.dev3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyegeria/README.md +35 -0
- pyegeria/__init__.py +345 -14
- pyegeria/_client.py +376 -126
- pyegeria/_deprecated_gov_engine.py +451 -0
- pyegeria/_exceptions.py +6 -6
- pyegeria/_globals.py +7 -1
- pyegeria/_validators.py +9 -6
- pyegeria/asset_catalog_omvs.py +807 -0
- pyegeria/automated_curation_omvs.py +3760 -0
- pyegeria/classification_manager_omvs.py +5238 -0
- pyegeria/collection_manager_omvs.py +2727 -0
- pyegeria/commands/README.md +47 -0
- pyegeria/commands/__init__.py +22 -0
- pyegeria/commands/cat/README.md +16 -0
- pyegeria/commands/cat/__init__.py +1 -0
- pyegeria/commands/cat/exp_list_glossaries.py +156 -0
- pyegeria/commands/cat/get_asset_graph.py +319 -0
- pyegeria/commands/cat/get_collection.py +148 -0
- pyegeria/commands/cat/get_project_dependencies.py +168 -0
- pyegeria/commands/cat/get_project_structure.py +168 -0
- pyegeria/commands/cat/get_tech_type_elements.py +174 -0
- pyegeria/commands/cat/glossary_actions.py +362 -0
- pyegeria/commands/cat/list_assets.py +176 -0
- pyegeria/commands/cat/list_cert_types.py +194 -0
- pyegeria/commands/cat/list_collections.py +162 -0
- pyegeria/commands/cat/list_deployed_catalogs.py +217 -0
- pyegeria/commands/cat/list_deployed_database_schemas.py +251 -0
- pyegeria/commands/cat/list_deployed_databases.py +202 -0
- pyegeria/commands/cat/list_glossaries.py +150 -0
- pyegeria/commands/cat/list_projects.py +221 -0
- pyegeria/commands/cat/list_servers_deployed_imp.py +158 -0
- pyegeria/commands/cat/list_tech_type_elements.py +190 -0
- pyegeria/commands/cat/list_tech_types.py +140 -0
- pyegeria/commands/cat/list_terms.py +242 -0
- pyegeria/commands/cat/list_todos.py +189 -0
- pyegeria/commands/cat/list_user_ids.py +145 -0
- pyegeria/commands/cli/__init__.py +13 -0
- pyegeria/commands/cli/egeria.py +1844 -0
- pyegeria/commands/cli/egeria_cat.py +638 -0
- pyegeria/commands/cli/egeria_login_tui.py +313 -0
- pyegeria/commands/cli/egeria_my.py +248 -0
- pyegeria/commands/cli/egeria_ops.py +502 -0
- pyegeria/commands/cli/egeria_tech.py +618 -0
- pyegeria/commands/cli/ops_config.py +45 -0
- pyegeria/commands/cli/txt_custom_v2.tcss +19 -0
- pyegeria/commands/doc/README.md +145 -0
- pyegeria/commands/doc/Visual Command Reference/README.md +511 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/asset-graph 2024-11-20 at 15.56.42.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/assets-in-domain 2024-11-20 at 15.49.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/elements-of-type 2024-11-20 at 16.01.35.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/tech-type-elements 2024-11-20 at 16.05.05.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs 2024-12-17 at 15.43.27@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs-2024-11-20 at 16.17.43@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-11-25 at 20.14.50@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-12-17 at 15.48.38@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-11-25 at 20.21.25@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-12-17 at 15.52.16@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed_databases 2024-12-16 at 16.40.31@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-glossaries 2024-11-25 at 20.30.02.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-terms 2024-11-25 at 20.32.11.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/asset-types 2024-11-25 at 20.34.19@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/certification-types 2024-11-25 at 20.37.07.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/collection-graph 2024-12-12 at 11.33.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-collections 2024-12-10 at 14.25.51@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-todos 2024-12-12 at 11.46.30@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-user-ids 2024-12-12 at 11.51.09@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/tech-types 2024-12-12 at 11.37.20@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_dependencies 2024-12-14 at 16.24.39@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_structure 2024-12-14 at 16.21.35@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/projects 2024-12-14 at 16.18.10@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/hey_egeria tui 2024-12-16 at 16.58.22@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_profile 2024-12-14 at 16.29.27@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_roles 2024-12-14 at 16.32.10@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_todos 2024-12-15 at 16.24.13@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/open_todos 2024-12-14 at 16.36.12@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/list_engine_activity compressed 2024-12-15 at 16.48.48@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity 2024-12-15 at 16.32.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity compressed 2024-12-15 at 16.38.29@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_status 2024-12-15 at 16.51.26.jpeg +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_daemon_status 2024-12-15 at 16.57.12@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_targets 2024-12-15 at 17.02.19@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/platforms/monitor_platform_status 2024-12-15 at 19.53.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status 2024-12-15 at 19.59.39@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status full 2024-12-15 at 20.01.57@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_startup_servers 2024-12-15 at 19.56.07@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_anchored_elements 2024-12-15 at 21.25.41@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_elements_of_om_type 2024-12-16 at 14.39.59@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/info_for_guid 2024-12-16 at 11.35.29@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type 2024-12-16 at 14.24.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type extended 2024-12-16 at 14.28.46@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_of_om_type_by_classification 2024-12-16 at 14.35.26@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/related_elements 2024-12-16 at 14.55.01@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/show_related_specifications 2024-12-16 at 15.04.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/asset_types 2024-12-16 at 15.10.16@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/detailed_governance_action_processes 2024-12-16 at 15.16.26@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/governance_action_processes 2024-12-16 at 15.13.01@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/registered_services 2024-12-16 at 16.44.54@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-16 at 16.20.34@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-19 at 10.51.54@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/valid_metadata_values 2024-12-16 at 15.31.56@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_tech_type_template_specs 2024-12-16 at 16.03.22@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_technology_types 2024-12-16 at 15.39.20@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_details 2024-12-16 at 15.37.21@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_templates 2024-12-16 at 16.11.48@2x.png +0 -0
- pyegeria/commands/doc/glossary/basic-glossary-tui.md +109 -0
- pyegeria/commands/doc/glossary/images/delete-glossary-step1 2024-11-06 at 15.47.23@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/delete-glossary-step2 2024-11-06 at 15.51.29@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/delete-glossary-step3 2024-11-06 at 15.53.19@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/delete-glossary-step4 2024-11-06 at 15.55.11@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-create-glossary example 2024-11-05 at 20.38.04@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-create-term 2024-11-06 at 20.48.29.png +0 -0
- pyegeria/commands/doc/glossary/images/out-delete-term 2024-11-07 at 03.57.25.png +0 -0
- pyegeria/commands/doc/glossary/images/out-display-terms-for-glossary-test 2024-11-06 at 20.51.28.png +0 -0
- pyegeria/commands/doc/glossary/images/out-export-example 2024-11-07 at 09.54.57.png +0 -0
- pyegeria/commands/doc/glossary/images/out-exported-terms 2024-11-06 at 21.06.32.png +0 -0
- pyegeria/commands/doc/glossary/images/out-glossary-list example 2024-11-05 at 20.41.02@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-import-terms 2024-11-07 at 08.15.18.png +0 -0
- pyegeria/commands/doc/glossary/images/out-list-all-terms 2024-11-06 at 16.22.20@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-list-terms-for-example 2024-11-06 at 16.40.12.png +0 -0
- pyegeria/commands/doc/glossary/images/out-list-terms-second 2024-11-06 at 16.45.13.png +0 -0
- pyegeria/commands/doc/glossary/images/out-pipx install pyegeria 2024-11-10 at 18.12.21.png +0 -0
- pyegeria/commands/doc/glossary/images/out-server-status-full 2024-11-10 at 18.25.14.png +0 -0
- pyegeria/commands/doc/glossary/images/out-servers-status 2024-11-10 at 18.15.42.png +0 -0
- pyegeria/commands/doc/glossary/images/out-upsert-import 2024-11-07 at 19.37.00.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-2024-11-10 at 18.26.29.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-create-glossary example 2024-11-05 at 20.34.24@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-create-term 2024-11-06 at 20.46.35.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-delete-term 2024-11-07 at 03.51.57.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-display-terms-for-example 2024-11-06 at 20.56.49.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-export-example 2024-11-07 at 09.52.59.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-hey-egeria 2024-11-10 at 18.31.01.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-import-upsert-example 2024-11-07 at 10.08.37.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-list-terms-second 2024-11-06 at 16.46.34.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-load-archive.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-server-status-full 2024-11-10 at 19.14.36.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-show-glossaries 2024-11-07 at 20.00.05.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-show-glossary-terms 2024-11-05 at 19.37.53@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-upsert 2024-11-07 at 11.49.04.png +0 -0
- pyegeria/commands/doc/glossary/images/upsert-example.om-terms 2024-11-07 at 11.44.05.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/README.md +346 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/CleanShot 2024-11-18 at 21.32.03@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/Xmind 1731421782704.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/Xmind 1731422134920.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/hey_egeria 2024-11-12 at 20.38.43.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/hey_egeria cat 2024-11-12 at 21.41.43.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-integ-status-list 2024-11-12 at 16.45.26.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-integ-status-live 2024-11-12 at 16.44.12@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-server-status 2024-11-10 at 18.15.42@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-server-status-full 2024-11-10 at 18.25.14@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/short-cut commands 2024-11-12 at 22.22.13.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-hey-egeria.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-integration-status-paging.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-load-archive 2024-11-10 at 19.19.09@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-show-server-status 2024-11-10 at 18.52.01@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-show-server-status-full 2024-11-10.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-status-paging 2024-11-12 at 16.26.14@2x.png +0 -0
- pyegeria/commands/my/README.md +17 -0
- pyegeria/commands/my/__init__.py +0 -0
- pyegeria/commands/my/list_my_profile.py +163 -0
- pyegeria/commands/my/list_my_roles.py +151 -0
- pyegeria/commands/my/monitor_my_todos.py +205 -0
- pyegeria/commands/my/monitor_open_todos.py +175 -0
- pyegeria/commands/my/todo_actions.py +242 -0
- pyegeria/commands/ops/README.md +24 -0
- pyegeria/commands/ops/__init__.py +22 -0
- pyegeria/commands/ops/gov_server_actions.py +177 -0
- pyegeria/commands/ops/list_archives.py +161 -0
- pyegeria/commands/ops/list_catalog_targets.py +203 -0
- pyegeria/commands/ops/load_archive.py +75 -0
- pyegeria/commands/ops/monitor_asset_events.py +107 -0
- pyegeria/commands/ops/monitor_engine_activity.py +270 -0
- pyegeria/commands/ops/monitor_engine_activity_c.py +286 -0
- pyegeria/commands/ops/monitor_gov_eng_status.py +288 -0
- pyegeria/commands/ops/monitor_integ_daemon_status.py +321 -0
- pyegeria/commands/ops/monitor_platform_status.py +188 -0
- pyegeria/commands/ops/monitor_server_startup.py +117 -0
- pyegeria/commands/ops/monitor_server_status.py +182 -0
- pyegeria/commands/ops/orig_monitor_server_list.py +140 -0
- pyegeria/commands/ops/orig_monitor_server_status.py +124 -0
- pyegeria/commands/ops/refresh_integration_daemon.py +83 -0
- pyegeria/commands/ops/restart_integration_daemon.py +82 -0
- pyegeria/commands/ops/table_integ_daemon_status.py +237 -0
- pyegeria/commands/ops/x_engine_actions.py +76 -0
- pyegeria/commands/tech/README.md +24 -0
- pyegeria/commands/tech/__init__.py +0 -0
- pyegeria/commands/tech/get_element_info.py +144 -0
- pyegeria/commands/tech/get_guid_info.py +134 -0
- pyegeria/commands/tech/get_tech_details.py +173 -0
- pyegeria/commands/tech/get_tech_type_template.py +166 -0
- pyegeria/commands/tech/list_anchored_elements.py +205 -0
- pyegeria/commands/tech/list_asset_types.py +123 -0
- pyegeria/commands/tech/list_elements.py +168 -0
- pyegeria/commands/tech/list_elements_for_classification.py +171 -0
- pyegeria/commands/tech/list_elements_x.py +191 -0
- pyegeria/commands/tech/list_gov_action_processes.py +139 -0
- pyegeria/commands/tech/list_registered_services.py +180 -0
- pyegeria/commands/tech/list_related_elements.py +207 -0
- pyegeria/commands/tech/list_related_specification.py +169 -0
- pyegeria/commands/tech/list_relationship_types.py +164 -0
- pyegeria/commands/tech/list_relationships.py +179 -0
- pyegeria/commands/tech/list_tech_templates.py +360 -0
- pyegeria/commands/tech/list_valid_metadata_values.py +178 -0
- pyegeria/commands/tech/table_tech_templates.py +238 -0
- pyegeria/commands/tech/x_list_related_elements.py +165 -0
- pyegeria/core_omag_server_config.py +550 -313
- pyegeria/create_tech_guid_lists.py +105 -0
- pyegeria/egeria_cat_client.py +78 -0
- pyegeria/egeria_client.py +117 -0
- pyegeria/egeria_config_client.py +45 -0
- pyegeria/egeria_my_client.py +56 -0
- pyegeria/egeria_tech_client.py +93 -0
- pyegeria/feedback_manager_omvs.py +4573 -0
- pyegeria/full_omag_server_config.py +1337 -0
- pyegeria/glossary_browser_omvs.py +2507 -0
- pyegeria/glossary_manager_omvs.py +3597 -0
- pyegeria/mermaid_utilities.py +218 -0
- pyegeria/metadata_explorer_omvs.py +2371 -0
- pyegeria/my_profile_omvs.py +1021 -0
- pyegeria/platform_services.py +259 -218
- pyegeria/project_manager_omvs.py +1854 -0
- pyegeria/registered_info.py +111 -108
- pyegeria/runtime_manager_omvs.py +2299 -0
- pyegeria/server_operations.py +178 -71
- pyegeria/template_manager_omvs.py +1414 -0
- pyegeria/utils.py +75 -85
- pyegeria/valid_metadata_omvs.py +1911 -0
- pyegeria/x_action_author_omvs.py +200 -0
- pyegeria-5.3.0.dev3.dist-info/METADATA +70 -0
- pyegeria-5.3.0.dev3.dist-info/RECORD +232 -0
- {pyegeria-0.2.4.dist-info → pyegeria-5.3.0.dev3.dist-info}/WHEEL +1 -1
- pyegeria-5.3.0.dev3.dist-info/entry_points.txt +81 -0
- pyegeria/config.toml +0 -11
- pyegeria/curation_omvs.py +0 -458
- pyegeria/exceptions.py +0 -382
- pyegeria/glossary_omvs.py +0 -639
- pyegeria/gov_engine.py +0 -573
- pyegeria-0.2.4.dist-info/METADATA +0 -57
- pyegeria-0.2.4.dist-info/RECORD +0 -19
- {pyegeria-0.2.4.dist-info/licenses → pyegeria-5.3.0.dev3.dist-info}/LICENSE +0 -0
@@ -0,0 +1,182 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
4
|
+
Copyright Contributors to the ODPi Egeria project.
|
5
|
+
|
6
|
+
Display the server status of all registered servers across all platforms.
|
7
|
+
|
8
|
+
Note: This implementation is using the platform-report. A more complex platform environment may require
|
9
|
+
reimplementing from a server only perspective using get_servers_by_dep_impl_type() to find the guids and
|
10
|
+
then get_server_by_guid() to get the status. Less efficient but may be more robust for some environments.
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
A simple server status display
|
15
|
+
"""
|
16
|
+
import argparse
|
17
|
+
import os
|
18
|
+
import sys
|
19
|
+
import time
|
20
|
+
|
21
|
+
from rich.live import Live
|
22
|
+
from rich.table import Table
|
23
|
+
|
24
|
+
from pyegeria import (
|
25
|
+
InvalidParameterException,
|
26
|
+
PropertyServerException,
|
27
|
+
UserNotAuthorizedException,
|
28
|
+
print_exception_response,
|
29
|
+
RuntimeManager,
|
30
|
+
)
|
31
|
+
|
32
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
33
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
34
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
35
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
36
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
37
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
38
|
+
)
|
39
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
40
|
+
EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
|
41
|
+
"EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
|
42
|
+
)
|
43
|
+
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
44
|
+
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
45
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
46
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
47
|
+
EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
48
|
+
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
49
|
+
|
50
|
+
|
51
|
+
def display_status(
|
52
|
+
extended: bool,
|
53
|
+
view_server: str,
|
54
|
+
url: str,
|
55
|
+
username: str,
|
56
|
+
user_pass: str,
|
57
|
+
jupyter: bool = EGERIA_JUPYTER,
|
58
|
+
width: int = EGERIA_WIDTH,
|
59
|
+
):
|
60
|
+
p_client = RuntimeManager(view_server, url, username, user_pass)
|
61
|
+
token = p_client.create_egeria_bearer_token()
|
62
|
+
|
63
|
+
def generate_table() -> Table:
|
64
|
+
"""Make a new table."""
|
65
|
+
table = Table(
|
66
|
+
title=f"Server Status for Platform - {time.asctime()}",
|
67
|
+
style="bold white on black",
|
68
|
+
row_styles=["bold white on black"],
|
69
|
+
header_style="white on dark_blue",
|
70
|
+
title_style="bold white on black",
|
71
|
+
caption_style="white on black",
|
72
|
+
caption=f"Server Status from Platform - '{url}'",
|
73
|
+
show_lines=True,
|
74
|
+
)
|
75
|
+
|
76
|
+
table.add_column("Known Server")
|
77
|
+
table.add_column("Status")
|
78
|
+
if extended:
|
79
|
+
table.add_column("GUID", no_wrap=True)
|
80
|
+
table.add_column("Qualified Name")
|
81
|
+
table.add_column("Description")
|
82
|
+
table.add_column("Server Type")
|
83
|
+
table.add_column("Last Started")
|
84
|
+
|
85
|
+
platform_list = p_client.get_platforms_by_type()
|
86
|
+
if type(platform_list) is str:
|
87
|
+
print("No OMAG Server Platforms found?")
|
88
|
+
sys.exit(1)
|
89
|
+
|
90
|
+
for platform in platform_list:
|
91
|
+
platform_name = platform["properties"].get("displayName", "---")
|
92
|
+
platform_guid = platform["elementHeader"]["guid"]
|
93
|
+
platform_desc = platform["properties"].get("resourceDescription", "---")
|
94
|
+
p_server_list = ""
|
95
|
+
|
96
|
+
platform_report = p_client.get_platform_report(platform_guid)
|
97
|
+
servers = platform_report.get("omagservers", None)
|
98
|
+
for p_server in servers:
|
99
|
+
server_name = p_server.get("serverName", "--- ")
|
100
|
+
server_type = p_server.get("serverType", "--- ")
|
101
|
+
server_desc = p_server.get("description", "--- ")
|
102
|
+
last_start_time = p_server.get("lastStartTime", "--- ")
|
103
|
+
|
104
|
+
server_status = p_server.get("serverActiveStatus", "UNKNOWN")
|
105
|
+
if server_status in ("RUNNING", "STARTING"):
|
106
|
+
status = "Active"
|
107
|
+
elif server_status in ("INACTIVE", "STOPPING", "UNKNOWN"):
|
108
|
+
status = "Inactive"
|
109
|
+
else:
|
110
|
+
status = "UNKNOWN"
|
111
|
+
|
112
|
+
if extended:
|
113
|
+
#
|
114
|
+
# get the qualified name and guid from get_server_by_name?
|
115
|
+
#
|
116
|
+
server_info = p_client.get_servers_by_name(server_name)
|
117
|
+
if type(server_info) is str:
|
118
|
+
guid = "---"
|
119
|
+
qualified_name = "---"
|
120
|
+
else:
|
121
|
+
guid = ""
|
122
|
+
qualified_name = ""
|
123
|
+
for i in server_info:
|
124
|
+
guid += f"{i['elementHeader']['guid']} "
|
125
|
+
qualified_name += f"{i['properties']['qualifiedName']} "
|
126
|
+
|
127
|
+
table.add_row(
|
128
|
+
server_name,
|
129
|
+
"[red]Inactive" if status == "Inactive" else "[green]Active",
|
130
|
+
guid,
|
131
|
+
qualified_name,
|
132
|
+
server_desc,
|
133
|
+
server_type,
|
134
|
+
last_start_time,
|
135
|
+
)
|
136
|
+
else:
|
137
|
+
table.add_row(
|
138
|
+
server_name,
|
139
|
+
"[red]Inactive" "" if status == "Inactive" else "[green]Active",
|
140
|
+
# server_status,
|
141
|
+
)
|
142
|
+
# p_client.close_session()
|
143
|
+
return table
|
144
|
+
|
145
|
+
try:
|
146
|
+
with Live(generate_table(), refresh_per_second=4, screen=True) as live:
|
147
|
+
while True:
|
148
|
+
time.sleep(2)
|
149
|
+
live.update(generate_table())
|
150
|
+
|
151
|
+
except (
|
152
|
+
InvalidParameterException,
|
153
|
+
PropertyServerException,
|
154
|
+
UserNotAuthorizedException,
|
155
|
+
) as e:
|
156
|
+
print_exception_response(e)
|
157
|
+
except KeyboardInterrupt:
|
158
|
+
pass
|
159
|
+
finally:
|
160
|
+
p_client.close_session()
|
161
|
+
|
162
|
+
|
163
|
+
def main():
|
164
|
+
parser = argparse.ArgumentParser()
|
165
|
+
parser.add_argument("--full", default=True, help="Extended Information?")
|
166
|
+
parser.add_argument("--server", help="Name of the server to display status for")
|
167
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
168
|
+
parser.add_argument("--userid", help="User Id")
|
169
|
+
parser.add_argument("--password", help="User Password")
|
170
|
+
args = parser.parse_args()
|
171
|
+
|
172
|
+
full = args.full if args.full is not None else False
|
173
|
+
server = args.server if args.server is not None else EGERIA_VIEW_SERVER
|
174
|
+
url = args.url if args.url is not None else EGERIA_VIEW_SERVER_URL
|
175
|
+
userid = args.userid if args.userid is not None else EGERIA_ADMIN_USER
|
176
|
+
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
177
|
+
|
178
|
+
display_status(full, server, url, userid, user_pass)
|
179
|
+
|
180
|
+
|
181
|
+
if __name__ == "__main__":
|
182
|
+
main()
|
@@ -0,0 +1,140 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
4
|
+
Copyright Contributors to the ODPi Egeria project.
|
5
|
+
|
6
|
+
Unit tests for the Utils helper functions using the Pytest framework.
|
7
|
+
|
8
|
+
|
9
|
+
A simple server status display
|
10
|
+
"""
|
11
|
+
import argparse
|
12
|
+
import os
|
13
|
+
import time
|
14
|
+
|
15
|
+
from rich.live import Live
|
16
|
+
from rich.table import Table
|
17
|
+
|
18
|
+
from pyegeria._exceptions import (
|
19
|
+
InvalidParameterException,
|
20
|
+
PropertyServerException,
|
21
|
+
UserNotAuthorizedException,
|
22
|
+
print_exception_response,
|
23
|
+
)
|
24
|
+
from pyegeria.core_omag_server_config import CoreServerConfig
|
25
|
+
from pyegeria.server_operations import ServerOps
|
26
|
+
|
27
|
+
disable_ssl_warnings = True
|
28
|
+
|
29
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
30
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
31
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
32
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
33
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
34
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
35
|
+
)
|
36
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
37
|
+
EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
|
38
|
+
"EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
|
39
|
+
)
|
40
|
+
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
41
|
+
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
42
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
43
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
44
|
+
EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
45
|
+
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
46
|
+
|
47
|
+
|
48
|
+
def display_status(
|
49
|
+
server: str,
|
50
|
+
url: str,
|
51
|
+
username: str,
|
52
|
+
user_pass: str,
|
53
|
+
jupyter: bool = EGERIA_JUPYTER,
|
54
|
+
width: int = EGERIA_WIDTH,
|
55
|
+
):
|
56
|
+
p_client = ServerOps(server, url, username)
|
57
|
+
c_client = CoreServerConfig(server, url, username, user_pass)
|
58
|
+
|
59
|
+
def generate_table() -> Table:
|
60
|
+
"""Make a new table."""
|
61
|
+
table = Table(
|
62
|
+
title=f"Server Status for Platform - {time.asctime()}",
|
63
|
+
style="bold white on black",
|
64
|
+
row_styles=["bold white on black"],
|
65
|
+
header_style="white on dark_blue",
|
66
|
+
title_style="bold white on black",
|
67
|
+
caption_style="white on black",
|
68
|
+
caption=f"Server Status for Platform - '{url}'",
|
69
|
+
show_lines=True,
|
70
|
+
# expand=True
|
71
|
+
)
|
72
|
+
|
73
|
+
table.add_column("Known Server")
|
74
|
+
table.add_column("Status")
|
75
|
+
table.add_column("Server Type")
|
76
|
+
table.add_column("Server Description")
|
77
|
+
known_server_list = p_client.get_known_servers()
|
78
|
+
active_server_list = p_client.get_active_server_list()
|
79
|
+
if len(known_server_list) == 0:
|
80
|
+
return table
|
81
|
+
|
82
|
+
for server in known_server_list:
|
83
|
+
if server in active_server_list:
|
84
|
+
status = "Active"
|
85
|
+
else:
|
86
|
+
status = "Inactive"
|
87
|
+
server_type = c_client.get_server_type_classification(server)[
|
88
|
+
"serverTypeName"
|
89
|
+
]
|
90
|
+
description = c_client.get_basic_server_properties(server).get(
|
91
|
+
"localServerDescription", " "
|
92
|
+
)
|
93
|
+
|
94
|
+
table.add_row(
|
95
|
+
server,
|
96
|
+
"[red]Inactive" if status == "Inactive" else "[green]Active",
|
97
|
+
server_type,
|
98
|
+
description,
|
99
|
+
)
|
100
|
+
|
101
|
+
return table
|
102
|
+
|
103
|
+
try:
|
104
|
+
with Live(generate_table(), refresh_per_second=4, screen=True) as live:
|
105
|
+
while True:
|
106
|
+
time.sleep(2)
|
107
|
+
live.update(generate_table())
|
108
|
+
|
109
|
+
except (
|
110
|
+
InvalidParameterException,
|
111
|
+
PropertyServerException,
|
112
|
+
UserNotAuthorizedException,
|
113
|
+
) as e:
|
114
|
+
print_exception_response(e)
|
115
|
+
except KeyboardInterrupt:
|
116
|
+
pass
|
117
|
+
|
118
|
+
finally:
|
119
|
+
p_client.close_session()
|
120
|
+
c_client.close_session()
|
121
|
+
|
122
|
+
|
123
|
+
def main():
|
124
|
+
parser = argparse.ArgumentParser()
|
125
|
+
parser.add_argument("--server", help="Name of the server to display status for")
|
126
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
127
|
+
parser.add_argument("--userid", help="User Id")
|
128
|
+
parser.add_argument("--password", help="User Password")
|
129
|
+
args = parser.parse_args()
|
130
|
+
|
131
|
+
server = args.server if args.server is not None else EGERIA_METADATA_STORE
|
132
|
+
url = args.url if args.url is not None else EGERIA_PLATFORM_URL
|
133
|
+
userid = args.userid if args.userid is not None else EGERIA_ADMIN_USER
|
134
|
+
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
135
|
+
|
136
|
+
display_status(server, url, userid, user_pass)
|
137
|
+
|
138
|
+
|
139
|
+
if __name__ == "__main__":
|
140
|
+
main()
|
@@ -0,0 +1,124 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
4
|
+
Copyright Contributors to the ODPi Egeria project.
|
5
|
+
|
6
|
+
Unit tests for the Utils helper functions using the Pytest framework.
|
7
|
+
|
8
|
+
|
9
|
+
A simple server status display
|
10
|
+
"""
|
11
|
+
import argparse
|
12
|
+
import os
|
13
|
+
import time
|
14
|
+
|
15
|
+
from rich.live import Live
|
16
|
+
from rich.table import Table
|
17
|
+
|
18
|
+
from pyegeria import (
|
19
|
+
InvalidParameterException,
|
20
|
+
PropertyServerException,
|
21
|
+
UserNotAuthorizedException,
|
22
|
+
print_exception_response,
|
23
|
+
ServerOps,
|
24
|
+
)
|
25
|
+
|
26
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
27
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
28
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
29
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
30
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
31
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
32
|
+
)
|
33
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
34
|
+
EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
|
35
|
+
"EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
|
36
|
+
)
|
37
|
+
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
38
|
+
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
39
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
40
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
41
|
+
EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
42
|
+
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
43
|
+
|
44
|
+
|
45
|
+
def display_status(
|
46
|
+
server: str,
|
47
|
+
url: str,
|
48
|
+
username: str,
|
49
|
+
user_pass: str,
|
50
|
+
jupyter: bool = EGERIA_JUPYTER,
|
51
|
+
width: int = EGERIA_WIDTH,
|
52
|
+
):
|
53
|
+
p_client = ServerOps(server, url, username, user_pass)
|
54
|
+
|
55
|
+
def generate_table() -> Table:
|
56
|
+
"""Make a new table."""
|
57
|
+
table = Table(
|
58
|
+
title=f"Server Status for Platform - {time.asctime()}",
|
59
|
+
style="bold white on black",
|
60
|
+
row_styles=["bold white on black"],
|
61
|
+
header_style="white on dark_blue",
|
62
|
+
title_style="bold white on black",
|
63
|
+
caption_style="white on black",
|
64
|
+
caption=f"Server Status for Platform - '{url}'",
|
65
|
+
# show_lines=True,
|
66
|
+
)
|
67
|
+
|
68
|
+
table.add_column("Known Server")
|
69
|
+
table.add_column("Status")
|
70
|
+
|
71
|
+
known_server_list = p_client.get_known_servers()
|
72
|
+
active_server_list = p_client.get_active_server_list()
|
73
|
+
if len(known_server_list) == 0:
|
74
|
+
return table
|
75
|
+
|
76
|
+
for server in known_server_list:
|
77
|
+
if server in active_server_list:
|
78
|
+
status = "Active"
|
79
|
+
else:
|
80
|
+
status = "Inactive"
|
81
|
+
|
82
|
+
table.add_row(
|
83
|
+
server,
|
84
|
+
"[red]Inactive" if status == "Inactive" else "[green]Active",
|
85
|
+
)
|
86
|
+
# p_client.close_session()
|
87
|
+
return table
|
88
|
+
|
89
|
+
try:
|
90
|
+
with Live(generate_table(), refresh_per_second=4, screen=True) as live:
|
91
|
+
while True:
|
92
|
+
time.sleep(2)
|
93
|
+
live.update(generate_table())
|
94
|
+
|
95
|
+
except (
|
96
|
+
InvalidParameterException,
|
97
|
+
PropertyServerException,
|
98
|
+
UserNotAuthorizedException,
|
99
|
+
) as e:
|
100
|
+
print_exception_response(e)
|
101
|
+
except KeyboardInterrupt:
|
102
|
+
pass
|
103
|
+
finally:
|
104
|
+
p_client.close_session()
|
105
|
+
|
106
|
+
|
107
|
+
def main():
|
108
|
+
parser = argparse.ArgumentParser()
|
109
|
+
parser.add_argument("--server", help="Name of the server to display status for")
|
110
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
111
|
+
parser.add_argument("--userid", help="User Id")
|
112
|
+
parser.add_argument("--password", help="User Password")
|
113
|
+
args = parser.parse_args()
|
114
|
+
|
115
|
+
server = args.server if args.server is not None else EGERIA_METADATA_STORE
|
116
|
+
url = args.url if args.url is not None else EGERIA_PLATFORM_URL
|
117
|
+
userid = args.userid if args.userid is not None else EGERIA_ADMIN_USER
|
118
|
+
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
119
|
+
|
120
|
+
display_status(server, url, userid, user_pass)
|
121
|
+
|
122
|
+
|
123
|
+
if __name__ == "__main__":
|
124
|
+
main()
|
@@ -0,0 +1,83 @@
|
|
1
|
+
"""
|
2
|
+
SPDX-License-Identifier: Apache-2.0
|
3
|
+
Copyright Contributors to the ODPi Egeria project.
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
This script refreshs an integration daemon.
|
8
|
+
|
9
|
+
"""
|
10
|
+
|
11
|
+
import argparse
|
12
|
+
import os
|
13
|
+
|
14
|
+
from pyegeria import EgeriaTech
|
15
|
+
from pyegeria._exceptions import (
|
16
|
+
InvalidParameterException,
|
17
|
+
PropertyServerException,
|
18
|
+
print_exception_response,
|
19
|
+
)
|
20
|
+
|
21
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
22
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
23
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
24
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
25
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
26
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
27
|
+
)
|
28
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
29
|
+
EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
|
30
|
+
"EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
|
31
|
+
)
|
32
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "garygeeke")
|
33
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
34
|
+
|
35
|
+
|
36
|
+
def refresh_connector(
|
37
|
+
connector: str, server: str, url: str, view_server: str, userid: str, password: str
|
38
|
+
):
|
39
|
+
try:
|
40
|
+
s_client = EgeriaTech(view_server, url, userid, user_pwd=password)
|
41
|
+
token = s_client.create_egeria_bearer_token()
|
42
|
+
if connector == "all":
|
43
|
+
connector = None
|
44
|
+
statement = "ALL connectors"
|
45
|
+
else:
|
46
|
+
statement = f"the {connector} "
|
47
|
+
server = "integration_daemon" if server is None else server
|
48
|
+
|
49
|
+
s_client.refresh_integration_connectors(
|
50
|
+
connector_name=connector, server_guid=None, display_name=server
|
51
|
+
)
|
52
|
+
|
53
|
+
print(f"\n===> Integration Daemon '{server}' refreshed {statement}.")
|
54
|
+
|
55
|
+
except (InvalidParameterException, PropertyServerException) as e:
|
56
|
+
print_exception_response(e)
|
57
|
+
|
58
|
+
|
59
|
+
def main():
|
60
|
+
parser = argparse.ArgumentParser()
|
61
|
+
parser.add_argument("--server", help="Name of the integration daemon to refresh")
|
62
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
63
|
+
parser.add_argument("--view_server", help="Name of the view server to connect to")
|
64
|
+
parser.add_argument("--userid", help="User Id")
|
65
|
+
parser.add_argument("--password", help="User Password")
|
66
|
+
parser.add_argument(
|
67
|
+
"--connector", default="all", help="Name of the connector to refresh"
|
68
|
+
)
|
69
|
+
args = parser.parse_args()
|
70
|
+
|
71
|
+
server = args.server if args.server is not None else EGERIA_INTEGRATION_DAEMON
|
72
|
+
url = args.url if args.url is not None else EGERIA_VIEW_SERVER_URL
|
73
|
+
view_server = (
|
74
|
+
args.view_server if args.view_server is not None else EGERIA_VIEW_SERVER
|
75
|
+
)
|
76
|
+
|
77
|
+
userid = args.userid if args.userid is not None else EGERIA_USER
|
78
|
+
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
79
|
+
refresh_connector(args.connector, server, url, view_server, userid, user_pass)
|
80
|
+
|
81
|
+
|
82
|
+
if __name__ == "__main__":
|
83
|
+
main()
|
@@ -0,0 +1,82 @@
|
|
1
|
+
"""
|
2
|
+
SPDX-License-Identifier: Apache-2.0
|
3
|
+
Copyright Contributors to the ODPi Egeria project.
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
This script restarts an integration daemon.
|
8
|
+
|
9
|
+
"""
|
10
|
+
|
11
|
+
import argparse
|
12
|
+
import os
|
13
|
+
|
14
|
+
from pyegeria import EgeriaTech
|
15
|
+
from pyegeria._exceptions import (
|
16
|
+
InvalidParameterException,
|
17
|
+
PropertyServerException,
|
18
|
+
print_exception_response,
|
19
|
+
)
|
20
|
+
|
21
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
22
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
23
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
24
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
25
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
26
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
27
|
+
)
|
28
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
29
|
+
EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
|
30
|
+
"EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
|
31
|
+
)
|
32
|
+
|
33
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "garygeeke")
|
34
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
35
|
+
|
36
|
+
|
37
|
+
def restart_connector(
|
38
|
+
connector: str, server: str, url: str, view_server: str, userid: str, password: str
|
39
|
+
):
|
40
|
+
try:
|
41
|
+
s_client = EgeriaTech(view_server, url, userid, user_pwd=password)
|
42
|
+
token = s_client.create_egeria_bearer_token()
|
43
|
+
if connector == "all":
|
44
|
+
connector = None
|
45
|
+
statement = "ALL connectors"
|
46
|
+
else:
|
47
|
+
statement = f"the {connector} "
|
48
|
+
server = "integration_daemon" if server is None else server
|
49
|
+
|
50
|
+
s_client.restart_integration_connectors(connector, None, server)
|
51
|
+
|
52
|
+
print(f"\n===> Integration Daemon '{server}' restarted {statement}.")
|
53
|
+
|
54
|
+
except (InvalidParameterException, PropertyServerException) as e:
|
55
|
+
print_exception_response(e)
|
56
|
+
|
57
|
+
|
58
|
+
def main():
|
59
|
+
parser = argparse.ArgumentParser()
|
60
|
+
parser.add_argument("--server", help="Name of the integration daemon to refresh")
|
61
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
62
|
+
parser.add_argument("--view_server", help="Name of the view server to connect to")
|
63
|
+
parser.add_argument("--userid", help="User Id")
|
64
|
+
parser.add_argument("--password", help="User Password")
|
65
|
+
parser.add_argument(
|
66
|
+
"--connector", default="all", help="Name of the connector to refresh"
|
67
|
+
)
|
68
|
+
args = parser.parse_args()
|
69
|
+
|
70
|
+
server = args.server if args.server is not None else EGERIA_INTEGRATION_DAEMON
|
71
|
+
url = args.url if args.url is not None else EGERIA_VIEW_SERVER_URL
|
72
|
+
view_server = (
|
73
|
+
args.view_server if args.view_server is not None else EGERIA_VIEW_SERVER
|
74
|
+
)
|
75
|
+
|
76
|
+
userid = args.userid if args.userid is not None else EGERIA_USER
|
77
|
+
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
78
|
+
restart_connector(args.connector, server, url, view_server, userid, user_pass)
|
79
|
+
|
80
|
+
|
81
|
+
if __name__ == "__main__":
|
82
|
+
main()
|