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,451 @@
|
|
1
|
+
"""
|
2
|
+
SPDX-License-Identifier: Apache-2.0
|
3
|
+
Copyright Contributors to the ODPi Egeria project.
|
4
|
+
|
5
|
+
Governance Engine functions. These functions initiate and manage Governance Actions and Processes
|
6
|
+
|
7
|
+
This module is deprecated - please use Automated Curation.
|
8
|
+
"""
|
9
|
+
|
10
|
+
from datetime import datetime
|
11
|
+
|
12
|
+
from ._client import Client
|
13
|
+
from ._globals import enable_ssl_check
|
14
|
+
|
15
|
+
|
16
|
+
def body_slimmer(body: dict) -> dict:
|
17
|
+
"""body_slimmer is a little function to remove unused keys from a dict
|
18
|
+
|
19
|
+
Parameters
|
20
|
+
----------
|
21
|
+
body : the dictionary that you want to slim
|
22
|
+
|
23
|
+
Returns
|
24
|
+
-------
|
25
|
+
dict:
|
26
|
+
a slimmed body
|
27
|
+
"""
|
28
|
+
slimmed = {key: value for key, value in body.items() if value}
|
29
|
+
return slimmed
|
30
|
+
|
31
|
+
|
32
|
+
class GovEng(Client):
|
33
|
+
"""
|
34
|
+
Client to initiate and manage governance actions and processes.
|
35
|
+
|
36
|
+
Attributes:
|
37
|
+
server_name: str
|
38
|
+
Name of the server to use.
|
39
|
+
platform_url : str
|
40
|
+
URL of the server platform to connect to
|
41
|
+
user_id : str
|
42
|
+
The identity of the user calling the method - this sets a default optionally used by the methods
|
43
|
+
when the user doesn't pass the user_id on a method call.
|
44
|
+
user_pwd: str = None
|
45
|
+
The password associated with the user
|
46
|
+
verify_flag: bool = enable_ssl_check
|
47
|
+
Set true for SSL verification to be enabled, false for disabled. Default behaviour set by the
|
48
|
+
enable_ssl_check attribute from _globals.py
|
49
|
+
|
50
|
+
"""
|
51
|
+
|
52
|
+
def __init__(
|
53
|
+
self,
|
54
|
+
server_name: str,
|
55
|
+
platform_url: str,
|
56
|
+
user_id: str,
|
57
|
+
user_pwd: str = None,
|
58
|
+
verify_flag: bool = enable_ssl_check,
|
59
|
+
):
|
60
|
+
self.admin_command_root: str
|
61
|
+
Client.__init__(self, server_name, platform_url, user_id, user_pwd)
|
62
|
+
self.engine_command_root = (
|
63
|
+
self.platform_url
|
64
|
+
+ "/servers/"
|
65
|
+
+ server_name
|
66
|
+
+ "/open-metadata/framework-services/governance-engine/open-governance-service/users/"
|
67
|
+
+ user_id
|
68
|
+
)
|
69
|
+
|
70
|
+
def get_engine_actions(self, start_from: int = 0, page_size: int = 0) -> [dict]:
|
71
|
+
"""Get engine actions associated deployed on the server.
|
72
|
+
|
73
|
+
Args:
|
74
|
+
start_from (int, optional): The index to start retrieving processes from. Defaults to 0.
|
75
|
+
page_size (int, optional): The number of processes to retrieve per page. Defaults to 0 (no pagination).
|
76
|
+
|
77
|
+
Returns:
|
78
|
+
List[str]: A list of JSON representations of governance action processes matching the provided name.
|
79
|
+
|
80
|
+
Raises:
|
81
|
+
InvalidParameterException: If the API response indicates an error (non-200 status code),
|
82
|
+
this exception is raised with details from the response content.
|
83
|
+
|
84
|
+
Note:
|
85
|
+
Pagination of 0 defaults to server default.
|
86
|
+
|
87
|
+
"""
|
88
|
+
url = (
|
89
|
+
self.engine_command_root
|
90
|
+
+ "/engine-actions?startFrom="
|
91
|
+
+ str(start_from)
|
92
|
+
+ "&pageSize="
|
93
|
+
+ str(page_size)
|
94
|
+
)
|
95
|
+
response = self.make_request("GET", url)
|
96
|
+
|
97
|
+
governance_elements = response.json().get("elements")
|
98
|
+
return governance_elements
|
99
|
+
|
100
|
+
def get_engine_action(self, engine_action_guid: str) -> str:
|
101
|
+
"""Return the governance action associated with the supplied guid
|
102
|
+
|
103
|
+
Parameters
|
104
|
+
----------
|
105
|
+
engine_action_guid : str
|
106
|
+
The unique identifier of the engine action to retrieve.
|
107
|
+
Returns
|
108
|
+
-------
|
109
|
+
JSON string of the governance action associated with the guid
|
110
|
+
|
111
|
+
Raises
|
112
|
+
------
|
113
|
+
InvalidParameterException
|
114
|
+
PropertyServerException
|
115
|
+
UserNotAuthorizedException
|
116
|
+
"""
|
117
|
+
|
118
|
+
url = self.engine_command_root + "/engine-actions/" + engine_action_guid
|
119
|
+
response = self.make_request("GET", url)
|
120
|
+
|
121
|
+
governance_element = response.json().get("element")
|
122
|
+
return governance_element
|
123
|
+
|
124
|
+
def get_active_engine_actions(
|
125
|
+
self, start_from: int = 0, page_size: int = 0
|
126
|
+
) -> [str]:
|
127
|
+
"""Get active governance actions associated on the server.
|
128
|
+
|
129
|
+
Args:
|
130
|
+
start_from (int, optional): The index to start retrieving processes from. Defaults to 0.
|
131
|
+
page_size (int, optional): The number of processes to retrieve per page. Defaults to 0 (no pagination).
|
132
|
+
|
133
|
+
Returns:
|
134
|
+
List[str]: A list of JSON representations of governance action processes matching the provided name.
|
135
|
+
|
136
|
+
Raises:
|
137
|
+
InvalidParameterException: If the API response indicates an error (non-200 status code),
|
138
|
+
this exception is raised with details from the response content.
|
139
|
+
|
140
|
+
Note:
|
141
|
+
Pagination of 0 defaults to server default.
|
142
|
+
"""
|
143
|
+
url = (
|
144
|
+
self.engine_command_root
|
145
|
+
+ "/engine-actions/active?startFrom="
|
146
|
+
+ str(start_from)
|
147
|
+
+ "&pageSize="
|
148
|
+
+ str(page_size)
|
149
|
+
)
|
150
|
+
|
151
|
+
response = self.make_request("GET", url)
|
152
|
+
governance_elements = response.json().get("elements")
|
153
|
+
return governance_elements
|
154
|
+
|
155
|
+
def get_engine_actions_by_name(
|
156
|
+
self, name: str, start_from: int = 0, page_size: int = 0
|
157
|
+
) -> str:
|
158
|
+
"""Retrieve engine actions matching the name string.
|
159
|
+
Args:
|
160
|
+
name (str): The qualified name or display name of the governance action to get.
|
161
|
+
start_from (int, optional): The index to start retrieving processes from. Defaults to 0.
|
162
|
+
page_size (int, optional): The number of processes to retrieve per page. Defaults to 0 (no pagination).
|
163
|
+
|
164
|
+
Returns:
|
165
|
+
List[str]: A list of JSON representations of governance action processes matching the provided name.
|
166
|
+
|
167
|
+
Raises:
|
168
|
+
InvalidParameterException: If the API response indicates an error (non-200 status code),
|
169
|
+
this exception is raised with details from the response content.
|
170
|
+
|
171
|
+
Note:
|
172
|
+
Pagination of 0 defaults to server default.
|
173
|
+
|
174
|
+
"""
|
175
|
+
url = (
|
176
|
+
self.engine_command_root
|
177
|
+
+ "/engine-actions/by-name?startFrom="
|
178
|
+
+ str(start_from)
|
179
|
+
+ "&pageSize="
|
180
|
+
+ str(page_size)
|
181
|
+
)
|
182
|
+
body = {"class": "NameRequestBody", "name": name}
|
183
|
+
response = self.make_request("POST", url, body)
|
184
|
+
|
185
|
+
governance_elements = response.json().get("elements")
|
186
|
+
return governance_elements
|
187
|
+
|
188
|
+
def find_engine_actions(
|
189
|
+
self, search_string: str, start_from: int = 0, page_size: int = 0
|
190
|
+
) -> [str]:
|
191
|
+
"""Search for engine actions matching the search string.
|
192
|
+
|
193
|
+
Args:
|
194
|
+
search_string (str): The search string to query for.
|
195
|
+
start_from (int, optional): The index to start retrieving processes from. Defaults to 0.
|
196
|
+
page_size (int, optional): The number of processes to retrieve per page. Defaults to 0 (no pagination).
|
197
|
+
|
198
|
+
Returns:
|
199
|
+
List[str]: A list of JSON representations of governance action processes matching the provided name.
|
200
|
+
|
201
|
+
Raises:
|
202
|
+
InvalidParameterException: If the API response indicates an error (non-200 status code),
|
203
|
+
this exception is raised with details from the response content.
|
204
|
+
|
205
|
+
Note:
|
206
|
+
Pagination of 0 defaults to server default.
|
207
|
+
"""
|
208
|
+
url = (
|
209
|
+
self.engine_command_root
|
210
|
+
+ "/engine-actions/by-search-string?startFrom="
|
211
|
+
+ str(start_from)
|
212
|
+
+ "&pageSize="
|
213
|
+
+ str(page_size)
|
214
|
+
)
|
215
|
+
body = {"class": "SearchStringRequestBody", "searchString": search_string}
|
216
|
+
response = self.make_request("POST", url, body)
|
217
|
+
|
218
|
+
governance_elements = response.json().get("elements")
|
219
|
+
return governance_elements
|
220
|
+
|
221
|
+
def get_governance_action_process_by_guid(self, gov_process_guid: str) -> str:
|
222
|
+
"""
|
223
|
+
Retrieves information about a governance action process based on its GUID.
|
224
|
+
|
225
|
+
Args:
|
226
|
+
gov_process_guid (str): The GUID (Globally Unique Identifier) of the governance action process.
|
227
|
+
|
228
|
+
Returns:
|
229
|
+
str: The JSON representation of the governance action process element.
|
230
|
+
|
231
|
+
Raises:
|
232
|
+
InvalidParameterException: If the API response indicates an error (non-200 status code),
|
233
|
+
this exception is raised with details from the response content.
|
234
|
+
PropertyServerException: If the API response indicates a server side error.
|
235
|
+
UserNotAuthorizedException:
|
236
|
+
|
237
|
+
Note:
|
238
|
+
This method assumes that the provided GUID is valid and corresponds to an existing
|
239
|
+
governance action process in the system.
|
240
|
+
|
241
|
+
"""
|
242
|
+
url = (
|
243
|
+
self.engine_command_root
|
244
|
+
+ "/governance-action-processes/"
|
245
|
+
+ gov_process_guid
|
246
|
+
)
|
247
|
+
response = self.make_request("GET", url)
|
248
|
+
governance_element = response.json().get("element")
|
249
|
+
return governance_element
|
250
|
+
|
251
|
+
def get_governance_action_processes_by_name(
|
252
|
+
self, name: str, start_from: int = 0, page_size: int = 0
|
253
|
+
) -> [str]:
|
254
|
+
"""
|
255
|
+
Retrieves governance action processes based on their name only (no wildcards).
|
256
|
+
|
257
|
+
Args:
|
258
|
+
name (str): The qualified name or display name of the governance action to get.
|
259
|
+
start_from (int, optional): The index to start retrieving processes from. Defaults to 0.
|
260
|
+
page_size (int, optional): The number of processes to retrieve per page. Defaults to 0 (no pagination).
|
261
|
+
|
262
|
+
Returns:
|
263
|
+
List[str]: A list of JSON representations of governance action processes matching the provided name.
|
264
|
+
|
265
|
+
Raises:
|
266
|
+
InvalidParameterException: If the API response indicates an error (non-200 status code),
|
267
|
+
this exception is raised with details from the response content.
|
268
|
+
|
269
|
+
Note:
|
270
|
+
Pagination of 0 defaults to server default.
|
271
|
+
|
272
|
+
"""
|
273
|
+
url = (
|
274
|
+
self.engine_command_root
|
275
|
+
+ "/governance-action-processes/by-name?startFrom="
|
276
|
+
+ str(start_from)
|
277
|
+
+ "&pageSize="
|
278
|
+
+ str(page_size)
|
279
|
+
)
|
280
|
+
body = {"class": "NameRequestBody", "name": name}
|
281
|
+
response = self.make_request("POST", url, body)
|
282
|
+
governance_elements = response.json().get("elements")
|
283
|
+
return governance_elements
|
284
|
+
|
285
|
+
def find_governance_action_processes(
|
286
|
+
self, search_string: str, start_from: int = 0, page_size: int = 0
|
287
|
+
) -> [str]:
|
288
|
+
"""Return governance action processes that match the search string (with regex).
|
289
|
+
|
290
|
+
Args:
|
291
|
+
search_string (str): The search string to query for.
|
292
|
+
start_from (int, optional): The index to start retrieving processes from. Defaults to 0.
|
293
|
+
page_size (int, optional): The number of processes to retrieve per page. Defaults to 0 (no pagination).
|
294
|
+
|
295
|
+
Returns:
|
296
|
+
List[str]: A list of JSON representations of governance action processes matching the provided name.
|
297
|
+
|
298
|
+
Raises:
|
299
|
+
InvalidParameterException: If the API response indicates an error (non-200 status code),
|
300
|
+
this exception is raised with details from the response content.
|
301
|
+
|
302
|
+
Note:
|
303
|
+
Pagination of 0 defaults to server default.
|
304
|
+
|
305
|
+
"""
|
306
|
+
url = (
|
307
|
+
self.engine_command_root
|
308
|
+
+ "/governance-action-processes/by-search-string?startFrom="
|
309
|
+
+ str(start_from)
|
310
|
+
+ "&pageSize="
|
311
|
+
+ str(page_size)
|
312
|
+
)
|
313
|
+
body = {"class": "SearchStringRequestBody", "searchString": search_string}
|
314
|
+
response = self.make_request("POST", url, body)
|
315
|
+
|
316
|
+
governance_elements = response.json().get("elements")
|
317
|
+
return governance_elements
|
318
|
+
|
319
|
+
def initiate_governance_action_process(
|
320
|
+
self,
|
321
|
+
qualified_name: str,
|
322
|
+
request_source_guids: [str],
|
323
|
+
action_targets: [str],
|
324
|
+
start_time: datetime,
|
325
|
+
request_parameters: dict,
|
326
|
+
orig_service_name: str,
|
327
|
+
orig_engine_name: str,
|
328
|
+
) -> str:
|
329
|
+
"""initiate_gov_action_process
|
330
|
+
|
331
|
+
This method starts a governance action process using the supplied parameters.
|
332
|
+
|
333
|
+
Parameters
|
334
|
+
----------
|
335
|
+
qualified_name: str
|
336
|
+
- unique name for the governance process
|
337
|
+
request_source_guids: [str]
|
338
|
+
- request source elements for the resulting governance action service
|
339
|
+
action_targets: [str]
|
340
|
+
-list of action target names to GUIDs for the resulting governance action service
|
341
|
+
start_time: datetime
|
342
|
+
- time to start the process
|
343
|
+
request_parameters: [str]
|
344
|
+
- parameters passed into the process
|
345
|
+
orig_service_name: str
|
346
|
+
- unique name of the requesting governance service (if initiated by a governance engine)
|
347
|
+
orig_engine_name: str
|
348
|
+
- optional unique name of the governance engine (if initiated by a governance engine).
|
349
|
+
|
350
|
+
Returns
|
351
|
+
-------
|
352
|
+
Unique id (guid) of the newly started governance engine process
|
353
|
+
|
354
|
+
Raises
|
355
|
+
------
|
356
|
+
InvalidParameterException
|
357
|
+
PropertyServerException
|
358
|
+
UserNotAuthorizedException
|
359
|
+
|
360
|
+
"""
|
361
|
+
url = self.engine_command_root + "/governance-action-processes/initiate"
|
362
|
+
body = {
|
363
|
+
"class": "GovernanceActionProcessRequestBody",
|
364
|
+
"processQualifiedName": qualified_name,
|
365
|
+
"requestSourceGUIDs": request_source_guids,
|
366
|
+
"actionTargets": action_targets,
|
367
|
+
"startTime": int(start_time.timestamp() * 1000),
|
368
|
+
"requestParameters": request_parameters,
|
369
|
+
"originatorServiceName": orig_service_name,
|
370
|
+
"originatorEngineName": orig_engine_name,
|
371
|
+
}
|
372
|
+
new_body = body_slimmer(body)
|
373
|
+
response = self.make_request("POST", url, new_body)
|
374
|
+
|
375
|
+
return response.json().get("guid")
|
376
|
+
|
377
|
+
def initiate_engine_action(
|
378
|
+
self,
|
379
|
+
qualified_name: str,
|
380
|
+
domain_identifier: int,
|
381
|
+
display_name: str,
|
382
|
+
description: str,
|
383
|
+
request_source_guids: str,
|
384
|
+
action_targets: str,
|
385
|
+
received_guards: [str],
|
386
|
+
start_time: datetime,
|
387
|
+
gov_engine_name: str,
|
388
|
+
request_type: str,
|
389
|
+
request_parameters: dict,
|
390
|
+
process_name: str,
|
391
|
+
request_src_name: str = None,
|
392
|
+
originator_svc_name: str = None,
|
393
|
+
originator_eng_name: str = None,
|
394
|
+
) -> str:
|
395
|
+
"""
|
396
|
+
Initiates an engine action with the specified parameters.
|
397
|
+
|
398
|
+
Args:
|
399
|
+
qualified_name (str): The qualified name of the governance action.
|
400
|
+
domain_identifier (int): The domain identifier for the governance action.
|
401
|
+
display_name (str): The display name of the governance action.
|
402
|
+
description (str): The description of the governance action.
|
403
|
+
request_source_guids (str): GUIDs of the sources initiating the request.
|
404
|
+
action_targets (str): Targets of the governance action.
|
405
|
+
received_guards (List[str]): List of guards received for the action.
|
406
|
+
start_time (datetime): The start time for the governance action.
|
407
|
+
gov_engine_name (str): The name of the governance engine associated with the action.
|
408
|
+
request_type (str): The type of the governance action request.
|
409
|
+
request_parameters (dict): Additional parameters for the governance action.
|
410
|
+
process_name (str): The name of the associated governance action process.
|
411
|
+
request_src_name (str, optional): The name of the request source. Defaults to None.
|
412
|
+
originator_svc_name (str, optional): The name of the originator service. Defaults to None.
|
413
|
+
originator_eng_name (str, optional): The name of the originator engine. Defaults to None.
|
414
|
+
|
415
|
+
Returns:
|
416
|
+
str: The GUID (Globally Unique Identifier) of the initiated governance action.
|
417
|
+
|
418
|
+
Raises:
|
419
|
+
InvalidParameterException: If the API response indicates an error (non-200 status code),
|
420
|
+
this exception is raised with details from the response content.
|
421
|
+
|
422
|
+
Note:
|
423
|
+
The `start_time` parameter should be a `datetime` object representing the start
|
424
|
+
time of the governance action.
|
425
|
+
|
426
|
+
|
427
|
+
"""
|
428
|
+
url = self.engine_command_root + (
|
429
|
+
"/governance-engines/" + gov_engine_name + "/engine-actions/initiate"
|
430
|
+
)
|
431
|
+
|
432
|
+
body = {
|
433
|
+
"class": "GovernanceActionRequestBody",
|
434
|
+
"qualifiedName": qualified_name + str(int(start_time.timestamp())),
|
435
|
+
"domainIdentifier": domain_identifier,
|
436
|
+
"displayName": display_name,
|
437
|
+
"description": description,
|
438
|
+
"requestSourceGUIDs": request_source_guids,
|
439
|
+
"actionTargets": action_targets,
|
440
|
+
"receivedGuards": received_guards,
|
441
|
+
"startTime": int(start_time.timestamp() * 1000),
|
442
|
+
"requestType": request_type,
|
443
|
+
"requestParameters": request_parameters,
|
444
|
+
"process_name": process_name,
|
445
|
+
"requestSourceName": request_src_name,
|
446
|
+
"originatorServiceName": originator_svc_name,
|
447
|
+
"originatorEngineName": originator_eng_name,
|
448
|
+
}
|
449
|
+
new_body = body_slimmer(body)
|
450
|
+
response = self.make_request("POST", url, new_body)
|
451
|
+
return response.json().get("guid")
|
pyegeria/_exceptions.py
CHANGED
@@ -322,6 +322,7 @@ class EgeriaException(Exception):
|
|
322
322
|
Define the Egeria exceptions raised during error handling. Modeled on the exceptions defined in the Egeria core.
|
323
323
|
|
324
324
|
"""
|
325
|
+
raw_error_message = ""
|
325
326
|
|
326
327
|
def __init__(self, response_body) -> None:
|
327
328
|
response_dict = json.loads(response_body)
|
@@ -330,14 +331,12 @@ class EgeriaException(Exception):
|
|
330
331
|
self.exception_class_name = response_dict["exceptionClassName"]
|
331
332
|
self.action_description = response_dict["actionDescription"]
|
332
333
|
self.exception_error_message = response_dict["exceptionErrorMessage"]
|
333
|
-
self.exception_error_message_id = response_dict
|
334
|
+
self.exception_error_message_id = response_dict.get("exceptionErrorMessageId", "UNKNOWN-ERROR-CODE")
|
334
335
|
|
335
336
|
# self.exception_error_message_id = response_dict["exceptionErrorMessageId"]
|
336
|
-
self.exception_error_message_parameters = response_dict
|
337
|
-
|
338
|
-
|
339
|
-
self.exception_system_action = response_dict["exceptionSystemAction"]
|
340
|
-
self.exception_user_action = response_dict["exceptionUserAction"]
|
337
|
+
self.exception_error_message_parameters = response_dict.get("exceptionErrorMessageParameters", "{}")
|
338
|
+
self.exception_system_action = response_dict.get("exceptionSystemAction", "UNKNOWN-SYSTEM-ACTION")
|
339
|
+
self.exception_user_action = response_dict.get("exceptionUserAction", "UNKNOWN-USER-ACTION")
|
341
340
|
|
342
341
|
def __str__(self):
|
343
342
|
return self.exception_error_message
|
@@ -373,6 +372,7 @@ def print_exception_response(e: EgeriaException):
|
|
373
372
|
print(
|
374
373
|
f"\t\t Error Code: {e.exception_error_message_id} with http code {str(e.related_http_code)}"
|
375
374
|
)
|
375
|
+
# print(f"\t\t Raw Error Text is {e.raw_error_message}")
|
376
376
|
print(f"\t\t Class: {e.exception_class_name}")
|
377
377
|
print(f"\t\t Caller: {e.action_description}")
|
378
378
|
print(f"\t\t System Action: {e.exception_system_action}")
|
pyegeria/_globals.py
CHANGED
@@ -8,10 +8,12 @@ This common file is used to set some global values and enumerations used by the
|
|
8
8
|
|
9
9
|
"""
|
10
10
|
|
11
|
+
|
11
12
|
is_debug = False
|
12
13
|
disable_ssl_warnings = True
|
13
14
|
enable_ssl_check = False
|
14
|
-
max_paging_size =
|
15
|
+
max_paging_size = 500
|
16
|
+
default_time_out = 30
|
15
17
|
|
16
18
|
comment_types = (
|
17
19
|
"ANSWER",
|
@@ -29,3 +31,7 @@ star_ratings = (
|
|
29
31
|
"THREE_STARS",
|
30
32
|
"TWO_STARS",
|
31
33
|
)
|
34
|
+
|
35
|
+
TEMPLATE_GUIDS: dict = {}
|
36
|
+
INTEGRATION_GUIDS: dict = {}
|
37
|
+
|
pyegeria/_validators.py
CHANGED
@@ -6,7 +6,7 @@ import inspect
|
|
6
6
|
import json
|
7
7
|
import validators
|
8
8
|
from json import JSONDecodeError
|
9
|
-
from pyegeria.
|
9
|
+
from pyegeria._exceptions import (
|
10
10
|
OMAGCommonErrorCode,
|
11
11
|
InvalidParameterException,
|
12
12
|
)
|
@@ -103,7 +103,7 @@ def validate_server_name(server_name: str) -> bool:
|
|
103
103
|
"exceptionUserAction": OMAGCommonErrorCode.NULL_USER_ID.value[
|
104
104
|
"user_action"
|
105
105
|
],
|
106
|
-
"exceptionProperties": {"
|
106
|
+
"exceptionProperties": {"view_server": server_name},
|
107
107
|
}
|
108
108
|
)
|
109
109
|
raise InvalidParameterException(exc_msg)
|
@@ -214,8 +214,11 @@ def validate_search_string(search_string: str) -> bool:
|
|
214
214
|
caller_method = inspect.getframeinfo(calling_frame).function
|
215
215
|
|
216
216
|
if (search_string is None) or (len(search_string) == 0):
|
217
|
-
msg = str(
|
218
|
-
|
217
|
+
msg = str(
|
218
|
+
OMAGCommonErrorCode.NULL_SEARCH_STRING.value["message_template"].format(
|
219
|
+
"search_string", caller_method
|
220
|
+
)
|
221
|
+
)
|
219
222
|
exc_msg = json.dumps(
|
220
223
|
{
|
221
224
|
"class": "VoidResponse",
|
@@ -329,8 +332,8 @@ def validate_url(url: str) -> bool:
|
|
329
332
|
|
330
333
|
# The following hack allows localhost to be used as a hostname - which is disallowed by the
|
331
334
|
# validations package
|
332
|
-
if (
|
333
|
-
|
335
|
+
if ("localhost" in url) and ("localhost." not in url):
|
336
|
+
url = url.replace("localhost", "127.0.0.1")
|
334
337
|
|
335
338
|
result = validators.url(url)
|
336
339
|
if result is not True:
|