pyegeria 5.2.1.1__py3-none-any.whl → 5.3__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.
- commands/cat/.DS_Store +0 -0
- commands/cat/Dr-Egeria_md-orig.py +166 -0
- commands/cat/__init__.py +23 -0
- commands/cat/dr_egeria_jupyter.py +122 -0
- commands/cat/dr_egeria_md.py +247 -0
- {pyegeria/commands → commands}/cat/exp_list_glossaries.py +3 -4
- {pyegeria/commands → commands}/cat/get_asset_graph.py +4 -4
- {pyegeria/commands → commands}/cat/get_collection.py +8 -9
- {pyegeria/commands → commands}/cat/get_project_dependencies.py +6 -8
- {pyegeria/commands → commands}/cat/get_project_structure.py +6 -8
- {pyegeria/commands → commands}/cat/get_tech_type_elements.py +13 -15
- {pyegeria/commands → commands}/cat/glossary_actions.py +184 -34
- {pyegeria/commands → commands}/cat/list_assets.py +9 -6
- commands/cat/list_categories.py +192 -0
- {pyegeria/commands → commands}/cat/list_cert_types.py +6 -6
- {pyegeria/commands → commands}/cat/list_collections.py +62 -19
- commands/cat/list_data_structures.py +223 -0
- {pyegeria/commands → commands}/cat/list_deployed_catalogs.py +9 -8
- {pyegeria/commands → commands}/cat/list_deployed_database_schemas.py +10 -9
- {pyegeria/commands → commands}/cat/list_deployed_databases.py +9 -8
- pyegeria/commands/cat/list_servers_deployed_imp.py → commands/cat/list_deployed_servers.py +3 -3
- {pyegeria/commands → commands}/cat/list_glossaries.py +57 -15
- {pyegeria/commands → commands}/cat/list_projects.py +5 -5
- {pyegeria/commands → commands}/cat/list_tech_type_elements.py +3 -3
- {pyegeria/commands → commands}/cat/list_tech_types.py +4 -4
- {pyegeria/commands → commands}/cat/list_terms.py +93 -45
- {pyegeria/commands → commands}/cat/list_todos.py +3 -3
- {pyegeria/commands → commands}/cat/list_user_ids.py +9 -8
- {pyegeria/commands → commands}/cli/__init__.py +1 -1
- {pyegeria/commands → commands}/cli/egeria.py +506 -250
- {pyegeria/commands → commands}/cli/egeria_cat.py +127 -50
- {pyegeria/commands → commands}/cli/egeria_login_tui.py +15 -17
- {pyegeria/commands → commands}/cli/egeria_my.py +22 -15
- {pyegeria/commands → commands}/cli/egeria_ops.py +54 -55
- {pyegeria/commands → commands}/cli/egeria_tech.py +364 -152
- {pyegeria/commands → commands}/cli/ops_config.py +11 -4
- commands/cli/txt_custom_v2.tcss +19 -0
- commands/my/__init__.py +22 -0
- {pyegeria/commands → commands}/my/list_my_profile.py +6 -8
- {pyegeria/commands → commands}/my/list_my_roles.py +4 -4
- {pyegeria/commands → commands}/my/monitor_my_todos.py +7 -7
- {pyegeria/commands → commands}/my/monitor_open_todos.py +7 -7
- {pyegeria/commands → commands}/my/todo_actions.py +3 -2
- commands/ops/__init__.py +23 -0
- {pyegeria/commands → commands}/ops/gov_server_actions.py +5 -4
- {pyegeria/commands → commands}/ops/list_archives.py +7 -6
- {pyegeria/commands → commands}/ops/list_catalog_targets.py +4 -4
- {pyegeria/commands → commands}/ops/load_archive.py +4 -2
- {pyegeria/commands → commands}/ops/monitor_asset_events.py +8 -7
- {pyegeria/commands → commands}/ops/monitor_engine_activity.py +5 -5
- {pyegeria/commands → commands}/ops/monitor_engine_activity_c.py +3 -3
- {pyegeria/commands → commands}/ops/monitor_gov_eng_status.py +3 -2
- {pyegeria/commands → commands}/ops/monitor_integ_daemon_status.py +23 -15
- {pyegeria/commands → commands}/ops/monitor_platform_status.py +5 -4
- {pyegeria/commands → commands}/ops/monitor_server_startup.py +7 -7
- {pyegeria/commands → commands}/ops/monitor_server_status.py +16 -11
- {pyegeria/commands → commands}/ops/orig_monitor_server_list.py +2 -2
- {pyegeria/commands → commands}/ops/orig_monitor_server_status.py +3 -3
- {pyegeria/commands → commands}/ops/refresh_integration_daemon.py +4 -4
- {pyegeria/commands → commands}/ops/restart_integration_daemon.py +3 -3
- {pyegeria/commands → commands}/ops/table_integ_daemon_status.py +3 -3
- commands/tech/__init__.py +22 -0
- commands/tech/generic_actions.py +74 -0
- {pyegeria/commands → commands}/tech/get_element_info.py +5 -7
- {pyegeria/commands → commands}/tech/get_guid_info.py +4 -5
- {pyegeria/commands → commands}/tech/get_tech_details.py +8 -9
- {pyegeria/commands → commands}/tech/get_tech_type_template.py +4 -4
- pyegeria/commands/tech/list_elements.py → commands/tech/list_all_om_type_elements.py +11 -10
- pyegeria/commands/tech/list_elements_x.py → commands/tech/list_all_om_type_elements_x.py +11 -12
- pyegeria/commands/tech/list_related_elements.py → commands/tech/list_all_related_elements.py +11 -9
- {pyegeria/commands → commands}/tech/list_anchored_elements.py +16 -16
- {pyegeria/commands → commands}/tech/list_asset_types.py +4 -4
- commands/tech/list_elements_by_classification_by_property_value.py +200 -0
- commands/tech/list_elements_by_property_value.py +180 -0
- commands/tech/list_elements_by_property_value_x.py +201 -0
- {pyegeria/commands → commands}/tech/list_elements_for_classification.py +11 -9
- {pyegeria/commands → commands}/tech/list_gov_action_processes.py +5 -6
- commands/tech/list_information_supply_chains.py +167 -0
- {pyegeria/commands → commands}/tech/list_registered_services.py +3 -3
- commands/tech/list_related_elements_with_prop_value.py +221 -0
- {pyegeria/commands → commands}/tech/list_related_specification.py +3 -3
- {pyegeria/commands → commands}/tech/list_relationship_types.py +4 -5
- {pyegeria/commands → commands}/tech/list_relationships.py +3 -3
- commands/tech/list_solution_blueprints.py +181 -0
- commands/tech/list_solution_components.py +185 -0
- commands/tech/list_solution_roles.py +184 -0
- {pyegeria/commands → commands}/tech/list_tech_templates.py +3 -3
- {pyegeria/commands → commands}/tech/list_valid_metadata_values.py +5 -6
- {pyegeria/commands → commands}/tech/table_tech_templates.py +16 -13
- {pyegeria/commands → commands}/tech/x_list_related_elements.py +6 -4
- md_processing/__init__.py +49 -0
- md_processing/data/commands.json +3252 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro.md +254 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_more_terms.md +696 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part1.md +254 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part2.md +298 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part3.md +608 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part4.md +94 -0
- md_processing/dr_egeria_inbox/archive/freddie_intro.md +284 -0
- md_processing/dr_egeria_inbox/archive/freddie_intro_orig.md +275 -0
- md_processing/dr_egeria_inbox/archive/test-term.md +110 -0
- md_processing/dr_egeria_inbox/cat_test.md +100 -0
- md_processing/dr_egeria_inbox/data_field.md +54 -0
- md_processing/dr_egeria_inbox/data_spec.md +77 -0
- md_processing/dr_egeria_inbox/data_spec_test.md +2406 -0
- md_processing/dr_egeria_inbox/data_test.md +86 -0
- md_processing/dr_egeria_inbox/dr_egeria_intro_categories.md +168 -0
- md_processing/dr_egeria_inbox/dr_egeria_intro_part1.md +280 -0
- md_processing/dr_egeria_inbox/dr_egeria_intro_part2.md +313 -0
- md_processing/dr_egeria_inbox/dr_egeria_intro_part3.md +1073 -0
- md_processing/dr_egeria_inbox/dr_egeria_isc1.md +44 -0
- md_processing/dr_egeria_inbox/glossary_creation_experiment.ipynb +341 -0
- md_processing/dr_egeria_inbox/glossary_test1.md +324 -0
- md_processing/dr_egeria_inbox/rel.md +8 -0
- md_processing/dr_egeria_inbox/sb.md +119 -0
- md_processing/dr_egeria_inbox/search_test.md +39 -0
- md_processing/dr_egeria_inbox/solution-components.md +154 -0
- md_processing/dr_egeria_inbox/solution_blueprints.md +118 -0
- md_processing/dr_egeria_inbox/synonym_test.md +42 -0
- md_processing/dr_egeria_inbox/t2.md +268 -0
- md_processing/dr_egeria_outbox/processed-2025-05-15 19:52-data_test.md +94 -0
- md_processing/dr_egeria_outbox/processed-2025-05-16 07:39-data_test.md +88 -0
- md_processing/dr_egeria_outbox/processed-2025-05-17 16:01-data_field.md +56 -0
- md_processing/dr_egeria_outbox/processed-2025-05-18 15:51-data_test.md +103 -0
- md_processing/dr_egeria_outbox/processed-2025-05-18 16:47-data_test.md +94 -0
- md_processing/dr_egeria_outbox/processed-2025-05-19 07:14-data_test.md +96 -0
- md_processing/dr_egeria_outbox/processed-2025-05-19 07:20-data_test.md +100 -0
- md_processing/dr_egeria_outbox/processed-2025-05-19 07:22-data_test.md +88 -0
- md_processing/dr_egeria_outbox/processed-2025-05-19 09:26-data_test.md +91 -0
- md_processing/dr_egeria_outbox/processed-2025-05-19 10:27-data_test.md +91 -0
- md_processing/dr_egeria_outbox/processed-2025-05-19 14:04-data_test.md +91 -0
- md_processing/md_commands/__init__.py +3 -0
- md_processing/md_commands/blueprint_commands.py +303 -0
- md_processing/md_commands/data_designer_commands.py +1182 -0
- md_processing/md_commands/glossary_commands.py +1144 -0
- md_processing/md_commands/project_commands.py +163 -0
- md_processing/md_processing_utils/__init__.py +4 -0
- md_processing/md_processing_utils/common_md_proc_utils.py +724 -0
- md_processing/md_processing_utils/common_md_utils.py +172 -0
- md_processing/md_processing_utils/extraction_utils.py +486 -0
- md_processing/md_processing_utils/md_processing_constants.py +128 -0
- md_processing/md_processing_utils/message_constants.py +19 -0
- pyegeria/.DS_Store +0 -0
- pyegeria/__init__.py +231 -146
- pyegeria/_client.py +36 -13
- pyegeria/_exceptions.py +55 -46
- pyegeria/_globals.py +11 -1
- pyegeria/_validators.py +5 -5
- pyegeria/asset_catalog_omvs.py +78 -21
- pyegeria/automated_curation_omvs.py +11 -6
- pyegeria/classification_manager_omvs.py +41 -37
- pyegeria/collection_manager_omvs.py +722 -705
- pyegeria/core_omag_server_config.py +1 -1
- pyegeria/create_tech_guid_lists.py +13 -13
- pyegeria/data_designer_omvs.py +5104 -0
- pyegeria/dr.egeria spec.md +9 -0
- pyegeria/egeria_cat_client.py +5 -8
- pyegeria/egeria_client.py +39 -24
- pyegeria/egeria_config_client.py +2 -1
- pyegeria/egeria_my_client.py +4 -4
- pyegeria/egeria_tech_client.py +40 -18
- pyegeria/feedback_manager_omvs.py +1 -1
- pyegeria/full_omag_server_config.py +5 -3
- pyegeria/glossary_browser_omvs.py +1915 -694
- pyegeria/glossary_manager_omvs.py +685 -1842
- pyegeria/m_test.py +118 -0
- pyegeria/md_processing_helpers.py +58 -0
- pyegeria/md_processing_utils.py +2147 -0
- pyegeria/md_processing_utils_orig.py +1103 -0
- pyegeria/mermaid_utilities.py +1194 -14
- pyegeria/metadata_explorer_omvs.py +5 -50
- pyegeria/my_profile_omvs.py +3 -2
- pyegeria/output_formatter.py +389 -0
- pyegeria/platform_services.py +5 -5
- pyegeria/project_manager_omvs.py +97 -18
- pyegeria/runtime_manager_omvs.py +8 -10
- pyegeria/server_operations.py +2 -2
- pyegeria/solution_architect_omvs.py +2156 -0
- pyegeria/template_manager_omvs.py +13 -13
- pyegeria/utils.py +3 -1
- pyegeria/valid_metadata_omvs.py +5 -4
- pyegeria/x_action_author_omvs.py +3 -6
- {pyegeria-5.2.1.1.dist-info → pyegeria-5.3.dist-info}/METADATA +9 -8
- pyegeria-5.3.dist-info/RECORD +196 -0
- {pyegeria-5.2.1.1.dist-info → pyegeria-5.3.dist-info}/WHEEL +1 -1
- pyegeria-5.3.dist-info/entry_points.txt +99 -0
- pyegeria/commands/README.md +0 -47
- pyegeria/commands/__init__.py +0 -22
- pyegeria/commands/cat/__init__.py +0 -1
- pyegeria/commands/doc/README.md +0 -145
- pyegeria/commands/doc/Visual Command Reference/README.md +0 -511
- 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 +0 -109
- 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 +0 -346
- 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/ops/__init__.py +0 -22
- pyegeria/commands/tech/__init__.py +0 -0
- pyegeria-5.2.1.1.dist-info/RECORD +0 -231
- pyegeria-5.2.1.1.dist-info/entry_points.txt +0 -81
- {pyegeria/commands → commands}/cat/README.md +0 -0
- {pyegeria/commands → commands}/my/README.md +0 -0
- {pyegeria/commands → commands}/ops/README.md +0 -0
- {pyegeria/commands → commands}/ops/x_engine_actions.py +0 -0
- {pyegeria/commands → commands}/tech/README.md +0 -0
- /pyegeria/commands/my/__init__.py → /md_processing/dr_egeria_inbox/t1.md +0 -0
- {pyegeria-5.2.1.1.dist-info → pyegeria-5.3.dist-info}/LICENSE +0 -0
@@ -0,0 +1,2156 @@
|
|
1
|
+
"""PDX-License-Identifier: Apache-2.0
|
2
|
+
Copyright Contributors to the ODPi Egeria project.
|
3
|
+
|
4
|
+
This module provides access to the metadata-explorer OMVS module.
|
5
|
+
|
6
|
+
https://egeria-project.org/concepts/information-supply-chain
|
7
|
+
|
8
|
+
"""
|
9
|
+
|
10
|
+
import asyncio
|
11
|
+
import os
|
12
|
+
import sys
|
13
|
+
from datetime import datetime
|
14
|
+
|
15
|
+
from httpx import Response
|
16
|
+
|
17
|
+
from pyegeria import validate_guid
|
18
|
+
from pyegeria._client import Client, max_paging_size
|
19
|
+
from pyegeria._globals import NO_ELEMENTS_FOUND
|
20
|
+
from pyegeria.utils import body_slimmer
|
21
|
+
|
22
|
+
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
|
23
|
+
|
24
|
+
DEFAULT_BODY_SKELETON = {
|
25
|
+
"effective_time": None, "limitResultsByStatus": ["ACTIVE"], "asOfTime": None, "sequencingOrder": None,
|
26
|
+
"sequencingProperty": None, "filter": None,
|
27
|
+
}
|
28
|
+
|
29
|
+
MD_SEPERATOR = "\n---\n\n"
|
30
|
+
|
31
|
+
def query_seperator(current_string):
|
32
|
+
if current_string == "":
|
33
|
+
return "?"
|
34
|
+
else:
|
35
|
+
return "&"
|
36
|
+
|
37
|
+
|
38
|
+
#("params are in the form of [(paramName, value), (param2Name, value)] if the value is not None, it will be added to "
|
39
|
+
# "the query string")
|
40
|
+
|
41
|
+
|
42
|
+
def query_string(params):
|
43
|
+
result = ""
|
44
|
+
for i in range(len(params)):
|
45
|
+
if params[i][1] is not None:
|
46
|
+
result = f"{result}{query_seperator(result)}{params[i][0]}={params[i][1]}"
|
47
|
+
return result
|
48
|
+
|
49
|
+
|
50
|
+
def base_path(client, view_server: str):
|
51
|
+
return f"{client.platform_url}/servers/{view_server}/api/open-metadata/metadata-explorer"
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
class SolutionArchitect(Client):
|
58
|
+
"""SolutionArchitect is a class that extends the Client class. The Solution Architect OMVS provides APIs for
|
59
|
+
searching for architectural elements such as information supply chains, solution blueprints, solution components
|
60
|
+
and component implementations.
|
61
|
+
|
62
|
+
Attributes:
|
63
|
+
|
64
|
+
view_server: str
|
65
|
+
The name of the View Server to connect to.
|
66
|
+
platform_url : str
|
67
|
+
URL of the server platform to connect to
|
68
|
+
user_id : str
|
69
|
+
The identity of the user calling the method - this sets a
|
70
|
+
default optionally used by the methods when the user
|
71
|
+
doesn't pass the user_id on a method call.
|
72
|
+
user_pwd: str
|
73
|
+
The password associated with the user_id. Defaults to None
|
74
|
+
|
75
|
+
|
76
|
+
"""
|
77
|
+
|
78
|
+
def __init__(self, view_server: str, platform_url: str, user_id: str = None, user_pwd: str = None,
|
79
|
+
token: str = None, ):
|
80
|
+
self.view_server = view_server
|
81
|
+
self.platform_url = platform_url
|
82
|
+
self.user_id = user_id
|
83
|
+
self.user_pwd = user_pwd
|
84
|
+
self.solution_architect_command_root: str = (f"{self.platform_url}/servers/{self.view_server}"
|
85
|
+
f"/api/open-metadata/solution-architect")
|
86
|
+
Client.__init__(self, view_server, platform_url, user_id=user_id, user_pwd=user_pwd, token=token, )
|
87
|
+
|
88
|
+
#
|
89
|
+
# Markdown output support
|
90
|
+
#
|
91
|
+
def generate_info_supply_chain_md(self, elements: list | dict, search_string: str,
|
92
|
+
output_format: str = 'MD', include_mermaid: bool = True
|
93
|
+
) -> str:
|
94
|
+
"""Generate markdown for information supply chains."""
|
95
|
+
elements_md, elements_action = self.make_preamble(obj_type="Information Supply Chain",
|
96
|
+
search_string=search_string,
|
97
|
+
output_format=output_format)
|
98
|
+
if isinstance(elements, dict):
|
99
|
+
elements = [elements]
|
100
|
+
|
101
|
+
for element in elements:
|
102
|
+
guid = element['elementHeader'].get("guid", None)
|
103
|
+
properties = element['properties']
|
104
|
+
qualified_name = properties.get("qualifiedName", None)
|
105
|
+
display_name = properties.get("displayName", None)
|
106
|
+
description = properties.get("description", None)
|
107
|
+
scope = properties.get("scope", None)
|
108
|
+
purposes = properties.get("purposes", [])
|
109
|
+
purpose_md = ""
|
110
|
+
if len(purposes) > 0:
|
111
|
+
for purpose in purposes:
|
112
|
+
purpose_md += f"* {purpose}\n"
|
113
|
+
mermaid = element.get('mermaidGraph', None)
|
114
|
+
|
115
|
+
if output_format in ['FORM', 'MD']:
|
116
|
+
elements_md += f"# {elements_action}\n\n"
|
117
|
+
elements_md += f"## Information Supply Chain Name \n\n{display_name}\n\n"
|
118
|
+
|
119
|
+
elif output_format == 'REPORT':
|
120
|
+
elements_md += f"# Information Supply Chain Name: {display_name}\n\n"
|
121
|
+
else:
|
122
|
+
elements_md += f"## Information Supply Chain Name \n\n{display_name}\n\n"
|
123
|
+
|
124
|
+
elements_md += self.make_md_attribute("description", description, output_format)
|
125
|
+
elements_md += self.make_md_attribute("scope", scope, output_format)
|
126
|
+
elements_md += self.make_md_attribute("purposes", purpose_md, output_format)
|
127
|
+
|
128
|
+
elements_md += self.make_md_attribute("qualified name", qualified_name, output_format)
|
129
|
+
elements_md += self.make_md_attribute("GUID", guid, output_format)
|
130
|
+
if include_mermaid and output_format == 'REPORT':
|
131
|
+
elements_md += f"\n```mermaid\n{mermaid}\n```\n"
|
132
|
+
elements_md += MD_SEPERATOR
|
133
|
+
return elements_md
|
134
|
+
|
135
|
+
def generate_solution_blueprint_md(self, elements: list | dict, search_string: str,
|
136
|
+
output_format: str = 'MD', include_mermaid: bool = True) -> str:
|
137
|
+
elements_md, elements_action = self.make_preamble(obj_type="Solution Blueprint", search_string=search_string,
|
138
|
+
output_format=output_format)
|
139
|
+
if isinstance(elements, dict):
|
140
|
+
elements = [elements]
|
141
|
+
|
142
|
+
for element in elements:
|
143
|
+
guid = element['elementHeader'].get("guid", None)
|
144
|
+
element_properties = element['properties']
|
145
|
+
display_name = element_properties.get("displayName", None)
|
146
|
+
description = element_properties.get("description", None)
|
147
|
+
version = element_properties.get("version", None)
|
148
|
+
qualified_name = element_properties.get("qualifiedName", None)
|
149
|
+
|
150
|
+
solution_components = element.get('solutionComponents', None)
|
151
|
+
solution_components_md = ""
|
152
|
+
if solution_components:
|
153
|
+
for solution_component in solution_components:
|
154
|
+
sol_comp_prop = solution_component['solutionComponent']['properties']
|
155
|
+
sol_comp_name = sol_comp_prop.get("displayName", None)
|
156
|
+
sol_comp_desc = sol_comp_prop.get("description", None)
|
157
|
+
solution_components_md += f"* {sol_comp_name}:\t {sol_comp_desc}\n"
|
158
|
+
bp_graph = element.get('mermaidGraph', None)
|
159
|
+
|
160
|
+
if output_format in ['FORM', 'MD']:
|
161
|
+
elements_md += f"# {elements_action}\n\n"
|
162
|
+
elements_md += f"## Blueprint Name \n\n{display_name}\n\n"
|
163
|
+
elif output_format == 'REPORT':
|
164
|
+
elements_md += f"# Blueprint Name: {display_name}\n\n"
|
165
|
+
else:
|
166
|
+
elements_md += f"## Blueprint Name \n\n{display_name}\n\n"
|
167
|
+
|
168
|
+
elements_md += self.make_md_attribute("description", description, output_format)
|
169
|
+
elements_md += self.make_md_attribute("version", version, output_format)
|
170
|
+
if output_format == 'REPORT':
|
171
|
+
elements_md += self.make_md_attribute("solution components", solution_components_md, output_format)
|
172
|
+
elements_md += self.make_md_attribute("qualified name", qualified_name, output_format)
|
173
|
+
elements_md += self.make_md_attribute("GUID", guid, output_format)
|
174
|
+
if include_mermaid and output_format == 'REPORT':
|
175
|
+
elements_md += f"\n```mermaid\n{bp_graph}\n```\n"
|
176
|
+
elements_md += MD_SEPERATOR
|
177
|
+
|
178
|
+
return elements_md
|
179
|
+
|
180
|
+
def generate_solution_roles_md(self, elements: list | dict, search_string: str,
|
181
|
+
output_format: str = 'MD', include_mermaid: bool = True) -> str:
|
182
|
+
elements_md, elements_action = self.make_preamble(obj_type="Categories", search_string=search_string,
|
183
|
+
output_format=output_format)
|
184
|
+
if isinstance(elements, dict):
|
185
|
+
elements = [elements]
|
186
|
+
|
187
|
+
for element in elements:
|
188
|
+
guid = element['elementHeader'].get("guid", None)
|
189
|
+
element_properties = element['properties']
|
190
|
+
display_name = element_properties.get("title", None)
|
191
|
+
role_id = element_properties.get("roleId", None)
|
192
|
+
scope = element_properties.get("scope", None)
|
193
|
+
description = element_properties.get("description", None)
|
194
|
+
domain_identifier = element_properties.get("domainIdentifier", None)
|
195
|
+
qualified_name = element_properties.get("qualifiedName", None)
|
196
|
+
|
197
|
+
solution_components = element.get('solutionComponents', None)
|
198
|
+
solution_components_md = ""
|
199
|
+
if solution_components:
|
200
|
+
for solution_component in solution_components:
|
201
|
+
sol_comp_prop = solution_component.get('relationshipProperties',None)
|
202
|
+
if sol_comp_prop:
|
203
|
+
sol_comp_name = sol_comp_prop.get("role", None)
|
204
|
+
sol_comp_desc = sol_comp_prop.get("description", None)
|
205
|
+
solution_components_md += f"* {sol_comp_name}:\t {sol_comp_desc}\n"
|
206
|
+
solution_roles_graph = element.get('mermaidGraph', None)
|
207
|
+
|
208
|
+
if output_format in ['FORM', 'MD']:
|
209
|
+
elements_md += f"# {elements_action}\n\n"
|
210
|
+
elements_md += f"## Blueprint Name \n\n{display_name}\n\n"
|
211
|
+
elif output_format == 'REPORT':
|
212
|
+
elements_md += f"# Blueprint Name: {display_name}\n\n"
|
213
|
+
else:
|
214
|
+
elements_md += f"## Blueprint Name \n\n{display_name}\n\n"
|
215
|
+
elements_md += self.make_md_attribute("role id", role_id, output_format)
|
216
|
+
elements_md += self.make_md_attribute("scope", scope, output_format)
|
217
|
+
elements_md += self.make_md_attribute("description", description, output_format)
|
218
|
+
elements_md += self.make_md_attribute("domain identifier", domain_identifier, output_format)
|
219
|
+
if output_format == 'REPORT':
|
220
|
+
elements_md += self.make_md_attribute("solution components", solution_components_md, output_format)
|
221
|
+
elements_md += self.make_md_attribute("qualified name", qualified_name, output_format)
|
222
|
+
elements_md += self.make_md_attribute("GUID", guid, output_format)
|
223
|
+
if include_mermaid and output_format == 'REPORT':
|
224
|
+
elements_md += f"\n```mermaid\n{solution_roles_graph}\n```\n"
|
225
|
+
elements_md += MD_SEPERATOR
|
226
|
+
|
227
|
+
return elements_md
|
228
|
+
|
229
|
+
def generate_solution_components_md(self, elements: list | dict, search_string: str,
|
230
|
+
output_format: str = 'MD', include_mermaid: bool = True) -> str:
|
231
|
+
"""
|
232
|
+
Generates a Markdown (MD) or formatted document representation for solution components.
|
233
|
+
|
234
|
+
Given a set of elements representing solution components (either as a list or a dictionary),
|
235
|
+
this function generates a detailed output string compliant with a specified format. The
|
236
|
+
resulting output includes various attributes of the solution components, such as their
|
237
|
+
names, descriptions, types, and related information like blueprints, parents, and extended
|
238
|
+
properties. Optionally, it can include Mermaid graphs for further visualization when needed.
|
239
|
+
|
240
|
+
Args:
|
241
|
+
elements (list | dict): A collection of elements, each representing a solution component.
|
242
|
+
Elements can be provided as a list of dictionaries or a single dictionary. Each
|
243
|
+
dictionary should contain the required keys, including "elementHeader" and "glossaryCategoryProperties".
|
244
|
+
search_string (str): A string to be used for preamble generation or context identification.
|
245
|
+
output_format (str, optional): The format of the resulting output string. Defaults to 'MD'.
|
246
|
+
Valid values include 'MD', 'FORM', and 'REPORT'.
|
247
|
+
include_mermaid (bool, optional): Determines whether Mermaid graphs should be included
|
248
|
+
in the output. Defaults to True.
|
249
|
+
|
250
|
+
Returns:
|
251
|
+
str: A string containing the formatted details of solution components in the specified format.
|
252
|
+
"""
|
253
|
+
elements_md, elements_action = self.make_preamble(obj_type="Categories", search_string=search_string,
|
254
|
+
output_format=output_format)
|
255
|
+
|
256
|
+
if isinstance(elements, dict):
|
257
|
+
elements = [elements]
|
258
|
+
|
259
|
+
for element in elements:
|
260
|
+
guid = element['elementHeader'].get("guid", None)
|
261
|
+
properties = element['glossaryCategoryProperties']
|
262
|
+
display_name = properties.get("displayName", None)
|
263
|
+
description = properties.get("description", None)
|
264
|
+
version = properties.get("version", None)
|
265
|
+
component_type = properties.get("solutionComponentType", None)
|
266
|
+
qualified_name = properties.get("qualifiedName", None)
|
267
|
+
|
268
|
+
extended_props = properties.get("extendedProperties", None)
|
269
|
+
extended_props_md = ""
|
270
|
+
if extended_props:
|
271
|
+
for key in extended_props.keys():
|
272
|
+
extended_props_md += f"* {key}:\t {extended_props[key]}\n"
|
273
|
+
|
274
|
+
blueprints_md = ""
|
275
|
+
blueprints = element.get('blueprints', None)
|
276
|
+
if blueprints:
|
277
|
+
for blueprint in blueprints:
|
278
|
+
bp_q_name = blueprint["relatedElement"]['properties']['qualifiedName']
|
279
|
+
blueprints_md += f"* {bp_q_name}\n"
|
280
|
+
|
281
|
+
parent_comp_md = ""
|
282
|
+
context = element["context"]
|
283
|
+
if context:
|
284
|
+
for parent in context:
|
285
|
+
parent_comp_md += f"* {parent['name']}\n"
|
286
|
+
# Todo - This is incomplete - discuss with Mandy
|
287
|
+
comp_graph = element.get('mermaidGraph', None)
|
288
|
+
|
289
|
+
if output_format in ['FORM', 'MD']:
|
290
|
+
elements_md += f"# {elements_action}\n\n"
|
291
|
+
elements_md += f"## Solution Component Name \n\n{display_name}\n\n"
|
292
|
+
|
293
|
+
elif output_format == 'REPORT':
|
294
|
+
elements_md += f"# Solution Component Name: {display_name}\n\n"
|
295
|
+
else:
|
296
|
+
elements_md += f"## Solution Component Name \n\n{display_name}\n\n"
|
297
|
+
|
298
|
+
elements_md += self.make_md_attribute("description", description, output_format)
|
299
|
+
elements_md += self.make_md_attribute("component type", component_type, output_format)
|
300
|
+
elements_md += self.make_md_attribute("version", version, output_format)
|
301
|
+
elements_md += self.make_md_attribute("qualified name/GUID", f"{qualified_name}\n---\n{guid}", output_format)
|
302
|
+
elements_md += self.make_md_attribute("blueprints", blueprints_md, output_format)
|
303
|
+
elements_md += self.make_md_attribute("parent components", parent_comp_md, output_format)
|
304
|
+
elements_md += self.make_md_attribute("extended properties", extended_props_md, output_format)
|
305
|
+
if include_mermaid and output_format == 'REPORT':
|
306
|
+
elements_md += f"\n```mermaid\n{comp_graph}\n```\n"
|
307
|
+
elements_md += MD_SEPERATOR
|
308
|
+
|
309
|
+
return elements_md
|
310
|
+
|
311
|
+
async def _async_create_info_supply_chain(self, body: dict) -> str:
|
312
|
+
"""Create an information supply. Async version.
|
313
|
+
|
314
|
+
Parameters
|
315
|
+
----------
|
316
|
+
body: dict
|
317
|
+
A dictionary containing the definition of the supply chain to create.
|
318
|
+
|
319
|
+
Returns
|
320
|
+
-------
|
321
|
+
|
322
|
+
str - guid of the supply chain created.
|
323
|
+
|
324
|
+
Raises
|
325
|
+
------
|
326
|
+
Raises
|
327
|
+
------
|
328
|
+
InvalidParameterException
|
329
|
+
one of the parameters is null or invalid or
|
330
|
+
PropertyServerException
|
331
|
+
There is a problem adding the element properties to the metadata repository or
|
332
|
+
UserNotAuthorizedException
|
333
|
+
the requesting user is not authorized to issue this request.
|
334
|
+
|
335
|
+
Notes
|
336
|
+
----
|
337
|
+
|
338
|
+
Body structure:
|
339
|
+
{
|
340
|
+
"class" : "NewInformationSupplyChainRequestBody",
|
341
|
+
"externalSourceGUID": "add guid here",
|
342
|
+
"externalSourceName": "add qualified name here",
|
343
|
+
"effectiveTime" : {{isotime}},
|
344
|
+
"forLineage" : false,
|
345
|
+
"forDuplicateProcessing" : false,
|
346
|
+
"anchorGUID" : "add guid here",
|
347
|
+
"isOwnAnchor": false,
|
348
|
+
"parentGUID": "add guid here",
|
349
|
+
"parentRelationshipTypeName": "add type name here",
|
350
|
+
"parentRelationshipProperties": {
|
351
|
+
"class": "ElementProperties",
|
352
|
+
"propertyValueMap" : {
|
353
|
+
"description" : {
|
354
|
+
"class": "PrimitiveTypePropertyValue",
|
355
|
+
"typeName": "string",
|
356
|
+
"primitiveValue" : "New description"
|
357
|
+
}
|
358
|
+
}
|
359
|
+
},
|
360
|
+
"parentAtEnd1": false,
|
361
|
+
"properties": {
|
362
|
+
"qualifiedName": "add unique name here",
|
363
|
+
"displayName": "add short name here",
|
364
|
+
"description": "add description here",
|
365
|
+
"scope": "add scope of this information supply chain's applicability.",
|
366
|
+
"purposes": ["purpose1", "purpose2"],
|
367
|
+
"additionalProperties": {
|
368
|
+
"property1" : "propertyValue1",
|
369
|
+
"property2" : "propertyValue2"
|
370
|
+
},
|
371
|
+
"effectiveFrom": {{isotime}},
|
372
|
+
"effectiveTo": {{isotime}}
|
373
|
+
}
|
374
|
+
}
|
375
|
+
|
376
|
+
"""
|
377
|
+
url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/solution-architect/"
|
378
|
+
f"information-supply-chains")
|
379
|
+
|
380
|
+
response = await self._async_make_request("POST", url, body_slimmer(body))
|
381
|
+
|
382
|
+
return response.json().get("guid", "Supply Chain not created")
|
383
|
+
|
384
|
+
def create_info_supply_chain(self, body: dict) -> str:
|
385
|
+
"""Create an information supply.
|
386
|
+
|
387
|
+
Parameters
|
388
|
+
----------
|
389
|
+
body: dict
|
390
|
+
A dictionary containing the definition of the supply chain to create.
|
391
|
+
|
392
|
+
Returns
|
393
|
+
-------
|
394
|
+
|
395
|
+
str - guid of the supply chain created.
|
396
|
+
|
397
|
+
Raises
|
398
|
+
------
|
399
|
+
Raises
|
400
|
+
------
|
401
|
+
InvalidParameterException
|
402
|
+
one of the parameters is null or invalid or
|
403
|
+
PropertyServerException
|
404
|
+
There is a problem adding the element properties to the metadata repository or
|
405
|
+
UserNotAuthorizedException
|
406
|
+
the requesting user is not authorized to issue this request.
|
407
|
+
|
408
|
+
Notes
|
409
|
+
----
|
410
|
+
|
411
|
+
Body structure:
|
412
|
+
{
|
413
|
+
"class" : "NewInformationSupplyChainRequestBody",
|
414
|
+
"externalSourceGUID": "add guid here",
|
415
|
+
"externalSourceName": "add qualified name here",
|
416
|
+
"effectiveTime" : {{isotime}},
|
417
|
+
"forLineage" : false,
|
418
|
+
"forDuplicateProcessing" : false,
|
419
|
+
"anchorGUID" : "add guid here",
|
420
|
+
"isOwnAnchor": false,
|
421
|
+
"parentGUID": "add guid here",
|
422
|
+
"parentRelationshipTypeName": "add type name here",
|
423
|
+
"parentRelationshipProperties": {
|
424
|
+
"class": "ElementProperties",
|
425
|
+
"propertyValueMap" : {
|
426
|
+
"description" : {
|
427
|
+
"class": "PrimitiveTypePropertyValue",
|
428
|
+
"typeName": "string",
|
429
|
+
"primitiveValue" : "New description"
|
430
|
+
}
|
431
|
+
}
|
432
|
+
},
|
433
|
+
"parentAtEnd1": false,
|
434
|
+
"properties": {
|
435
|
+
"qualifiedName": "add unique name here",
|
436
|
+
"displayName": "add short name here",
|
437
|
+
"description": "add description here",
|
438
|
+
"scope": "add scope of this information supply chain's applicability.",
|
439
|
+
"purposes": ["purpose1", "purpose2"],
|
440
|
+
"additionalProperties": {
|
441
|
+
"property1" : "propertyValue1",
|
442
|
+
"property2" : "propertyValue2"
|
443
|
+
},
|
444
|
+
"effectiveFrom": {{isotime}},
|
445
|
+
"effectiveTo": {{isotime}}
|
446
|
+
}
|
447
|
+
}
|
448
|
+
|
449
|
+
"""
|
450
|
+
|
451
|
+
loop = asyncio.get_event_loop()
|
452
|
+
response = loop.run_until_complete(self._async_create_info_supply_chain(body))
|
453
|
+
return response
|
454
|
+
|
455
|
+
async def _async_create_info_supply_chain_from_template(self, body: dict) -> str:
|
456
|
+
""" Create a new metadata element to represent an information supply chain using an existing metadata element
|
457
|
+
as a template. The template defines additional classifications and relationships that should be added to
|
458
|
+
the new element. Async Version.
|
459
|
+
|
460
|
+
|
461
|
+
Parameters
|
462
|
+
----------
|
463
|
+
body: dict
|
464
|
+
A dictionary containing the definition of the supply chain to create.
|
465
|
+
|
466
|
+
Returns
|
467
|
+
-------
|
468
|
+
|
469
|
+
str - guid of the supply chain created.
|
470
|
+
|
471
|
+
Raises
|
472
|
+
------
|
473
|
+
Raises
|
474
|
+
------
|
475
|
+
InvalidParameterException
|
476
|
+
one of the parameters is null or invalid or
|
477
|
+
PropertyServerException
|
478
|
+
There is a problem adding the element properties to the metadata repository or
|
479
|
+
UserNotAuthorizedException
|
480
|
+
the requesting user is not authorized to issue this request.
|
481
|
+
|
482
|
+
Notes
|
483
|
+
----
|
484
|
+
|
485
|
+
Body structure:
|
486
|
+
{
|
487
|
+
"class" : "TemplateRequestBody",
|
488
|
+
"externalSourceGUID": "add guid here",
|
489
|
+
"externalSourceName": "add qualified name here",
|
490
|
+
"effectiveTime" : {{isotime}},
|
491
|
+
"forLineage" : false,
|
492
|
+
"forDuplicateProcessing" : false,
|
493
|
+
"anchorGUID" : "add guid here",
|
494
|
+
"isOwnAnchor": false,
|
495
|
+
"parentGUID": "add guid here",
|
496
|
+
"parentRelationshipTypeName": "add type name here",
|
497
|
+
"parentRelationshipProperties": {
|
498
|
+
"class": "ElementProperties",
|
499
|
+
"propertyValueMap" : {
|
500
|
+
"description" : {
|
501
|
+
"class": "PrimitiveTypePropertyValue",
|
502
|
+
"typeName": "string",
|
503
|
+
"primitiveValue" : "New description"
|
504
|
+
}
|
505
|
+
}
|
506
|
+
},
|
507
|
+
"parentAtEnd1": false,
|
508
|
+
"templateGUID": "add guid here",
|
509
|
+
"replacementProperties": {
|
510
|
+
"class": "ElementProperties",
|
511
|
+
"propertyValueMap" : {
|
512
|
+
"description" : {
|
513
|
+
"class": "PrimitiveTypePropertyValue",
|
514
|
+
"typeName": "string",
|
515
|
+
"primitiveValue" : "New description"
|
516
|
+
}
|
517
|
+
}
|
518
|
+
},
|
519
|
+
"placeholderPropertyValues": {
|
520
|
+
"placeholder1" : "propertyValue1",
|
521
|
+
"placeholder2" : "propertyValue2"
|
522
|
+
}
|
523
|
+
}
|
524
|
+
|
525
|
+
"""
|
526
|
+
url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/solution-architect/"
|
527
|
+
f"information-supply-chains/from-template")
|
528
|
+
|
529
|
+
response = await self._async_make_request("POST", url, body_slimmer(body))
|
530
|
+
|
531
|
+
return response.json().get("guid", "Supply Chain not created")
|
532
|
+
|
533
|
+
def create_info_supply_chain_from_template(self, body: dict) -> str:
|
534
|
+
""" Create a new metadata element to represent an information supply chain using an existing metadata element
|
535
|
+
as a template. The template defines additional classifications and relationships that should be added to
|
536
|
+
the new element.
|
537
|
+
|
538
|
+
Parameters
|
539
|
+
----------
|
540
|
+
body: dict
|
541
|
+
A dictionary containing the definition of the supply chain to create.
|
542
|
+
|
543
|
+
Returns
|
544
|
+
-------
|
545
|
+
|
546
|
+
str - guid of the supply chain created.
|
547
|
+
|
548
|
+
Raises
|
549
|
+
------
|
550
|
+
Raises
|
551
|
+
------
|
552
|
+
InvalidParameterException
|
553
|
+
one of the parameters is null or invalid or
|
554
|
+
PropertyServerException
|
555
|
+
There is a problem adding the element properties to the metadata repository or
|
556
|
+
UserNotAuthorizedException
|
557
|
+
the requesting user is not authorized to issue this request.
|
558
|
+
|
559
|
+
Notes
|
560
|
+
----
|
561
|
+
|
562
|
+
Body structure:
|
563
|
+
{
|
564
|
+
"class" : "TemplateRequestBody",
|
565
|
+
"externalSourceGUID": "add guid here",
|
566
|
+
"externalSourceName": "add qualified name here",
|
567
|
+
"effectiveTime" : {{isotime}},
|
568
|
+
"forLineage" : false,
|
569
|
+
"forDuplicateProcessing" : false,
|
570
|
+
"anchorGUID" : "add guid here",
|
571
|
+
"isOwnAnchor": false,
|
572
|
+
"parentGUID": "add guid here",
|
573
|
+
"parentRelationshipTypeName": "add type name here",
|
574
|
+
"parentRelationshipProperties": {
|
575
|
+
"class": "ElementProperties",
|
576
|
+
"propertyValueMap" : {
|
577
|
+
"description" : {
|
578
|
+
"class": "PrimitiveTypePropertyValue",
|
579
|
+
"typeName": "string",
|
580
|
+
"primitiveValue" : "New description"
|
581
|
+
}
|
582
|
+
}
|
583
|
+
},
|
584
|
+
"parentAtEnd1": false,
|
585
|
+
"templateGUID": "add guid here",
|
586
|
+
"replacementProperties": {
|
587
|
+
"class": "ElementProperties",
|
588
|
+
"propertyValueMap" : {
|
589
|
+
"description" : {
|
590
|
+
"class": "PrimitiveTypePropertyValue",
|
591
|
+
"typeName": "string",
|
592
|
+
"primitiveValue" : "New description"
|
593
|
+
}
|
594
|
+
}
|
595
|
+
},
|
596
|
+
"placeholderPropertyValues": {
|
597
|
+
"placeholder1" : "propertyValue1",
|
598
|
+
"placeholder2" : "propertyValue2"
|
599
|
+
}
|
600
|
+
}
|
601
|
+
|
602
|
+
"""
|
603
|
+
|
604
|
+
loop = asyncio.get_event_loop()
|
605
|
+
response = loop.run_until_complete(self._async_create_info_supply_chain_from_template(body))
|
606
|
+
return response
|
607
|
+
|
608
|
+
async def _async_update_info_supply_chain(self, guid: str, body: dict,
|
609
|
+
replace_all_properties: bool = False) -> None:
|
610
|
+
""" Update the properties of an information supply chain. Async Version.
|
611
|
+
|
612
|
+
Parameters
|
613
|
+
----------
|
614
|
+
guid: str
|
615
|
+
guid of the information supply chain to update.
|
616
|
+
body: dict
|
617
|
+
A dictionary containing the updates to the supply chain.
|
618
|
+
replace_all_properties: bool, optional
|
619
|
+
Whether to replace all properties with those provided in the body or to merge with existing properties.
|
620
|
+
|
621
|
+
Returns
|
622
|
+
-------
|
623
|
+
|
624
|
+
None
|
625
|
+
|
626
|
+
Raises
|
627
|
+
------
|
628
|
+
Raises
|
629
|
+
------
|
630
|
+
InvalidParameterException
|
631
|
+
one of the parameters is null or invalid or
|
632
|
+
PropertyServerException
|
633
|
+
There is a problem adding the element properties to the metadata repository or
|
634
|
+
UserNotAuthorizedException
|
635
|
+
the requesting user is not authorized to issue this request.
|
636
|
+
|
637
|
+
Notes
|
638
|
+
----
|
639
|
+
|
640
|
+
Body structure:
|
641
|
+
{
|
642
|
+
"class" : "UpdateInformationSupplyChainRequestBody",
|
643
|
+
"externalSourceGUID": "add guid here",
|
644
|
+
"externalSourceName": "add qualified name here",
|
645
|
+
"effectiveTime" : {{isotime}},
|
646
|
+
"forLineage" : false,
|
647
|
+
"forDuplicateProcessing" : false,
|
648
|
+
"properties": {
|
649
|
+
"qualifiedName": "add unique name here",
|
650
|
+
"displayName": "add short name here",
|
651
|
+
"description": "add description here",
|
652
|
+
"scope": "add scope of this information supply chain's applicability.",
|
653
|
+
"purposes": ["purpose1", "purpose2"],
|
654
|
+
"additionalProperties": {
|
655
|
+
"property1" : "propertyValue1",
|
656
|
+
"property2" : "propertyValue2"
|
657
|
+
},
|
658
|
+
"effectiveFrom": {{isotime}},
|
659
|
+
"effectiveTo": {{isotime}}
|
660
|
+
}
|
661
|
+
}
|
662
|
+
"""
|
663
|
+
validate_guid(guid)
|
664
|
+
replace_all_properties_s = str(replace_all_properties).lower()
|
665
|
+
url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/solution-architect/"
|
666
|
+
f"information-supply-chains/{guid}/update?replaceAllProperties={replace_all_properties_s}")
|
667
|
+
|
668
|
+
await self._async_make_request("POST", url, body_slimmer(body))
|
669
|
+
|
670
|
+
def update_info_supply_chain(self, guid: str, body: dict, replace_all_properties: bool = False) -> None:
|
671
|
+
""" Update the properties of an information supply chain. Async Version.
|
672
|
+
|
673
|
+
Parameters
|
674
|
+
----------
|
675
|
+
guid: str
|
676
|
+
guid of the information supply chain to update.
|
677
|
+
body: dict
|
678
|
+
A dictionary containing the updates to the supply chain.
|
679
|
+
replace_all_properties: bool, optional
|
680
|
+
Whether to replace all properties with those provided in the body or to merge with existing properties.
|
681
|
+
|
682
|
+
Returns
|
683
|
+
-------
|
684
|
+
|
685
|
+
None
|
686
|
+
|
687
|
+
Raises
|
688
|
+
------
|
689
|
+
Raises
|
690
|
+
------
|
691
|
+
InvalidParameterException
|
692
|
+
one of the parameters is null or invalid or
|
693
|
+
PropertyServerException
|
694
|
+
There is a problem adding the element properties to the metadata repository or
|
695
|
+
UserNotAuthorizedException
|
696
|
+
the requesting user is not authorized to issue this request.
|
697
|
+
|
698
|
+
Notes
|
699
|
+
----
|
700
|
+
|
701
|
+
Body structure:
|
702
|
+
{
|
703
|
+
"class" : "UpdateInformationSupplyChainRequestBody",
|
704
|
+
"externalSourceGUID": "add guid here",
|
705
|
+
"externalSourceName": "add qualified name here",
|
706
|
+
"effectiveTime" : {{isotime}},
|
707
|
+
"forLineage" : false,
|
708
|
+
"forDuplicateProcessing" : false,
|
709
|
+
"properties": {
|
710
|
+
"qualifiedName": "add unique name here",
|
711
|
+
"displayName": "add short name here",
|
712
|
+
"description": "add description here",
|
713
|
+
"scope": "add scope of this information supply chain's applicability.",
|
714
|
+
"purposes": ["purpose1", "purpose2"],
|
715
|
+
"additionalProperties": {
|
716
|
+
"property1" : "propertyValue1",
|
717
|
+
"property2" : "propertyValue2"
|
718
|
+
},
|
719
|
+
"effectiveFrom": {{isotime}},
|
720
|
+
"effectiveTo": {{isotime}}
|
721
|
+
}
|
722
|
+
}
|
723
|
+
"""
|
724
|
+
loop = asyncio.get_event_loop()
|
725
|
+
loop.run_until_complete(self._async_update_info_supply_chain(guid, body, replace_all_properties))
|
726
|
+
|
727
|
+
async def _async_delete_info_supply_chain(self, guid: str, body: dict = None) -> None:
|
728
|
+
"""Delete an information supply chain. Async Version.
|
729
|
+
|
730
|
+
Parameters
|
731
|
+
----------
|
732
|
+
guid: str
|
733
|
+
guid of the information supply chain to delete.
|
734
|
+
body: dict, optional
|
735
|
+
A dictionary containing parameters of the deletion.
|
736
|
+
|
737
|
+
Returns
|
738
|
+
-------
|
739
|
+
None
|
740
|
+
|
741
|
+
Raises
|
742
|
+
------
|
743
|
+
Raises
|
744
|
+
------
|
745
|
+
InvalidParameterException
|
746
|
+
one of the parameters is null or invalid or
|
747
|
+
PropertyServerException
|
748
|
+
There is a problem adding the element properties to the metadata repository or
|
749
|
+
UserNotAuthorizedException
|
750
|
+
the requesting user is not authorized to issue this request.
|
751
|
+
|
752
|
+
Notes
|
753
|
+
----
|
754
|
+
|
755
|
+
Body structure:
|
756
|
+
{
|
757
|
+
"class" : "MetadataSourceRequestBody",
|
758
|
+
"externalSourceGUID": "add guid here",
|
759
|
+
"externalSourceName": "add qualified name here",
|
760
|
+
"effectiveTime" : {{isotime}},
|
761
|
+
"forLineage" : false,
|
762
|
+
"forDuplicateProcessing" : false
|
763
|
+
}
|
764
|
+
"""
|
765
|
+
validate_guid(guid)
|
766
|
+
|
767
|
+
url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/solution-architect/"
|
768
|
+
f"information-supply-chains/{guid}/delete")
|
769
|
+
|
770
|
+
await self._async_make_request("POST", url, body_slimmer(body))
|
771
|
+
|
772
|
+
def delete_info_supply_chain(self, guid: str, body: dict = None) -> None:
|
773
|
+
""" Delete an information supply chain.
|
774
|
+
|
775
|
+
Parameters
|
776
|
+
----------
|
777
|
+
guid: str
|
778
|
+
guid of the information supply chain to delete.
|
779
|
+
body: dict, optional
|
780
|
+
A dictionary containing parameters of the deletion.
|
781
|
+
|
782
|
+
Returns
|
783
|
+
-------
|
784
|
+
None
|
785
|
+
|
786
|
+
Raises
|
787
|
+
------
|
788
|
+
InvalidParameterException
|
789
|
+
one of the parameters is null or invalid or
|
790
|
+
PropertyServerException
|
791
|
+
There is a problem adding the element properties to the metadata repository or
|
792
|
+
UserNotAuthorizedException
|
793
|
+
the requesting user is not authorized to issue this request.
|
794
|
+
|
795
|
+
Notes
|
796
|
+
----
|
797
|
+
|
798
|
+
Body structure:
|
799
|
+
{
|
800
|
+
"class" : "MetadataSourceRequestBody",
|
801
|
+
"externalSourceGUID": "add guid here",
|
802
|
+
"externalSourceName": "add qualified name here",
|
803
|
+
"effectiveTime" : {{isotime}},
|
804
|
+
"forLineage" : false,
|
805
|
+
"forDuplicateProcessing" : false
|
806
|
+
}
|
807
|
+
"""
|
808
|
+
loop = asyncio.get_event_loop()
|
809
|
+
loop.run_until_complete(self._async_delete_info_supply_chain(guid, body))
|
810
|
+
|
811
|
+
async def _async_get_info_supply_chain_by_guid(self, guid: str, body: dict = None,
|
812
|
+
add_implementation: bool = True) -> dict | str:
|
813
|
+
"""Return the properties of a specific information supply chain. Async Version.
|
814
|
+
|
815
|
+
Parameters
|
816
|
+
----------
|
817
|
+
guid: str
|
818
|
+
guid of the information supply chain to retrieve.
|
819
|
+
body: dict, optional
|
820
|
+
A dictionary containing parameters of the retrieval.
|
821
|
+
add_implementation: bool, optional
|
822
|
+
Whether to add the implementation details to the response.
|
823
|
+
|
824
|
+
Returns
|
825
|
+
-------
|
826
|
+
None
|
827
|
+
|
828
|
+
Raises
|
829
|
+
------
|
830
|
+
InvalidParameterException
|
831
|
+
one of the parameters is null or invalid or
|
832
|
+
PropertyServerException
|
833
|
+
There is a problem adding the element properties to the metadata repository or
|
834
|
+
UserNotAuthorizedException
|
835
|
+
the requesting user is not authorized to issue this request.
|
836
|
+
|
837
|
+
Notes
|
838
|
+
-----
|
839
|
+
Body structure:
|
840
|
+
{
|
841
|
+
"class" : "AnyTimeRequestBody",
|
842
|
+
"asOfTime" : {{isotime}},
|
843
|
+
"effectiveTime" : {{isotime}},
|
844
|
+
"forLineage" : false,
|
845
|
+
"forDuplicateProcessing" : false
|
846
|
+
}
|
847
|
+
|
848
|
+
"""
|
849
|
+
validate_guid(guid)
|
850
|
+
add_impl = str(add_implementation).lower()
|
851
|
+
url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/solution-architect/"
|
852
|
+
f"information-supply-chains/{guid}/retrieve?addImplementation={add_impl}")
|
853
|
+
|
854
|
+
if body is None:
|
855
|
+
response = await self._async_make_request("POST", url)
|
856
|
+
else:
|
857
|
+
response = await self._async_make_request("POST", url, body_slimmer(body))
|
858
|
+
return response.json().get("element", NO_ELEMENTS_FOUND)
|
859
|
+
|
860
|
+
def get_info_supply_chain_by_guid(self, guid: str, body: dict = None,
|
861
|
+
add_implementation: bool = True) -> dict | str:
|
862
|
+
""" Return the properties of a specific information supply chain.
|
863
|
+
|
864
|
+
Parameters
|
865
|
+
----------
|
866
|
+
guid: str
|
867
|
+
guid of the information supply chain to retrieve.
|
868
|
+
body: dict, optional
|
869
|
+
A dictionary containing parameters of the retrieval.
|
870
|
+
add_implementation: bool, optional
|
871
|
+
Whether to add the implementation details to the response.
|
872
|
+
|
873
|
+
Returns
|
874
|
+
-------
|
875
|
+
None
|
876
|
+
|
877
|
+
Raises
|
878
|
+
------
|
879
|
+
InvalidParameterException
|
880
|
+
one of the parameters is null or invalid or
|
881
|
+
PropertyServerException
|
882
|
+
There is a problem adding the element properties to the metadata repository or
|
883
|
+
UserNotAuthorizedException
|
884
|
+
the requesting user is not authorized to issue this request.
|
885
|
+
|
886
|
+
Notes
|
887
|
+
-----
|
888
|
+
Body structure:
|
889
|
+
{
|
890
|
+
"class" : "AnyTimeRequestBody",
|
891
|
+
"asOfTime" : {{isotime}},
|
892
|
+
"effectiveTime" : {{isotime}},
|
893
|
+
"forLineage" : false,
|
894
|
+
"forDuplicateProcessing" : false
|
895
|
+
}
|
896
|
+
|
897
|
+
"""
|
898
|
+
loop = asyncio.get_event_loop()
|
899
|
+
response = loop.run_until_complete(self._async_get_info_supply_chain_by_guid(guid, body, add_implementation))
|
900
|
+
return response
|
901
|
+
|
902
|
+
async def _async_get_info_supply_chain_by_name(self, search_filter: str, body: dict = None,
|
903
|
+
add_implementation: bool = True, start_from: int = 0,
|
904
|
+
page_size: int = max_paging_size) -> dict | str:
|
905
|
+
""" Returns the list of information supply chains with a particular name. Async Version.
|
906
|
+
|
907
|
+
Parameters
|
908
|
+
----------
|
909
|
+
search_filter: str
|
910
|
+
name of the information supply chain to retrieve.
|
911
|
+
body: dict, optional
|
912
|
+
A dictionary containing parameters of the retrieval.
|
913
|
+
add_implementation: bool, optional
|
914
|
+
Whether to add the implementation details to the response.
|
915
|
+
|
916
|
+
Returns
|
917
|
+
-------
|
918
|
+
[dict] | str
|
919
|
+
A list of information supply chains matching the name.
|
920
|
+
|
921
|
+
Raises
|
922
|
+
------
|
923
|
+
InvalidParameterException
|
924
|
+
one of the parameters is null or invalid or
|
925
|
+
PropertyServerException
|
926
|
+
There is a problem adding the element properties to the metadata repository or
|
927
|
+
UserNotAuthorizedException
|
928
|
+
the requesting user is not authorized to issue this request.
|
929
|
+
|
930
|
+
Notes
|
931
|
+
-----
|
932
|
+
Body structure:
|
933
|
+
{
|
934
|
+
"class" : "FilterRequestBody",
|
935
|
+
"asOfTime" : {{isotime}},
|
936
|
+
"effectiveTime" : {{isotime}},
|
937
|
+
"forLineage" : false,
|
938
|
+
"forDuplicateProcessing" : false,
|
939
|
+
"limitResultsByStatus" : ["ACTIVE"],
|
940
|
+
"sequencingOrder" : "PROPERTY_ASCENDING",
|
941
|
+
"sequencingProperty" : "qualifiedName",
|
942
|
+
"filter" : "Add name here"
|
943
|
+
}
|
944
|
+
|
945
|
+
"""
|
946
|
+
add_impl = str(add_implementation).lower()
|
947
|
+
possible_query_params = query_string(
|
948
|
+
[("addImplementation", add_impl), ("startFrom", start_from), ("pageSize", page_size)])
|
949
|
+
|
950
|
+
if body is None:
|
951
|
+
body = {
|
952
|
+
"filter": search_filter,
|
953
|
+
}
|
954
|
+
else:
|
955
|
+
body["filter"] = search_filter
|
956
|
+
|
957
|
+
url = (f"{self.solution_architect_command_root}/information-supply-chains/by-name"
|
958
|
+
f"{possible_query_params}")
|
959
|
+
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
960
|
+
return response.json().get("elements", NO_ELEMENTS_FOUND)
|
961
|
+
|
962
|
+
def get_info_supply_chain_by_name(self, search_filter: str, body: dict = None, add_implementation: bool = True,
|
963
|
+
start_from: int = 0, page_size: int = max_paging_size) -> dict | str:
|
964
|
+
""" Returns the list of information supply chains with a particular name. Async Version.
|
965
|
+
|
966
|
+
Parameters
|
967
|
+
----------
|
968
|
+
search_filter: str
|
969
|
+
name of the information supply chain to retrieve.
|
970
|
+
body: dict, optional
|
971
|
+
A dictionary containing parameters of the retrieval.
|
972
|
+
add_implementation: bool, optional
|
973
|
+
Whether to add the implementation details to the response.
|
974
|
+
start_from: int, [default=0], optional
|
975
|
+
When multiple pages of results are available, the page number to start from.
|
976
|
+
page_size: int, [default=max_paging_size], optional
|
977
|
+
The number of items to return in a single page. If not specified, the default will be taken from
|
978
|
+
the class instance.
|
979
|
+
|
980
|
+
Returns
|
981
|
+
-------
|
982
|
+
[dict] | str
|
983
|
+
A list of information supply chains matching the name.
|
984
|
+
|
985
|
+
Raises
|
986
|
+
------
|
987
|
+
InvalidParameterException
|
988
|
+
one of the parameters is null or invalid or
|
989
|
+
PropertyServerException
|
990
|
+
There is a problem adding the element properties to the metadata repository or
|
991
|
+
UserNotAuthorizedException
|
992
|
+
the requesting user is not authorized to issue this request.
|
993
|
+
|
994
|
+
Notes
|
995
|
+
-----
|
996
|
+
Body structure:
|
997
|
+
{
|
998
|
+
"class" : "FilterRequestBody",
|
999
|
+
"asOfTime" : {{isotime}},
|
1000
|
+
"effectiveTime" : {{isotime}},
|
1001
|
+
"forLineage" : false,
|
1002
|
+
"forDuplicateProcessing" : false,
|
1003
|
+
"limitResultsByStatus" : ["ACTIVE"],
|
1004
|
+
"sequencingOrder" : "PROPERTY_ASCENDING",
|
1005
|
+
"sequencingProperty" : "qualifiedName",
|
1006
|
+
"filter" : "Add name here"
|
1007
|
+
}
|
1008
|
+
|
1009
|
+
"""
|
1010
|
+
loop = asyncio.get_event_loop()
|
1011
|
+
response = loop.run_until_complete(
|
1012
|
+
self._async_get_info_supply_chain_by_name(search_filter, body, add_implementation, start_from, page_size))
|
1013
|
+
return response
|
1014
|
+
|
1015
|
+
async def _async_find_information_supply_chains(self, filter: str = "*", add_implementation: bool = True,
|
1016
|
+
starts_with: bool = True, ends_with: bool = False, ignore_case: bool = False, start_from: int = 0,
|
1017
|
+
page_size: int = max_paging_size, body: dict = None,
|
1018
|
+
output_format: str = 'JSON', include_mermaid: bool = False ) -> list[dict] | str:
|
1019
|
+
"""Retrieve the list of information supply chain metadata elements that contain the search string.
|
1020
|
+
https://egeria-project.org/concepts/information-supply-chain
|
1021
|
+
Async version.
|
1022
|
+
|
1023
|
+
Parameters
|
1024
|
+
----------
|
1025
|
+
filter : str
|
1026
|
+
- search_filter string to search for.
|
1027
|
+
add_implementation : bool, [default=True], optional
|
1028
|
+
- add_implementation flag to include information supply chain implementations details..
|
1029
|
+
starts_with : bool, [default=False], optional
|
1030
|
+
Starts with the supplied string.
|
1031
|
+
ends_with : bool, [default=False], optional
|
1032
|
+
Ends with the supplied string
|
1033
|
+
ignore_case : bool, [default=False], optional
|
1034
|
+
Ignore case when searching
|
1035
|
+
body: dict, optional, default = None
|
1036
|
+
- additional optional specifications for the search.
|
1037
|
+
output_format: str, default = 'JSON'
|
1038
|
+
Type of output to produce:
|
1039
|
+
JSON - output standard json
|
1040
|
+
MD - output standard markdown with no preamble
|
1041
|
+
FORM - output markdown with a preamble for a form
|
1042
|
+
REPORT - output markdown with a preamble for a report
|
1043
|
+
include_mermaid: bool, default = False
|
1044
|
+
Include mermaid diagrams?
|
1045
|
+
|
1046
|
+
Returns
|
1047
|
+
-------
|
1048
|
+
list[dict] | str
|
1049
|
+
A list of information supply chain structures or a string if there are no elements found.
|
1050
|
+
|
1051
|
+
Raises
|
1052
|
+
------
|
1053
|
+
InvalidParameterException
|
1054
|
+
one of the parameters is null or invalid or
|
1055
|
+
PropertyServerException
|
1056
|
+
There is a problem adding the element properties to the metadata repository or
|
1057
|
+
UserNotAuthorizedException
|
1058
|
+
the requesting user is not authorized to issue this request.
|
1059
|
+
"""
|
1060
|
+
|
1061
|
+
possible_query_params = query_string(
|
1062
|
+
[("addImplementation", add_implementation), ("startFrom", start_from), ("pageSize", page_size),
|
1063
|
+
("startsWith", starts_with), ("endsWith", ends_with), ("ignoreCase", ignore_case), ])
|
1064
|
+
|
1065
|
+
if filter is None or filter == "*":
|
1066
|
+
search_filter = None
|
1067
|
+
else:
|
1068
|
+
search_filter = filter
|
1069
|
+
|
1070
|
+
if body is None:
|
1071
|
+
body = {
|
1072
|
+
"filter": search_filter,
|
1073
|
+
}
|
1074
|
+
else:
|
1075
|
+
body["filter"] = search_filter
|
1076
|
+
|
1077
|
+
url = (f"{self.solution_architect_command_root}/information-supply-chains/by-search-string"
|
1078
|
+
f"{possible_query_params}")
|
1079
|
+
|
1080
|
+
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
1081
|
+
element = response.json().get("elements", NO_ELEMENTS_FOUND)
|
1082
|
+
if element == NO_ELEMENTS_FOUND:
|
1083
|
+
return NO_ELEMENTS_FOUND
|
1084
|
+
if output_format != 'JSON': # return a simplified markdown representation
|
1085
|
+
return self.generate_info_supply_chain_md(element, filter, output_format, include_mermaid)
|
1086
|
+
return response.json().get("elements", NO_ELEMENTS_FOUND)
|
1087
|
+
|
1088
|
+
def find_information_supply_chains(self, filter: str = "*", add_implementation: bool = True, starts_with: bool = True,
|
1089
|
+
ends_with: bool = False, ignore_case: bool = False, start_from: int = 0, page_size: int = max_paging_size,
|
1090
|
+
body: dict = None, output_format: str = 'JSON', include_mermaid: bool = False ) -> list[dict] | str:
|
1091
|
+
"""Retrieve the list of information supply chain metadata elements that contain the search string.
|
1092
|
+
https://egeria-project.org/concepts/information-supply-chain
|
1093
|
+
|
1094
|
+
Parameters
|
1095
|
+
----------
|
1096
|
+
filter: str
|
1097
|
+
- search_filterstring to search for.
|
1098
|
+
add_implementation : bool, [default=True], optional
|
1099
|
+
- add_implementation flag to include information supply chain implementations details..
|
1100
|
+
starts_with : bool, [default=False], optional
|
1101
|
+
Starts with the supplied string.
|
1102
|
+
ends_with : bool, [default=False], optional
|
1103
|
+
Ends with the supplied string
|
1104
|
+
ignore_case : bool, [default=False], optional
|
1105
|
+
Ignore case when searching
|
1106
|
+
start_from: int, [default=0], optional
|
1107
|
+
When multiple pages of results are available, the page number to start from.
|
1108
|
+
page_size: int, [default=max_paging_size], optional
|
1109
|
+
The number of items to return in a single page. If not specified, the default will be taken from
|
1110
|
+
the class instance.
|
1111
|
+
body: dict, optional, default = None
|
1112
|
+
- additional optional specifications for the search.
|
1113
|
+
|
1114
|
+
Returns
|
1115
|
+
-------
|
1116
|
+
list[dict] | str
|
1117
|
+
A list of information supply chain structures or a string if there are no elements found.
|
1118
|
+
|
1119
|
+
Raises
|
1120
|
+
------
|
1121
|
+
InvalidParameterException
|
1122
|
+
one of the parameters is null or invalid or
|
1123
|
+
PropertyServerException
|
1124
|
+
There is a problem adding the element properties to the metadata repository or
|
1125
|
+
UserNotAuthorizedException
|
1126
|
+
the requesting user is not authorized to issue this request.
|
1127
|
+
"""
|
1128
|
+
|
1129
|
+
loop = asyncio.get_event_loop()
|
1130
|
+
response = loop.run_until_complete(
|
1131
|
+
self._async_find_information_supply_chains(filter, add_implementation, starts_with, ends_with, ignore_case,
|
1132
|
+
start_from, page_size, body, output_format, include_mermaid ))
|
1133
|
+
return response
|
1134
|
+
|
1135
|
+
|
1136
|
+
def find_all_information_supply_chains(self, start_from: int = 0, page_size: int = max_paging_size) -> list[dict] | str:
|
1137
|
+
"""Retrieve a list of all information supply chains
|
1138
|
+
https://egeria-project.org/concepts/information-supply-chain
|
1139
|
+
"""
|
1140
|
+
|
1141
|
+
return self.find_information_supply_chains("*", start_from=start_from, page_size=page_size)
|
1142
|
+
|
1143
|
+
|
1144
|
+
#
|
1145
|
+
# Segments
|
1146
|
+
#
|
1147
|
+
async def _async_create_info_supply_chain_segment(self, guid: str, body: dict) -> str:
|
1148
|
+
"""Create an information supply chain segment and link it to its owning information supply chain.
|
1149
|
+
Async version.
|
1150
|
+
|
1151
|
+
Parameters
|
1152
|
+
----------
|
1153
|
+
guid: str
|
1154
|
+
guid of the owning information supply chain.
|
1155
|
+
body: dict
|
1156
|
+
A dictionary containing the definition of the supply chain to create.
|
1157
|
+
|
1158
|
+
Returns
|
1159
|
+
-------
|
1160
|
+
|
1161
|
+
str - guid of the supply chain segment created.
|
1162
|
+
|
1163
|
+
Raises
|
1164
|
+
------
|
1165
|
+
Raises
|
1166
|
+
------
|
1167
|
+
InvalidParameterException
|
1168
|
+
one of the parameters is null or invalid or
|
1169
|
+
PropertyServerException
|
1170
|
+
There is a problem adding the element properties to the metadata repository or
|
1171
|
+
UserNotAuthorizedException
|
1172
|
+
the requesting user is not authorized to issue this request.
|
1173
|
+
|
1174
|
+
Notes
|
1175
|
+
----
|
1176
|
+
|
1177
|
+
Body structure:
|
1178
|
+
{
|
1179
|
+
"class" : "InformationSupplyChainSegmentRequestBody",
|
1180
|
+
"externalSourceGUID": "add guid here",
|
1181
|
+
"externalSourceName": "add qualified name here",
|
1182
|
+
"effectiveTime" : {{isotime}},
|
1183
|
+
"forLineage" : false,
|
1184
|
+
"forDuplicateProcessing" : false,
|
1185
|
+
"properties": {
|
1186
|
+
"qualifiedName": "add unique name here",
|
1187
|
+
"displayName": "add short name here",
|
1188
|
+
"description": "add description here",
|
1189
|
+
"scope": "add scope of this information supply chain's applicability.",
|
1190
|
+
"integrationStyle": "style",
|
1191
|
+
"estimatedVolumetrics": {
|
1192
|
+
"property1" : "propertyValue1",
|
1193
|
+
"property2" : "propertyValue2"
|
1194
|
+
},
|
1195
|
+
"additionalProperties": {
|
1196
|
+
"property1" : "propertyValue1",
|
1197
|
+
"property2" : "propertyValue2"
|
1198
|
+
},
|
1199
|
+
"effectiveFrom": {{isotime}},
|
1200
|
+
"effectiveTo": {{isotime}}
|
1201
|
+
}
|
1202
|
+
}
|
1203
|
+
|
1204
|
+
"""
|
1205
|
+
validate_guid(guid)
|
1206
|
+
|
1207
|
+
url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/solution-architect/"
|
1208
|
+
f"information-supply-chains/{guid}/segments")
|
1209
|
+
|
1210
|
+
response = await self._async_make_request("POST", url, body_slimmer(body))
|
1211
|
+
|
1212
|
+
return response.json().get("guid", "Supply Chain segment not created")
|
1213
|
+
|
1214
|
+
|
1215
|
+
def create_info_supply_chain_segment(self, guid: str, body: dict) -> str:
|
1216
|
+
"""Create an information supply chain segment and link it to its owning information supply chain.
|
1217
|
+
|
1218
|
+
Parameters
|
1219
|
+
----------
|
1220
|
+
guid: str
|
1221
|
+
The guid of the information supply chain you are adding a segment to.
|
1222
|
+
body: dict
|
1223
|
+
A dictionary containing the definition of the supply chain to create.
|
1224
|
+
|
1225
|
+
Returns
|
1226
|
+
-------
|
1227
|
+
|
1228
|
+
str - guid of the supply chain segment created.
|
1229
|
+
|
1230
|
+
Raises
|
1231
|
+
------
|
1232
|
+
Raises
|
1233
|
+
------
|
1234
|
+
InvalidParameterException
|
1235
|
+
one of the parameters is null or invalid or
|
1236
|
+
PropertyServerException
|
1237
|
+
There is a problem adding the element properties to the metadata repository or
|
1238
|
+
UserNotAuthorizedException
|
1239
|
+
the requesting user is not authorized to issue this request.
|
1240
|
+
|
1241
|
+
Notes
|
1242
|
+
----
|
1243
|
+
|
1244
|
+
Body structure:
|
1245
|
+
{
|
1246
|
+
"class" : "InformationSupplyChainSegmentRequestBody",
|
1247
|
+
"externalSourceGUID": "add guid here",
|
1248
|
+
"externalSourceName": "add qualified name here",
|
1249
|
+
"effectiveTime" : {{isotime}},
|
1250
|
+
"forLineage" : false,
|
1251
|
+
"forDuplicateProcessing" : false,
|
1252
|
+
"properties": {
|
1253
|
+
"qualifiedName": "add unique name here",
|
1254
|
+
"displayName": "add short name here",
|
1255
|
+
"description": "add description here",
|
1256
|
+
"scope": "add scope of this information supply chain's applicability.",
|
1257
|
+
"integrationStyle": "style",
|
1258
|
+
"estimatedVolumetrics": {
|
1259
|
+
"property1" : "propertyValue1",
|
1260
|
+
"property2" : "propertyValue2"
|
1261
|
+
},
|
1262
|
+
"additionalProperties": {
|
1263
|
+
"property1" : "propertyValue1",
|
1264
|
+
"property2" : "propertyValue2"
|
1265
|
+
},
|
1266
|
+
"effectiveFrom": {{isotime}},
|
1267
|
+
"effectiveTo": {{isotime}}
|
1268
|
+
}
|
1269
|
+
}
|
1270
|
+
|
1271
|
+
"""
|
1272
|
+
|
1273
|
+
loop = asyncio.get_event_loop()
|
1274
|
+
response = loop.run_until_complete(self._async_create_info_supply_chain_segment(guid, body))
|
1275
|
+
return response
|
1276
|
+
|
1277
|
+
|
1278
|
+
async def _async_update_info_supply_chain_segment(self, guid: str, body: dict,
|
1279
|
+
replace_all_properties: bool = False) -> None:
|
1280
|
+
""" Update the properties of an information supply chain segment. Async Version.
|
1281
|
+
|
1282
|
+
Parameters
|
1283
|
+
----------
|
1284
|
+
guid: str
|
1285
|
+
guid of the information supply chain segment to update.
|
1286
|
+
body: dict
|
1287
|
+
A dictionary containing the updates to the supply chain segment.
|
1288
|
+
replace_all_properties: bool, optional
|
1289
|
+
Whether to replace all properties with those provided in the body or to merge with existing properties.
|
1290
|
+
|
1291
|
+
Returns
|
1292
|
+
-------
|
1293
|
+
None
|
1294
|
+
|
1295
|
+
Raises
|
1296
|
+
------
|
1297
|
+
InvalidParameterException
|
1298
|
+
one of the parameters is null or invalid or
|
1299
|
+
PropertyServerException
|
1300
|
+
There is a problem adding the element properties to the metadata repository or
|
1301
|
+
UserNotAuthorizedException
|
1302
|
+
the requesting user is not authorized to issue this request.
|
1303
|
+
|
1304
|
+
Notes
|
1305
|
+
----
|
1306
|
+
|
1307
|
+
Body structure:
|
1308
|
+
{
|
1309
|
+
"class" : "InformationSupplyChainSegmentRequestBody",
|
1310
|
+
"externalSourceGUID": "add guid here",
|
1311
|
+
"externalSourceName": "add qualified name here",
|
1312
|
+
"effectiveTime" : {{isotime}},
|
1313
|
+
"forLineage" : false,
|
1314
|
+
"forDuplicateProcessing" : false,
|
1315
|
+
"properties": {
|
1316
|
+
"qualifiedName": "add unique name here",
|
1317
|
+
"displayName": "add short name here",
|
1318
|
+
"description": "add description here",
|
1319
|
+
"scope": "add scope of this information supply chain's applicability.",
|
1320
|
+
"integrationStyle": "style",
|
1321
|
+
"estimatedVolumetrics": {
|
1322
|
+
"property1" : "propertyValue1",
|
1323
|
+
"property2" : "propertyValue2"
|
1324
|
+
},
|
1325
|
+
"additionalProperties": {
|
1326
|
+
"property1" : "propertyValue1",
|
1327
|
+
"property2" : "propertyValue2"
|
1328
|
+
},
|
1329
|
+
"effectiveFrom": {{isotime}},
|
1330
|
+
"effectiveTo": {{isotime}}
|
1331
|
+
}
|
1332
|
+
}
|
1333
|
+
"""
|
1334
|
+
validate_guid(guid)
|
1335
|
+
replace_all_properties_s = str(replace_all_properties).lower()
|
1336
|
+
url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/solution-architect/"
|
1337
|
+
f"information-supply-chains/segments/{guid}/update?replaceAllProperties={replace_all_properties_s}")
|
1338
|
+
|
1339
|
+
await self._async_make_request("POST", url, body_slimmer(body))
|
1340
|
+
|
1341
|
+
|
1342
|
+
def update_info_supply_chain_segment(self, guid: str, body: dict, replace_all_properties: bool = False) -> None:
|
1343
|
+
""" Update the properties of an information supply chain segment. Async Version.
|
1344
|
+
|
1345
|
+
Parameters
|
1346
|
+
----------
|
1347
|
+
guid: str
|
1348
|
+
guid of the information supply chain segment to update.
|
1349
|
+
body: dict
|
1350
|
+
A dictionary containing the updates to the supply chain segment .
|
1351
|
+
replace_all_properties: bool, optional
|
1352
|
+
Whether to replace all properties with those provided in the body or to merge with existing properties.
|
1353
|
+
|
1354
|
+
Returns
|
1355
|
+
-------
|
1356
|
+
|
1357
|
+
None
|
1358
|
+
|
1359
|
+
Raises
|
1360
|
+
------
|
1361
|
+
Raises
|
1362
|
+
------
|
1363
|
+
InvalidParameterException
|
1364
|
+
one of the parameters is null or invalid or
|
1365
|
+
PropertyServerException
|
1366
|
+
There is a problem adding the element properties to the metadata repository or
|
1367
|
+
UserNotAuthorizedException
|
1368
|
+
the requesting user is not authorized to issue this request.
|
1369
|
+
|
1370
|
+
Notes
|
1371
|
+
----
|
1372
|
+
|
1373
|
+
Body structure:
|
1374
|
+
{
|
1375
|
+
"class" : "InformationSupplyChainSegmentRequestBody",
|
1376
|
+
"externalSourceGUID": "add guid here",
|
1377
|
+
"externalSourceName": "add qualified name here",
|
1378
|
+
"effectiveTime" : {{isotime}},
|
1379
|
+
"forLineage" : false,
|
1380
|
+
"forDuplicateProcessing" : false,
|
1381
|
+
"properties": {
|
1382
|
+
"qualifiedName": "add unique name here",
|
1383
|
+
"displayName": "add short name here",
|
1384
|
+
"description": "add description here",
|
1385
|
+
"scope": "add scope of this information supply chain's applicability.",
|
1386
|
+
"integrationStyle": "style",
|
1387
|
+
"estimatedVolumetrics": {
|
1388
|
+
"property1" : "propertyValue1",
|
1389
|
+
"property2" : "propertyValue2"
|
1390
|
+
},
|
1391
|
+
"additionalProperties": {
|
1392
|
+
"property1" : "propertyValue1",
|
1393
|
+
"property2" : "propertyValue2"
|
1394
|
+
},
|
1395
|
+
"effectiveFrom": {{isotime}},
|
1396
|
+
"effectiveTo": {{isotime}}
|
1397
|
+
}
|
1398
|
+
}
|
1399
|
+
"""
|
1400
|
+
loop = asyncio.get_event_loop()
|
1401
|
+
loop.run_until_complete(self._async_update_info_supply_chain_segment(guid, body, replace_all_properties))
|
1402
|
+
|
1403
|
+
|
1404
|
+
async def _async_delete_info_supply_chain_segment(self, guid: str, body: dict = None) -> None:
|
1405
|
+
"""Delete an information supply chain segment. Async Version.
|
1406
|
+
|
1407
|
+
Parameters
|
1408
|
+
----------
|
1409
|
+
guid: str
|
1410
|
+
guid of the information supply chain segment to delete.
|
1411
|
+
body: dict, optional
|
1412
|
+
A dictionary containing parameters of the deletion.
|
1413
|
+
|
1414
|
+
Returns
|
1415
|
+
-------
|
1416
|
+
None
|
1417
|
+
|
1418
|
+
Raises
|
1419
|
+
------
|
1420
|
+
Raises
|
1421
|
+
------
|
1422
|
+
InvalidParameterException
|
1423
|
+
one of the parameters is null or invalid or
|
1424
|
+
PropertyServerException
|
1425
|
+
There is a problem adding the element properties to the metadata repository or
|
1426
|
+
UserNotAuthorizedException
|
1427
|
+
the requesting user is not authorized to issue this request.
|
1428
|
+
|
1429
|
+
Notes
|
1430
|
+
----
|
1431
|
+
|
1432
|
+
Body structure:
|
1433
|
+
{
|
1434
|
+
"class" : "MetadataSourceRequestBody",
|
1435
|
+
"externalSourceGUID": "add guid here",
|
1436
|
+
"externalSourceName": "add qualified name here",
|
1437
|
+
"effectiveTime" : {{isotime}},
|
1438
|
+
"forLineage" : false,
|
1439
|
+
"forDuplicateProcessing" : false
|
1440
|
+
}
|
1441
|
+
"""
|
1442
|
+
validate_guid(guid)
|
1443
|
+
|
1444
|
+
url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/solution-architect/"
|
1445
|
+
f"information-supply-chains/segments/{guid}/delete")
|
1446
|
+
|
1447
|
+
await self._async_make_request("POST", url, body_slimmer(body))
|
1448
|
+
|
1449
|
+
|
1450
|
+
def delete_info_supply_chain_segment(self, guid: str, body: dict = None) -> None:
|
1451
|
+
""" Delete an information supply chain segment. Async Version.
|
1452
|
+
|
1453
|
+
Parameters
|
1454
|
+
----------
|
1455
|
+
guid: str
|
1456
|
+
guid of the information supply chain segment to delete.
|
1457
|
+
body: dict, optional
|
1458
|
+
A dictionary containing parameters of the deletion.
|
1459
|
+
|
1460
|
+
Returns
|
1461
|
+
-------
|
1462
|
+
None
|
1463
|
+
|
1464
|
+
Raises
|
1465
|
+
------
|
1466
|
+
Raises
|
1467
|
+
------
|
1468
|
+
InvalidParameterException
|
1469
|
+
one of the parameters is null or invalid or
|
1470
|
+
PropertyServerException
|
1471
|
+
There is a problem adding the element properties to the metadata repository or
|
1472
|
+
UserNotAuthorizedException
|
1473
|
+
the requesting user is not authorized to issue this request.
|
1474
|
+
|
1475
|
+
Notes
|
1476
|
+
----
|
1477
|
+
|
1478
|
+
Body structure:
|
1479
|
+
{
|
1480
|
+
"class" : "MetadataSourceRequestBody",
|
1481
|
+
"externalSourceGUID": "add guid here",
|
1482
|
+
"externalSourceName": "add qualified name here",
|
1483
|
+
"effectiveTime" : {{isotime}},
|
1484
|
+
"forLineage" : false,
|
1485
|
+
"forDuplicateProcessing" : false
|
1486
|
+
}
|
1487
|
+
"""
|
1488
|
+
loop = asyncio.get_event_loop()
|
1489
|
+
loop.run_until_complete(self._async_delete_info_supply_chain_segment(guid, body))
|
1490
|
+
|
1491
|
+
|
1492
|
+
async def _async_link_info_supply_chain_segments(self, segment_guid1: str, segment_guid2: str, body: dict) -> None:
|
1493
|
+
""" Connect the information supply chain segments. Async Version.
|
1494
|
+
|
1495
|
+
Parameters
|
1496
|
+
----------
|
1497
|
+
segment_guid1: str
|
1498
|
+
guid of the first information supply chain segment to link.
|
1499
|
+
segment_guid2: str
|
1500
|
+
guid of the second information supply chain segment to link.
|
1501
|
+
body: dict
|
1502
|
+
The body describing the link between the two segments.
|
1503
|
+
|
1504
|
+
Returns
|
1505
|
+
-------
|
1506
|
+
None
|
1507
|
+
|
1508
|
+
Raises
|
1509
|
+
------
|
1510
|
+
InvalidParameterException
|
1511
|
+
one of the parameters is null or invalid or
|
1512
|
+
PropertyServerException
|
1513
|
+
There is a problem adding the element properties to the metadata repository or
|
1514
|
+
UserNotAuthorizedException
|
1515
|
+
the requesting user is not authorized to issue this request.
|
1516
|
+
|
1517
|
+
Notes
|
1518
|
+
----
|
1519
|
+
|
1520
|
+
Body structure:
|
1521
|
+
{
|
1522
|
+
"class" : "InformationSupplyChainLinkRequestBody",
|
1523
|
+
"externalSourceGUID": "add guid here",
|
1524
|
+
"externalSourceName": "add qualified name here",
|
1525
|
+
"effectiveTime" : {{isotime}},
|
1526
|
+
"forLineage" : false,
|
1527
|
+
"forDuplicateProcessing" : false,
|
1528
|
+
"properties": {
|
1529
|
+
"label": "add label here",
|
1530
|
+
"description": "add description here",
|
1531
|
+
"effectiveFrom": {{isotime}},
|
1532
|
+
"effectiveTo": {{isotime}}
|
1533
|
+
}
|
1534
|
+
}
|
1535
|
+
"""
|
1536
|
+
validate_guid(segment_guid1)
|
1537
|
+
validate_guid(segment_guid2)
|
1538
|
+
url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/solution-architect/"
|
1539
|
+
f"information-supply-chains/segments/{segment_guid1}/link-to{segment_guid2}/attach")
|
1540
|
+
|
1541
|
+
await self._async_make_request("POST", url, body_slimmer(body))
|
1542
|
+
|
1543
|
+
|
1544
|
+
def link_info_supply_chain_segments(self, segment_guid1: str, segment_guid2: str, body: dict) -> None:
|
1545
|
+
""" Connect the information supply chain segments.
|
1546
|
+
|
1547
|
+
Parameters
|
1548
|
+
----------
|
1549
|
+
segment_guid1: str
|
1550
|
+
guid of the first information supply chain segment to link.
|
1551
|
+
segment_guid2: str
|
1552
|
+
guid of the second information supply chain segment to link.
|
1553
|
+
body: dict
|
1554
|
+
The body describing the link between the two segments.
|
1555
|
+
|
1556
|
+
Returns
|
1557
|
+
-------
|
1558
|
+
None
|
1559
|
+
|
1560
|
+
Raises
|
1561
|
+
------
|
1562
|
+
InvalidParameterException
|
1563
|
+
one of the parameters is null or invalid or
|
1564
|
+
PropertyServerException
|
1565
|
+
There is a problem adding the element properties to the metadata repository or
|
1566
|
+
UserNotAuthorizedException
|
1567
|
+
the requesting user is not authorized to issue this request.
|
1568
|
+
|
1569
|
+
Notes
|
1570
|
+
----
|
1571
|
+
|
1572
|
+
Body structure:
|
1573
|
+
{
|
1574
|
+
"class" : "InformationSupplyChainLinkRequestBody",
|
1575
|
+
"externalSourceGUID": "add guid here",
|
1576
|
+
"externalSourceName": "add qualified name here",
|
1577
|
+
"effectiveTime" : {{isotime}},
|
1578
|
+
"forLineage" : false,
|
1579
|
+
"forDuplicateProcessing" : false,
|
1580
|
+
"properties": {
|
1581
|
+
"label": "add label here",
|
1582
|
+
"description": "add description here",
|
1583
|
+
"effectiveFrom": {{isotime}},
|
1584
|
+
"effectiveTo": {{isotime}}
|
1585
|
+
}
|
1586
|
+
}
|
1587
|
+
"""
|
1588
|
+
loop = asyncio.get_event_loop()
|
1589
|
+
loop.run_until_complete(self._async_link_info_supply_chain_segments(segment_guid1, segment_guid2, body))
|
1590
|
+
|
1591
|
+
|
1592
|
+
async def _async_detach_info_supply_chain_segments(self, segment_guid1: str, segment_guid2: str,
|
1593
|
+
body: dict = None) -> None:
|
1594
|
+
""" Detach two information supply chain segments from one another. Request body is optional.
|
1595
|
+
Async Version.
|
1596
|
+
|
1597
|
+
Parameters
|
1598
|
+
----------
|
1599
|
+
segment_guid1: str
|
1600
|
+
guid of the first information supply chain segment to link.
|
1601
|
+
segment_guid2: str
|
1602
|
+
guid of the second information supply chain segment to link.
|
1603
|
+
body: dict, optional
|
1604
|
+
The body describing the link between the two segments.
|
1605
|
+
|
1606
|
+
Returns
|
1607
|
+
-------
|
1608
|
+
None
|
1609
|
+
|
1610
|
+
Raises
|
1611
|
+
------
|
1612
|
+
InvalidParameterException
|
1613
|
+
one of the parameters is null or invalid or
|
1614
|
+
PropertyServerException
|
1615
|
+
There is a problem adding the element properties to the metadata repository or
|
1616
|
+
UserNotAuthorizedException
|
1617
|
+
the requesting user is not authorized to issue this request.
|
1618
|
+
|
1619
|
+
Notes
|
1620
|
+
----
|
1621
|
+
|
1622
|
+
Body structure:
|
1623
|
+
{
|
1624
|
+
"class" : "MetadataSourceRequestBody",
|
1625
|
+
"externalSourceGUID": "add guid here",
|
1626
|
+
"externalSourceName": "add qualified name here",
|
1627
|
+
"effectiveTime" : {{isotime}},
|
1628
|
+
"forLineage" : false,
|
1629
|
+
"forDuplicateProcessing" : false
|
1630
|
+
}
|
1631
|
+
|
1632
|
+
"""
|
1633
|
+
validate_guid(segment_guid1)
|
1634
|
+
validate_guid(segment_guid2)
|
1635
|
+
url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/solution-architect/"
|
1636
|
+
f"information-supply-chains/segments/{segment_guid1}/link-to{segment_guid2}/detach")
|
1637
|
+
|
1638
|
+
await self._async_make_request("POST", url, body_slimmer(body))
|
1639
|
+
|
1640
|
+
|
1641
|
+
def detach_info_supply_chain_segments(self, segment_guid1: str, segment_guid2: str, body: dict = None) -> None:
|
1642
|
+
""" Detach two information supply chain segments from one another. Request body is optional.
|
1643
|
+
|
1644
|
+
Parameters
|
1645
|
+
----------
|
1646
|
+
segment_guid1: str
|
1647
|
+
guid of the first information supply chain segment to link.
|
1648
|
+
segment_guid2: str
|
1649
|
+
guid of the second information supply chain segment to link.
|
1650
|
+
body: dict
|
1651
|
+
The body describing the link between the two segments.
|
1652
|
+
|
1653
|
+
Returns
|
1654
|
+
-------
|
1655
|
+
None
|
1656
|
+
|
1657
|
+
Raises
|
1658
|
+
------
|
1659
|
+
InvalidParameterException
|
1660
|
+
one of the parameters is null or invalid or
|
1661
|
+
PropertyServerException
|
1662
|
+
There is a problem adding the element properties to the metadata repository or
|
1663
|
+
UserNotAuthorizedException
|
1664
|
+
the requesting user is not authorized to issue this request.
|
1665
|
+
|
1666
|
+
Notes
|
1667
|
+
----
|
1668
|
+
|
1669
|
+
Body structure:
|
1670
|
+
{
|
1671
|
+
"class" : "InformationSupplyChainLinkRequestBody",
|
1672
|
+
"externalSourceGUID": "add guid here",
|
1673
|
+
"externalSourceName": "add qualified name here",
|
1674
|
+
"effectiveTime" : {{isotime}},
|
1675
|
+
"forLineage" : false,
|
1676
|
+
"forDuplicateProcessing" : false,
|
1677
|
+
"properties": {
|
1678
|
+
"label": "add label here",
|
1679
|
+
"description": "add description here",
|
1680
|
+
"effectiveFrom": {{isotime}},
|
1681
|
+
"effectiveTo": {{isotime}}
|
1682
|
+
}
|
1683
|
+
}
|
1684
|
+
"""
|
1685
|
+
loop = asyncio.get_event_loop()
|
1686
|
+
loop.run_until_complete(self._async_detach_info_supply_chain_segments(segment_guid1, segment_guid2, body))
|
1687
|
+
|
1688
|
+
|
1689
|
+
#
|
1690
|
+
# Blueprints
|
1691
|
+
#
|
1692
|
+
|
1693
|
+
|
1694
|
+
async def _async_find_solution_blueprints(self, filter: str = "*", starts_with: bool = True, ends_with: bool = False,
|
1695
|
+
ignore_case: bool = False, start_from: int = 0, page_size: int = max_paging_size, body: dict = None,
|
1696
|
+
output_format: str = "JSON", include_mermaid: bool = False) -> list[
|
1697
|
+
dict] | str:
|
1698
|
+
"""Retrieve the solution blueprint elements that contain the search string.
|
1699
|
+
https://egeria-project.org/concepts/solution-blueprint
|
1700
|
+
Async version.
|
1701
|
+
|
1702
|
+
Parameters
|
1703
|
+
----------
|
1704
|
+
filter: str
|
1705
|
+
- search_filterstring to search for.
|
1706
|
+
starts_with : bool, [default=False], optional
|
1707
|
+
Starts with the supplied string.
|
1708
|
+
ends_with : bool, [default=False], optional
|
1709
|
+
Ends with the supplied string
|
1710
|
+
ignore_case : bool, [default=False], optional
|
1711
|
+
Ignore case when searching
|
1712
|
+
body: dict, optional, default = None
|
1713
|
+
- additional optional specifications for the search.
|
1714
|
+
output_format: str, default = 'JSON'
|
1715
|
+
Type of output to produce:
|
1716
|
+
JSON - output standard json
|
1717
|
+
MD - output standard markdown with no preamble
|
1718
|
+
FORM - output markdown with a preamble for a form
|
1719
|
+
REPORT - output markdown with a preamble for a report
|
1720
|
+
include_mermaid: bool, default = False
|
1721
|
+
Include mermaid diagrams?
|
1722
|
+
|
1723
|
+
Returns
|
1724
|
+
-------
|
1725
|
+
list[dict] | str
|
1726
|
+
A list of solution blueprint structures or a string if there are no elements found.
|
1727
|
+
|
1728
|
+
Raises
|
1729
|
+
------
|
1730
|
+
InvalidParameterException
|
1731
|
+
one of the parameters is null or invalid or
|
1732
|
+
PropertyServerException
|
1733
|
+
There is a problem adding the element properties to the metadata repository or
|
1734
|
+
UserNotAuthorizedException
|
1735
|
+
the requesting user is not authorized to issue this request.
|
1736
|
+
"""
|
1737
|
+
|
1738
|
+
possible_query_params = query_string(
|
1739
|
+
[("startFrom", start_from), ("pageSize", page_size), ("startsWith", starts_with), ("endsWith", ends_with),
|
1740
|
+
("ignoreCase", ignore_case), ])
|
1741
|
+
|
1742
|
+
if filter is None or filter == "*":
|
1743
|
+
search_filter = None
|
1744
|
+
else:
|
1745
|
+
search_filter = filter
|
1746
|
+
|
1747
|
+
if body is None:
|
1748
|
+
body = {
|
1749
|
+
"filter": search_filter,
|
1750
|
+
}
|
1751
|
+
else:
|
1752
|
+
body["filter"] = search_filter
|
1753
|
+
|
1754
|
+
url = (f"{self.solution_architect_command_root}/solution-blueprints/by-search-string"
|
1755
|
+
f"{possible_query_params}")
|
1756
|
+
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
1757
|
+
element = response.json().get("elements", NO_ELEMENTS_FOUND)
|
1758
|
+
if element == NO_ELEMENTS_FOUND:
|
1759
|
+
return NO_ELEMENTS_FOUND
|
1760
|
+
if output_format != 'JSON': # return a simplified markdown representation
|
1761
|
+
return self.generate_solution_blueprint_md(element, filter, output_format, include_mermaid)
|
1762
|
+
return response.json().get("elements", NO_ELEMENTS_FOUND)
|
1763
|
+
|
1764
|
+
|
1765
|
+
def find_solution_blueprints(self, filter: str = "*", starts_with: bool = True, ends_with: bool = False,
|
1766
|
+
ignore_case: bool = False, start_from: int = 0, page_size: int = max_paging_size, body: dict = None,
|
1767
|
+
output_format: str = 'JSON', include_mermaid: bool= False) -> list[dict] | str:
|
1768
|
+
"""Retrieve the list of solution blueprint elements that contain the search string.
|
1769
|
+
https://egeria-project.org/concepts/solution-blueprint
|
1770
|
+
|
1771
|
+
Parameters
|
1772
|
+
----------
|
1773
|
+
filter: str
|
1774
|
+
- search_filterstring to search for.
|
1775
|
+
starts_with : bool, [default=False], optional
|
1776
|
+
Starts with the supplied string.
|
1777
|
+
ends_with : bool, [default=False], optional
|
1778
|
+
Ends with the supplied string
|
1779
|
+
ignore_case : bool, [default=False], optional
|
1780
|
+
Ignore case when searching
|
1781
|
+
start_from: int, [default=0], optional
|
1782
|
+
When multiple pages of results are available, the page number to start from.
|
1783
|
+
page_size: int, [default=max_paging_size], optional
|
1784
|
+
The number of items to return in a single page. If not specified, the default will be taken from
|
1785
|
+
the class instance.
|
1786
|
+
body: dict, optional, default = None
|
1787
|
+
- additional optional specifications for the search.
|
1788
|
+
output_format: str, default = 'JSON'
|
1789
|
+
Type of output to produce:
|
1790
|
+
JSON - output standard json
|
1791
|
+
MD - output standard markdown with no preamble
|
1792
|
+
FORM - output markdown with a preamble for a form
|
1793
|
+
REPORT - output markdown with a preamble for a report
|
1794
|
+
include_mermaid: bool, default = False
|
1795
|
+
Include mermaid diagrams?
|
1796
|
+
|
1797
|
+
Returns
|
1798
|
+
-------
|
1799
|
+
list[dict] | str
|
1800
|
+
A list of information supply chain structures or a string if there are no elements found.
|
1801
|
+
|
1802
|
+
Raises
|
1803
|
+
------
|
1804
|
+
InvalidParameterException
|
1805
|
+
one of the parameters is null or invalid or
|
1806
|
+
PropertyServerException
|
1807
|
+
There is a problem adding the element properties to the metadata repository or
|
1808
|
+
UserNotAuthorizedException
|
1809
|
+
the requesting user is not authorized to issue this request.
|
1810
|
+
"""
|
1811
|
+
|
1812
|
+
loop = asyncio.get_event_loop()
|
1813
|
+
response = loop.run_until_complete(
|
1814
|
+
self._async_find_solution_blueprints(filter, starts_with, ends_with, ignore_case,
|
1815
|
+
start_from, page_size, body,
|
1816
|
+
output_format, include_mermaid)
|
1817
|
+
)
|
1818
|
+
return response
|
1819
|
+
|
1820
|
+
|
1821
|
+
def find_all_solution_blueprints(self, start_from: int = 0, page_size: int = max_paging_size) -> list[dict] | str:
|
1822
|
+
"""Retrieve a list of all solution blueprint elements
|
1823
|
+
https://egeria-project.org/concepts/solution-blueprint
|
1824
|
+
"""
|
1825
|
+
return self.find_solution_blueprints("*", start_from=start_from, page_size=page_size)
|
1826
|
+
|
1827
|
+
|
1828
|
+
#
|
1829
|
+
# Roles
|
1830
|
+
#
|
1831
|
+
|
1832
|
+
async def _async_find_solution_roles(self, filter: str = "*", starts_with: bool = True, ends_with: bool = False,
|
1833
|
+
ignore_case: bool = False, start_from: int = 0, page_size: int = max_paging_size, body: dict = None,
|
1834
|
+
output_format: str = "JSON", include_mermaid: bool = False) -> list[
|
1835
|
+
dict] | str:
|
1836
|
+
"""Retrieve the solutio nrole elements that contain the search string.
|
1837
|
+
https://egeria-project.org/concepts/actor
|
1838
|
+
Async version.
|
1839
|
+
|
1840
|
+
Parameters
|
1841
|
+
----------
|
1842
|
+
filter: str
|
1843
|
+
- search_filterstring to search for.
|
1844
|
+
starts_with : bool, [default=False], optional
|
1845
|
+
Starts with the supplied string.
|
1846
|
+
ends_with : bool, [default=False], optional
|
1847
|
+
Ends with the supplied string
|
1848
|
+
ignore_case : bool, [default=False], optional
|
1849
|
+
Ignore case when searching
|
1850
|
+
body: dict, optional, default = None
|
1851
|
+
- additional optional specifications for the search.
|
1852
|
+
output_format: str, default = 'JSON'
|
1853
|
+
Type of output to produce:
|
1854
|
+
JSON - output standard json
|
1855
|
+
MD - output standard markdown with no preamble
|
1856
|
+
FORM - output markdown with a preamble for a form
|
1857
|
+
REPORT - output markdown with a preamble for a report
|
1858
|
+
include_mermaid: bool, default = False
|
1859
|
+
Include mermaid diagrams?
|
1860
|
+
|
1861
|
+
Returns
|
1862
|
+
-------
|
1863
|
+
list[dict] | str
|
1864
|
+
A list of solution role structures or a string if there are no elements found.
|
1865
|
+
|
1866
|
+
Raises
|
1867
|
+
------
|
1868
|
+
InvalidParameterException
|
1869
|
+
one of the parameters is null or invalid or
|
1870
|
+
PropertyServerException
|
1871
|
+
There is a problem adding the element properties to the metadata repository or
|
1872
|
+
UserNotAuthorizedException
|
1873
|
+
the requesting user is not authorized to issue this request.
|
1874
|
+
"""
|
1875
|
+
|
1876
|
+
possible_query_params = query_string(
|
1877
|
+
[("startFrom", start_from), ("pageSize", page_size), ("startsWith", starts_with), ("endsWith", ends_with),
|
1878
|
+
("ignoreCase", ignore_case), ])
|
1879
|
+
|
1880
|
+
if filter is None or filter == "*":
|
1881
|
+
search_filter = None
|
1882
|
+
else:
|
1883
|
+
search_filter = filter
|
1884
|
+
|
1885
|
+
if body is None:
|
1886
|
+
body = {
|
1887
|
+
"filter": search_filter,
|
1888
|
+
}
|
1889
|
+
else:
|
1890
|
+
body["filter"] = search_filter
|
1891
|
+
|
1892
|
+
url = (f"{self.solution_architect_command_root}/solution-roles/by-search-string"
|
1893
|
+
f"{possible_query_params}")
|
1894
|
+
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
1895
|
+
element = response.json().get("elements", NO_ELEMENTS_FOUND)
|
1896
|
+
if element == NO_ELEMENTS_FOUND:
|
1897
|
+
return NO_ELEMENTS_FOUND
|
1898
|
+
if output_format != 'JSON': # return a simplified markdown representation
|
1899
|
+
return self.generate_solution_roles_md(element, filter, output_format, include_mermaid)
|
1900
|
+
return response.json().get("elements", NO_ELEMENTS_FOUND)
|
1901
|
+
|
1902
|
+
|
1903
|
+
def find_solution_roles(self, filter: str = "*", starts_with: bool = True, ends_with: bool = False,
|
1904
|
+
ignore_case: bool = False, start_from: int = 0, page_size: int = max_paging_size, body: dict = None,
|
1905
|
+
output_format: str = "JSON", include_mermaid: bool = False) -> list[dict] | str:
|
1906
|
+
"""Retrieve the list of solution role elements that contain the search string.
|
1907
|
+
https://egeria-project.org/concepts/actor
|
1908
|
+
|
1909
|
+
Parameters
|
1910
|
+
----------
|
1911
|
+
filter: str
|
1912
|
+
- search_filterstring to search for.
|
1913
|
+
starts_with : bool, [default=False], optional
|
1914
|
+
Starts with the supplied string.
|
1915
|
+
ends_with : bool, [default=False], optional
|
1916
|
+
Ends with the supplied string
|
1917
|
+
ignore_case : bool, [default=False], optional
|
1918
|
+
Ignore case when searching
|
1919
|
+
start_from: int, [default=0], optional
|
1920
|
+
When multiple pages of results are available, the page number to start from.
|
1921
|
+
page_size: int, [default=max_paging_size], optional
|
1922
|
+
The number of items to return in a single page. If not specified, the default will be taken from
|
1923
|
+
the class instance.
|
1924
|
+
body: dict, optional, default = None
|
1925
|
+
- additional optional specifications for the search.
|
1926
|
+
output_format: str, default = 'JSON'
|
1927
|
+
Type of output to produce:
|
1928
|
+
JSON - output standard json
|
1929
|
+
MD - output standard markdown with no preamble
|
1930
|
+
FORM - output markdown with a preamble for a form
|
1931
|
+
REPORT - output markdown with a preamble for a report
|
1932
|
+
include_mermaid: bool, default = False
|
1933
|
+
Include mermaid diagrams?
|
1934
|
+
|
1935
|
+
Returns
|
1936
|
+
-------
|
1937
|
+
list[dict] | str
|
1938
|
+
A list of information supply chain structures or a string if there are no elements found.
|
1939
|
+
|
1940
|
+
Raises
|
1941
|
+
------
|
1942
|
+
InvalidParameterException
|
1943
|
+
one of the parameters is null or invalid or
|
1944
|
+
PropertyServerException
|
1945
|
+
There is a problem adding the element properties to the metadata repository or
|
1946
|
+
UserNotAuthorizedException
|
1947
|
+
the requesting user is not authorized to issue this request.
|
1948
|
+
"""
|
1949
|
+
|
1950
|
+
loop = asyncio.get_event_loop()
|
1951
|
+
response = loop.run_until_complete(
|
1952
|
+
self._async_find_solution_roles(filter, starts_with, ends_with, ignore_case,
|
1953
|
+
start_from, page_size, body,
|
1954
|
+
output_format=output_format, include_mermaid=include_mermaid )
|
1955
|
+
)
|
1956
|
+
return response
|
1957
|
+
|
1958
|
+
|
1959
|
+
def find_all_solution_roles(self, start_from: int = 0, page_size: int = max_paging_size) -> list[dict] | str:
|
1960
|
+
"""Retrieve a list of all solution blueprint elements
|
1961
|
+
https://egeria-project.org/concepts/actor
|
1962
|
+
"""
|
1963
|
+
return self.find_solution_roles("*", start_from=start_from, page_size=page_size)
|
1964
|
+
|
1965
|
+
|
1966
|
+
#
|
1967
|
+
# Components
|
1968
|
+
#
|
1969
|
+
async def _async_find_solution_components(self, filter: str = "*", starts_with: bool = True, ends_with: bool = False,
|
1970
|
+
ignore_case: bool = False, start_from: int = 0, page_size: int = max_paging_size, body: dict = None, ) -> list[
|
1971
|
+
dict] | str:
|
1972
|
+
"""Retrieve the solution component elements that contain the search string.
|
1973
|
+
https://egeria-project.org/concepts/solution-components
|
1974
|
+
Async version.
|
1975
|
+
|
1976
|
+
Parameters
|
1977
|
+
----------
|
1978
|
+
filter: str
|
1979
|
+
- search_filterstring to search for.
|
1980
|
+
starts_with : bool, [default=False], optional
|
1981
|
+
Starts with the supplied string.
|
1982
|
+
ends_with : bool, [default=False], optional
|
1983
|
+
Ends with the supplied string
|
1984
|
+
ignore_case : bool, [default=False], optional
|
1985
|
+
Ignore case when searching
|
1986
|
+
body: dict, optional, default = None
|
1987
|
+
- additional optional specifications for the search.
|
1988
|
+
|
1989
|
+
Returns
|
1990
|
+
-------
|
1991
|
+
list[dict] | str
|
1992
|
+
A list of solution blueprint structures or a string if there are no elements found.
|
1993
|
+
|
1994
|
+
Raises
|
1995
|
+
------
|
1996
|
+
InvalidParameterException
|
1997
|
+
one of the parameters is null or invalid or
|
1998
|
+
PropertyServerException
|
1999
|
+
There is a problem adding the element properties to the metadata repository or
|
2000
|
+
UserNotAuthorizedException
|
2001
|
+
the requesting user is not authorized to issue this request.
|
2002
|
+
"""
|
2003
|
+
|
2004
|
+
possible_query_params = query_string(
|
2005
|
+
[("startFrom", start_from), ("pageSize", page_size), ("startsWith", starts_with), ("endsWith", ends_with),
|
2006
|
+
("ignoreCase", ignore_case), ])
|
2007
|
+
|
2008
|
+
if filter is None or filter == "*":
|
2009
|
+
search_filter = None
|
2010
|
+
else:
|
2011
|
+
search_filter = filter
|
2012
|
+
|
2013
|
+
if body is None:
|
2014
|
+
body = {
|
2015
|
+
"filter": search_filter,
|
2016
|
+
}
|
2017
|
+
else:
|
2018
|
+
body["filter"] = search_filter
|
2019
|
+
|
2020
|
+
url = (f"{self.solution_architect_command_root}/solution-components/by-search-string"
|
2021
|
+
f"{possible_query_params}")
|
2022
|
+
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
2023
|
+
return response.json().get("elements", NO_ELEMENTS_FOUND)
|
2024
|
+
|
2025
|
+
|
2026
|
+
def find_solution_components(self, filter: str = "*", starts_with: bool = True, ends_with: bool = False,
|
2027
|
+
ignore_case: bool = False, start_from: int = 0, page_size: int = max_paging_size, body: dict = None, ) -> list[
|
2028
|
+
dict] | str:
|
2029
|
+
"""Retrieve the list of solution component elements that contain the search string.
|
2030
|
+
https://egeria-project.org/concepts/solution-components
|
2031
|
+
|
2032
|
+
Parameters
|
2033
|
+
----------
|
2034
|
+
filter : str
|
2035
|
+
- filter string to search for.
|
2036
|
+
starts_with : bool, [default=False], optional
|
2037
|
+
Starts with the supplied string.
|
2038
|
+
ends_with : bool, [default=False], optional
|
2039
|
+
Ends with the supplied string
|
2040
|
+
ignore_case : bool, [default=False], optional
|
2041
|
+
Ignore case when searching
|
2042
|
+
start_from: int, [default=0], optional
|
2043
|
+
When multiple pages of results are available, the page number to start from.
|
2044
|
+
page_size: int, [default=max_paging_size], optional
|
2045
|
+
The number of items to return in a single page. If not specified, the default will be taken from
|
2046
|
+
the class instance.
|
2047
|
+
body: dict, optional, default = None
|
2048
|
+
- additional optional specifications for the search.
|
2049
|
+
|
2050
|
+
Returns
|
2051
|
+
-------
|
2052
|
+
list[dict] | str
|
2053
|
+
A list of information supply chain structures or a string if there are no elements found.
|
2054
|
+
|
2055
|
+
Raises
|
2056
|
+
------
|
2057
|
+
InvalidParameterException
|
2058
|
+
one of the parameters is null or invalid or
|
2059
|
+
PropertyServerException
|
2060
|
+
There is a problem adding the element properties to the metadata repository or
|
2061
|
+
UserNotAuthorizedException
|
2062
|
+
the requesting user is not authorized to issue this request.
|
2063
|
+
"""
|
2064
|
+
|
2065
|
+
loop = asyncio.get_event_loop()
|
2066
|
+
response = loop.run_until_complete(
|
2067
|
+
self._async_find_solution_components(filter, starts_with, ends_with, ignore_case, start_from, page_size,
|
2068
|
+
body, ))
|
2069
|
+
return response
|
2070
|
+
|
2071
|
+
|
2072
|
+
def find_all_solution_components(self, start_from: int = 0, page_size: int = max_paging_size) -> list[dict] | str:
|
2073
|
+
"""Retrieve a list of all solution component elements
|
2074
|
+
https://egeria-project.org/concepts/solution-components
|
2075
|
+
"""
|
2076
|
+
return self.find_solution_components("*", start_from=start_from, page_size=page_size)
|
2077
|
+
|
2078
|
+
|
2079
|
+
async def _async_get_solution_component_implementations(self, guid: str, body: dict = None, start_from: int = 0,
|
2080
|
+
page_size: int = max_paging_size, ) -> list[dict] | str:
|
2081
|
+
""" Retrieve the list of metadata elements that are associated with the solution component via
|
2082
|
+
the ImplementedBy relationship.
|
2083
|
+
Async version.
|
2084
|
+
|
2085
|
+
Parameters
|
2086
|
+
----------
|
2087
|
+
guid: str
|
2088
|
+
- identifier of the solution component to retrieve the implementations for.
|
2089
|
+
body: dict, optional, default = None
|
2090
|
+
- additional optional specifications for the search.
|
2091
|
+
start_from : int, default = 0
|
2092
|
+
page_size : int, default = max_paging_size
|
2093
|
+
|
2094
|
+
Returns
|
2095
|
+
-------
|
2096
|
+
list[dict] | str
|
2097
|
+
A list of implementation elements or a string if there are no elements found.
|
2098
|
+
|
2099
|
+
Raises
|
2100
|
+
------
|
2101
|
+
InvalidParameterException
|
2102
|
+
one of the parameters is null or invalid or
|
2103
|
+
PropertyServerException
|
2104
|
+
There is a problem adding the element properties to the metadata repository or
|
2105
|
+
UserNotAuthorizedException
|
2106
|
+
the requesting user is not authorized to issue this request.
|
2107
|
+
"""
|
2108
|
+
|
2109
|
+
possible_query_params = query_string([("startFrom", start_from), ("pageSize", page_size)])
|
2110
|
+
|
2111
|
+
validate_guid(guid)
|
2112
|
+
|
2113
|
+
url = (f"{self.solution_architect_command_root}/solution-components/{guid}/implementations"
|
2114
|
+
f"{possible_query_params}")
|
2115
|
+
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
2116
|
+
return response.json().get("elementList", NO_ELEMENTS_FOUND)
|
2117
|
+
|
2118
|
+
|
2119
|
+
def get_solution_component_implementations(self, guid: str, body: dict = None, start_from: int = 0,
|
2120
|
+
page_size: int = max_paging_size, ) -> list[dict] | str:
|
2121
|
+
"""Retrieve the list of metadata elements that are associated with the solution component via
|
2122
|
+
the ImplementedBy relationship.
|
2123
|
+
Async version.
|
2124
|
+
|
2125
|
+
Parameters
|
2126
|
+
----------
|
2127
|
+
guid: str
|
2128
|
+
- identifier of the solution component to retrieve the implementations for.
|
2129
|
+
body: dict, optional, default = None
|
2130
|
+
- additional optional specifications for the search.
|
2131
|
+
start_from : int, default = 0
|
2132
|
+
page_size : int, default = max_paging_size
|
2133
|
+
|
2134
|
+
Returns
|
2135
|
+
-------
|
2136
|
+
list[dict] | str
|
2137
|
+
A list of implementation elements or a string if there are no elements found.
|
2138
|
+
|
2139
|
+
Raises
|
2140
|
+
------
|
2141
|
+
InvalidParameterException
|
2142
|
+
one of the parameters is null or invalid or
|
2143
|
+
PropertyServerException
|
2144
|
+
There is a problem adding the element properties to the metadata repository or
|
2145
|
+
UserNotAuthorizedException
|
2146
|
+
the requesting user is not authorized to issue this request.
|
2147
|
+
"""
|
2148
|
+
|
2149
|
+
loop = asyncio.get_event_loop()
|
2150
|
+
response = loop.run_until_complete(
|
2151
|
+
self._async_get_solution_component_implementations(guid, body, start_from, page_size))
|
2152
|
+
return response
|
2153
|
+
|
2154
|
+
|
2155
|
+
if __name__ == "__main__":
|
2156
|
+
print("Main-Metadata Explorer")
|