pyegeria 5.4.0.28__py3-none-any.whl → 5.5.3.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.

Potentially problematic release.


This version of pyegeria might be problematic. Click here for more details.

Files changed (433) hide show
  1. commands/__init__.py +24 -0
  2. commands/cat/Dr-Egeria_md-orig.py +2 -2
  3. commands/cat/collection_actions.py +197 -0
  4. commands/cat/dr_egeria_command_help.py +137 -38
  5. commands/cat/dr_egeria_jupyter.py +7 -7
  6. commands/cat/dr_egeria_md.py +10 -267
  7. commands/cat/exp_list_glossaries.py +11 -14
  8. commands/cat/get_asset_graph.py +37 -267
  9. commands/cat/{get_collection.py → get_collection_tree.py} +10 -18
  10. commands/cat/get_project_dependencies.py +14 -14
  11. commands/cat/get_project_structure.py +15 -14
  12. commands/cat/get_tech_type_elements.py +16 -116
  13. commands/cat/glossary_actions.py +145 -298
  14. commands/cat/list_assets.py +3 -11
  15. commands/cat/list_cert_types.py +17 -63
  16. commands/cat/list_collections.py +17 -139
  17. commands/cat/list_deployed_catalogs.py +15 -27
  18. commands/cat/list_deployed_database_schemas.py +27 -43
  19. commands/cat/list_deployed_databases.py +16 -31
  20. commands/cat/list_deployed_servers.py +35 -54
  21. commands/cat/list_glossaries.py +18 -17
  22. commands/cat/list_projects.py +10 -12
  23. commands/cat/list_tech_type_elements.py +21 -37
  24. commands/cat/list_tech_types.py +13 -25
  25. commands/cat/list_terms.py +38 -79
  26. commands/cat/list_todos.py +4 -11
  27. commands/cat/list_user_ids.py +3 -10
  28. commands/cat/my_reports.py +559 -0
  29. commands/cat/run_report.py +394 -0
  30. commands/cat/{list_format_set.py → run_report_orig.py} +136 -44
  31. commands/cli/egeria.py +182 -219
  32. commands/cli/egeria_cat.py +32 -59
  33. commands/cli/egeria_my.py +13 -0
  34. commands/cli/egeria_ops.py +69 -74
  35. commands/cli/egeria_tech.py +17 -93
  36. commands/{cat → deprecated}/list_data_designer.py +2 -4
  37. commands/{cat → deprecated}/list_data_structures_full.py +3 -6
  38. commands/deprecated/old_get_asset_graph.py +315 -0
  39. commands/my/__init__.py +0 -2
  40. commands/my/list_my_profile.py +27 -34
  41. commands/my/list_my_roles.py +1 -7
  42. commands/my/monitor_my_todos.py +1 -7
  43. commands/my/monitor_open_todos.py +6 -7
  44. commands/my/todo_actions.py +4 -5
  45. commands/ops/__init__.py +0 -2
  46. commands/ops/gov_server_actions.py +17 -21
  47. commands/ops/list_archives.py +17 -38
  48. commands/ops/list_catalog_targets.py +33 -40
  49. commands/ops/load_archive.py +14 -11
  50. commands/ops/{monitor_engine_activity_c.py → monitor_active_engine_activity.py} +51 -82
  51. commands/ops/{monitor_integ_daemon_status.py → monitor_daemon_status.py} +35 -55
  52. commands/ops/monitor_engine_activity.py +79 -77
  53. commands/ops/{monitor_gov_eng_status.py → monitor_engine_status.py} +10 -7
  54. commands/ops/monitor_platform_status.py +38 -50
  55. commands/ops/monitor_server_startup.py +6 -11
  56. commands/ops/monitor_server_status.py +7 -11
  57. commands/ops/orig_monitor_server_list.py +8 -8
  58. commands/ops/orig_monitor_server_status.py +1 -5
  59. commands/ops/refresh_integration_daemon.py +5 -5
  60. commands/ops/restart_integration_daemon.py +5 -5
  61. commands/ops/table_integ_daemon_status.py +6 -6
  62. commands/ops/x_engine_actions.py +7 -7
  63. commands/tech/__init__.py +0 -2
  64. commands/tech/{generic_actions.py → element_actions.py} +6 -11
  65. commands/tech/get_element_info.py +20 -29
  66. commands/tech/get_guid_info.py +23 -42
  67. commands/tech/get_tech_details.py +20 -35
  68. commands/tech/get_tech_type_template.py +28 -39
  69. commands/tech/list_all_om_type_elements.py +24 -30
  70. commands/tech/list_all_om_type_elements_x.py +22 -28
  71. commands/tech/list_all_related_elements.py +19 -28
  72. commands/tech/list_anchored_elements.py +22 -30
  73. commands/tech/list_asset_types.py +19 -24
  74. commands/tech/list_elements_by_classification_by_property_value.py +26 -32
  75. commands/tech/list_elements_by_property_value.py +19 -25
  76. commands/tech/list_elements_by_property_value_x.py +20 -28
  77. commands/tech/list_elements_for_classification.py +28 -41
  78. commands/tech/list_gov_action_processes.py +16 -27
  79. commands/tech/list_information_supply_chains.py +22 -30
  80. commands/tech/list_registered_services.py +14 -26
  81. commands/tech/list_related_elements_with_prop_value.py +15 -25
  82. commands/tech/list_related_specification.py +1 -4
  83. commands/tech/list_relationship_types.py +15 -25
  84. commands/tech/list_relationships.py +20 -36
  85. commands/tech/list_solution_blueprints.py +28 -33
  86. commands/tech/list_solution_components.py +23 -29
  87. commands/tech/list_solution_roles.py +21 -32
  88. commands/tech/list_tech_templates.py +51 -54
  89. commands/tech/list_valid_metadata_values.py +5 -9
  90. commands/tech/table_tech_templates.py +2 -6
  91. commands/tech/x_list_related_elements.py +1 -4
  92. examples/GeoSpatial Products Example.py +524 -0
  93. examples/Jupyter Notebooks/P-egeria-server-config.ipynb +2137 -0
  94. examples/Jupyter Notebooks/README.md +2 -0
  95. examples/Jupyter Notebooks/common/P-environment-check.ipynb +115 -0
  96. examples/Jupyter Notebooks/common/__init__.py +14 -0
  97. examples/Jupyter Notebooks/common/common-functions.ipynb +4694 -0
  98. examples/Jupyter Notebooks/common/environment-check.ipynb +52 -0
  99. examples/Jupyter Notebooks/common/globals.ipynb +184 -0
  100. examples/Jupyter Notebooks/common/globals.py +154 -0
  101. examples/Jupyter Notebooks/common/orig_globals.py +152 -0
  102. examples/format_sets/all_format_sets.json +910 -0
  103. examples/format_sets/custom_format_sets.json +268 -0
  104. examples/format_sets/subset_format_sets.json +187 -0
  105. examples/format_sets_save_load_example.py +291 -0
  106. examples/jacquard_data_sets.py +129 -0
  107. examples/output_formats_example.py +193 -0
  108. examples/test_jacquard_data_sets.py +54 -0
  109. examples/test_jacquard_data_sets_scenarios.py +94 -0
  110. md_processing/__init__.py +33 -24
  111. md_processing/command_dispatcher.py +33 -0
  112. md_processing/command_mapping.py +221 -0
  113. md_processing/data/commands/commands_data_designer.json +537 -0
  114. md_processing/data/commands/commands_external_reference.json +733 -0
  115. md_processing/data/commands/commands_feedback.json +155 -0
  116. md_processing/data/commands/commands_general.json +204 -0
  117. md_processing/data/commands/commands_glossary.json +218 -0
  118. md_processing/data/commands/commands_governance.json +3678 -0
  119. md_processing/data/commands/commands_product_manager.json +865 -0
  120. md_processing/data/commands/commands_project.json +642 -0
  121. md_processing/data/commands/commands_solution_architect.json +366 -0
  122. md_processing/data/commands.json +6489 -30060
  123. md_processing/data/{commands-working.json → commands_working.json} +9304 -13513
  124. md_processing/data/gened_report_specs.py +6584 -0
  125. md_processing/data/generated_format_sets.json +6533 -0
  126. md_processing/data/generated_format_sets_old.json +4137 -0
  127. md_processing/data/generated_format_sets_old.py +45 -0
  128. md_processing/dr_egeria.py +182 -0
  129. md_processing/md_commands/data_designer_commands.py +195 -583
  130. md_processing/md_commands/ext_ref_commands.py +530 -0
  131. md_processing/md_commands/feedback_commands.py +726 -0
  132. md_processing/md_commands/glossary_commands.py +106 -490
  133. md_processing/md_commands/governance_officer_commands.py +129 -18
  134. md_processing/md_commands/product_manager_commands.py +362 -115
  135. md_processing/md_commands/project_commands.py +351 -134
  136. md_processing/md_commands/solution_architect_commands.py +276 -232
  137. md_processing/md_commands/view_commands.py +295 -0
  138. md_processing/md_processing_utils/common_md_proc_utils.py +258 -166
  139. md_processing/md_processing_utils/common_md_utils.py +138 -43
  140. md_processing/md_processing_utils/determine_width.py +103 -0
  141. md_processing/md_processing_utils/extraction_utils.py +100 -39
  142. md_processing/md_processing_utils/gen_report_specs.py +643 -0
  143. md_processing/md_processing_utils/generate_dr_help.py +61 -33
  144. md_processing/md_processing_utils/generate_md_cmd_templates.py +20 -19
  145. md_processing/md_processing_utils/generate_md_templates.py +3 -12
  146. md_processing/md_processing_utils/md_processing_constants.py +1053 -72
  147. pyegeria/__init__.py +203 -158
  148. pyegeria/core/__init__.py +40 -0
  149. pyegeria/core/_base_platform_client.py +574 -0
  150. pyegeria/core/_base_server_client.py +573 -0
  151. pyegeria/{_exceptions_new.py → core/_exceptions.py} +62 -30
  152. pyegeria/{_globals.py → core/_globals.py} +14 -3
  153. pyegeria/core/_server_client.py +6073 -0
  154. pyegeria/{_validators.py → core/_validators.py} +7 -8
  155. pyegeria/core/config.py +654 -0
  156. pyegeria/{create_tech_guid_lists.py → core/create_tech_guid_lists.py} +0 -1
  157. pyegeria/core/load_config.py +37 -0
  158. pyegeria/{logging_configuration.py → core/logging_configuration.py} +1 -1
  159. pyegeria/core/mcp_adapter.py +144 -0
  160. pyegeria/core/mcp_server.py +212 -0
  161. pyegeria/core/utils.py +405 -0
  162. pyegeria/{_client.py → deprecated/_client.py} +24 -25
  163. pyegeria/{_deprecated_gov_engine.py → deprecated/_deprecated_gov_engine.py} +16 -16
  164. pyegeria/{classification_manager_omvs.py → deprecated/classification_manager_omvs.py} +1987 -1877
  165. pyegeria/{output_formatter.py → deprecated/output_formatter_with_machine_keys.py} +298 -45
  166. pyegeria/{runtime_manager_omvs.py → deprecated/runtime_manager_omvs.py} +155 -171
  167. pyegeria/{valid_metadata_omvs.py → deprecated/valid_metadata_omvs.py} +93 -93
  168. pyegeria/{x_action_author_omvs.py → deprecated/x_action_author_omvs.py} +2 -3
  169. pyegeria/egeria_cat_client.py +26 -70
  170. pyegeria/egeria_client.py +130 -93
  171. pyegeria/egeria_config_client.py +40 -46
  172. pyegeria/egeria_tech_client.py +141 -54
  173. pyegeria/models/__init__.py +150 -0
  174. pyegeria/{models.py → models/models.py} +156 -20
  175. pyegeria/omvs/__init__.py +84 -0
  176. pyegeria/omvs/action_author.py +342 -0
  177. pyegeria/omvs/actor_manager.py +5980 -0
  178. pyegeria/omvs/asset_catalog.py +842 -0
  179. pyegeria/omvs/asset_maker.py +2736 -0
  180. pyegeria/omvs/automated_curation.py +4403 -0
  181. pyegeria/omvs/classification_manager.py +11213 -0
  182. pyegeria/{collection_manager.py → omvs/collection_manager.py} +1334 -1160
  183. pyegeria/omvs/community_matters_omvs.py +468 -0
  184. pyegeria/{core_omag_server_config.py → omvs/core_omag_server_config.py} +157 -157
  185. pyegeria/{data_designer.py → omvs/data_designer.py} +1115 -660
  186. pyegeria/omvs/data_discovery.py +869 -0
  187. pyegeria/omvs/data_engineer.py +372 -0
  188. pyegeria/omvs/digital_business.py +1133 -0
  189. pyegeria/omvs/external_links.py +1752 -0
  190. pyegeria/omvs/feedback_manager.py +834 -0
  191. pyegeria/{full_omag_server_config.py → omvs/full_omag_server_config.py} +73 -69
  192. pyegeria/{glossary_manager.py → omvs/glossary_manager.py} +857 -519
  193. pyegeria/{governance_officer.py → omvs/governance_officer.py} +964 -468
  194. pyegeria/omvs/lineage_linker.py +314 -0
  195. pyegeria/omvs/location_arena.py +1525 -0
  196. pyegeria/omvs/metadata_expert.py +668 -0
  197. pyegeria/omvs/metadata_explorer_omvs.py +2943 -0
  198. pyegeria/omvs/my_profile.py +1042 -0
  199. pyegeria/omvs/notification_manager.py +358 -0
  200. pyegeria/omvs/people_organizer.py +394 -0
  201. pyegeria/{platform_services.py → omvs/platform_services.py} +113 -193
  202. pyegeria/omvs/product_manager.py +1825 -0
  203. pyegeria/omvs/project_manager.py +1907 -0
  204. pyegeria/omvs/reference_data.py +1140 -0
  205. pyegeria/omvs/registered_info.py +334 -0
  206. pyegeria/omvs/runtime_manager.py +2817 -0
  207. pyegeria/omvs/schema_maker.py +446 -0
  208. pyegeria/{server_operations.py → omvs/server_operations.py} +27 -26
  209. pyegeria/{solution_architect_omvs.py → omvs/solution_architect.py} +1886 -1505
  210. pyegeria/omvs/specification_properties.py +37 -0
  211. pyegeria/omvs/subject_area.py +1042 -0
  212. pyegeria/omvs/template_manager_omvs.py +236 -0
  213. pyegeria/omvs/time_keeper.py +1761 -0
  214. pyegeria/omvs/valid_metadata.py +3221 -0
  215. pyegeria/omvs/valid_metadata_lists.py +37 -0
  216. pyegeria/omvs/valid_type_lists.py +37 -0
  217. pyegeria/view/__init__.py +28 -0
  218. pyegeria/{_output_format_models.py → view/_output_format_models.py} +160 -24
  219. pyegeria/view/_output_formats.py +14 -0
  220. pyegeria/view/base_report_formats.py +2719 -0
  221. pyegeria/view/dr_egeria_reports.py +56 -0
  222. pyegeria/view/format_set_executor.py +397 -0
  223. pyegeria/{md_processing_utils.py → view/md_processing_utils.py} +5 -5
  224. pyegeria/{mermaid_utilities.py → view/mermaid_utilities.py} +2 -154
  225. pyegeria/view/output_formatter.py +1297 -0
  226. pyegeria-5.5.3.3.dist-info/METADATA +218 -0
  227. pyegeria-5.5.3.3.dist-info/RECORD +241 -0
  228. {pyegeria-5.4.0.28.dist-info → pyegeria-5.5.3.3.dist-info}/WHEEL +2 -1
  229. pyegeria-5.5.3.3.dist-info/entry_points.txt +103 -0
  230. pyegeria-5.5.3.3.dist-info/top_level.txt +4 -0
  231. commands/cat/.DS_Store +0 -0
  232. commands/cat/.env +0 -8
  233. commands/cat/README.md +0 -16
  234. commands/cat/debug_log +0 -1126
  235. commands/cat/debug_log.2025-08-18_11-34-38_088636.zip +0 -0
  236. commands/cat/list_categories.py +0 -192
  237. commands/cat/logs/pyegeria.log +0 -4
  238. commands/cli/debug_log +0 -0
  239. commands/cli/debug_log.log +0 -0
  240. commands/cli/txt_custom_v2.tcss +0 -19
  241. commands/my/README.md +0 -17
  242. commands/ops/README.md +0 -24
  243. commands/ops/logs/pyegeria.log +0 -0
  244. commands/ops/monitor_asset_events.py +0 -108
  245. commands/tech/README.md +0 -24
  246. md_processing/.DS_Store +0 -0
  247. md_processing/dr-egeria-outbox/Collections-2025-08-12-13-30-37.md +0 -163
  248. md_processing/dr-egeria-outbox/Collections-2025-08-12-13-35-58.md +0 -474
  249. md_processing/dr_egeria_inbox/Derive-Dr-Gov-Defs.md +0 -8
  250. md_processing/dr_egeria_inbox/Dr.Egeria Templates.md +0 -873
  251. md_processing/dr_egeria_inbox/arch_test.md +0 -57
  252. md_processing/dr_egeria_inbox/archive/dr_egeria_intro.md +0 -254
  253. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_more_terms.md +0 -696
  254. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part1.md +0 -254
  255. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part2.md +0 -298
  256. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part3.md +0 -608
  257. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part4.md +0 -94
  258. md_processing/dr_egeria_inbox/archive/freddie_intro.md +0 -284
  259. md_processing/dr_egeria_inbox/archive/freddie_intro_orig.md +0 -275
  260. md_processing/dr_egeria_inbox/archive/test-term.md +0 -110
  261. md_processing/dr_egeria_inbox/cat_test.md +0 -100
  262. md_processing/dr_egeria_inbox/collections.md +0 -39
  263. md_processing/dr_egeria_inbox/data_designer_debug.log +0 -6
  264. md_processing/dr_egeria_inbox/data_designer_out.md +0 -60
  265. md_processing/dr_egeria_inbox/data_designer_search_test.md +0 -11
  266. md_processing/dr_egeria_inbox/data_field.md +0 -54
  267. md_processing/dr_egeria_inbox/data_spec.md +0 -77
  268. md_processing/dr_egeria_inbox/data_spec_test.md +0 -2406
  269. md_processing/dr_egeria_inbox/data_test.md +0 -179
  270. md_processing/dr_egeria_inbox/data_test2.md +0 -429
  271. md_processing/dr_egeria_inbox/data_test3.md +0 -462
  272. md_processing/dr_egeria_inbox/dr_egeria_data_designer_1.md +0 -124
  273. md_processing/dr_egeria_inbox/dr_egeria_intro_categories.md +0 -168
  274. md_processing/dr_egeria_inbox/dr_egeria_intro_part1.md +0 -280
  275. md_processing/dr_egeria_inbox/dr_egeria_intro_part2.md +0 -318
  276. md_processing/dr_egeria_inbox/dr_egeria_intro_part3.md +0 -1073
  277. md_processing/dr_egeria_inbox/dr_egeria_isc1.md +0 -44
  278. md_processing/dr_egeria_inbox/generated_help_report.md +0 -9
  279. md_processing/dr_egeria_inbox/glossary_creation_experiment.ipynb +0 -341
  280. md_processing/dr_egeria_inbox/glossary_list.md +0 -5
  281. md_processing/dr_egeria_inbox/glossary_search_test.md +0 -40
  282. md_processing/dr_egeria_inbox/glossary_test1.md +0 -324
  283. md_processing/dr_egeria_inbox/gov_def.md +0 -482
  284. md_processing/dr_egeria_inbox/gov_def2.md +0 -447
  285. md_processing/dr_egeria_inbox/img.png +0 -0
  286. md_processing/dr_egeria_inbox/product.md +0 -211
  287. md_processing/dr_egeria_inbox/rel.md +0 -8
  288. md_processing/dr_egeria_inbox/sb.md +0 -119
  289. md_processing/dr_egeria_inbox/solution-components.md +0 -136
  290. md_processing/dr_egeria_inbox/solution_blueprints.md +0 -118
  291. md_processing/dr_egeria_inbox/synonym_test.md +0 -42
  292. md_processing/dr_egeria_inbox/t2.md +0 -268
  293. md_processing/dr_egeria_outbox/.obsidian/app.json +0 -1
  294. md_processing/dr_egeria_outbox/.obsidian/appearance.json +0 -1
  295. md_processing/dr_egeria_outbox/.obsidian/community-plugins.json +0 -6
  296. md_processing/dr_egeria_outbox/.obsidian/core-plugins.json +0 -31
  297. md_processing/dr_egeria_outbox/.obsidian/plugins/calendar/data.json +0 -10
  298. md_processing/dr_egeria_outbox/.obsidian/plugins/calendar/main.js +0 -4459
  299. md_processing/dr_egeria_outbox/.obsidian/plugins/calendar/manifest.json +0 -10
  300. md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-kanban/data.json +0 -3
  301. md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-kanban/main.js +0 -153
  302. md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-kanban/manifest.json +0 -11
  303. md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-kanban/styles.css +0 -1
  304. md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-tasks-plugin/main.js +0 -500
  305. md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-tasks-plugin/manifest.json +0 -12
  306. md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-tasks-plugin/styles.css +0 -1
  307. md_processing/dr_egeria_outbox/.obsidian/plugins/templater-obsidian/main.js +0 -37
  308. md_processing/dr_egeria_outbox/.obsidian/plugins/templater-obsidian/manifest.json +0 -11
  309. md_processing/dr_egeria_outbox/.obsidian/plugins/templater-obsidian/styles.css +0 -220
  310. md_processing/dr_egeria_outbox/.obsidian/types.json +0 -28
  311. md_processing/dr_egeria_outbox/.obsidian/workspace.json +0 -220
  312. md_processing/dr_egeria_outbox/Untitled.canvas +0 -1
  313. md_processing/dr_egeria_outbox/friday/processed-2025-08-22 21:22-dr_egeria_intro_part1.md +0 -312
  314. md_processing/dr_egeria_outbox/friday/processed-2025-08-22 21:23-dr_egeria_intro_part1.md +0 -265
  315. md_processing/dr_egeria_outbox/friday/processed-2025-08-23 15:06-dr_egeria_intro_part1.md +0 -230
  316. md_processing/dr_egeria_outbox/friday/processed-2025-08-23 15:30-dr_egeria_intro_part1.md +0 -296
  317. md_processing/dr_egeria_outbox/friday/processed-2025-08-23 15:31-dr_egeria_intro_part1.md +0 -253
  318. md_processing/dr_egeria_outbox/friday/processed-2025-08-23 16:08-dr_egeria_intro_part2.md +0 -343
  319. md_processing/dr_egeria_outbox/friday/processed-2025-08-23 16:12-dr_egeria_intro_part2.md +0 -343
  320. md_processing/dr_egeria_outbox/monday/processed-2025-08-19 07:05-product.md +0 -426
  321. md_processing/dr_egeria_outbox/monday/processed-2025-08-19 07:56-product.md +0 -212
  322. md_processing/dr_egeria_outbox/monday/processed-2025-08-19 09:43-product.md +0 -201
  323. md_processing/dr_egeria_outbox/sunday/processed-2025-07-20 14:55-product.md +0 -77
  324. md_processing/dr_egeria_outbox/sunday/processed-2025-07-20 15:05-product.md +0 -75
  325. md_processing/dr_egeria_outbox/sunday/processed-2025-07-20 15:11-product.md +0 -74
  326. md_processing/dr_egeria_outbox/sunday/processed-2025-07-20 20:40-collections.md +0 -49
  327. md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 15:00-Derive-Dr-Gov-Defs.md +0 -719
  328. md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 20:13-Derive-Dr-Gov-Defs.md +0 -41
  329. md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 20:14-Derive-Dr-Gov-Defs.md +0 -33
  330. md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 20:50-Derive-Dr-Gov-Defs.md +0 -192
  331. md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 22:08-gov_def2.md +0 -486
  332. md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 22:10-gov_def2.md +0 -486
  333. md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 08:53-gov_def2.md +0 -486
  334. md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 08:54-gov_def2.md +0 -486
  335. md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 09:03-gov_def2.md +0 -486
  336. md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 09:06-gov_def2.md +0 -486
  337. md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 09:10-gov_def2.md +0 -486
  338. md_processing/dr_egeria_outbox/tuesday/processed-2025-07-16 19:15-gov_def2.md +0 -527
  339. md_processing/dr_egeria_outbox/tuesday/processed-2025-07-17 12:08-gov_def2.md +0 -527
  340. md_processing/dr_egeria_outbox/tuesday/processed-2025-07-17 14:27-gov_def2.md +0 -485
  341. md_processing/dr_egeria_outbox/tuesday/processed-2025-08-19 10:55-product.md +0 -209
  342. md_processing/family_docs/Data Designer/Create_Data_Class.md +0 -164
  343. md_processing/family_docs/Data Designer/Create_Data_Dictionary.md +0 -30
  344. md_processing/family_docs/Data Designer/Create_Data_Field.md +0 -162
  345. md_processing/family_docs/Data Designer/Create_Data_Specification.md +0 -36
  346. md_processing/family_docs/Data Designer/Create_Data_Structure.md +0 -38
  347. md_processing/family_docs/Data Designer/View_Data_Classes.md +0 -78
  348. md_processing/family_docs/Data Designer/View_Data_Dictionaries.md +0 -78
  349. md_processing/family_docs/Data Designer/View_Data_Fields.md +0 -78
  350. md_processing/family_docs/Data Designer/View_Data_Specifications.md +0 -78
  351. md_processing/family_docs/Data Designer/View_Data_Structures.md +0 -78
  352. md_processing/family_docs/Data Designer.md +0 -842
  353. md_processing/family_docs/Digital Product Manager/Add_Member->Collection.md +0 -42
  354. md_processing/family_docs/Digital Product Manager/Attach_Collection->Resource.md +0 -36
  355. md_processing/family_docs/Digital Product Manager/Create_Agreement.md +0 -96
  356. md_processing/family_docs/Digital Product Manager/Create_Data_Sharing_Agreement.md +0 -72
  357. md_processing/family_docs/Digital Product Manager/Create_DigitalSubscription.md +0 -102
  358. md_processing/family_docs/Digital Product Manager/Create_Digital_Product.md +0 -134
  359. md_processing/family_docs/Digital Product Manager/Link_Agreement_Items.md +0 -60
  360. md_processing/family_docs/Digital Product Manager/Link_Contracts.md +0 -26
  361. md_processing/family_docs/Digital Product Manager/Link_Digital_Product_-_Digital_Product.md +0 -30
  362. md_processing/family_docs/Digital Product Manager/Link_Subscribers.md +0 -48
  363. md_processing/family_docs/Digital Product Manager.md +0 -668
  364. md_processing/family_docs/Glossary/Attach_Category_Parent.md +0 -18
  365. md_processing/family_docs/Glossary/Attach_Term-Term_Relationship.md +0 -26
  366. md_processing/family_docs/Glossary/Create_Category.md +0 -38
  367. md_processing/family_docs/Glossary/Create_Glossary.md +0 -42
  368. md_processing/family_docs/Glossary/Create_Term.md +0 -70
  369. md_processing/family_docs/Glossary.md +0 -206
  370. md_processing/family_docs/Governance Officer/Create_Business_Imperative.md +0 -106
  371. md_processing/family_docs/Governance Officer/Create_Certification_Type.md +0 -112
  372. md_processing/family_docs/Governance Officer/Create_Governance_Approach.md +0 -114
  373. md_processing/family_docs/Governance Officer/Create_Governance_Obligation.md +0 -114
  374. md_processing/family_docs/Governance Officer/Create_Governance_Principle.md +0 -114
  375. md_processing/family_docs/Governance Officer/Create_Governance_Procedure.md +0 -128
  376. md_processing/family_docs/Governance Officer/Create_Governance_Process.md +0 -122
  377. md_processing/family_docs/Governance Officer/Create_Governance_Processing_Purpose.md +0 -106
  378. md_processing/family_docs/Governance Officer/Create_Governance_Responsibility.md +0 -122
  379. md_processing/family_docs/Governance Officer/Create_Governance_Rule.md +0 -122
  380. md_processing/family_docs/Governance Officer/Create_Governance_Strategy.md +0 -106
  381. md_processing/family_docs/Governance Officer/Create_License_Type.md +0 -112
  382. md_processing/family_docs/Governance Officer/Create_Naming_Standard_Rule.md +0 -122
  383. md_processing/family_docs/Governance Officer/Create_Regulation_Article.md +0 -106
  384. md_processing/family_docs/Governance Officer/Create_Regulation_Definition.md +0 -118
  385. md_processing/family_docs/Governance Officer/Create_Security_Access_Control.md +0 -114
  386. md_processing/family_docs/Governance Officer/Create_Security_Group.md +0 -120
  387. md_processing/family_docs/Governance Officer/Create_Service_Level_Objectives.md +0 -122
  388. md_processing/family_docs/Governance Officer/Create_Threat_Definition.md +0 -106
  389. md_processing/family_docs/Governance Officer/Link_Governance_Controls.md +0 -32
  390. md_processing/family_docs/Governance Officer/Link_Governance_Drivers.md +0 -32
  391. md_processing/family_docs/Governance Officer/Link_Governance_Policies.md +0 -32
  392. md_processing/family_docs/Governance Officer/View_Governance_Definitions.md +0 -82
  393. md_processing/family_docs/Governance Officer.md +0 -2412
  394. md_processing/family_docs/Solution Architect/Create_Information_Supply_Chain.md +0 -70
  395. md_processing/family_docs/Solution Architect/Create_Solution_Blueprint.md +0 -44
  396. md_processing/family_docs/Solution Architect/Create_Solution_Component.md +0 -96
  397. md_processing/family_docs/Solution Architect/Create_Solution_Role.md +0 -66
  398. md_processing/family_docs/Solution Architect/Link_Information_Supply_Chain_Peers.md +0 -32
  399. md_processing/family_docs/Solution Architect/Link_Solution_Component_Peers.md +0 -32
  400. md_processing/family_docs/Solution Architect/View_Information_Supply_Chains.md +0 -32
  401. md_processing/family_docs/Solution Architect/View_Solution_Blueprints.md +0 -32
  402. md_processing/family_docs/Solution Architect/View_Solution_Components.md +0 -32
  403. md_processing/family_docs/Solution Architect/View_Solution_Roles.md +0 -32
  404. md_processing/family_docs/Solution Architect.md +0 -490
  405. md_processing/md_processing_utils/debug_log +0 -574
  406. md_processing/md_processing_utils/debug_log.log +0 -0
  407. md_processing/md_processing_utils/dr-egeria-help-2025-07-17T17:22:09.md +0 -2065
  408. md_processing/md_processing_utils/generated_help_terms.md +0 -842
  409. pyegeria/.DS_Store +0 -0
  410. pyegeria/README.md +0 -35
  411. pyegeria/_client_new.py +0 -1102
  412. pyegeria/_output_formats.py +0 -730
  413. pyegeria/asset_catalog_omvs.py +0 -864
  414. pyegeria/automated_curation_omvs.py +0 -3765
  415. pyegeria/config.py +0 -523
  416. pyegeria/egeria_my_client.py +0 -91
  417. pyegeria/feedback_manager_omvs.py +0 -4573
  418. pyegeria/load_config_orig.py +0 -218
  419. pyegeria/md_processing_helpers.py +0 -58
  420. pyegeria/md_processing_utils_orig.py +0 -1103
  421. pyegeria/metadata_explorer_omvs.py +0 -2326
  422. pyegeria/my_profile_omvs.py +0 -1022
  423. pyegeria/project_manager.py +0 -1591
  424. pyegeria/registered_info.py +0 -167
  425. pyegeria/template_manager_omvs.py +0 -1414
  426. pyegeria/utils.py +0 -256
  427. pyegeria-5.4.0.28.dist-info/METADATA +0 -77
  428. pyegeria-5.4.0.28.dist-info/RECORD +0 -343
  429. pyegeria-5.4.0.28.dist-info/entry_points.txt +0 -105
  430. /commands/cat/debug_log.log → /pyegeria/deprecated/__init__.py +0 -0
  431. /pyegeria/{_exceptions.py → deprecated/_exceptions.py} +0 -0
  432. /pyegeria/{collection_models.py → models/collection_models.py} +0 -0
  433. {pyegeria-5.4.0.28.dist-info → pyegeria-5.5.3.3.dist-info/licenses}/LICENSE +0 -0
@@ -1,3765 +0,0 @@
1
- """
2
- SPDX-License-Identifier: Apache-2.0
3
- Copyright Contributors to the ODPi Egeria project.
4
-
5
- Automated Curation View Service Methods
6
-
7
- """
8
-
9
- import asyncio
10
- import datetime
11
-
12
- from httpx import Response
13
-
14
- from pyegeria.utils import body_slimmer
15
- from pyegeria._globals import NO_ELEMENTS_FOUND
16
- from pyegeria._client import Client
17
- from pyegeria import TEMPLATE_GUIDS, max_paging_size
18
- from pyegeria._exceptions import (
19
- InvalidParameterException,
20
- PropertyServerException,
21
- UserNotAuthorizedException,
22
- )
23
-
24
- from ._validators import validate_guid, validate_name, validate_search_string
25
-
26
-
27
- class AutomatedCuration(Client):
28
- """Set up and maintain automation services in Egeria.
29
-
30
- Attributes:
31
- view_server : str
32
- The name of the View Server to use.
33
- platform_url : str
34
- URL of the server platform to connect to
35
- user_id : str
36
- The identity of the user calling the method - this sets a default optionally used by the methods
37
- when the user doesn't pass the user_id on a method call.
38
- user_pwd: str
39
- The password associated with the user_id. Defaults to None
40
-
41
-
42
- """
43
-
44
- def __init__(
45
- self,
46
- view_server: str,
47
- platform_url: str,
48
- user_id: str,
49
- user_pwd: str = None,
50
- token: str = None,
51
- ):
52
- self.view_server = view_server
53
- self.platform_url = platform_url
54
- self.user_id = user_id
55
- self.user_pwd = user_pwd
56
- Client.__init__(self, view_server, platform_url, user_id, user_pwd, token=token)
57
- self.curation_command_root = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/automated-curation"
58
-
59
- async def _async_create_element_from_template(self, body: dict) -> str:
60
- """Create a new metadata element from a template. Async version.
61
- Parameters
62
- ----------
63
- body : str
64
- The json body used to instantiate the template.
65
-
66
- Returns
67
- -------
68
- Response
69
- The guid of the resulting element
70
-
71
- Raises
72
- ------
73
- InvalidParameterException
74
- PropertyServerException
75
- UserNotAuthorizedException
76
-
77
- Notes
78
- -----
79
- See also: https://egeria-project.org/features/templated-cataloguing/overview/
80
- The full description of the body is shown below:
81
- {
82
- "typeName" : "",
83
- "initialStatus" : "",
84
- "initialClassifications" : "",
85
- "anchorGUID" : "",
86
- "isOwnAnchor" : "",
87
- "effectiveFrom" : "",
88
- "effectiveTo" : "",
89
- "templateGUID" : "",
90
- "templateProperties" : {},
91
- "placeholderPropertyValues" : {
92
- "placeholderPropertyName1" : "placeholderPropertyValue1",
93
- "placeholderPropertyName2" : "placeholderPropertyValue2"
94
- },
95
- "parentGUID" : "",
96
- "parentRelationshipTypeName" : "",
97
- "parentRelationshipProperties" : "",
98
- "parentAtEnd1" : "",
99
- "effectiveTime" : ""
100
- }
101
- """
102
-
103
- url = f"{self.curation_command_root}/catalog-templates/new-element"
104
- response = await self._async_make_request("POST", url, body)
105
- return response.json().get("guid", "GUID failed to be returned")
106
-
107
- def create_element_from_template(self, body: dict) -> str:
108
- """Create a new metadata element from a template. Async version.
109
- Parameters
110
- ----------
111
- body : str
112
- The json body used to instantiate the template.
113
-
114
-
115
- Returns
116
- -------
117
- Response
118
- The guid of the resulting element
119
-
120
- Raises
121
- ------
122
- InvalidParameterException
123
- PropertyServerException
124
- UserNotAuthorizedException
125
-
126
- Notes
127
- -----
128
- See also: https://egeria-project.org/features/templated-cataloguing/overview/
129
- The full description of the body is shown below:
130
- {
131
- "typeName" : "",
132
- "initialStatus" : "",
133
- "initialClassifications" : "",
134
- "anchorGUID" : "",
135
- "isOwnAnchor" : "",
136
- "effectiveFrom" : "",
137
- "effectiveTo" : "",
138
- "templateGUID" : "",
139
- "templateProperties" : {},
140
- "placeholderPropertyValues" : {
141
- "placeholderPropertyName1" : "placeholderPropertyValue1",
142
- "placeholderPropertyName2" : "placeholderPropertyValue2"
143
- },
144
- "parentGUID" : "",
145
- "parentRelationshipTypeName" : "",
146
- "parentRelationshipProperties" : "",
147
- "parentAtEnd1" : "",
148
- "effectiveTime" : ""
149
- }
150
- """
151
- loop = asyncio.get_event_loop()
152
- response = loop.run_until_complete(
153
- self._async_create_element_from_template(body)
154
- )
155
- return response
156
-
157
- async def _async_create_kafka_server_element_from_template(
158
- self,
159
- kafka_server: str,
160
- host_name: str,
161
- port: str,
162
- description: str = None,
163
- ) -> str:
164
- """Create a Kafka server element from a template. Async version.
165
-
166
- Parameters
167
- ----------
168
- kafka_server : str
169
- The name of the Kafka server.
170
-
171
- host_name : str
172
- The host name of the Kafka server.
173
-
174
- port : str
175
- The port number of the Kafka server.
176
-
177
- description: str, opt
178
- A description of the Kafka server.
179
-
180
-
181
-
182
- Returns
183
- -------
184
- str
185
- The GUID of the Kafka server element.
186
- """
187
-
188
- body = {
189
- "templateGUID": TEMPLATE_GUIDS["Apache Kafka Server"],
190
- "isOwnAnchor": "true",
191
- "placeholderPropertyValues": {
192
- "serverName": kafka_server,
193
- "hostIdentifier": host_name,
194
- "portNumber": port,
195
- "description": description,
196
- },
197
- }
198
- body_s = body_slimmer(body)
199
- response = await self._async_create_element_from_template(body_s)
200
- return str(response)
201
-
202
- def create_kafka_server_element_from_template(
203
- self,
204
- kafka_server: str,
205
- host_name: str,
206
- port: str,
207
- description: str = None,
208
- ) -> str:
209
- """Create a Kafka server element from a template.
210
-
211
- Parameters
212
- ----------
213
- kafka_server : str
214
- The name of the Kafka server.
215
-
216
- host_name : str
217
- The host name of the Kafka server.
218
-
219
- port : str
220
- The port number of the Kafka server.
221
-
222
- description: str, opt
223
- A description of the Kafka server.
224
-
225
-
226
-
227
- Returns
228
- -------
229
- str
230
- The GUID of the Kafka server element.
231
- """
232
- loop = asyncio.get_event_loop()
233
- response = loop.run_until_complete(
234
- self._async_create_kafka_server_element_from_template(
235
- kafka_server, host_name, port, description
236
- )
237
- )
238
- return response
239
-
240
- async def _async_create_postgres_server_element_from_template(
241
- self,
242
- postgres_server: str,
243
- host_name: str,
244
- port: str,
245
- db_user: str,
246
- db_pwd: str,
247
- description: str = None,
248
- ) -> str:
249
- """Create a Postgres server element from a template. Async version.
250
-
251
- Parameters
252
- ----------
253
- postgres_server : str
254
- The name of the Postgres server.
255
-
256
- host_name : str
257
- The host name of the Postgres server.
258
-
259
- port : str
260
- The port number of the Postgres server.
261
-
262
- db_user: str
263
- User name to connect to the database
264
-
265
- db_pwd: str
266
- User password to connect to the database
267
-
268
- description: str, opt
269
- A description of the element.
270
-
271
-
272
-
273
- Returns
274
- -------
275
- str
276
- The GUID of the Postgres server element.
277
- """
278
- body = {
279
- "templateGUID": TEMPLATE_GUIDS["PostgreSQL Server"],
280
- "isOwnAnchor": "true",
281
- "placeholderPropertyValues": {
282
- "serverName": postgres_server,
283
- "hostIdentifier": host_name,
284
- "portNumber": port,
285
- "databaseUserId": db_user,
286
- "description": description,
287
- "databasePassword": db_pwd,
288
- },
289
- }
290
- body_s = body_slimmer(body)
291
- response = await self._async_create_element_from_template(body_s)
292
- return str(response)
293
-
294
- def create_postgres_server_element_from_template(
295
- self,
296
- postgres_server: str,
297
- host_name: str,
298
- port: str,
299
- db_user: str,
300
- db_pwd: str,
301
- description: str = None,
302
- ) -> str:
303
- """Create a Postgres server element from a template.
304
-
305
- Parameters
306
- ----------
307
- postgres_server : str
308
- The name of the Postgres server.
309
-
310
- host_name : str
311
- The host name of the Postgres server.
312
-
313
- port : str
314
- The port number of the Postgres server.
315
-
316
-
317
-
318
- description: str, opt
319
- A description of the elementr.
320
-
321
- db_user: str
322
- User name to connect to the database
323
-
324
- db_pwd: str
325
- User password to connect to the database
326
-
327
- Returns
328
- -------
329
- str
330
- The GUID of the Postgres server element.
331
- """
332
- loop = asyncio.get_event_loop()
333
- response = loop.run_until_complete(
334
- self._async_create_postgres_server_element_from_template(
335
- postgres_server, host_name, port, db_user, db_pwd, description
336
- )
337
- )
338
- return response
339
-
340
- async def _async_create_postgres_database_element_from_template(
341
- self,
342
- postgres_database: str,
343
- server_name: str,
344
- host_identifier: str,
345
- port: str,
346
- db_user: str,
347
- db_pwd: str,
348
- description: str = None,
349
- ) -> str:
350
- """Create a Postgres database element from a template. Async version.
351
-
352
- Parameters
353
- ----------
354
- postgres_database : str
355
- The name of the Postgres database.
356
- server_name : str
357
- The server name of the Postgres server.
358
- host_identifier: str
359
- The host IP address or domain name.
360
- port : str
361
- The port number of the Postgres server.
362
- db_user: str
363
- User name to connect to the database
364
- db_pwd: str
365
- User password to connect to the database
366
- description: str, opt
367
- A description of the element.
368
-
369
- Returns
370
- -------
371
- str
372
- The GUID of the Postgres database element.
373
- """
374
- body = {
375
- "templateGUID": TEMPLATE_GUIDS["PostgreSQL Relational Database"],
376
- "isOwnAnchor": "true",
377
- "placeholderPropertyValues": {
378
- "databaseName": postgres_database,
379
- "serverName": server_name,
380
- "hostIdentifier": host_identifier,
381
- "portNumber": port,
382
- "databaseUserId": db_user,
383
- "description": description,
384
- "databasePassword": db_pwd,
385
- },
386
- }
387
- body_s = body_slimmer(body)
388
- response = await self._async_create_element_from_template(body_s)
389
- return str(response)
390
-
391
- def create_postgres_database_element_from_template(
392
- self,
393
- postgres_database: str,
394
- server_name: str,
395
- host_identifier: str,
396
- port: str,
397
- db_user: str,
398
- db_pwd: str,
399
- description: str = None,
400
- ) -> str:
401
- """Create a Postgres database element from a template. Async version.
402
-
403
- Parameters
404
- ----------
405
- postgres_database : str
406
- The name of the Postgres database.
407
- server_name : str
408
- The server name of the Postgres server.
409
- host_identifier: str
410
- The host IP address or domain name.
411
- port : str
412
- The port number of the Postgres server.
413
- db_user: str
414
- User name to connect to the database
415
- db_pwd: str
416
- User password to connect to the database
417
- description: str, opt
418
- A description of the element.
419
-
420
- Returns
421
- -------
422
- str
423
- The GUID of the Postgres database element.
424
- """
425
- loop = asyncio.get_event_loop()
426
- response = loop.run_until_complete(
427
- self._async_create_postgres_database_element_from_template(
428
- postgres_database,
429
- server_name,
430
- host_identifier,
431
- port,
432
- db_user,
433
- db_pwd,
434
- description,
435
- )
436
- )
437
- return response
438
-
439
- async def _async_create_folder_element_from_template(
440
- self,
441
- path_name: str,
442
- folder_name: str,
443
- file_system: str,
444
- description: str = None,
445
- version: str = None,
446
- ) -> str:
447
- """Create a File folder element from a template.
448
- Async version.
449
-
450
- Parameters
451
- ----------
452
- path_name : str
453
- The path including the folder..
454
-
455
- folder_name : str
456
- The name of the folder to create.
457
-
458
- file_system : str
459
- The unique name for the file system that the folder belongs to. It may be a machine name or URL to a
460
- remote file store.
461
-
462
- description: str, opt
463
- A description of the element.
464
-
465
- version: str, opt
466
- version of the element - typically of the form x.y.z
467
-
468
-
469
-
470
- Returns
471
- -------
472
- str
473
- The GUID of the File Folder element.
474
- """
475
- body = {
476
- "templateGUID": TEMPLATE_GUIDS["File System Directory"],
477
- "isOwnAnchor": "true",
478
- "placeholderPropertyValues": {
479
- "directoryPathName": path_name,
480
- "directoryName": folder_name,
481
- "versionIdentifier": version,
482
- "fileSystemName": file_system,
483
- "description": description,
484
- },
485
- }
486
- body_s = body_slimmer(body)
487
- response = await self._async_create_element_from_template(body_s)
488
- return str(response)
489
-
490
- def create_folder_element_from_template(
491
- self,
492
- path_name: str,
493
- folder_name: str,
494
- file_system: str,
495
- description: str = None,
496
- version: str = None,
497
- ) -> str:
498
- """Create a File folder element from a template.
499
-
500
- Parameters
501
- ----------
502
- path_name : str
503
- The path including the folder..
504
-
505
- folder_name : str
506
- The name of the folder to create.
507
-
508
- file_system : str
509
- The unique name for the file system that the folder belongs to. It may be a machine name or URL to a
510
- remote file store.
511
-
512
- description: str, opt
513
- A description of the element.
514
-
515
- version: str, opt
516
- version of the element - typically of the form x.y.z
517
-
518
-
519
-
520
- Returns
521
- -------
522
- str
523
- The GUID of the File Folder element.
524
- """
525
- loop = asyncio.get_event_loop()
526
- response = loop.run_until_complete(
527
- self._async_create_folder_element_from_template(
528
- path_name, folder_name, file_system, description, version
529
- )
530
- )
531
- return response
532
-
533
- async def _async_create_uc_server_element_from_template(
534
- self,
535
- server_name: str,
536
- host_url: str,
537
- port: str,
538
- description: str = None,
539
- version: str = None,
540
- ) -> str:
541
- """Create a Unity Catalog Server element from a template. Async version.
542
-
543
- Parameters
544
- ----------
545
- server_name : str
546
- The name of the Unity Catalog server we are configuring.
547
-
548
- host_url : str
549
- The URL of the server.
550
-
551
- port : str
552
- The port number of the server.
553
-
554
- description: str, opt
555
- A description of the server.
556
-
557
- version: str, opt
558
- version of the element - typically of the form x.y.z
559
-
560
-
561
-
562
- Returns
563
- -------
564
- str
565
- The GUID of the File Folder element.
566
- """
567
- body = {
568
- "templateGUID": TEMPLATE_GUIDS["Unity Catalog Server"],
569
- "isOwnAnchor": "true",
570
- "placeholderPropertyValues": {
571
- "serverName": server_name,
572
- "hostURL": host_url,
573
- "versionIdentifier": version,
574
- "portNumber": port,
575
- "description": description,
576
- },
577
- }
578
- body_s = body_slimmer(body)
579
- response = await self._async_create_element_from_template(body_s)
580
- return str(response)
581
-
582
- def create_uc_server_element_from_template(
583
- self,
584
- server_name: str,
585
- host_url: str,
586
- port: str,
587
- description: str = None,
588
- version: str = None,
589
- ) -> str:
590
- """Create a Unity Catalog Server element from a template. Async version.
591
-
592
- Parameters
593
- ----------
594
- server_name : str
595
- The name of the Unity Catalog server we are configuring.
596
-
597
- host_url : str
598
- The URL of the server.
599
-
600
- port : str
601
- The port number of the server.
602
-
603
- description: str, opt
604
- A description of the server.
605
-
606
- version: str, opt
607
- version of the element - typically of the form x.y.z
608
-
609
-
610
-
611
- Returns
612
- -------
613
- str
614
- The GUID of the File Folder element.
615
- """
616
- loop = asyncio.get_event_loop()
617
- response = loop.run_until_complete(
618
- self._async_create_uc_server_element_from_template(
619
- server_name, host_url, port, description, version
620
- )
621
- )
622
- return response
623
-
624
- async def _async_create_uc_catalog_element_from_template(
625
- self,
626
- uc_catalog: str,
627
- network_address: str,
628
- description: str = None,
629
- version: str = None,
630
- ) -> str:
631
- """Create a Unity Catalog Catalog element from a template. Async version.
632
-
633
- Parameters
634
- ----------
635
- uc_catalog : str
636
- The name of the UC catalog we are configuring.
637
-
638
- network_address : str
639
- The endpoint of the catalog.
640
-
641
- description: str, opt
642
- A description of the server.
643
-
644
- version: str, opt
645
- version of the element - typically of the form x.y.z
646
-
647
-
648
-
649
- Returns
650
- -------
651
- str
652
- The GUID of the File Folder element.
653
- """
654
- body = {
655
- "templateGUID": TEMPLATE_GUIDS["Unity Catalog Catalog"],
656
- "isOwnAnchor": "true",
657
- "placeholderPropertyValues": {
658
- "ucCatalogName": uc_catalog,
659
- "serverNetworkAddress": network_address,
660
- "versionIdentifier": version,
661
- "description": description,
662
- },
663
- }
664
- body_s = body_slimmer(body)
665
- response = await self._async_create_element_from_template(body_s)
666
- return str(response)
667
-
668
- def create_uc_catalog_element_from_template(
669
- self,
670
- uc_catalog: str,
671
- network_address: str,
672
- description: str = None,
673
- version: str = None,
674
- ) -> str:
675
- """Create a Unity Catalog Catalog element from a template.
676
-
677
- Parameters
678
- ----------
679
- uc_catalog : str
680
- The name of the UC catalog we are configuring.
681
-
682
- network_address : str
683
- The endpoint of the catalog.
684
-
685
- description: str, opt
686
- A description of the server.
687
-
688
- version: str, opt
689
- version of the element - typically of the form x.y.z
690
-
691
-
692
-
693
- Returns
694
- -------
695
- str
696
- The GUID of the File Folder element.
697
- """
698
- loop = asyncio.get_event_loop()
699
- response = loop.run_until_complete(
700
- self._async_create_uc_catalog_element_from_template(
701
- uc_catalog, network_address, description, version
702
- )
703
- )
704
- return response
705
-
706
- async def _async_create_uc_schema_element_from_template(
707
- self,
708
- uc_catalog: str,
709
- uc_schema: str,
710
- network_address: str,
711
- description: str = None,
712
- version: str = None,
713
- ) -> str:
714
- """Create a Unity Catalog schema element from a template. Async version.
715
-
716
- Parameters
717
- ----------
718
- uc_catalog : str
719
- The name of the UC catalog we are configuring.
720
-
721
- uc_schema: str
722
- The name of the UC schema we are configuring.
723
-
724
- network_address : str
725
- The endpoint of the catalog.
726
-
727
- description: str, opt
728
- A description of the server.
729
-
730
- version: str, opt
731
- version of the element - typically of the form x.y.z
732
-
733
-
734
-
735
- Returns
736
- -------
737
- str
738
- The GUID of the File Folder element.
739
- """
740
- body = {
741
- "templateGUID": TEMPLATE_GUIDS["Unity Catalog Schema"],
742
- "isOwnAnchor": "true",
743
- "placeholderPropertyValues": {
744
- "ucCatalogName": uc_catalog,
745
- "ucSchemaName": uc_schema,
746
- "serverNetworkAddress": network_address,
747
- "versionIdentifier": version,
748
- "description": description,
749
- },
750
- }
751
- body_s = body_slimmer(body)
752
- response = await self._async_create_element_from_template(body_s)
753
- return str(response)
754
-
755
- def create_uc_schema_element_from_template(
756
- self,
757
- uc_catalog: str,
758
- uc_schema: str,
759
- network_address: str,
760
- description: str = None,
761
- version: str = None,
762
- ) -> str:
763
- """Create a Unity Catalog schema element from a template. Async version.
764
-
765
- Parameters
766
- ----------
767
- uc_catalog : str
768
- The name of the UC catalog we are configuring.
769
-
770
- uc_schema: str
771
- The name of the UC schema we are configuring.
772
-
773
- network_address : str
774
- The endpoint of the catalog.
775
-
776
- description: str, opt
777
- A description of the server.
778
-
779
- version: str, opt
780
- version of the element - typically of the form x.y.z
781
-
782
-
783
-
784
- Returns
785
- -------
786
- str
787
- The GUID of the File Folder element.
788
- """
789
- loop = asyncio.get_event_loop()
790
- response = loop.run_until_complete(
791
- self._async_create_uc_schema_element_from_template(
792
- uc_catalog, uc_schema, network_address, description, version
793
- )
794
- )
795
- return response
796
-
797
- async def _async_create_uc_table_element_from_template(
798
- self,
799
- uc_catalog: str,
800
- uc_schema: str,
801
- uc_table: str,
802
- uc_table_type: str,
803
- uc_storage_loc: str,
804
- uc_data_source_format: str,
805
- network_address: str,
806
- description: str = None,
807
- version: str = None,
808
- ) -> str:
809
- """Create a Unity Catalog table element from a template. Async version.
810
-
811
- Parameters
812
- ----------
813
- uc_catalog : str
814
- The name of the UC catalog we are configuring.
815
-
816
- uc_schema: str
817
- The name of the UC schema we are configuring.
818
-
819
- uc_table: str
820
- The name of the UC table we are configuring.
821
- uc_table_type: str
822
- The type of table - expect either Managed or External.
823
- uc_storage_loc: str
824
- The location where the data associated with this element is stored.
825
- uc_data_source_format: str
826
- The format of the data source - currently DELTA, CSV, JSON, AVRO, PARQUET, ORC, TEXT.
827
-
828
- network_address : str
829
- The endpoint of the catalog.
830
-
831
- description: str, opt
832
- A description of the server.
833
-
834
- version: str, opt
835
- version of the element - typically of the form x.y.z
836
-
837
-
838
-
839
- Returns
840
- -------
841
- str
842
- The GUID of the File Folder element.
843
- """
844
- body = {
845
- "templateGUID": TEMPLATE_GUIDS["Unity Catalog Table"],
846
- "isOwnAnchor": "true",
847
- "placeholderPropertyValues": {
848
- "ucCatalogName": uc_catalog,
849
- "ucSchemaName": uc_schema,
850
- "ucTableName": uc_table,
851
- "ucTableType": uc_table_type,
852
- "ucStorageLocation": uc_storage_loc,
853
- "ucDataSourceFormat": uc_data_source_format,
854
- "serverNetworkAddress": network_address,
855
- "versionIdentifier": version,
856
- "description": description,
857
- },
858
- }
859
- body_s = body_slimmer(body)
860
- response = await self._async_create_element_from_template(body_s)
861
- return str(response)
862
-
863
- def create_uc_table_element_from_template(
864
- self,
865
- uc_catalog: str,
866
- uc_schema: str,
867
- uc_table: str,
868
- uc_table_type: str,
869
- uc_storage_loc: str,
870
- uc_data_source_format: str,
871
- network_address: str,
872
- description: str = None,
873
- version: str = None,
874
- ) -> str:
875
- """Create a Unity Catalog table element from a template.
876
-
877
- Parameters
878
- ----------
879
- uc_catalog : str
880
- The name of the UC catalog we are configuring.
881
-
882
- uc_schema: str
883
- The name of the UC schema we are configuring.
884
-
885
- uc_table: str
886
- The name of the UC table we are configuring.
887
- uc_table_type: str
888
- The type of table - expect either Managed or External.
889
- uc_storage_loc: str
890
- The location where the data associated with this element is stored.
891
- uc_data_source_format: str
892
- The format of the data source - currently DELTA, CSV, JSON, AVRO, PARQUET, ORC, TEXT.
893
-
894
- network_address : str
895
- The endpoint of the catalog.
896
-
897
- description: str, opt
898
- A description of the server.
899
-
900
- version: str, opt
901
- version of the element - typically of the form x.y.z
902
-
903
-
904
-
905
- Returns
906
- -------
907
- str
908
- The GUID of the File Folder element.
909
- """
910
- loop = asyncio.get_event_loop()
911
- response = loop.run_until_complete(
912
- self._async_create_uc_table_element_from_template(
913
- uc_catalog,
914
- uc_schema,
915
- uc_table,
916
- uc_table_type,
917
- uc_storage_loc,
918
- uc_data_source_format,
919
- network_address,
920
- description,
921
- version,
922
- )
923
- )
924
- return response
925
-
926
- async def _async_create_uc_function_element_from_template(
927
- self,
928
- uc_catalog: str,
929
- uc_schema: str,
930
- uc_function: str,
931
- network_address: str,
932
- description: str = None,
933
- version: str = None,
934
- ) -> str:
935
- """Create a Unity Catalog function element from a template. Async version.
936
-
937
- Parameters
938
- ----------
939
- uc_catalog : str
940
- The name of the UC catalog we are configuring.
941
-
942
- uc_schema: str
943
- The name of the UC schema we are configuring.
944
-
945
- uc_function: str
946
- The name of the UC function we are configuring.
947
-
948
- network_address : str
949
- The endpoint of the catalog.
950
-
951
- description: str, opt
952
- A description of the server.
953
-
954
- version: str, opt
955
- version of the element - typically of the form x.y.z
956
-
957
-
958
-
959
- Returns
960
- -------
961
- str
962
- The GUID of the File Folder element.
963
- """
964
- body = {
965
- "templateGUID": TEMPLATE_GUIDS["Unity Catalog Function"],
966
- "isOwnAnchor": "true",
967
- "placeholderPropertyValues": {
968
- "ucCatalogName": uc_catalog,
969
- "ucSchemaName": uc_schema,
970
- "ucFunctionName": uc_function,
971
- "serverNetworkAddress": network_address,
972
- "versionIdentifier": version,
973
- "description": description,
974
- },
975
- }
976
- body_s = body_slimmer(body)
977
- response = await self._async_create_element_from_template(body_s)
978
- return str(response)
979
-
980
- def create_uc_function_element_from_template(
981
- self,
982
- uc_catalog: str,
983
- uc_schema: str,
984
- uc_function: str,
985
- network_address: str,
986
- description: str = None,
987
- version: str = None,
988
- ) -> str:
989
- """Create a Unity Catalog function element from a template.
990
-
991
- Parameters
992
- ----------
993
- uc_catalog : str
994
- The name of the UC catalog we are configuring.
995
-
996
- uc_schema: str
997
- The name of the UC schema we are configuring.
998
-
999
- uc_function: str
1000
- The name of the UC function we are configuring.
1001
-
1002
- network_address : str
1003
- The endpoint of the catalog.
1004
-
1005
- description: str, opt
1006
- A description of the server.
1007
-
1008
- version: str, opt
1009
- version of the element - typically of the form x.y.z
1010
-
1011
-
1012
-
1013
- Returns
1014
- -------
1015
- str
1016
- The GUID of the File Folder element.
1017
- """
1018
- loop = asyncio.get_event_loop()
1019
- response = loop.run_until_complete(
1020
- self._async_create_uc_function_element_from_template(
1021
- uc_catalog,
1022
- uc_schema,
1023
- uc_function,
1024
- network_address,
1025
- description,
1026
- version,
1027
- )
1028
- )
1029
- return response
1030
-
1031
- async def _async_create_uc_volume_element_from_template(
1032
- self,
1033
- uc_catalog: str,
1034
- uc_schema: str,
1035
- uc_volume: str,
1036
- uc_vol_type: str,
1037
- uc_storage_loc: str,
1038
- network_address: str,
1039
- description: str = None,
1040
- version: str = None,
1041
- ) -> str:
1042
- """Create a Unity Catalog volume element from a template. Async version.
1043
-
1044
- Parameters
1045
- ----------
1046
- uc_catalog : str
1047
- The name of the UC catalog we are configuring.
1048
-
1049
- uc_schema: str
1050
- The name of the UC schema we are configuring.
1051
-
1052
- uc_volume: str
1053
- The name of the UC volume we are configuring.
1054
-
1055
- uc_vol_type: str
1056
- The volume type of the UC volume we are configuring. Currently Managed or External.
1057
- uc_storage_loc: str
1058
- The location with the data associated with this element is stored.
1059
-
1060
- network_address : str
1061
- The endpoint of the catalog.
1062
-
1063
- description: str, opt
1064
- A description of the server.
1065
-
1066
- version: str, opt
1067
- version of the element - typically of the form x.y.z
1068
-
1069
-
1070
-
1071
- Returns
1072
- -------
1073
- str
1074
- The GUID of the File Folder element.
1075
- """
1076
- body = {
1077
- "templateGUID": TEMPLATE_GUIDS["Unity Catalog Volume"],
1078
- "isOwnAnchor": "true",
1079
- "placeholderPropertyValues": {
1080
- "ucCatalogName": uc_catalog,
1081
- "ucSchemaName": uc_schema,
1082
- "ucVolumeName": uc_volume,
1083
- "ucVolumeType": uc_vol_type,
1084
- "ucStorageLocation": uc_storage_loc,
1085
- "serverNetworkAddress": network_address,
1086
- "versionIdentifier": version,
1087
- "description": description,
1088
- },
1089
- }
1090
- body_s = body_slimmer(body)
1091
- response = await self._async_create_element_from_template(body_s)
1092
- return str(response)
1093
-
1094
- def create_uc_volume_element_from_template(
1095
- self,
1096
- uc_catalog: str,
1097
- uc_schema: str,
1098
- uc_volume: str,
1099
- uc_vol_type: str,
1100
- uc_storage_loc: str,
1101
- network_address: str,
1102
- description: str = None,
1103
- version: str = None,
1104
- ) -> str:
1105
- """Create a Unity Catalog volume element from a template. Async version.
1106
-
1107
- Parameters
1108
- ----------
1109
- uc_catalog : str
1110
- The name of the UC catalog we are configuring.
1111
-
1112
- uc_schema: str
1113
- The name of the UC schema we are configuring.
1114
-
1115
- uc_volume: str
1116
- The name of the UC volume we are configuring.
1117
-
1118
- uc_vol_type: str
1119
- The volume type of the UC volume we are configuring. Currently Managed or External.
1120
-
1121
- uc_storage_loc: str
1122
- The location with the data associated with this element is stored.
1123
-
1124
- network_address : str
1125
- The endpoint of the catalog.
1126
-
1127
- description: str, opt
1128
- A description of the server.
1129
-
1130
- version: str, opt
1131
- version of the element - typically of the form x.y.z
1132
-
1133
-
1134
-
1135
- Returns
1136
- -------
1137
- str
1138
- The GUID of the File Folder element.
1139
- """
1140
- loop = asyncio.get_event_loop()
1141
- response = loop.run_until_complete(
1142
- self._async_create_uc_volume_element_from_template(
1143
- uc_catalog,
1144
- uc_schema,
1145
- uc_volume,
1146
- uc_vol_type,
1147
- uc_storage_loc,
1148
- network_address,
1149
- description,
1150
- version,
1151
- )
1152
- )
1153
- return response
1154
-
1155
- #
1156
- # Engine Actions
1157
- #
1158
- async def _async_get_engine_actions(
1159
- self, start_from: int = 0, page_size: int = max_paging_size
1160
- ) -> list:
1161
- """Retrieve the engine actions that are known to the server. Async version.
1162
- Parameters
1163
- ----------
1164
-
1165
- start_from : int, optional
1166
- The starting index of the actions to retrieve. Default is 0.
1167
- page_size : int, optional
1168
- The maximum number of actions to retrieve per page. Default is the global maximum paging size.
1169
-
1170
- Returns
1171
- -------
1172
- [dict]
1173
- A list of engine action descriptions as JSON.
1174
-
1175
- Raises
1176
- ------
1177
- InvalidParameterException
1178
- PropertyServerException
1179
- UserNotAuthorizedException
1180
-
1181
- Notes
1182
- -----
1183
- For more information see: https://egeria-project.org/concepts/engine-action
1184
- """
1185
-
1186
- url = (
1187
- f"{self.curation_command_root}/engine-actions?"
1188
- f"startFrom={start_from}&pageSize={page_size}"
1189
- )
1190
-
1191
- response = await self._async_make_request("GET", url)
1192
- return response.json().get("elements", "No elements")
1193
-
1194
- def get_engine_actions(
1195
- self, start_from: int = 0, page_size: int = max_paging_size
1196
- ) -> list:
1197
- """Retrieve the engine actions that are known to the server.
1198
- Parameters
1199
- ----------
1200
-
1201
- start_from : int, optional
1202
- The starting index of the actions to retrieve. Default is 0.
1203
- page_size : int, optional
1204
- The maximum number of actions to retrieve per page. Default is the global maximum paging size.
1205
-
1206
- Returns
1207
- -------
1208
- [dict]
1209
- A list of engine action descriptions as JSON.
1210
-
1211
- Raises
1212
- ------
1213
- InvalidParameterException
1214
- PropertyServerException
1215
- UserNotAuthorizedException
1216
-
1217
- Notes
1218
- -----
1219
- For more information see: https://egeria-project.org/concepts/engine-action
1220
- """
1221
- loop = asyncio.get_event_loop()
1222
- response = loop.run_until_complete(
1223
- self._async_get_engine_actions(start_from, page_size)
1224
- )
1225
- return response
1226
-
1227
- async def _async_get_engine_action(self, engine_action_guid: str) -> dict:
1228
- """Request the status and properties of an executing engine action request. Async version.
1229
- Parameters
1230
- ----------
1231
- engine_action_guid : str
1232
- The GUID of the engine action to retrieve.
1233
-
1234
-
1235
-
1236
- Returns
1237
- -------
1238
- dict
1239
- The JSON representation of the engine action.
1240
-
1241
- Raises
1242
- ------
1243
- InvalidParameterException
1244
- PropertyServerException
1245
- UserNotAuthorizedException
1246
-
1247
- Notes
1248
- -----
1249
- For more information see: https://egeria-project.org/concepts/engine-action
1250
- """
1251
-
1252
- url = f"{self.curation_command_root}/engine-actions/" f"{engine_action_guid}"
1253
-
1254
- response = await self._async_make_request("GET", url)
1255
- return response.json().get("element", "No element found")
1256
-
1257
- def get_engine_action(self, engine_action_guid: str) -> dict:
1258
- """Request the status and properties of an executing engine action request.
1259
- Parameters
1260
- ----------
1261
- engine_action_guid : str
1262
- The GUID of the engine action to retrieve.
1263
-
1264
-
1265
-
1266
- Returns
1267
- -------
1268
- dict
1269
- The JSON representation of the engine action.
1270
-
1271
- Raises
1272
- ------
1273
- InvalidParameterException
1274
- PropertyServerException
1275
- UserNotAuthorizedException
1276
-
1277
- Notes
1278
- -----
1279
- For more information see: https://egeria-project.org/concepts/engine-action
1280
- """
1281
- loop = asyncio.get_event_loop()
1282
- response = loop.run_until_complete(
1283
- self._async_get_engine_action(engine_action_guid)
1284
- )
1285
- return response
1286
-
1287
- async def _async_cancel_engine_action(self, engine_action_guid: str) -> None:
1288
- """Request that an engine action request is cancelled and any running governance service is stopped. Async Ver.
1289
- Parameters
1290
- ----------
1291
- engine_action_guid : str
1292
- The GUID of the engine action to retrieve.
1293
-
1294
-
1295
-
1296
- Returns
1297
- -------
1298
- dict
1299
- The JSON representation of the engine action.
1300
-
1301
- Raises
1302
- ------
1303
- InvalidParameterException
1304
- PropertyServerException
1305
- UserNotAuthorizedException
1306
-
1307
- Notes
1308
- -----
1309
- For more information see: https://egeria-project.org/concepts/engine-action
1310
- """
1311
-
1312
- validate_guid(engine_action_guid)
1313
-
1314
- url = (
1315
- f"{self.curation_command_root}/engine-actions/"
1316
- f"{engine_action_guid}/cancel"
1317
- )
1318
-
1319
- await self._async_make_request("POST", url)
1320
-
1321
- def cancel_engine_action(self, engine_action_guid: str) -> None:
1322
- """Request that an engine action request is cancelled and any running governance service is stopped.
1323
- Parameters
1324
- ----------
1325
- engine_action_guid : str
1326
- The GUID of the engine action to retrieve.
1327
-
1328
-
1329
-
1330
- Returns
1331
- -------
1332
- dict
1333
- The JSON representation of the engine action.
1334
-
1335
- Raises
1336
- ------
1337
- InvalidParameterException
1338
- PropertyServerException
1339
- UserNotAuthorizedException
1340
-
1341
- Notes
1342
- -----
1343
- For more information see: https://egeria-project.org/concepts/engine-action
1344
- """
1345
- loop = asyncio.get_event_loop()
1346
- loop.run_until_complete(self._async_cancel_engine_action(engine_action_guid))
1347
- return
1348
-
1349
- async def _async_get_active_engine_actions(
1350
- self, start_from: int = 0, page_size: int = max_paging_size
1351
- ) -> list | str:
1352
- """Retrieve the engine actions that are still in process. Async Version.
1353
-
1354
- Parameters:
1355
- ----------
1356
-
1357
- start_from : int, optional
1358
- The starting index of the actions to retrieve. Default is 0.
1359
- page_size : int, optional
1360
- The maximum number of actions to retrieve per page. Default is the global maximum paging size.
1361
-
1362
- Returns:
1363
- -------
1364
- List[dict]: A list of JSON representations of governance action processes matching the provided name.
1365
-
1366
- Raises:
1367
- ------
1368
- InvalidParameterException: If the API response indicates an error (non-200 status code),
1369
- this exception is raised with details from the response content.
1370
-
1371
- Notes
1372
- -----
1373
- For more information see: https://egeria-project.org/concepts/engine-action
1374
-
1375
- """
1376
-
1377
- url = (
1378
- f"{self.curation_command_root}/engine-actions/active?"
1379
- f"startFrom={start_from}&pageSize={page_size}"
1380
- )
1381
-
1382
- response = await self._async_make_request("GET", url)
1383
- return response.json().get("elements", "no actions")
1384
-
1385
- def get_active_engine_actions(
1386
- self, start_from: int = 0, page_size: int = 0
1387
- ) -> list | str:
1388
- """Retrieve the engine actions that are still in process.
1389
-
1390
- Parameters:
1391
- ----------
1392
-
1393
- start_from : int, optional
1394
- The starting index of the actions to retrieve. Default is 0.
1395
- page_size : int, optional
1396
- The maximum number of actions to retrieve per page. Default is the global maximum paging size.
1397
-
1398
- Returns
1399
- -------
1400
- List[dict]: A list of JSON representations of governance action processes matching the provided name.
1401
-
1402
- Raises
1403
- ------
1404
- InvalidParameterException: If the API response indicates an error (non-200 status code),
1405
- this exception is raised with details from the response content.
1406
- Notes
1407
- -----
1408
- For more information see: https://egeria-project.org/concepts/engine-action
1409
-
1410
- """
1411
- loop = asyncio.get_event_loop()
1412
- response = loop.run_until_complete(
1413
- self._async_get_active_engine_actions(start_from, page_size)
1414
- )
1415
- return response
1416
-
1417
- async def _async_get_engine_actions_by_name(
1418
- self,
1419
- name: str,
1420
- start_from: int = 0,
1421
- page_size: int = max_paging_size,
1422
- ) -> list | str:
1423
- """Retrieve the list of engine action metadata elements with a matching qualified or display name.
1424
- There are no wildcards supported on this request. Async Version.
1425
- Parameters
1426
- ----------
1427
- name : str
1428
- The name of the engine action to retrieve.
1429
-
1430
- start_from : int, optional
1431
- The index to start retrieving engine actions from. If not provided, the default value will be used.
1432
- page_size : int, optional
1433
- The maximum number of engine actions to retrieve in a single request. If not provided, the default global
1434
- maximum paging size will be used.
1435
-
1436
- Returns
1437
- -------
1438
- list of dict | str
1439
- A list of dictionaries representing the retrieved engine actions, or "no actions" if no engine actions were
1440
- found with the given name.
1441
- Raises:
1442
- ------
1443
- InvalidParameterException
1444
- PropertyServerException
1445
- UserNotAuthorizedException
1446
-
1447
- Notes
1448
- -----
1449
- For more information see: https://egeria-project.org/concepts/engine-action
1450
-
1451
- """
1452
-
1453
- validate_name(name)
1454
-
1455
- url = (
1456
- f"{self.curation_command_root}/engine-actions/by-name?"
1457
- f"startFrom={start_from}&pageSize={page_size}"
1458
- )
1459
- body = {"filter": name}
1460
- response = await self._async_make_request("POST", url, body)
1461
- return response.json().get("elements", "no actions")
1462
-
1463
- def get_engine_actions_by_name(
1464
- self,
1465
- name: str,
1466
- start_from: int = 0,
1467
- page_size: int = max_paging_size,
1468
- ) -> list | str:
1469
- """Retrieve the list of engine action metadata elements with a matching qualified or display name.
1470
- There are no wildcards supported on this request.
1471
-
1472
- Parameters
1473
- ----------
1474
- name : str
1475
- The name of the engine action to retrieve.
1476
-
1477
- start_from : int, optional
1478
- The index to start retrieving engine actions from. If not provided, the default value will be used.
1479
- page_size : int, optional
1480
- The maximum number of engine actions to retrieve in a single request. If not provided, the default global
1481
- maximum paging size will be used.
1482
-
1483
- Returns
1484
- -------
1485
- list of dict | str
1486
- A list of dictionaries representing the retrieved engine actions, or "no actions" if no engine actions were
1487
- found with the given name.
1488
- Raises:
1489
- ------
1490
- InvalidParameterException
1491
- PropertyServerException
1492
- UserNotAuthorizedException
1493
-
1494
- Notes
1495
- -----
1496
- For more information see: https://egeria-project.org/concepts/engine-action
1497
-
1498
- """
1499
- loop = asyncio.get_event_loop()
1500
- response = loop.run_until_complete(
1501
- self._async_get_engine_actions_by_name(name, start_from, page_size)
1502
- )
1503
- return response
1504
-
1505
- async def _async_find_engine_actions(
1506
- self,
1507
- search_string: str,
1508
- starts_with: bool = False,
1509
- ends_with: bool = False,
1510
- ignore_case: bool = False,
1511
- start_from: int = 0,
1512
- page_size: int = max_paging_size,
1513
- ) -> list | str:
1514
- """Retrieve the list of engine action metadata elements that contain the search string. Async Version.
1515
- Parameters
1516
- ----------
1517
- search_string : str
1518
- The string used for searching engine actions by name.
1519
-
1520
-
1521
-
1522
- starts_with : bool, optional
1523
- Whether to search engine actions that start with the given search string. Default is False.
1524
-
1525
- ends_with : bool, optional
1526
- Whether to search engine actions that end with the given search string. Default is False.
1527
-
1528
- ignore_case : bool, optional
1529
- Whether to ignore case while searching engine actions. Default is False.
1530
-
1531
- start_from : int, optional
1532
- The index from which to start fetching the engine actions. Default is 0.
1533
-
1534
- page_size : int, optional
1535
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
1536
-
1537
- Returns
1538
- -------
1539
- List[dict] or str
1540
- A list of dictionaries representing the engine actions found based on the search query.
1541
- If no actions are found, returns the string "no actions".
1542
-
1543
- Raises:
1544
- ------
1545
- InvalidParameterException
1546
- PropertyServerException
1547
- UserNotAuthorizedException
1548
-
1549
- Notes
1550
- -----
1551
- For more information see: https://egeria-project.org/concepts/engine-action
1552
- """
1553
-
1554
- validate_search_string(search_string)
1555
- if search_string == "*":
1556
- search_string = None
1557
- starts_with_s = str(starts_with).lower()
1558
- ends_with_s = str(ends_with).lower()
1559
- ignore_case_s = str(ignore_case).lower()
1560
-
1561
- url = (
1562
- f"{self.curation_command_root}/engine-actions/"
1563
- f"by-search-string?startFrom={start_from}&pageSize={page_size}&startsWith={starts_with_s}&"
1564
- f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}"
1565
- )
1566
- body = {"class": "SearchStringRequestBody", "name": search_string}
1567
- response = await self._async_make_request("POST", url, body)
1568
- return response.json().get("elements", "no actions")
1569
-
1570
- def find_engine_actions(
1571
- self,
1572
- search_string: str = "*",
1573
- starts_with: bool = False,
1574
- ends_with: bool = False,
1575
- ignore_case: bool = False,
1576
- start_from: int = 0,
1577
- page_size: int = max_paging_size,
1578
- ) -> list | str:
1579
- """Retrieve the list of engine action metadata elements that contain the search string.
1580
- Parameters
1581
- ----------
1582
- search_string : str
1583
- The string used for searching engine actions by name.
1584
-
1585
-
1586
-
1587
- starts_with : bool, optional
1588
- Whether to search engine actions that start with the given search string. Default is False.
1589
-
1590
- ends_with : bool, optional
1591
- Whether to search engine actions that end with the given search string. Default is False.
1592
-
1593
- ignore_case : bool, optional
1594
- Whether to ignore case while searching engine actions. Default is False.
1595
-
1596
- start_from : int, optional
1597
- The index from which to start fetching the engine actions. Default is 0.
1598
-
1599
- page_size : int, optional
1600
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
1601
-
1602
- Returns
1603
- -------
1604
- List[dict] or str
1605
- A list of dictionaries representing the engine actions found based on the search query.
1606
- If no actions are found, returns the string "no actions".
1607
-
1608
- Raises:
1609
- ------
1610
- InvalidParameterException
1611
- PropertyServerException
1612
- UserNotAuthorizedException
1613
-
1614
- Notes
1615
- -----
1616
- For more information see: https://egeria-project.org/concepts/engine-action
1617
- """
1618
-
1619
- loop = asyncio.get_event_loop()
1620
- response = loop.run_until_complete(
1621
- self._async_find_engine_actions(
1622
- search_string,
1623
- starts_with,
1624
- ends_with,
1625
- ignore_case,
1626
- start_from,
1627
- page_size,
1628
- )
1629
- )
1630
- return response
1631
-
1632
- #
1633
- # Governance action processes
1634
- #
1635
-
1636
- async def _async_get_governance_action_process_by_guid(
1637
- self, process_guid: str
1638
- ) -> dict | str:
1639
- """Retrieve the governance action process metadata element with the supplied unique identifier. Async Version.
1640
-
1641
- Parameters:
1642
- ----------
1643
- process_guid: str
1644
- The GUID (Globally Unique Identifier) of the governance action process.
1645
-
1646
-
1647
- Returns:
1648
- -------
1649
- dict: The JSON representation of the governance action process element.
1650
-
1651
- Raises:
1652
- ------
1653
- InvalidParameterException: If the API response indicates an error (non-200 status code),
1654
- this exception is raised with details from the response content.
1655
- PropertyServerException: If the API response indicates a server side error.
1656
- UserNotAuthorizedException:
1657
- """
1658
-
1659
- validate_guid(process_guid)
1660
-
1661
- url = (
1662
- f"{self.curation_command_root}/"
1663
- f"governance-action-processes/{process_guid}"
1664
- )
1665
-
1666
- response = await self._async_make_request("GET", url)
1667
- return response.json().get("element", "no actions")
1668
-
1669
- def get_governance_action_process_by_guid(self, process_guid: str) -> dict | str:
1670
- """Retrieve the governance action process metadata element with the supplied unique identifier.
1671
-
1672
- Parameters:
1673
- ----------
1674
- process_guid: str
1675
- The GUID (Globally Unique Identifier) of the governance action process.
1676
-
1677
- Returns:
1678
- -------
1679
- dict: The JSON representation of the governance action process element.
1680
-
1681
- Raises:
1682
- ------
1683
- InvalidParameterException: If the API response indicates an error (non-200 status code),
1684
- this exception is raised with details from the response content.
1685
- PropertyServerException: If the API response indicates a server side error.
1686
- UserNotAuthorizedException:
1687
- """
1688
- loop = asyncio.get_event_loop()
1689
- response = loop.run_until_complete(
1690
- self._async_get_governance_action_process_by_guid(process_guid)
1691
- )
1692
- return response
1693
-
1694
- async def _async_get_gov_action_process_graph(
1695
- self, process_guid: str
1696
- ) -> dict | str:
1697
- """Retrieve the governance action process metadata element with the supplied unique
1698
- identifier along with the flow definition describing its implementation. Async Version.
1699
- Parameters
1700
- ----------
1701
- process_guid : str
1702
- The process GUID to retrieve the graph for.
1703
-
1704
- Returns
1705
- -------
1706
- dict or str
1707
- A dictionary representing the graph of the governance action process, or the string "no actions"
1708
- if no actions are found.
1709
- Raises:
1710
- ------
1711
- InvalidParameterException: If the API response indicates an error (non-200 status code),
1712
- this exception is raised with details from the response content.
1713
- PropertyServerException: If the API response indicates a server side error.
1714
- UserNotAuthorizedException:
1715
-
1716
- """
1717
-
1718
- validate_guid(process_guid)
1719
-
1720
- url = (
1721
- f"{self.curation_command_root}/"
1722
- f"governance-action-processes/{process_guid}/graph"
1723
- )
1724
-
1725
- response = await self._async_make_request("POST", url)
1726
- return response.json().get("element", "no actions")
1727
-
1728
- def get_gov_action_process_graph(self, process_guid: str) -> dict | str:
1729
- """Retrieve the governance action process metadata element with the supplied unique
1730
- identifier along with the flow definition describing its implementation.
1731
- Parameters
1732
- ----------
1733
- process_guid : str
1734
- The process GUID to retrieve the graph for.
1735
-
1736
- Returns
1737
- -------
1738
- dict or str
1739
- A dictionary representing the graph of the governance action process, or the string "no actions"
1740
- if no actions are found.
1741
- Raises:
1742
- ------
1743
- InvalidParameterException: If the API response indicates an error (non-200 status code),
1744
- this exception is raised with details from the response content.
1745
- PropertyServerException: If the API response indicates a server side error.
1746
- UserNotAuthorizedException:
1747
-
1748
- """
1749
- loop = asyncio.get_event_loop()
1750
- response = loop.run_until_complete(
1751
- self._async_get_gov_action_process_graph(process_guid)
1752
- )
1753
- return response
1754
-
1755
- async def _async_get_gov_action_processes_by_name(
1756
- self,
1757
- name: str,
1758
- start_from: int = None,
1759
- page_size: int = max_paging_size,
1760
- ) -> list | str:
1761
- """Retrieve the list of governance action process metadata elements with a matching qualified or display name.
1762
- There are no wildcards supported on this request. Async Version.
1763
-
1764
- Parameters
1765
- ----------
1766
- name : str
1767
- The name of the engine action to retrieve.
1768
-
1769
- start_from : int, optional
1770
- The index to start retrieving engine actions from. If not provided, the default value will be used.
1771
- page_size : int, optional
1772
- The maximum number of engine actions to retrieve in a single request. If not provided, the default
1773
- global maximum paging size will be used.
1774
-
1775
- Returns
1776
- -------
1777
- list of dict | str
1778
- A list of dictionaries representing the retrieved engine actions,
1779
- or "no actions" if no engine actions were found with the given name.
1780
- Raises:
1781
- ------
1782
- InvalidParameterException
1783
- PropertyServerException
1784
- UserNotAuthorizedException
1785
- """
1786
-
1787
- validate_name(name)
1788
-
1789
- url = (
1790
- f"{self.curation_command_root}/governance-action-processes/"
1791
- f"by-name?startFrom={start_from}&pageSize={page_size}"
1792
- )
1793
- body = {"filter": name}
1794
- response = await self._async_make_request("POST", url, body)
1795
- return response.json().get("elements", "no actions")
1796
-
1797
- def get_gov_action_processes_by_name(
1798
- self,
1799
- name: str,
1800
- start_from: int = 0,
1801
- page_size: int = max_paging_size,
1802
- ) -> list | str:
1803
- """Retrieve the list of governance action process metadata elements with a matching qualified or display name.
1804
- There are no wildcards supported on this request.
1805
-
1806
- Parameters
1807
- ----------
1808
- name : str
1809
- The name of the engine action to retrieve.
1810
-
1811
- start_from : int, optional
1812
- The index to start retrieving engine actions from. If not provided, the default value will be used.
1813
- page_size : int, optional
1814
- The maximum number of engine actions to retrieve in a single request. If not provided, the default global
1815
- maximum paging size will be used.
1816
-
1817
- Returns
1818
- -------
1819
- list of dict | str
1820
- A list of dictionaries representing the retrieved engine actions,
1821
- or "no actions" if no engine actions were found with the given name.
1822
- Raises:
1823
- ------
1824
- InvalidParameterException
1825
- PropertyServerException
1826
- UserNotAuthorizedException
1827
- """
1828
- loop = asyncio.get_event_loop()
1829
- response = loop.run_until_complete(
1830
- self._async_get_gov_action_processes_by_name(name, start_from, page_size)
1831
- )
1832
- return response
1833
-
1834
- async def _async_find_gov_action_processes(
1835
- self,
1836
- search_string: str,
1837
- starts_with: bool = False,
1838
- ends_with: bool = False,
1839
- ignore_case: bool = False,
1840
- start_from: int = 0,
1841
- page_size: int = max_paging_size,
1842
- ) -> list | str:
1843
- """Retrieve the list of governance action process metadata elements that contain the search string. Async ver.
1844
-
1845
- Parameters
1846
- ----------
1847
- search_string : str
1848
- The string used for searching engine actions by name.
1849
-
1850
-
1851
-
1852
- starts_with : bool, optional
1853
- Whether to search engine actions that start with the given search string. Default is False.
1854
-
1855
- ends_with : bool, optional
1856
- Whether to search engine actions that end with the given search string. Default is False.
1857
-
1858
- ignore_case : bool, optional
1859
- Whether to ignore case while searching engine actions. Default is False.
1860
-
1861
- start_from : int, optional
1862
- The index from which to start fetching the engine actions. Default is 0.
1863
-
1864
- page_size : int, optional
1865
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
1866
-
1867
- Returns
1868
- -------
1869
- List[dict] or str
1870
- A list of dictionaries representing the governance action processes found based on the search query.
1871
- If no actions are found, returns the string "no actions".
1872
-
1873
- Raises:
1874
- ------
1875
- InvalidParameterException
1876
- PropertyServerException
1877
- UserNotAuthorizedException
1878
- """
1879
-
1880
- validate_search_string(search_string)
1881
- if search_string == "*":
1882
- search_string = None
1883
- starts_with_s = str(starts_with).lower()
1884
- ends_with_s = str(ends_with).lower()
1885
- ignore_case_s = str(ignore_case).lower()
1886
-
1887
- url = (
1888
- f"{self.curation_command_root}/governance-action-processes/"
1889
- f"by-search-string?startFrom={start_from}&pageSize={page_size}&startsWith={starts_with_s}&"
1890
- f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}"
1891
- )
1892
-
1893
- if search_string:
1894
- body = {"filter": search_string}
1895
- response = await self._async_make_request("POST", url, body)
1896
- else:
1897
- response = await self._async_make_request("POST", url)
1898
-
1899
- return response.json().get("elements", "no actions")
1900
-
1901
- def find_gov_action_processes(
1902
- self,
1903
- search_string: str = "*",
1904
- starts_with: bool = False,
1905
- ends_with: bool = False,
1906
- ignore_case: bool = False,
1907
- start_from: int = 0,
1908
- page_size: int = max_paging_size,
1909
- ) -> list | str:
1910
- """Retrieve the list of governance action process metadata elements that contain the search string.
1911
-
1912
- Parameters
1913
- ----------
1914
- search_string : str
1915
- The string used for searching engine actions by name.
1916
-
1917
-
1918
-
1919
- starts_with : bool, optional
1920
- Whether to search engine actions that start with the given search string. Default is False.
1921
-
1922
- ends_with : bool, optional
1923
- Whether to search engine actions that end with the given search string. Default is False.
1924
-
1925
- ignore_case : bool, optional
1926
- Whether to ignore case while searching engine actions. Default is False.
1927
-
1928
- start_from : int, optional
1929
- The index from which to start fetching the engine actions. Default is 0.
1930
-
1931
- page_size : int, optional
1932
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
1933
-
1934
- Returns
1935
- -------
1936
- List[dict] or str
1937
- A list of dictionaries representing the governance action processes found based on the search query.
1938
- If no actions are found, returns the string "no actions".
1939
-
1940
- Raises:
1941
- ------
1942
- InvalidParameterException
1943
- PropertyServerException
1944
- UserNotAuthorizedException
1945
- """
1946
-
1947
- loop = asyncio.get_event_loop()
1948
- response = loop.run_until_complete(
1949
- self._async_find_gov_action_processes(
1950
- search_string,
1951
- starts_with,
1952
- ends_with,
1953
- ignore_case,
1954
- start_from,
1955
- page_size,
1956
- )
1957
- )
1958
- return response
1959
-
1960
- async def _async_initiate_gov_action_process(
1961
- self,
1962
- action_type_qualified_name: str,
1963
- request_source_guids: [str] = None,
1964
- action_targets: list = None,
1965
- start_time: datetime = None,
1966
- request_parameters: dict = None,
1967
- orig_service_name: str = None,
1968
- orig_engine_name: str = None,
1969
- ) -> str:
1970
- """Using the named governance action process as a template, initiate a chain of engine actions. Async version.
1971
-
1972
- Parameters
1973
- ----------
1974
- action_type_qualified_name: str
1975
- - unique name for the governance process
1976
- request_source_guids: [str], optional
1977
- - request source elements for the resulting governance action service
1978
- action_targets: [str], optional
1979
- -list of action target names to GUIDs for the resulting governance action service
1980
- start_time: datetime, optional
1981
- - time to start the process
1982
- request_parameters: [str], optional
1983
- - parameters passed into the process
1984
- orig_service_name: str, optional
1985
- - unique name of the requesting governance service (if initiated by a governance engine)
1986
- orig_engine_name: str, optional
1987
- - optional unique name of the governance engine (if initiated by a governance engine).
1988
-
1989
- Returns
1990
- -------
1991
- Unique id (guid) of the newly started governance engine process
1992
-
1993
- Raises
1994
- ------
1995
- InvalidParameterException
1996
- PropertyServerException
1997
- UserNotAuthorizedException
1998
-
1999
- """
2000
-
2001
- start_time: datetime = (
2002
- datetime.datetime.now() if start_time is None else start_time
2003
- )
2004
-
2005
- url = f"{self.curation_command_root}/governance-action-processes/initiate"
2006
- body = {
2007
- "class": "GovernanceActionProcessRequestBody",
2008
- "processQualifiedName": action_type_qualified_name,
2009
- "requestSourceGUIDs": request_source_guids,
2010
- "actionTargets": action_targets,
2011
- "startTime": int(start_time.timestamp() * 1000),
2012
- "requestParameters": request_parameters,
2013
- "originatorServiceName": orig_service_name,
2014
- "originatorEngineName": orig_engine_name,
2015
- }
2016
- new_body = body_slimmer(body)
2017
- response = await self._async_make_request("POST", url, new_body)
2018
- return response.json().get("guid", "Action not initiated")
2019
-
2020
- def initiate_gov_action_process(
2021
- self,
2022
- action_type_qualified_name: str,
2023
- request_source_guids: [str] = None,
2024
- action_targets: [str] = None,
2025
- start_time: datetime = None,
2026
- request_parameters: dict = None,
2027
- orig_service_name: str = None,
2028
- orig_engine_name: str = None,
2029
- ) -> str:
2030
- """Using the named governance action process as a template, initiate a chain of engine actions.
2031
-
2032
- Parameters
2033
- ----------
2034
- action_type_qualified_name: str
2035
- - unique name for the governance process
2036
- request_source_guids: [str], optional
2037
- - request source elements for the resulting governance action service
2038
- action_targets: [str], optional
2039
- -list of action target names to GUIDs for the resulting governance action service
2040
- start_time: datetime, optional
2041
- - time to start the process
2042
- request_parameters: [str], optional
2043
- - parameters passed into the process
2044
- orig_service_name: str, optional
2045
- - unique name of the requesting governance service (if initiated by a governance engine)
2046
- orig_engine_name: str, optional
2047
- - optional unique name of the governance engine (if initiated by a governance engine).
2048
-
2049
- Returns
2050
- -------
2051
- Unique id (guid) of the newly started governance engine process
2052
-
2053
- Raises
2054
- ------
2055
- InvalidParameterException
2056
- PropertyServerException
2057
- UserNotAuthorizedException
2058
-
2059
- """
2060
- loop = asyncio.get_event_loop()
2061
- response = loop.run_until_complete(
2062
- self._async_initiate_gov_action_process(
2063
- action_type_qualified_name,
2064
- request_source_guids,
2065
- action_targets,
2066
- start_time,
2067
- request_parameters,
2068
- orig_service_name,
2069
- orig_engine_name,
2070
- )
2071
- )
2072
- return response
2073
-
2074
- async def _async_get_gov_action_types_by_guid(
2075
- self, gov_action_type_guid: str
2076
- ) -> dict | str:
2077
- """Retrieve the governance action type metadata element with the supplied unique identifier. Async version.
2078
-
2079
- Parameters:
2080
- ----------
2081
- gov_action_type_guid: str
2082
- The GUID (Globally Unique Identifier) of the governance action type to retrieve.
2083
-
2084
- Returns:
2085
- -------
2086
- dict: The JSON representation of the governance action type element.
2087
-
2088
- Raises:
2089
- ------
2090
- InvalidParameterException: If the API response indicates an error (non-200 status code),
2091
- this exception is raised with details from the response content.
2092
- PropertyServerException: If the API response indicates a server side error.
2093
- UserNotAuthorizedException:
2094
- """
2095
-
2096
- validate_guid(gov_action_type_guid)
2097
-
2098
- url = (
2099
- f"{self.curation_command_root}/"
2100
- f"governance-action-types/{gov_action_type_guid}"
2101
- )
2102
-
2103
- response = await self._async_make_request("GET", url)
2104
- return response.json().get("element", "no actions")
2105
-
2106
- def get_gov_action_types_by_guid(self, gov_action_type_guid: str) -> dict | str:
2107
- """Retrieve the governance action type metadata element with the supplied unique identifier.
2108
-
2109
- Parameters:
2110
- ----------
2111
- gov_action_type_guid: str
2112
- The GUID (Globally Unique Identifier) of the governance action type to retrieve.
2113
-
2114
- Returns:
2115
- -------
2116
- dict: The JSON representation of the governance action type element.
2117
-
2118
- Raises:
2119
- ------
2120
- InvalidParameterException: If the API response indicates an error (non-200 status code),
2121
- this exception is raised with details from the response content.
2122
- PropertyServerException: If the API response indicates a server side error.
2123
- UserNotAuthorizedException:
2124
- """
2125
- loop = asyncio.get_event_loop()
2126
- response = loop.run_until_complete(
2127
- self._async_get_gov_action_types_by_guid(gov_action_type_guid)
2128
- )
2129
- return response
2130
-
2131
- async def _async_get_gov_action_types_by_name(
2132
- self,
2133
- action_type_name,
2134
- start_from: int = 0,
2135
- page_size: int = max_paging_size,
2136
- ) -> list | str:
2137
- """Retrieve the list of governance action type metadata elements with a matching qualified or display name.
2138
- There are no wildcards supported on this request. Async version.
2139
-
2140
- Parameters:
2141
- ----------
2142
- action_type_name: str
2143
- The name of the governance action type to retrieve.
2144
-
2145
- Returns:
2146
- -------
2147
- dict: The JSON representation of the governance action type element.
2148
-
2149
- Raises:
2150
- ------
2151
- InvalidParameterException: If the API response indicates an error (non-200 status code),
2152
- this exception is raised with details from the response content.
2153
- PropertyServerException: If the API response indicates a server side error.
2154
- UserNotAuthorizedException:
2155
- """
2156
-
2157
- validate_name(action_type_name)
2158
-
2159
- url = (
2160
- f"{self.curation_command_root}/"
2161
- f"governance-action-types/by-name?startFrom={start_from}&pageSize={page_size}"
2162
- )
2163
-
2164
- body = {"filter": action_type_name}
2165
-
2166
- response = await self._async_make_request("POST", url, body)
2167
- return response.json().get("elements", "no actions")
2168
-
2169
- def get_gov_action_types_by_name(
2170
- self,
2171
- action_type_name,
2172
- start_from: int = 0,
2173
- page_size: int = max_paging_size,
2174
- ) -> list | str:
2175
- """Retrieve the list of governance action type metadata elements with a matching qualified or display name.
2176
- There are no wildcards supported on this request. Async version.
2177
-
2178
- Parameters:
2179
- ----------
2180
- action_type_name: str
2181
- The name of the governance action type to retrieve.
2182
-
2183
- Returns:
2184
- -------
2185
- dict: The JSON representation of the governance action type element.
2186
-
2187
- Raises:
2188
- ------
2189
- InvalidParameterException: If the API response indicates an error (non-200 status code),
2190
- this exception is raised with details from the response content.
2191
- PropertyServerException: If the API response indicates a server side error.
2192
- UserNotAuthorizedException:
2193
- """
2194
- loop = asyncio.get_event_loop()
2195
- response = loop.run_until_complete(
2196
- self._async_get_gov_action_types_by_name(
2197
- action_type_name, start_from, page_size
2198
- )
2199
- )
2200
- return response
2201
-
2202
- async def _async_find_gov_action_types(
2203
- self,
2204
- search_string: str = "*",
2205
- starts_with: bool = False,
2206
- ends_with: bool = False,
2207
- ignore_case: bool = True,
2208
- start_from: int = 0,
2209
- page_size: int = max_paging_size,
2210
- ) -> list | str:
2211
- """Retrieve the list of governance action type metadata elements that contain the search string.
2212
- Async Version.
2213
-
2214
- Parameters
2215
- ----------
2216
- search_string : str
2217
- The string used for searching engine actions by name.
2218
-
2219
-
2220
-
2221
- starts_with : bool, optional
2222
- Whether to search engine actions that start with the given search string. Default is False.
2223
-
2224
- ends_with : bool, optional
2225
- Whether to search engine actions that end with the given search string. Default is False.
2226
-
2227
- ignore_case : bool, optional
2228
- Whether to ignore case while searching engine actions. Default is False.
2229
-
2230
- start_from : int, optional
2231
- The index from which to start fetching the engine actions. Default is 0.
2232
-
2233
- page_size : int, optional
2234
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
2235
-
2236
- Returns
2237
- -------
2238
- List[dict] or str
2239
- A list of dictionaries representing the governance action types found based on the search query.
2240
- If no actions are found, returns the string "no action types".
2241
-
2242
- Raises
2243
- ------
2244
- InvalidParameterException
2245
- PropertyServerException
2246
- UserNotAuthorizedException
2247
-
2248
- """
2249
-
2250
- validate_search_string(search_string)
2251
- if search_string == "*":
2252
- search_string = None
2253
- starts_with_s = str(starts_with).lower()
2254
- ends_with_s = str(ends_with).lower()
2255
- ignore_case_s = str(ignore_case).lower()
2256
-
2257
- url = (
2258
- f"{self.curation_command_root}/governance-action-types/"
2259
- f"by-search-string?startFrom={start_from}&pageSize={page_size}&startsWith={starts_with_s}&"
2260
- f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}"
2261
- )
2262
- body = {"filter": search_string}
2263
- response = await self._async_make_request("POST", url, body)
2264
- return response.json().get("elements", "no action types")
2265
-
2266
- def find_gov_action_types(
2267
- self,
2268
- search_string: str = "*",
2269
- starts_with: bool = False,
2270
- ends_with: bool = False,
2271
- ignore_case: bool = False,
2272
- start_from: int = 0,
2273
- page_size: int = max_paging_size,
2274
- ) -> list | str:
2275
- """Retrieve the list of governance action type metadata elements that contain the search string.
2276
-
2277
- Parameters
2278
- ----------
2279
- search_string : str
2280
- The string used for searching engine actions by name.
2281
-
2282
-
2283
- starts_with : bool, optional
2284
- Whether to search engine actions that start with the given search string. Default is False.
2285
-
2286
- ends_with : bool, optional
2287
- Whether to search engine actions that end with the given search string. Default is False.
2288
-
2289
- ignore_case : bool, optional
2290
- Whether to ignore case while searching engine actions. Default is False.
2291
-
2292
- start_from : int, optional
2293
- The index from which to start fetching the engine actions. Default is 0.
2294
-
2295
- page_size : int, optional
2296
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
2297
-
2298
- Returns
2299
- -------
2300
- List[dict] or str
2301
- A list of dictionaries representing the governance action types found based on the search query.
2302
- If no actions are found, returns the string "no action types".
2303
-
2304
- Raises
2305
- ------
2306
- InvalidParameterException
2307
- PropertyServerException
2308
- UserNotAuthorizedException
2309
-
2310
- """
2311
- loop = asyncio.get_event_loop()
2312
- response = loop.run_until_complete(
2313
- self._async_find_gov_action_types(
2314
- search_string,
2315
- starts_with,
2316
- ends_with,
2317
- ignore_case,
2318
- start_from,
2319
- page_size,
2320
- )
2321
- )
2322
- return response
2323
-
2324
- async def _async_initiate_gov_action_type(
2325
- self,
2326
- action_type_qualified_name: str,
2327
- request_source_guids: [str],
2328
- action_targets: list,
2329
- start_time: datetime = None,
2330
- request_parameters: dict = None,
2331
- orig_service_name: str = None,
2332
- orig_engine_name: str = None,
2333
- ) -> str:
2334
- """Using the named governance action type as a template, initiate an engine action. Async version.
2335
-
2336
- Parameters
2337
- ----------
2338
- action_type_qualified_name: str
2339
- - unique name for the governance process
2340
- request_source_guids: [str]
2341
- - request source elements for the resulting governance action service
2342
- action_targets: [str]
2343
- -list of action target names to GUIDs for the resulting governance action service
2344
- start_time: datetime, default = None
2345
- - time to start the process, no earlier than start time. None means now.
2346
- request_parameters: [str]
2347
- - parameters passed into the process
2348
- orig_service_name: str
2349
- - unique name of the requesting governance service (if initiated by a governance engine)
2350
- orig_engine_name: str
2351
- - optional unique name of the governance engine (if initiated by a governance engine).
2352
-
2353
- Returns
2354
- -------
2355
- Unique id (guid) of the newly started governance engine process
2356
-
2357
- Raises
2358
- ------
2359
- InvalidParameterException
2360
- PropertyServerException
2361
- UserNotAuthorizedException
2362
-
2363
- """
2364
-
2365
- url = f"{self.curation_command_root}/governance-action-types/" f"initiate"
2366
- start = int(start_time.timestamp() * 1000) if start_time else None
2367
- body = {
2368
- "class": "InitiateGovernanceActionTypeRequestBody",
2369
- "governanceActionTypeQualifiedName": action_type_qualified_name,
2370
- "requestSourceGUIDs": request_source_guids,
2371
- "actionTargets": action_targets,
2372
- "startDate": start,
2373
- "requestParameters": request_parameters,
2374
- "originatorServiceName": orig_service_name,
2375
- "originatorEngineName": orig_engine_name,
2376
- }
2377
- new_body = body_slimmer(body)
2378
- response = await self._async_make_request("POST", url, new_body)
2379
- return response.json().get("guid", "Action not initiated")
2380
-
2381
- def initiate_gov_action_type(
2382
- self,
2383
- action_type_qualified_name: str,
2384
- request_source_guids: [str],
2385
- action_targets: list,
2386
- start_time: datetime = None,
2387
- request_parameters: dict = None,
2388
- orig_service_name: str = None,
2389
- orig_engine_name: str = None,
2390
- ) -> str:
2391
- """Using the named governance action type as a template, initiate an engine action.
2392
-
2393
- Parameters
2394
- ----------
2395
- action_type_qualified_name: str
2396
- - unique name for the governance process
2397
- request_source_guids: [str]
2398
- - request source elements for the resulting governance action service
2399
- action_targets: [str]
2400
- -list of action target names to GUIDs for the resulting governance action service
2401
- start_time: datetime, default = None
2402
- - time to start the process, no earlier than start time. None means now.
2403
- request_parameters: [str]
2404
- - parameters passed into the process
2405
- orig_service_name: str
2406
- - unique name of the requesting governance service (if initiated by a governance engine)
2407
- orig_engine_name: str
2408
- - optional unique name of the governance engine (if initiated by a governance engine).
2409
-
2410
- Returns
2411
- -------
2412
- Unique id (guid) of the newly started governance engine process
2413
-
2414
- Raises
2415
- ------
2416
- InvalidParameterException
2417
- PropertyServerException
2418
- UserNotAuthorizedException
2419
- """
2420
- loop = asyncio.get_event_loop()
2421
- response = loop.run_until_complete(
2422
- self._async_initiate_gov_action_type(
2423
- action_type_qualified_name,
2424
- request_source_guids,
2425
- action_targets,
2426
- start_time,
2427
- request_parameters,
2428
- orig_service_name,
2429
- orig_engine_name,
2430
- )
2431
- )
2432
- return response
2433
-
2434
- #
2435
- # Initiate surveys
2436
- #
2437
-
2438
- async def _async_initiate_survey(self, survey_name: str, resource_guid: str) -> str:
2439
- """Initiate a survey of the survey_name on the target resource. Async Version.
2440
-
2441
- Parameters
2442
- ----------
2443
- survey_name: str
2444
- The name of the survey to initiate.
2445
- resource_guid : str
2446
- The GUID of the resource to be surveyed.
2447
-
2448
- Returns
2449
- -------
2450
- str
2451
- The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2452
-
2453
- """
2454
-
2455
- url = f"{self.curation_command_root}/governance-action-types/initiate"
2456
-
2457
- body = {
2458
- "class": "InitiateGovernanceActionTypeRequestBody",
2459
- "governanceActionTypeQualifiedName": survey_name,
2460
- "actionTargets": [
2461
- {
2462
- "class": "NewActionTarget",
2463
- "actionTargetName": "serverToSurvey",
2464
- "actionTargetGUID": resource_guid.strip(),
2465
- }
2466
- ],
2467
- }
2468
- response = await self._async_make_request("POST", url, body)
2469
- return response.json().get("guid", "Action not initiated")
2470
-
2471
- def initiate_postgres_database_survey(self, postgres_database_guid: str) -> str:
2472
- """Initiate a postgres database survey"""
2473
- loop = asyncio.get_event_loop()
2474
- response = loop.run_until_complete(
2475
- self._async_initiate_survey(
2476
- "PostgreSQLSurvey:survey-postgres-database", postgres_database_guid
2477
- )
2478
- )
2479
- return response
2480
-
2481
- def initiate_postgres_server_survey(self, postgres_server_guid: str) -> str:
2482
- """Initiate a postgres server survey"""
2483
- loop = asyncio.get_event_loop()
2484
- response = loop.run_until_complete(
2485
- self._async_initiate_survey(
2486
- "PostgreSQLSurvey:survey-postgres-server", postgres_server_guid
2487
- )
2488
- )
2489
- return response
2490
-
2491
- def initiate_file_folder_survey(
2492
- self,
2493
- file_folder_guid: str,
2494
- survey_name: str = "FileSurveys:survey-folder",
2495
- ) -> str:
2496
- """Initiate a file folder survey - async version
2497
-
2498
- Parameters:
2499
- ----------
2500
- file_folder_guid: str
2501
- The GUID of the File Folder that we wish to survey.
2502
- survey_name: str, optional
2503
- The unique name of the survey routine to execute. Default surveys all folders.
2504
-
2505
- Returns:
2506
- -------
2507
- str:
2508
- The guid of the survey being run.
2509
-
2510
- Raises:
2511
- ------
2512
- InvalidParameterException: If the API response indicates an error (non-200 status code),
2513
- this exception is raised with details from the response content.
2514
- PropertyServerException: If the API response indicates a server side error.
2515
- UserNotAuthorizedException:
2516
-
2517
- Notes:
2518
- There are multiple kinds of file folder surveys available, each with their own purpose. They are described
2519
- in the Core Content Brain.
2520
-
2521
- File Folder Survey Names currently include::
2522
- - Egeria:GovernanceActionType:AssetSurvey:survey-folders
2523
- - Egeria:GovernanceActionType:AssetSurvey:survey-folder-and-files
2524
- - Egeria:GovernanceActionType:AssetSurvey:survey-all-folders
2525
- - Egeria:GovernanceActionType:AssetSurvey:survey-all-folders-and-files
2526
-
2527
-
2528
- """
2529
- loop = asyncio.get_event_loop()
2530
- response = loop.run_until_complete(
2531
- self._async_initiate_survey(
2532
- survey_name,
2533
- file_folder_guid,
2534
- )
2535
- )
2536
- return response
2537
-
2538
- def initiate_file_survey(self, file_guid: str) -> str:
2539
- """Initiate a file survey"""
2540
- loop = asyncio.get_event_loop()
2541
- response = loop.run_until_complete(
2542
- self._async_initiate_survey("FileSurveys:survey-data-file", file_guid)
2543
- )
2544
- return response
2545
-
2546
- def initiate_kafka_server_survey(self, kafka_server_guid: str) -> str:
2547
- """Initiate survey of a kafka server.
2548
- Parameters
2549
- ----------
2550
- kafka_server_guid : str
2551
- The GUID of the Kafka server to be surveyed.
2552
-
2553
-
2554
- Returns
2555
- -------
2556
- str
2557
- The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2558
-
2559
- """
2560
- loop = asyncio.get_event_loop()
2561
- response = loop.run_until_complete(
2562
- self._async_initiate_survey(
2563
- "ApacheKafkaSurveys:survey-kafka-server", kafka_server_guid
2564
- )
2565
- )
2566
- return response
2567
-
2568
- def initiate_uc_server_survey(self, uc_server_guid: str) -> str:
2569
- """Initiate survey of a Unity Catalog server. Async Version.
2570
- Parameters
2571
- ----------
2572
- uc_server_guid : str
2573
- The GUID of the Kafka server to be surveyed.
2574
-
2575
-
2576
- Returns
2577
- -------
2578
- str
2579
- The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2580
-
2581
- """
2582
- loop = asyncio.get_event_loop()
2583
- response = loop.run_until_complete(
2584
- self._async_initiate_survey(
2585
- "UnityCatalogSurveys:survey-unity-catalog-server", uc_server_guid
2586
- )
2587
- )
2588
- return response
2589
-
2590
- def initiate_uc_schema_survey(self, uc_schema_guid: str) -> str:
2591
- """Initiate survey of a Unity Catalog schema. Async Version.
2592
- Parameters
2593
- ----------
2594
- uc_schema_guid : str
2595
- The GUID of the Kafka server to be surveyed.
2596
-
2597
-
2598
-
2599
- Returns
2600
- -------
2601
- str
2602
- The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2603
-
2604
- """
2605
- loop = asyncio.get_event_loop()
2606
- response = loop.run_until_complete(
2607
- self._async_initiate_survey(
2608
- "UnityCatalogSurveys:survey-unity-catalog-schema", uc_schema_guid
2609
- )
2610
- )
2611
- return response
2612
-
2613
- # async def _async_initiate_uc_function_survey(self, uc_server_guid: str) -> str:
2614
- # """ Initiate survey of a Unity Catalog server. Async Version.
2615
- # Parameters
2616
- # ----------
2617
- # Unity Catalog_server_guid : str
2618
- # The GUID of the Kafka server to be surveyed.
2619
- #
2620
- # server : str, optional
2621
- # The name of the server. If not provided, the default server name is used.
2622
- #
2623
- # Returns
2624
- # -------
2625
- # str
2626
- # The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2627
- #
2628
- # """
2629
- # server = self.view_server if server is None else server
2630
- # url = (f"{self.curation_command_root}/governance-action-types/"
2631
- # f"initiate")
2632
- #
2633
- # body = {"class": "InitiateGovernanceActionTypeRequestBody",
2634
- # "governanceActionTypeQualifiedName": "AssetSurvey:survey-unity-catalog-server", "actionTargets": [
2635
- # {"class": "NewActionTarget", "actionTargetName": "serverToSurvey", "actionTargetGUID": uc_server_guid}]}
2636
- # response = await self._async_make_request("POST", url, body)
2637
- # return response.json().get("guid", "Action not initiated")
2638
- #
2639
- # def initiate_uc_function_survey(self, uc_server_guid: str) -> str:
2640
- # """ Initiate survey of a Unity Catalog server. Async Version.
2641
- # Parameters
2642
- # ----------
2643
- # Unity Catalog_server_guid : str
2644
- # The GUID of the Kafka server to be surveyed.
2645
- #
2646
- # server : str, optional
2647
- # The name of the server. If not provided, the default server name is used.
2648
- #
2649
- # Returns
2650
- # -------
2651
- # str
2652
- # The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2653
- #
2654
- # """
2655
- # loop = asyncio.get_event_loop()
2656
- # response = loop.run_until_complete(self._async_initiate_uc_server_survey(uc_server_guid))
2657
- # return response
2658
- #
2659
- # async def _async_initiate_uc_server_survey(self, uc_server_guid: str) -> str:
2660
- # """ Initiate survey of a Unity Catalog server. Async Version.
2661
- # Parameters
2662
- # ----------
2663
- # Unity Catalog_server_guid : str
2664
- # The GUID of the Kafka server to be surveyed.
2665
- #
2666
- # server : str, optional
2667
- # The name of the server. If not provided, the default server name is used.
2668
- #
2669
- # Returns
2670
- # -------
2671
- # str
2672
- # The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2673
- #
2674
- # """
2675
- # server = self.view_server if server is None else server
2676
- # url = (f"{self.curation_command_root}/governance-action-types/"
2677
- # f"initiate")
2678
- #
2679
- # body = {"class": "InitiateGovernanceActionTypeRequestBody",
2680
- # "governanceActionTypeQualifiedName": "AssetSurvey:survey-unity-catalog-server", "actionTargets": [
2681
- # {"class": "NewActionTarget", "actionTargetName": "serverToSurvey", "actionTargetGUID": uc_server_guid}]}
2682
- # response = await self._async_make_request("POST", url, body)
2683
- # return response.json().get("guid", "Action not initiated")
2684
- #
2685
- # def initiate_uc_server_survey(self, uc_server_guid: str) -> str:
2686
- # """ Initiate survey of a Unity Catalog server. Async Version.
2687
- # Parameters
2688
- # ----------
2689
- # Unity Catalog_server_guid : str
2690
- # The GUID of the Kafka server to be surveyed.
2691
- #
2692
- # server : str, optional
2693
- # The name of the server. If not provided, the default server name is used.
2694
- #
2695
- # Returns
2696
- # -------
2697
- # str
2698
- # The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2699
- #
2700
- # """
2701
- # loop = asyncio.get_event_loop()
2702
- # response = loop.run_until_complete(self._async_initiate_uc_server_survey(uc_server_guid))
2703
- # return response
2704
- #
2705
- # async def _async_initiate_uc_server_survey(self, uc_server_guid: str) -> str:
2706
- # """ Initiate survey of a Unity Catalog server. Async Version.
2707
- # Parameters
2708
- # ----------
2709
- # Unity Catalog_server_guid : str
2710
- # The GUID of the Kafka server to be surveyed.
2711
- #
2712
- # server : str, optional
2713
- # The name of the server. If not provided, the default server name is used.
2714
- #
2715
- # Returns
2716
- # -------
2717
- # str
2718
- # The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2719
- #
2720
- # """
2721
- # server = self.view_server if server is None else server
2722
- # url = (f"{self.curation_command_root}/governance-action-types/"
2723
- # f"initiate")
2724
- #
2725
- # body = {"class": "InitiateGovernanceActionTypeRequestBody",
2726
- # "governanceActionTypeQualifiedName": "AssetSurvey:survey-unity-catalog-server", "actionTargets": [
2727
- # {"class": "NewActionTarget", "actionTargetName": "serverToSurvey", "actionTargetGUID": uc_server_guid}]}
2728
- # response = await self._async_make_request("POST", url, body)
2729
- # return response.json().get("guid", "Action not initiated")
2730
- #
2731
- # def initiate_uc_server_survey(self, uc_server_guid: str) -> str:
2732
- # """ Initiate survey of a Unity Catalog server. Async Version.
2733
- # Parameters
2734
- # ----------
2735
- # Unity Catalog_server_guid : str
2736
- # The GUID of the Kafka server to be surveyed.
2737
- #
2738
- # server : str, optional
2739
- # The name of the server. If not provided, the default server name is used.
2740
- #
2741
- # Returns
2742
- # -------
2743
- # str
2744
- # The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2745
- #
2746
- # """
2747
- # loop = asyncio.get_event_loop()
2748
- # response = loop.run_until_complete(self._async_initiate_uc_server_survey(uc_server_guid))
2749
- # return response
2750
-
2751
- #
2752
- # Initiate general engine action
2753
- #
2754
-
2755
- async def _async_initiate_engine_action(
2756
- self,
2757
- qualified_name: str,
2758
- domain_identifier: int,
2759
- display_name: str,
2760
- description: str,
2761
- request_source_guids: str,
2762
- action_targets: str,
2763
- received_guards: [str],
2764
- start_time: datetime,
2765
- request_type: str,
2766
- request_parameters: dict,
2767
- process_name: str,
2768
- request_src_name: str = None,
2769
- originator_svc_name: str = None,
2770
- originator_eng_name: str = None,
2771
- ) -> str:
2772
- """Create an engine action in the metadata store that will trigger the governance service associated with
2773
- the supplied request type. The engine action remains to act as a record of the actions taken for auditing.
2774
- Async version.
2775
-
2776
- Parameters
2777
- ----------
2778
- qualified_name (str): The qualified name of the governance action.
2779
- domain_identifier (int): The domain identifier for the governance action.
2780
- display_name (str): The display name of the governance action.
2781
- description (str): The description of the governance action.
2782
- request_source_guids (str): GUIDs of the sources initiating the request.
2783
- action_targets (str): Targets of the governance action.
2784
- received_guards (List[str]): List of guards received for the action.
2785
- start_time (datetime): The start time for the governance action.
2786
- request_type (str): The type of the governance action request.
2787
- request_parameters (dict): Additional parameters for the governance action.
2788
- process_name (str): The name of the associated governance action process.
2789
- request_src_name (str, optional): The name of the request source. Defaults to None.
2790
- originator_svc_name (str, optional): The name of the originator service. Defaults to None.
2791
- originator_eng_name (str, optional): The name of the originator engine. Defaults to None.
2792
-
2793
- Returns
2794
- -------
2795
- str: The GUID (Globally Unique Identifier) of the initiated governance action.
2796
-
2797
- Raises
2798
- ------
2799
- InvalidParameterException: If the API response indicates an error (non-200 status code),
2800
- this exception is raised with details from the response content.
2801
-
2802
- Note
2803
- ----
2804
- The `start_time` parameter should be a `datetime` object representing the start time of the
2805
- governance action.
2806
-
2807
-
2808
- """
2809
-
2810
- url = (
2811
- f"{self.curation_command_root}/governance-engines/"
2812
- f"engine-actions/initiate"
2813
- )
2814
- body = {
2815
- "class": "GovernanceActionRequestBody",
2816
- "qualifiedName": qualified_name + str(int(start_time.timestamp())),
2817
- "domainIdentifier": domain_identifier,
2818
- "displayName": display_name,
2819
- "description": description,
2820
- "requestSourceGUIDs": request_source_guids,
2821
- "actionTargets": action_targets,
2822
- "receivedGuards": received_guards,
2823
- "startTime": int(start_time.timestamp() * 1000),
2824
- "requestType": request_type,
2825
- "requestParameters": request_parameters,
2826
- "processName": process_name,
2827
- "requestSourceName": request_src_name,
2828
- "originatorServiceName": originator_svc_name,
2829
- "originatorEngineName": originator_eng_name,
2830
- }
2831
- new_body = body_slimmer(body)
2832
- response = await self._async_make_request("POST", url, new_body)
2833
- return response.json().get("guid", "Action not initiated")
2834
-
2835
- def initiate_engine_action(
2836
- self,
2837
- qualified_name: str,
2838
- domain_identifier: int,
2839
- display_name: str,
2840
- description: str,
2841
- request_source_guids: str,
2842
- action_targets: str,
2843
- received_guards: [str],
2844
- start_time: datetime,
2845
- request_type: str,
2846
- request_parameters: dict,
2847
- process_name: str,
2848
- request_src_name: str = None,
2849
- originator_svc_name: str = None,
2850
- originator_eng_name: str = None,
2851
- ) -> str:
2852
- """Create an engine action in the metadata store that will trigger the governance service associated with
2853
- the supplied request type. The engine action remains to act as a record of the actions taken for auditing.
2854
-
2855
- Parameters
2856
- ----------
2857
- qualified_name (str): The qualified name of the governance action.
2858
- domain_identifier (int): The domain identifier for the governance action.
2859
- display_name (str): The display name of the governance action.
2860
- description (str): The description of the governance action.
2861
- request_source_guids (str): GUIDs of the sources initiating the request.
2862
- action_targets (str): Targets of the governance action.
2863
- received_guards (List[str]): List of guards received for the action.
2864
- start_time (datetime): The start time for the governance action.
2865
- gov_engine_name (str): The name of the governance engine associated with the action.
2866
- request_type (str): The type of the governance action request.
2867
- request_parameters (dict): Additional parameters for the governance action.
2868
- process_name (str): The name of the associated governance action process.
2869
- request_src_name (str, optional): The name of the request source. Defaults to None.
2870
- originator_svc_name (str, optional): The name of the originator service. Defaults to None.
2871
- originator_eng_name (str, optional): The name of the originator engine. Defaults to None.
2872
-
2873
- Returns
2874
- -------
2875
- str: The GUID (Globally Unique Identifier) of the initiated governance action.
2876
-
2877
- Raises
2878
- ------
2879
- InvalidParameterException: If the API response indicates an error (non-200 status code),
2880
- this exception is raised with details from the response content.
2881
-
2882
- Note
2883
- ----
2884
- The `start_time` parameter should be a `datetime` object representing the start time of the
2885
- governance action.
2886
- """
2887
- loop = asyncio.get_event_loop()
2888
- response = loop.run_until_complete(
2889
- self._async_initiate_engine_action(
2890
- qualified_name,
2891
- domain_identifier,
2892
- display_name,
2893
- description,
2894
- request_source_guids,
2895
- action_targets,
2896
- received_guards,
2897
- start_time,
2898
- request_type,
2899
- request_parameters,
2900
- process_name,
2901
- request_src_name,
2902
- originator_svc_name,
2903
- originator_eng_name,
2904
- )
2905
- )
2906
- return response
2907
-
2908
- async def _async_get_catalog_targets(
2909
- self,
2910
- integ_connector_guid: str,
2911
- start_from: int = 0,
2912
- page_size: int = max_paging_size,
2913
- ) -> list | str:
2914
- """Retrieve the details of the metadata elements identified as catalog targets with an integration connector.
2915
- Async version.
2916
-
2917
- Parameters:
2918
- ----------
2919
- integ_connector_guid: str
2920
- The GUID (Globally Unique Identifier) of the integration connector used to retrieve catalog targets.
2921
- Returns:
2922
- -------
2923
- [dict]: The list of catalog targets JSON objects.
2924
-
2925
- Raises:
2926
- ------
2927
- InvalidParameterException: If the API response indicates an error (non-200 status code),
2928
- this exception is raised with details from the response content.
2929
- PropertyServerException: If the API response indicates a server side error.
2930
- UserNotAuthorizedException:
2931
- """
2932
-
2933
- validate_guid(integ_connector_guid)
2934
-
2935
- url = (
2936
- f"{self.curation_command_root}/integration-connectors/"
2937
- f"{integ_connector_guid}/catalog-targets?startFrom={start_from}&pageSize={page_size}"
2938
- )
2939
-
2940
- response = await self._async_make_request("GET", url)
2941
- return response.json().get("elements", "no targets")
2942
-
2943
- def get_catalog_targets(
2944
- self,
2945
- integ_connector_guid: str,
2946
- start_from: int = 0,
2947
- page_size: int = max_paging_size,
2948
- ) -> list | str:
2949
- """Retrieve the details of the metadata elements identified as catalog targets with an integration connector.
2950
-
2951
- Parameters:
2952
- ----------
2953
- integ_connector_guid: str
2954
- The GUID (Globally Unique Identifier) of the integration connector used to retrieve catalog targets.
2955
- Returns:
2956
- -------
2957
- [dict]: The list of catalog targets JSON objects.
2958
-
2959
- Raises:
2960
- ------
2961
- InvalidParameterException: If the API response indicates an error (non-200 status code),
2962
- this exception is raised with details from the response content.
2963
- PropertyServerException: If the API response indicates a server side error.
2964
- UserNotAuthorizedException:
2965
- """
2966
-
2967
- loop = asyncio.get_event_loop()
2968
- response = loop.run_until_complete(
2969
- self._async_get_catalog_targets(integ_connector_guid, start_from, page_size)
2970
- )
2971
- return response
2972
-
2973
- async def _async_get_catalog_target(self, relationship_guid: str) -> dict | str:
2974
- """Retrieve a specific catalog target associated with an integration connector. Further Information:
2975
- https://egeria-project.org/concepts/integration-connector/ . Async version.
2976
-
2977
- Parameters:
2978
- ----------
2979
- relationship_guid: str
2980
- The GUID (Globally Unique Identifier) identifying the catalog targets for an integration connector.
2981
-
2982
- Returns:
2983
- -------
2984
- dict: JSON structure of the catalog target.
2985
-
2986
- Raises:
2987
- ------
2988
- InvalidParameterException: If the API response indicates an error (non-200 status code),
2989
- this exception is raised with details from the response content.
2990
- PropertyServerException: If the API response indicates a server side error.
2991
- UserNotAuthorizedException:
2992
- """
2993
-
2994
- validate_guid(relationship_guid)
2995
-
2996
- url = f"{self.curation_command_root}/catalog-targets/" f"{relationship_guid}"
2997
-
2998
- response = await self._async_make_request("GET", url)
2999
- return response.json().get("element", "no actions")
3000
-
3001
- def get_catalog_target(self, relationship_guid: str) -> dict | str:
3002
- """Retrieve a specific catalog target associated with an integration connector. Further Information:
3003
- https://egeria-project.org/concepts/integration-connector/ .
3004
-
3005
- Parameters:
3006
- ----------
3007
- relationship_guid: str
3008
- The GUID (Globally Unique Identifier) identifying the catalog targets for an integration connector.
3009
-
3010
- Returns:
3011
- -------
3012
- dict: JSON structure of the catalog target.
3013
-
3014
- Raises:
3015
- ------
3016
- InvalidParameterException: If the API response indicates an error (non-200 status code),
3017
- this exception is raised with details from the response content.
3018
- PropertyServerException: If the API response indicates a server side error.
3019
- UserNotAuthorizedException:
3020
- """
3021
-
3022
- loop = asyncio.get_event_loop()
3023
- response = loop.run_until_complete(
3024
- self._async_get_catalog_target(relationship_guid)
3025
- )
3026
- return response
3027
-
3028
- async def _async_add_catalog_target(
3029
- self,
3030
- integ_connector_guid: str,
3031
- metadata_element_guid: str,
3032
- catalog_target_name: str,
3033
- connection_name: str = None,
3034
- metadata_src_qual_name: str = None,
3035
- config_properties: dict = None,
3036
- template_properties: dict = None,
3037
- permitted_sync: str = "BOTH_DIRECTIONS",
3038
- delete_method: str = "ARCHIVE",
3039
- ) -> str:
3040
- """Add a catalog target to an integration connector and .
3041
- Async version.
3042
-
3043
- Parameters:
3044
- ----------
3045
- integ_connector_guid: str
3046
- The GUID (Globally Unique Identifier) of the integration connector used to retrieve catalog targets.
3047
- metadata_element_guid: str
3048
- The specific metadata element target we want to retrieve.
3049
- catalog_target_name : dict
3050
- Name of the catalog target to add.
3051
- connection_name: str, default = None
3052
- Optional name of connection to use for this catalog target when multiple connections defined.
3053
- metadata_src_qual_name: str
3054
- The qualified name of the metadata source for the catalog target
3055
- config_properties: dict
3056
- Configuration properties for the catalog target
3057
- template_properties: dict
3058
- Template properties to pass
3059
- permitted_sync: str, default = BOTH_DIRECTIONS
3060
- Direction the metadata is allowed to flow (BOTH_DIRECTIONS, FROM_THIRD_PARTH, TO_THIRD_PARTY
3061
- delete_method: str, default = ARCHIVE
3062
- Controls the type of delete. Use ARCHIVE for lineage considerations. Alternative is SOFT_DELETE.
3063
- Returns:
3064
- -------
3065
- Relationship GUID for the catalog target,
3066
-
3067
- Raises:
3068
- ------
3069
- InvalidParameterException: If the API response indicates an error (non-200 status code),
3070
- this exception is raised with details from the response content.
3071
- PropertyServerException: If the API response indicates a server side error.
3072
- UserNotAuthorizedException:
3073
- """
3074
-
3075
- validate_guid(integ_connector_guid)
3076
- validate_guid(metadata_element_guid)
3077
-
3078
- url = (
3079
- f"{self.curation_command_root}/integration-connectors/"
3080
- f"{integ_connector_guid}/catalog-targets/{metadata_element_guid}"
3081
- )
3082
- body = {
3083
- "catalogTargetName": catalog_target_name,
3084
- "metadataSourceQualifiedName": metadata_src_qual_name,
3085
- "configProperties": config_properties,
3086
- "templateProperties": template_properties,
3087
- "connectionName": connection_name,
3088
- "permittedSynchronization": permitted_sync,
3089
- "deleteMethod": delete_method,
3090
- }
3091
-
3092
- response = await self._async_make_request("POST", url, body)
3093
- return response.json().get("guid", "No Guid returned")
3094
-
3095
- def add_catalog_target(
3096
- self,
3097
- integ_connector_guid: str,
3098
- metadata_element_guid: str,
3099
- catalog_target_name: str,
3100
- connection_name: str = None,
3101
- metadata_src_qual_name: str = None,
3102
- config_properties: dict = None,
3103
- template_properties: dict = None,
3104
- permitted_sync: str = "BOTH_DIRECTIONS",
3105
- delete_method: str = "ARCHIVE",
3106
- ) -> str:
3107
- """Add a catalog target to an integration connector and .
3108
-
3109
- Parameters:
3110
- ----------
3111
- integ_connector_guid: str
3112
- The GUID (Globally Unique Identifier) of the integration connector used to retrieve catalog targets.
3113
- metadata_element_guid: str
3114
- The specific metadata element target we want to retrieve.
3115
- catalog_target_name : dict
3116
- Name of the catalog target to add.
3117
- connection_name: str, default = None
3118
- Optional name of connection to use for this catalog target when multiple connections defined.
3119
- metadata_src_qual_name: str
3120
- The qualified name of the metadata source for the catalog target
3121
- config_properties: dict
3122
- Configuration properties for the catalog target
3123
- template_properties: dict
3124
- Template properties to pass
3125
- permitted_sync: str, default = BOTH_DIRECTIONS
3126
- Direction the metadata is allowed to flow (BOTH_DIRECTIONS, FROM_THIRD_PARTH, TO_THIRD_PARTY
3127
- delete_method: str, default = ARCHIVE
3128
- Controls the type of delete. Use ARCHIVE for lineage considerations. Alternative is SOFT_DELETE.
3129
- Returns:
3130
- -------
3131
- Relationship GUID for the catalog target,
3132
-
3133
- Raises:
3134
- ------
3135
- InvalidParameterException: If the API response indicates an error (non-200 status code),
3136
- this exception is raised with details from the response content.
3137
- PropertyServerException: If the API response indicates a server side error.
3138
- UserNotAuthorizedException:
3139
- """
3140
- loop = asyncio.get_event_loop()
3141
- response = loop.run_until_complete(
3142
- self._async_add_catalog_target(
3143
- integ_connector_guid,
3144
- metadata_element_guid,
3145
- catalog_target_name,
3146
- connection_name,
3147
- metadata_src_qual_name,
3148
- config_properties,
3149
- template_properties,
3150
- permitted_sync,
3151
- delete_method,
3152
- )
3153
- )
3154
- return response
3155
-
3156
- async def _async_update_catalog_target(
3157
- self,
3158
- relationship_guid: str,
3159
- catalog_target_name: str,
3160
- connection_name: str = None,
3161
- metadata_src_qual_name: str = None,
3162
- config_properties: dict = None,
3163
- template_properties: dict = None,
3164
- permitted_sync: str = "BOTH_DIRECTIONS",
3165
- delete_method: str = "ARCHIVE",
3166
- ) -> None:
3167
- """Update a catalog target to an integration connector.
3168
- Async version.
3169
-
3170
- Parameters:
3171
- ----------
3172
- relationship_guid: str
3173
- The GUID (Globally Unique Identifier) of the relationship used to retrieve catalog targets.
3174
- catalog_target_name : dict
3175
- Name of the catalog target to add.
3176
- connection_name: str, default = None
3177
- Optional name of connection to use for this catalog target when multiple connections defined.
3178
- metadata_src_qual_name: str
3179
- The qualified name of the metadata source for the catalog target
3180
- config_properties: dict
3181
- Configuration properties for the catalog target
3182
- template_properties: dict
3183
- Template properties to pass
3184
- permitted_sync: str, default = BOTH_DIRECTIONS
3185
- Direction the metadata is allowed to flow (BOTH_DIRECTIONS, FROM_THIRD_PARTH, TO_THIRD_PARTY
3186
- delete_method: str, default = ARCHIVE
3187
- Controls the type of delete. Use ARCHIVE for lineage considerations. Alternative is SOFT_DELETE.
3188
- Returns:
3189
- -------
3190
- None
3191
-
3192
- Raises:
3193
- ------
3194
- InvalidParameterException: If the API response indicates an error (non-200 status code),
3195
- this exception is raised with details from the response content.
3196
- PropertyServerException: If the API response indicates a server side error.
3197
- UserNotAuthorizedException:
3198
- """
3199
-
3200
- validate_guid(relationship_guid)
3201
-
3202
- url = (
3203
- f"{self.curation_command_root}/catalog-targets/"
3204
- f"{relationship_guid}/update"
3205
- )
3206
- body = {
3207
- "catalogTargetName": catalog_target_name,
3208
- "metadataSourceQualifiedName": metadata_src_qual_name,
3209
- "configProperties": config_properties,
3210
- "templateProperties": template_properties,
3211
- "connectionName": connection_name,
3212
- "permittedSynchronization": permitted_sync,
3213
- "deleteMethod": delete_method,
3214
- }
3215
- await self._async_make_request("POST", url, body)
3216
- return
3217
-
3218
- def update_catalog_target(
3219
- self,
3220
- relationship_guid: str,
3221
- catalog_target_name: str,
3222
- connection_name: str = None,
3223
- metadata_src_qual_name: str = None,
3224
- config_properties: dict = None,
3225
- template_properties: dict = None,
3226
- permitted_sync: str = "BOTH_DIRECTIONS",
3227
- delete_method: str = "ARCHIVE",
3228
- ) -> None:
3229
- """Update a catalog target to an integration connector.
3230
-
3231
- Parameters:
3232
- ----------
3233
- relationship_guid: str
3234
- The GUID (Globally Unique Identifier) of the relationship used to retrieve catalog targets.
3235
- catalog_target_name : dict
3236
- Name of the catalog target to add.
3237
- connection_name: str, default = None
3238
- Optional name of connection to use for this catalog target when multiple connections defined.
3239
- metadata_src_qual_name: str
3240
- The qualified name of the metadata source for the catalog target
3241
- config_properties: dict
3242
- Configuration properties for the catalog target
3243
- template_properties: dict
3244
- Template properties to pass
3245
- permitted_sync: str, default = BOTH_DIRECTIONS
3246
- Direction the metadata is allowed to flow (BOTH_DIRECTIONS, FROM_THIRD_PARTH, TO_THIRD_PARTY
3247
- delete_method: str, default = ARCHIVE
3248
- Controls the type of delete. Use ARCHIVE for lineage considerations. Alternative is SOFT_DELETE.
3249
- server: str, optional
3250
- """
3251
-
3252
- loop = asyncio.get_event_loop()
3253
- loop.run_until_complete(
3254
- self._async_update_catalog_target(
3255
- relationship_guid,
3256
- catalog_target_name,
3257
- connection_name,
3258
- metadata_src_qual_name,
3259
- config_properties,
3260
- template_properties,
3261
- permitted_sync,
3262
- delete_method,
3263
- )
3264
- )
3265
- return
3266
-
3267
- async def _async_remove_catalog_target(self, relationship_guid: str) -> None:
3268
- """Remove a catalog target to an integration connector. Async version.
3269
-
3270
- Parameters:
3271
- ----------
3272
- relationship_guid: str
3273
- The GUID (Globally Unique Identifier) identifying the catalog target relationship.
3274
-
3275
- Returns:
3276
- -------
3277
- None
3278
-
3279
- Raises:
3280
- ------
3281
- InvalidParameterException: If the API response indicates an error (non-200 status code),
3282
- this exception is raised with details from the response content.
3283
- PropertyServerException: If the API response indicates a server side error.
3284
- UserNotAuthorizedException:
3285
- """
3286
-
3287
- validate_guid(relationship_guid)
3288
-
3289
- url = (
3290
- f"{self.curation_command_root}/catalog-targets/"
3291
- f"{relationship_guid}/remove"
3292
- )
3293
-
3294
- await self._async_make_request("POST", url)
3295
- return
3296
-
3297
- def remove_catalog_target(self, relationship_guid: str) -> None:
3298
- """Remove a catalog target to an integration connector.
3299
-
3300
- Parameters:
3301
- ----------
3302
- relationship_guid: str
3303
- The GUID (Globally Unique Identifier) identifying the catalog target relationship.
3304
-
3305
- Returns:
3306
- -------
3307
- None
3308
-
3309
- Raises:
3310
- ------
3311
- InvalidParameterException: If the API response indicates an error (non-200 status code),
3312
- this exception is raised with details from the response content.
3313
- PropertyServerException: If the API response indicates a server side error.
3314
- UserNotAuthorizedException:
3315
- """
3316
-
3317
- loop = asyncio.get_event_loop()
3318
- loop.run_until_complete(self._async_remove_catalog_target(relationship_guid))
3319
- return
3320
-
3321
- #
3322
- # Get information about technologies
3323
- #
3324
-
3325
- async def _async_get_tech_types_for_open_metadata_type(
3326
- self,
3327
- type_name: str,
3328
- tech_name: str,
3329
- start_from: int = 0,
3330
- page_size: int = max_paging_size,
3331
- ) -> list | str:
3332
- """Retrieve the list of deployed implementation type metadata elements linked to a particular
3333
- open metadata type.. Async version.
3334
-
3335
- Parameters:
3336
- ----------
3337
- type_name: str
3338
- The technology type we are looking for.
3339
- tech_name: str
3340
- The technology name we are looking for.
3341
-
3342
- Returns:
3343
- -------
3344
- [dict] | str: List of elements describing the technology - or "no tech found" if not found.
3345
-
3346
- Raises:
3347
- ------
3348
- InvalidParameterException: If the API response indicates an error (non-200 status code),
3349
- this exception is raised with details from the response content.
3350
- PropertyServerException: If the API response indicates a server side error.
3351
- UserNotAuthorizedException:
3352
-
3353
- Notes
3354
- -----
3355
- More information can be found at: https://egeria-project.org/types
3356
- """
3357
-
3358
- # validate_name(type_name)
3359
- url = (
3360
- f"{self.curation_command_root}/open-metadata-types/"
3361
- f"{type_name}/technology-types?startFrom={start_from}&pageSize={page_size}"
3362
- )
3363
- body = {"filter": tech_name}
3364
-
3365
- response = await self._async_make_request("GET", url, body)
3366
- return response.json().get("elements", "no tech found")
3367
-
3368
- def get_tech_types_for_open_metadata_type(
3369
- self,
3370
- type_name: str,
3371
- tech_name: str,
3372
- start_from: int = 0,
3373
- page_size: int = max_paging_size,
3374
- ) -> list | str:
3375
- """Retrieve the list of deployed implementation type metadata elements linked to a particular
3376
- open metadata type.
3377
-
3378
- Parameters:
3379
- ----------
3380
- type_name: str
3381
- The technology type we are looking for.
3382
- tech_name: str
3383
- The technology name we are looking for.
3384
-
3385
- Returns:
3386
- -------
3387
- [dict] | str: List of elements describing the technology - or "no tech found" if not found.
3388
-
3389
- Raises:
3390
- ------
3391
- InvalidParameterException: If the API response indicates an error (non-200 status code),
3392
- this exception is raised with details from the response content.
3393
- PropertyServerException: If the API response indicates a server side error.
3394
- UserNotAuthorizedException:
3395
-
3396
- Notes
3397
- -----
3398
- More information can be found at: https://egeria-project.org/types
3399
- """
3400
- loop = asyncio.get_event_loop()
3401
- response = loop.run_until_complete(
3402
- self._async_get_tech_types_for_open_metadata_type(
3403
- type_name, tech_name, start_from, page_size
3404
- )
3405
- )
3406
- return response
3407
-
3408
- async def _async_get_technology_type_detail(self, type_name: str) -> list | str:
3409
- """Retrieve the details of the named technology type. This name should be the name of the technology type
3410
- and contain no wild cards. Async version.
3411
- Parameters
3412
- ----------
3413
- type_name : str
3414
- The name of the technology type to retrieve detailed information for.
3415
-
3416
-
3417
- Returns
3418
- -------
3419
- list[dict] | str
3420
- A list of dictionaries containing the detailed information for the specified technology type.
3421
- If the technology type is not found, returns the string "no type found".
3422
- Raises
3423
- ------
3424
- InvalidParameterException: If the API response indicates an error (non-200 status code),
3425
- this exception is raised with details from the response content.
3426
- PropertyServerException: If the API response indicates a server side error.
3427
- UserNotAuthorizedException:
3428
-
3429
- Notes
3430
- -----
3431
- More information can be found at: https://egeria-project.org/concepts/deployed-implementation-type
3432
- """
3433
-
3434
- # validate_name(type_name)
3435
- url = f"{self.curation_command_root}/technology-types/by-name"
3436
-
3437
- body = {"filter": type_name}
3438
-
3439
- response = await self._async_make_request("POST", url, body)
3440
- return response.json().get("element", "no type found")
3441
-
3442
- def get_technology_type_detail(self, type_name: str) -> list | str:
3443
- """Retrieve the details of the named technology type. This name should be the name of the technology type
3444
- and contain no wild cards.
3445
- Parameters
3446
- ----------
3447
- type_name : str
3448
- The name of the technology type to retrieve detailed information for.
3449
-
3450
- Returns
3451
- -------
3452
- list[dict] | str
3453
- A list of dictionaries containing the detailed information for the specified technology type.
3454
- If the technology type is not found, returns the string "no type found".
3455
- Raises
3456
- ------
3457
- InvalidParameterException: If the API response indicates an error (non-200 status code),
3458
- this exception is raised with details from the response content.
3459
- PropertyServerException: If the API response indicates a server side error.
3460
- UserNotAuthorizedException:
3461
-
3462
- Notes
3463
- -----
3464
- More information can be found at: https://egeria-project.org/concepts/deployed-implementation-type
3465
- """
3466
-
3467
- loop = asyncio.get_event_loop()
3468
- response = loop.run_until_complete(
3469
- self._async_get_technology_type_detail(type_name)
3470
- )
3471
- return response
3472
-
3473
- async def _async_find_technology_types(
3474
- self,
3475
- search_string: str = "*",
3476
- start_from: int = 0,
3477
- page_size: int = max_paging_size,
3478
- starts_with: bool = False,
3479
- ends_with: bool = False,
3480
- ignore_case: bool = True,
3481
- ) -> list | str:
3482
- """Retrieve the list of technology types that contain the search string. Async version.
3483
-
3484
- Parameters:
3485
- ----------
3486
- type_name: str
3487
- The technology type we are looking for.
3488
- starts_with : bool, optional
3489
- Whether to search engine actions that start with the given search string. Default is False.
3490
-
3491
- ends_with : bool, optional
3492
- Whether to search engine actions that end with the given search string. Default is False.
3493
-
3494
- ignore_case : bool, optional
3495
- Whether to ignore case while searching engine actions. Default is True.
3496
-
3497
- start_from : int, optional
3498
- The index from which to start fetching the engine actions. Default is 0.
3499
-
3500
- page_size : int, optional
3501
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
3502
- Returns:
3503
- -------
3504
- [dict] | str: List of elements describing the technology - or "no tech found" if not found.
3505
-
3506
- Raises:
3507
- ------
3508
- InvalidParameterException: If the API response indicates an error (non-200 status code),
3509
- this exception is raised with details from the response content.
3510
- PropertyServerException: If the API response indicates a server side error.
3511
- UserNotAuthorizedException:
3512
-
3513
- Notes
3514
- -----
3515
- For more information see: https://egeria-project.org/concepts/deployed-implementation-type
3516
- """
3517
-
3518
- starts_with_s = str(starts_with).lower()
3519
- ends_with_s = str(ends_with).lower()
3520
- ignore_case_s = str(ignore_case).lower()
3521
- validate_name(search_string)
3522
- if search_string == "*":
3523
- search_string = ""
3524
-
3525
- url = (
3526
- f"{self.curation_command_root}/technology-types/"
3527
- f"by-search-string?startFrom={start_from}&pageSize={page_size}&startsWith={starts_with_s}&"
3528
- f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}"
3529
- )
3530
- body = {"filter": search_string}
3531
-
3532
- response = await self._async_make_request("POST", url, body)
3533
- return response.json().get("elements", "no tech found")
3534
-
3535
- def find_technology_types(
3536
- self,
3537
- search_string: str = "*",
3538
- start_from: int = 0,
3539
- page_size: int = max_paging_size,
3540
- starts_with: bool = False,
3541
- ends_with: bool = False,
3542
- ignore_case: bool = True,
3543
- ) -> list | str:
3544
- """Retrieve the list of technology types that contain the search string. Async version.
3545
-
3546
- Parameters:
3547
- ----------
3548
- type_name: str
3549
- The technology type we are looking for.
3550
-
3551
- Returns:
3552
- -------
3553
- [dict] | str: List of elements describing the technology - or "no tech found" if not found.
3554
-
3555
- Raises:
3556
- ------
3557
- InvalidParameterException: If the API response indicates an error (non-200 status code),
3558
- this exception is raised with details from the response content.
3559
- PropertyServerException: If the API response indicates a server side error.
3560
- UserNotAuthorizedException:
3561
-
3562
- Notes
3563
- -----
3564
- For more information see: https://egeria-project.org/concepts/deployed-implementation-type
3565
- """
3566
-
3567
- loop = asyncio.get_event_loop()
3568
- response = loop.run_until_complete(
3569
- self._async_find_technology_types(
3570
- search_string,
3571
- start_from,
3572
- page_size,
3573
- starts_with,
3574
- ends_with,
3575
- ignore_case,
3576
- )
3577
- )
3578
- return response
3579
-
3580
- async def _async_get_all_technology_types(
3581
- self, start_from: int = 0, page_size: int = max_paging_size
3582
- ) -> list | str:
3583
- """Get all technology types - async version"""
3584
- return await self._async_find_technology_types("*", start_from, page_size)
3585
-
3586
- def get_all_technology_types(
3587
- self, start_from: int = 0, page_size: int = max_paging_size
3588
- ) -> list | str:
3589
- """Get all technology types"""
3590
- return self.find_technology_types("*", start_from, page_size)
3591
-
3592
- def print_engine_action_summary(self, governance_action: dict):
3593
- """print_governance_action_summary
3594
-
3595
- Print all the governance actions with their status, in the server.
3596
-
3597
- Parameters
3598
- ----------
3599
-
3600
- Returns
3601
- -------
3602
-
3603
- Raises
3604
- ------
3605
- InvalidParameterException
3606
- PropertyServerException
3607
- UserNotAuthorizedException
3608
- """
3609
- if governance_action:
3610
- name = governance_action.get("displayName")
3611
- if not name:
3612
- name = governance_action.get("qualifiedName")
3613
- action_status = governance_action.get("action_status")
3614
- if governance_action.get("completion_guards"):
3615
- completion_guards = governance_action.get("completion_guards")
3616
- else:
3617
- completion_guards = "\t"
3618
- if governance_action.get("process_name"):
3619
- process_name = governance_action.get("process_name")
3620
- else:
3621
- process_name = "\t"
3622
- if governance_action.get("completion_message"):
3623
- completion_message = governance_action.get("completion_message")
3624
- else:
3625
- completion_message = ""
3626
- print(
3627
- action_status
3628
- + "\n\t| "
3629
- + name
3630
- + "\t| "
3631
- + process_name
3632
- + "\t| "
3633
- + "%s" % ", ".join(map(str, completion_guards))
3634
- + "\t| "
3635
- + completion_message
3636
- )
3637
-
3638
- def print_engine_actions(self):
3639
- """print_governance_actions
3640
-
3641
- Print all the governance actions with their status, in the server.
3642
-
3643
- Parameters
3644
- ----------
3645
-
3646
- Returns
3647
- -------
3648
-
3649
- Raises
3650
- ------
3651
- InvalidParameterException
3652
- PropertyServerException
3653
- UserNotAuthorizedException
3654
-
3655
- """
3656
- governance_actions = self.get_engine_actions()
3657
- if governance_actions is not None:
3658
- for x in range(len(governance_actions)):
3659
- self.print_engine_action_summary(governance_actions[x])
3660
-
3661
- async def _async_get_technology_type_elements(
3662
- self,
3663
- filter: str,
3664
- effective_time: str = None,
3665
- start_from: int = 0,
3666
- page_size: int = max_paging_size,
3667
- get_templates: bool = False,
3668
- ) -> list | str:
3669
- """Retrieve the elements for the requested deployed implementation type. There are no wildcards allowed
3670
- in the name. Async version.
3671
-
3672
- Parameters:
3673
- ----------
3674
- filter: str
3675
- The name of the deployed technology implementation type to retrieve elements for.
3676
- effective_time: datetime, [default=None], optional
3677
- Effective time of the query. If not specified will default to any effective time. Time format is
3678
- "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
3679
-
3680
- start_from : int, optional
3681
- The index from which to start fetching the engine actions. Default is 0.
3682
-
3683
- page_size : int, optional
3684
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
3685
-
3686
- Returns:
3687
- -------
3688
- [dict] | str: List of elements describing the technology - or "no tech found" if not found.
3689
-
3690
- Raises:
3691
- ------
3692
- InvalidParameterException: If the API response indicates an error (non-200 status code),
3693
- this exception is raised with details from the response content.
3694
- PropertyServerException: If the API response indicates a server side error.
3695
- UserNotAuthorizedException:
3696
-
3697
- Notes
3698
- -----
3699
- For more information see: https://egeria-project.org/concepts/deployed-implementation-type
3700
- """
3701
-
3702
- get_templates_s = str(get_templates).lower()
3703
- validate_name(filter)
3704
-
3705
- url = (
3706
- f"{self.curation_command_root}/technology-types/elements?"
3707
- f"startFrom={start_from}&pageSize={page_size}&getTemplates={get_templates_s}"
3708
- )
3709
- body = {"filter": filter, "effective_time": effective_time}
3710
-
3711
- response = await self._async_make_request("POST", url, body)
3712
- return response.json().get("elements", "no tech found")
3713
-
3714
- def get_technology_type_elements(
3715
- self,
3716
- filter: str,
3717
- effective_time: str = None,
3718
- start_from: int = 0,
3719
- page_size: int = max_paging_size,
3720
- get_templates: bool = False,
3721
- ) -> list | str:
3722
- """Retrieve the elements for the requested deployed implementation type. There are no wildcards allowed
3723
- in the name.
3724
-
3725
- Parameters:
3726
- ----------
3727
- filter: str
3728
- The name of the deployed technology implementation type to retrieve elements for.
3729
- effective_time: datetime, [default=None], optional
3730
- Effective time of the query. If not specified will default to any effective time. Time format is
3731
- "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
3732
-
3733
- start_from : int, optional
3734
- The index from which to start fetching the engine actions. Default is 0.
3735
-
3736
- page_size : int, optional
3737
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
3738
-
3739
- Returns:
3740
- -------
3741
- [dict] | str: List of elements describing the technology - or "no tech found" if not found.
3742
-
3743
- Raises:
3744
- ------
3745
- InvalidParameterException: If the API response indicates an error (non-200 status code),
3746
- this exception is raised with details from the response content.
3747
- PropertyServerException: If the API response indicates a server side error.
3748
- UserNotAuthorizedException:
3749
-
3750
- Notes
3751
- -----
3752
- For more information see: https://egeria-project.org/concepts/deployed-implementation-type
3753
- """
3754
-
3755
- loop = asyncio.get_event_loop()
3756
- response = loop.run_until_complete(
3757
- self._async_get_technology_type_elements(
3758
- filter, effective_time, start_from, page_size, get_templates
3759
- )
3760
- )
3761
- return response
3762
-
3763
-
3764
- if __name__ == "__main__":
3765
- print("Main-Automated Curation")