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
@@ -10,30 +10,28 @@ import asyncio
10
10
  import os
11
11
  import sys
12
12
  from typing import Annotated, Literal, Union
13
- from typing import Dict, List
13
+ from typing import Dict, List, Optional
14
14
 
15
15
  from loguru import logger
16
16
  from pydantic import Field
17
17
 
18
- from pyegeria._client_new import Client2
19
- from pyegeria.output_formatter import (
18
+ from pyegeria.core._server_client import ServerClient
19
+ from pyegeria.view.base_report_formats import select_report_spec, get_report_spec_match
20
+ from pyegeria.view.output_formatter import (
20
21
  extract_mermaid_only,
21
22
  generate_output,
22
- _extract_referenceable_properties,
23
- populate_columns_from_properties,
24
- get_required_relationships,
23
+ populate_common_columns,
25
24
  )
26
- from pyegeria._output_formats import select_output_format_set, get_output_format_type_match
27
25
 
28
26
  sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
29
- from pyegeria._exceptions_new import PyegeriaInvalidParameterException
30
- from pyegeria._globals import NO_GUID_RETURNED
31
- from pyegeria.config import settings as app_settings
32
- from pyegeria.models import (SearchStringRequestBody, FilterRequestBody, NewElementRequestBody,
27
+ from pyegeria.core._exceptions import PyegeriaInvalidParameterException
28
+ from pyegeria.core._globals import NO_GUID_RETURNED
29
+ from pyegeria.core.config import settings as app_settings
30
+ from pyegeria.models import (GetRequestBody, SearchStringRequestBody, FilterRequestBody, NewElementRequestBody,
33
31
  ReferenceableProperties, TemplateRequestBody,
34
- UpdateElementRequestBody, UpdateStatusRequestBody, NewRelationshipRequestBody,
35
- DeleteRequestBody)
36
- from pyegeria.utils import dynamic_catch
32
+ UpdateElementRequestBody, NewRelationshipRequestBody,
33
+ DeleteElementRequestBody, DeleteRelationshipRequestBody)
34
+ from pyegeria.core.utils import dynamic_catch
37
35
 
38
36
  GOV_DEF_PROPERTIES_LIST = ["GovernanceDefinitionProperties", "GovernanceStrategyProperties", "RegulationProperties",
39
37
  "GovernanceControlProperties", "SecurityGroupProperties", "NamingStandardRuleProperties",
@@ -71,53 +69,62 @@ class GovernanceDefinitionProperties(ReferenceableProperties):
71
69
  userDefinedStatus: str | None = None
72
70
 
73
71
 
74
- class GovernanceOfficer(Client2):
75
- """GovernanceOfficer is a class that extends the Client class. The Governance Officer OMVS provides APIs for
76
- defining and managing governance definitions.
77
-
78
- Attributes:
79
-
80
- view_server: str
81
- The name of the View Server to connect to.
82
- platform_url : str
83
- URL of the server platform to connect to
84
- user_id : str
85
- The identity of the user calling the method - this sets a
86
- default optionally used by the methods when the user
87
- doesn't pass the user_id on a method call.
88
- user_pwd: str
89
- The password associated with the user_id. Defaults to None
90
-
91
-
72
+ class GovernanceOfficer(ServerClient):
73
+ """
74
+ Client for the Governance Officer View Service.
75
+
76
+ The Governance Officer View Service provides methods to manage governance
77
+ definitions, peer definitions, and governance results.
78
+
79
+ Attributes
80
+ ----------
81
+ view_server : str
82
+ The name of the View Server to use.
83
+ platform_url : str
84
+ URL of the server platform to connect to.
85
+ user_id : str
86
+ The identity of the user calling the method.
87
+ user_pwd : str
88
+ The password associated with the user_id. Defaults to None.
92
89
  """
93
90
 
94
- def __init__(self, view_server: str, platform_url: str, user_id: str = None, user_pwd: str = None,
95
- token: str = None, ):
91
+ def __init__(self, view_server: str, platform_url: str, user_id: Optional[str] = None, user_pwd: Optional[str] = None,
92
+ token: Optional[str] = None, ):
96
93
  self.view_server = view_server
97
94
  self.platform_url = platform_url
98
95
  self.user_id = user_id
99
96
  self.user_pwd = user_pwd
100
97
 
101
- Client2.__init__(self, view_server, platform_url, user_id=user_id, user_pwd=user_pwd, token=token)
98
+ ServerClient.__init__(self, view_server, platform_url, user_id=user_id, user_pwd=user_pwd, token=token)
102
99
  self.url_marker = "governance-officer"
103
100
 
104
101
  #
105
102
  # Extract properties functions
106
103
  #
107
- def _generate_governance_definition_output(self, elements: list | dict, search_string: str, element_type_name: str = None,
108
- output_format: str = 'DICT', output_format_set: dict | str = None
104
+ def _generate_governance_definition_output(self, elements: list | dict, search_string: str, element_type_name: Optional[str] = None,
105
+ output_format: str = 'DICT', report_spec: dict | str = None
109
106
  ) -> str | list:
110
107
  """
111
- Generate output for governance definitions in the specified format, using output format sets.
108
+ Render governance definitions using the shared output pipeline.
112
109
 
113
- Args:
114
- elements: Dictionary or list of dictionaries containing governance definition elements
115
- search_string: The search string used to find the elements
116
- output_format: The desired output format (MD, FORM, REPORT, LIST, DICT, MERMAID, HTML)
117
- output_format_set: Optional format set name or structure to control columns
110
+ Parameters
111
+ ----------
112
+ elements : dict | list[dict]
113
+ Element(s) returned by the OMVS.
114
+ search_string : str
115
+ The search string used to retrieve these elements (shown in preamble for some formats).
116
+ element_type_name : str, optional
117
+ Friendly type label to display (defaults to "Governance Definition").
118
+ output_format : str
119
+ One of: MD, FORM, REPORT, LIST, DICT, MERMAID, HTML.
120
+ report_spec : dict | str, optional
121
+ Either a label for a format set or a concrete format-set dict. When omitted, a sensible
122
+ default for Governance Definitions is chosen, falling back to "Default".
118
123
 
119
- Returns:
120
- Formatted output as string or list of dictionaries
124
+ Returns
125
+ -------
126
+ str | list
127
+ Rendered output in the requested format.
121
128
  """
122
129
  # Ensure elements handled consistently for MERMAID
123
130
  if output_format == "MERMAID":
@@ -125,18 +132,18 @@ class GovernanceOfficer(Client2):
125
132
 
126
133
  entity_type = element_type_name if element_type_name else "Governance Definition"
127
134
  # Resolve columns_struct via output format sets
128
- if output_format_set:
129
- if isinstance(output_format_set, str):
130
- output_formats = select_output_format_set(output_format_set, output_format)
131
- elif isinstance(output_format_set, dict):
132
- output_formats = get_output_format_type_match(output_format_set, output_format)
135
+ if report_spec:
136
+ if isinstance(report_spec, str):
137
+ output_formats = select_report_spec(report_spec, output_format)
138
+ elif isinstance(report_spec, dict):
139
+ output_formats = get_report_spec_match(report_spec, output_format)
133
140
  else:
134
141
  output_formats = None
135
142
  else:
136
143
  # Default to the Governance Definitions format set
137
- output_formats = select_output_format_set("Governance Definitions", output_format)
144
+ output_formats = select_report_spec("Governance Definitions", output_format)
138
145
  if output_formats is None:
139
- output_formats = select_output_format_set("Default", output_format)
146
+ output_formats = select_report_spec("Default", output_format)
140
147
 
141
148
  logger.trace(f"Executing generate_governance_definition_output: {output_formats}")
142
149
  return generate_output(
@@ -167,27 +174,13 @@ class GovernanceOfficer(Client2):
167
174
  Returns:
168
175
  dict: columns_struct with populated 'value' fields
169
176
  """
170
- col_data = populate_columns_from_properties(element, columns_struct)
171
- columns_list = col_data.get('formats', {}).get('columns', [])
172
-
173
- # Header-derived values (GUID, type_name, etc.)
174
- header_props = _extract_referenceable_properties(element)
175
- for column in columns_list:
176
- key = column.get('key')
177
- if key in header_props:
178
- column['value'] = header_props.get(key)
179
- elif isinstance(key, str) and key.lower() == 'guid':
180
- column['value'] = header_props.get('GUID')
181
-
182
- # Populate requested relationship-based columns generically
183
- col_data = get_required_relationships(element, col_data)
184
-
185
- # Mermaid graph if requested
186
- for column in columns_list:
187
- if column.get('key') == 'mermaid':
188
- column['value'] = element.get('mermaidGraph', '') or ''
189
- break
190
-
177
+ # Use the common population pipeline to reduce duplication
178
+ col_data = populate_common_columns(element, columns_struct,
179
+ include_header=True,
180
+ include_relationships=True,
181
+ include_subject_area=True,
182
+ mermaid_source_key='mermaidGraph',
183
+ mermaid_dest_key='mermaid')
191
184
  return col_data
192
185
 
193
186
  def _extract_gov_def_list(self, element: Union[Dict, List[Dict]]) -> List[Dict]:
@@ -322,11 +315,11 @@ class GovernanceOfficer(Client2):
322
315
 
323
316
  Raises
324
317
  ------
325
- InvalidParameterException
318
+ PyegeriaInvalidParameterException
326
319
  one of the parameters is null or invalid or
327
- PropertyServerException
320
+ PyegeriaAPIException
328
321
  There is a problem adding the element properties to the metadata repository or
329
- UserNotAuthorizedException
322
+ PyegeriaUnauthorizedException
330
323
  the requesting user is not authorized to issue this request.
331
324
 
332
325
  Notes
@@ -452,11 +445,11 @@ class GovernanceOfficer(Client2):
452
445
 
453
446
  Raises
454
447
  ------
455
- InvalidParameterException
448
+ PyegeriaInvalidParameterException
456
449
  one of the parameters is null or invalid or
457
- PropertyServerException
450
+ PyegeriaAPIException
458
451
  There is a problem adding the element properties to the metadata repository or
459
- UserNotAuthorizedException
452
+ PyegeriaUnauthorizedException
460
453
  the requesting user is not authorized to issue this request.
461
454
 
462
455
  Notes
@@ -577,11 +570,11 @@ class GovernanceOfficer(Client2):
577
570
 
578
571
  Raises
579
572
  ------
580
- InvalidParameterException
573
+ PyegeriaInvalidParameterException
581
574
  one of the parameters is null or invalid or
582
- PropertyServerException
575
+ PyegeriaAPIException
583
576
  There is a problem adding the element properties to the metadata repository or
584
- UserNotAuthorizedException
577
+ PyegeriaUnauthorizedException
585
578
  the requesting user is not authorized to issue this request.
586
579
 
587
580
  Notes
@@ -666,11 +659,11 @@ class GovernanceOfficer(Client2):
666
659
 
667
660
  Raises
668
661
  ------
669
- InvalidParameterException
662
+ PyegeriaInvalidParameterException
670
663
  one of the parameters is null or invalid or
671
- PropertyServerException
664
+ PyegeriaAPIException
672
665
  There is a problem adding the element properties to the metadata repository or
673
- UserNotAuthorizedException
666
+ PyegeriaUnauthorizedException
674
667
  the requesting user is not authorized to issue this request.
675
668
 
676
669
  Notes
@@ -744,11 +737,11 @@ class GovernanceOfficer(Client2):
744
737
 
745
738
  Raises
746
739
  ------
747
- InvalidParameterException
740
+ PyegeriaInvalidParameterException
748
741
  one of the parameters is null or invalid or
749
- PropertyServerException
742
+ PyegeriaAPIException
750
743
  There is a problem adding the element properties to the metadata repository or
751
- UserNotAuthorizedException
744
+ PyegeriaUnauthorizedException
752
745
  the requesting user is not authorized to issue this request.
753
746
 
754
747
  Notes
@@ -790,11 +783,7 @@ class GovernanceOfficer(Client2):
790
783
  f"{guid}/update")
791
784
  await self._async_update_element_body_request(url, GOV_DEF_PROPERTIES_LIST, body)
792
785
 
793
- @dynamic_catch
794
- async def _async_update_governance_definition(self, guid: str, body: dict | UpdateElementRequestBody) -> None:
795
- """ Update a governance definition. Async Version."""
796
-
797
- def update_governance_definition(self, guid: str, body: dict | UpdateStatusRequestBody) -> None:
786
+ def update_governance_definition(self, guid: str, body: dict | UpdateElementRequestBody) -> None:
798
787
  """ Update the properties of a governance definition.
799
788
 
800
789
  Parameters
@@ -813,11 +802,11 @@ class GovernanceOfficer(Client2):
813
802
 
814
803
  Raises
815
804
  ------
816
- InvalidParameterException
805
+ PyegeriaInvalidParameterException
817
806
  one of the parameters is null or invalid or
818
- PropertyServerException
807
+ PyegeriaAPIException
819
808
  There is a problem adding the element properties to the metadata repository or
820
- UserNotAuthorizedException
809
+ PyegeriaUnauthorizedException
821
810
  the requesting user is not authorized to issue this request.
822
811
 
823
812
  Notes
@@ -855,102 +844,9 @@ class GovernanceOfficer(Client2):
855
844
  loop = asyncio.get_event_loop()
856
845
  loop.run_until_complete(self._async_update_governance_definition(guid, body))
857
846
 
858
- @dynamic_catch
859
- async def _async_update_governance_definition_status(self, guid: str, status: str = None,
860
- body: dict | UpdateStatusRequestBody = None) -> None:
861
- """ Update the status of a governance definition. Async Version.
862
-
863
- Parameters
864
- ----------
865
- guid: str
866
- guid of the governance definition to update.
867
- status: str, optional, default is None
868
- The status to update the governance definition to. Superseded by the body definition if present.
869
- body: dict
870
- A dictionary containing the updates to the governance definition.
871
-
872
- Returns
873
- -------
874
-
875
- None
876
-
877
- Raises
878
- ------
879
- InvalidParameterException
880
- one of the parameters is null or invalid or
881
- PropertyServerException
882
- There is a problem adding the element properties to the metadata repository or
883
- UserNotAuthorizedException
884
- the requesting user is not authorized to issue this request.
885
-
886
- Notes
887
- ----
888
-
889
- Body structure:
890
- {
891
- "class": "UpdateGovernanceDefinitionRequestBody",
892
- "externalSourceGUID": "add guid here",
893
- "externalSourceName": "add qualified name here",
894
- "effectiveTime": "{{$isoTimestamp}}",
895
- "forLineage": false,
896
- "forDuplicateProcessing": false,
897
- "status": "ACTIVE"
898
- }
899
- """
900
-
901
- url = (
902
- f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/{self.url_marker}/governance-defnitions/"
903
- f"{guid}/update-status")
904
-
905
- await self._async_update_status_request(url, status, body)
906
-
907
- def update_governance_definition_status(self, guid: str, status: str = None,
908
- body: dict | UpdateStatusRequestBody = None) -> None:
909
- """ Update the status of a governance definition.
910
-
911
- Parameters
912
- ----------
913
- guid: str
914
- guid of the information governance definition to update.
915
- status: str, optional, default is None
916
- The status to update the governance definition to. Superseded by the body definition if present.
917
- body: dict
918
- A dictionary containing the updates to the governance definition.
919
-
920
- Returns
921
- -------
922
-
923
- None
924
-
925
- Raises
926
- ------
927
- InvalidParameterException
928
- one of the parameters is null or invalid or
929
- PropertyServerException
930
- There is a problem adding the element properties to the metadata repository or
931
- UserNotAuthorizedException
932
- the requesting user is not authorized to issue this request.
933
-
934
- Notes
935
- ----
936
-
937
- Body structure:
938
- {
939
- "class" : "UpdateGovernanceDefinitionRequestBody",
940
- "externalSourceGUID": "add guid here",
941
- "externalSourceName": "add qualified name here",
942
- "effectiveTime" : "{{$isoTimestamp}}",
943
- "forLineage" : false,
944
- "forDuplicateProcessing" : false,
945
- "status": "ACTIVE"
946
- }
947
- """
948
- loop = asyncio.get_event_loop()
949
- loop.run_until_complete(self._async_update_governance_definition_status(guid, status, body))
950
-
951
847
  @dynamic_catch
952
848
  async def _async_delete_governance_definition(self, definition_guid: str,
953
- body: dict | DeleteRequestBody = None,
849
+ body: Optional[dict | DeleteElementRequestBody] = None,
954
850
  cascade: bool = False) -> None:
955
851
  """ Delete a governance definition. Async Version.
956
852
 
@@ -962,7 +858,7 @@ class GovernanceOfficer(Client2):
962
858
  cascade: bool, optional, defaults to True
963
859
  If true, a cascade delete is performed.
964
860
 
965
- body: dict DeleteRequestBodyt, optional, default = None
861
+ body: dict DeleteElementRequestBodyt, optional, default = None
966
862
  A dict representing the details of the relationship.
967
863
 
968
864
  Returns
@@ -991,13 +887,12 @@ class GovernanceOfficer(Client2):
991
887
  }
992
888
  """
993
889
  url = (
994
- f"{self.platform_url}/s"
995
- f"ervers/{self.view_server}/api/open-metadata/governance-officer/governance-definitions/"
890
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/governance-officer/governance-definitions/"
996
891
  f"{definition_guid}/delete")
997
- await self._async_delete_request(url, body, cascade)
892
+ await self._async_delete_element_request(url, body, cascade)
998
893
  logger.info(f"Deleted collection {definition_guid} with cascade {cascade}")
999
894
 
1000
- def delete_governance_definition(self, definition_guid: str, body: dict | DeleteRequestBody = None,
895
+ def delete_governance_definition(self, definition_guid: str, body: Optional[dict | DeleteElementRequestBody] = None,
1001
896
  cascade: bool = False) -> None:
1002
897
  """Delete a governance definition.
1003
898
 
@@ -1009,7 +904,7 @@ class GovernanceOfficer(Client2):
1009
904
  cascade: bool, optional, defaults to True
1010
905
  If true, a cascade delete is performed.
1011
906
 
1012
- body: dict DeleteRequestBodyt, optional, default = None
907
+ body: dict DeleteElementRequestBodyt, optional, default = None
1013
908
  A dict representing the details of the relationship.
1014
909
 
1015
910
  Returns
@@ -1062,11 +957,11 @@ class GovernanceOfficer(Client2):
1062
957
 
1063
958
  Raises
1064
959
  ------
1065
- InvalidParameterException
960
+ PyegeriaInvalidParameterException
1066
961
  one of the parameters is null or invalid or
1067
- PropertyServerException
962
+ PyegeriaAPIException
1068
963
  There is a problem adding the element properties to the metadata repository or
1069
- UserNotAuthorizedException
964
+ PyegeriaUnauthorizedException
1070
965
  the requesting user is not authorized to issue this request.
1071
966
 
1072
967
  Notes
@@ -1105,7 +1000,7 @@ class GovernanceOfficer(Client2):
1105
1000
 
1106
1001
  @dynamic_catch
1107
1002
  def link_peer_definitions(self, definition_guid1: str, relationship_type: str, definition_guid2: str,
1108
- body: dict | NewElementRequestBody = None) -> None:
1003
+ body: Optional[dict | NewElementRequestBody] = None) -> None:
1109
1004
  """ Attach two peer governance definitions. Async Version.
1110
1005
 
1111
1006
  Parameters
@@ -1125,11 +1020,11 @@ class GovernanceOfficer(Client2):
1125
1020
 
1126
1021
  Raises
1127
1022
  ------
1128
- InvalidParameterException
1023
+ PyegeriaInvalidParameterException
1129
1024
  one of the parameters is null or invalid or
1130
- PropertyServerException
1025
+ PyegeriaAPIException
1131
1026
  There is a problem adding the element properties to the metadata repository or
1132
- UserNotAuthorizedException
1027
+ PyegeriaUnauthorizedException
1133
1028
  the requesting user is not authorized to issue this request.
1134
1029
 
1135
1030
  Notes
@@ -1164,7 +1059,7 @@ class GovernanceOfficer(Client2):
1164
1059
 
1165
1060
  @dynamic_catch
1166
1061
  async def _async_detach_peer_definitions(self, definition_guid1: str, relationship_type: str, definition_guid2: str,
1167
- body: dict | DeleteRequestBody = None) -> None:
1062
+ body: Optional[dict | DeleteRelationshipRequestBody] = None) -> None:
1168
1063
  """ Detach two peer governance definitions. Request body is optional. Async Version.
1169
1064
 
1170
1065
  Parameters
@@ -1184,11 +1079,11 @@ class GovernanceOfficer(Client2):
1184
1079
 
1185
1080
  Raises
1186
1081
  ------
1187
- InvalidParameterException
1082
+ PyegeriaInvalidParameterException
1188
1083
  one of the parameters is null or invalid or
1189
- PropertyServerException
1084
+ PyegeriaAPIException
1190
1085
  There is a problem adding the element properties to the metadata repository or
1191
- UserNotAuthorizedException
1086
+ PyegeriaUnauthorizedException
1192
1087
  the requesting user is not authorized to issue this request.
1193
1088
 
1194
1089
  Notes
@@ -1209,12 +1104,12 @@ class GovernanceOfficer(Client2):
1209
1104
  f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/"
1210
1105
  f"{self.url_marker}/governance-definitions/"
1211
1106
  f"{definition_guid1}/peer-definitions/{relationship_type}/{definition_guid2}/detach")
1212
- await self._async_delete_request(url, body)
1107
+ await self._async_delete_relationship_request(url, body)
1213
1108
  logger.info(f"Detached peer definitions: {definition_guid1} -> {definition_guid2}")
1214
1109
 
1215
1110
  @dynamic_catch
1216
1111
  def detach_peer_definitions(self, definition_guid1: str, relationship_type: str, definition_guid2: str,
1217
- body: dict = None | DeleteRequestBody) -> None:
1112
+ body: dict = None | DeleteRelationshipRequestBody) -> None:
1218
1113
  """ Detach two peer governance definitions. Request body is optional.
1219
1114
 
1220
1115
  Parameters
@@ -1234,11 +1129,11 @@ class GovernanceOfficer(Client2):
1234
1129
 
1235
1130
  Raises
1236
1131
  ------
1237
- InvalidParameterException
1132
+ PyegeriaInvalidParameterException
1238
1133
  one of the parameters is null or invalid or
1239
- PropertyServerException
1134
+ PyegeriaAPIException
1240
1135
  There is a problem adding the element properties to the metadata repository or
1241
- UserNotAuthorizedException
1136
+ PyegeriaUnauthorizedException
1242
1137
  the requesting user is not authorized to issue this request.
1243
1138
 
1244
1139
  Notes
@@ -1262,7 +1157,7 @@ class GovernanceOfficer(Client2):
1262
1157
  @dynamic_catch
1263
1158
  async def _async_attach_supporting_definitions(self, definition_guid1: str, relationship_type: str,
1264
1159
  definition_guid2: str,
1265
- body: dict | NewRelationshipRequestBody = None) -> None:
1160
+ body: Optional[dict | NewRelationshipRequestBody] = None) -> None:
1266
1161
  """ Attach a supporting governance definition. Request body is optional.
1267
1162
  The relationshipTypeNme can be:
1268
1163
  * GovernanceResponse between governance drivers (GovernanceStrategy, BusinessImperative, Regulation,
@@ -1291,11 +1186,11 @@ class GovernanceOfficer(Client2):
1291
1186
 
1292
1187
  Raises
1293
1188
  ------
1294
- InvalidParameterException
1189
+ PyegeriaInvalidParameterException
1295
1190
  one of the parameters is null or invalid or
1296
- PropertyServerException
1191
+ PyegeriaAPIException
1297
1192
  There is a problem adding the element properties to the metadata repository or
1298
- UserNotAuthorizedException
1193
+ PyegeriaUnauthorizedException
1299
1194
  the requesting user is not authorized to issue this request.
1300
1195
 
1301
1196
  Notes
@@ -1326,7 +1221,7 @@ class GovernanceOfficer(Client2):
1326
1221
 
1327
1222
  @dynamic_catch
1328
1223
  def attach_supporting_definitions(self, definition_guid1: str, relationship_type: str, definition_guid2: str,
1329
- body: dict | NewRelationshipRequestBody = None) -> None:
1224
+ body: Optional[dict | NewRelationshipRequestBody] = None) -> None:
1330
1225
  """ Attach a supporting governance definition. Request body is optional.
1331
1226
  The relationshipTypeNme can be:
1332
1227
  * GovernanceResponse between governance drivers (GovernanceStrategy, BusinessImperative, Regulation,
@@ -1353,11 +1248,11 @@ class GovernanceOfficer(Client2):
1353
1248
 
1354
1249
  Raises
1355
1250
  ------
1356
- InvalidParameterException
1251
+ PyegeriaInvalidParameterException
1357
1252
  one of the parameters is null or invalid or
1358
- PropertyServerException
1253
+ PyegeriaAPIException
1359
1254
  There is a problem adding the element properties to the metadata repository or
1360
- UserNotAuthorizedException
1255
+ PyegeriaUnauthorizedException
1361
1256
  the requesting user is not authorized to issue this request.
1362
1257
 
1363
1258
  Notes
@@ -1386,7 +1281,7 @@ class GovernanceOfficer(Client2):
1386
1281
  @dynamic_catch
1387
1282
  async def _async_detach_supporting_definitions(self, definition_guid1: str, relationship_type: str,
1388
1283
  definition_guid2: str,
1389
- body: dict | DeleteRequestBody = None) -> None:
1284
+ body: Optional[dict | DeleteRelationshipRequestBody] = None) -> None:
1390
1285
  """ Detach a governance definition from a supporting governance definition.
1391
1286
  Request body is optional. Async Version.
1392
1287
 
@@ -1407,11 +1302,11 @@ class GovernanceOfficer(Client2):
1407
1302
 
1408
1303
  Raises
1409
1304
  ------
1410
- InvalidParameterException
1305
+ PyegeriaInvalidParameterException
1411
1306
  one of the parameters is null or invalid or
1412
- PropertyServerException
1307
+ PyegeriaAPIException
1413
1308
  There is a problem adding the element properties to the metadata repository or
1414
- UserNotAuthorizedException
1309
+ PyegeriaUnauthorizedException
1415
1310
  the requesting user is not authorized to issue this request.
1416
1311
 
1417
1312
  Notes
@@ -1432,12 +1327,12 @@ class GovernanceOfficer(Client2):
1432
1327
  f"{self.url_marker}/governance-definitions/"
1433
1328
  f"{definition_guid1}/supporting-definitions/{relationship_type}/{definition_guid2}/detach"
1434
1329
  )
1435
- await self._async_delete_request(url, body)
1330
+ await self._async_delete_relationship_request(url, body)
1436
1331
  logger.info(f"Detached digital supporting definitions: {definition_guid1} -> {definition_guid2}")
1437
1332
 
1438
1333
  @dynamic_catch
1439
1334
  def detach_supporting_definitions(self, definition_guid1: str, relationship_type: str, definition_guid2: str,
1440
- body: dict | DeleteRequestBody = None) -> None:
1335
+ body: Optional[dict | DeleteRelationshipRequestBody] = None) -> None:
1441
1336
  """ Detach a governance definition from a supporting governance definition.
1442
1337
  Request body is optional.
1443
1338
 
@@ -1458,11 +1353,11 @@ class GovernanceOfficer(Client2):
1458
1353
 
1459
1354
  Raises
1460
1355
  ------
1461
- InvalidParameterException
1356
+ PyegeriaInvalidParameterException
1462
1357
  one of the parameters is null or invalid or
1463
- PropertyServerException
1358
+ PyegeriaAPIException
1464
1359
  There is a problem adding the element properties to the metadata repository or
1465
- UserNotAuthorizedException
1360
+ PyegeriaUnauthorizedException
1466
1361
  the requesting user is not authorized to issue this request.
1467
1362
 
1468
1363
  Notes
@@ -1482,147 +1377,569 @@ class GovernanceOfficer(Client2):
1482
1377
  loop.run_until_complete(
1483
1378
  self._async_detach_supporting_definitions(definition_guid1, relationship_type, definition_guid2, body))
1484
1379
 
1380
+
1381
+
1382
+ async def _async_attach_governed_by_definition(self, element_guid: str, definition_guid: str,
1383
+ body: Optional[dict | NewRelationshipRequestBody] = None) -> None:
1384
+ """ Link a governance definition to an element using the GovernedBy relationship. Request body is optional.
1385
+
1386
+ Async Version.
1387
+
1388
+ Parameters
1389
+ ----------
1390
+ element_guid: str
1391
+ guid of the element to be governed.
1392
+ definition_guid: str
1393
+ the governance definition guid.
1394
+ body: dict
1395
+ The body describing the link between the two.
1396
+
1397
+ Returns
1398
+ -------
1399
+ None
1400
+
1401
+ Raises
1402
+ ------
1403
+ PyegeriaException
1404
+ ValidationError
1405
+
1406
+ Notes
1407
+ ----
1408
+
1409
+ Body structure:
1410
+ {
1411
+ "class" : "NewRelationshipRequestBody",
1412
+ "properties" : {
1413
+ "class" : "GovernedByProperties",
1414
+ "label" : "add label here",
1415
+ "description" : "add description here"
1416
+ },
1417
+ "externalSourceGUID": "Add guid here",
1418
+ "externalSourceName": "Add qualified name here",
1419
+ "forLineage": false,
1420
+ "forDuplicateProcessing": false,
1421
+ "effectiveTime" : "{{$isoTimestamp}}"
1422
+ }
1423
+ """
1424
+ url = (
1425
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/"
1426
+ f"{self.url_marker}/elements/{element_guid}/governed-by/definition/{definition_guid}/attach"
1427
+ )
1428
+ await self._async_new_relationship_request(url, "GovernedByProperties", body)
1429
+ logger.info(f"Linked Governed-By {definition_guid} -> {element_guid}")
1430
+
1485
1431
  @dynamic_catch
1486
- async def _async_delete_governance_definition(self, guid: str, body: dict | DeleteRequestBody = None) -> None:
1487
- """ Delete an information supply. Async version.
1432
+ def attach_governed_by_definition(self, element_guid: str, definition_guid: str,
1433
+ body: Optional[dict | NewRelationshipRequestBody] = None) -> None:
1434
+ """ Link a governance definition to an element using the GovernedBy relationship. Request body is optional.
1488
1435
 
1489
1436
  Parameters
1490
1437
  ----------
1491
- guid: str
1492
- GUID of the governance definition to delete.
1493
-
1494
- body: dict, optional
1495
- A dictionary containing the definition of the governance definition to create.
1438
+ element_guid: str
1439
+ guid of the element to be governed.
1440
+ definition_guid: str
1441
+ the governance definition guid.
1442
+ body: dict
1443
+ The body describing the link between the two.
1496
1444
 
1497
1445
  Returns
1498
1446
  -------
1447
+ None
1499
1448
 
1500
- str - guid of the governance definition created.
1449
+ Raises
1450
+ ------
1451
+ PyegeriaException
1452
+ ValidationError
1453
+
1454
+ Notes
1455
+ ----
1456
+
1457
+ Body structure:
1458
+ {
1459
+ "class" : "NewRelationshipRequestBody",
1460
+ "properties" : {
1461
+ "class" : "GovernedByProperties",
1462
+ "label" : "add label here",
1463
+ "description" : "add description here"
1464
+ },
1465
+ "externalSourceGUID": "Add guid here",
1466
+ "externalSourceName": "Add qualified name here",
1467
+ "forLineage": false,
1468
+ "forDuplicateProcessing": false,
1469
+ "effectiveTime" : "{{$isoTimestamp}}"
1470
+ }
1471
+ """
1472
+ loop = asyncio.get_event_loop()
1473
+ loop.run_until_complete(
1474
+ self._async_attach_governed_by_definition(element_guid, definition_guid, body))
1475
+
1476
+ @dynamic_catch
1477
+ async def _async_detach_governed_by_definition(self, element_guid: str, definition_guid: str,
1478
+ body: Optional[dict | DeleteRelationshipRequestBody] = None) -> None:
1479
+ """ Detach a governance definition from a supporting governance definition.
1480
+ Request body is optional. Async Version.
1481
+
1482
+ Parameters
1483
+ ----------
1484
+ element_guid: str
1485
+ guid of the element to be governed.
1486
+ definition_guid: str
1487
+ the governance definition guid.
1488
+ body: dict
1489
+ The body describing the link between the two.
1490
+
1491
+ Returns
1492
+ -------
1493
+ None
1501
1494
 
1502
1495
  Raises
1503
1496
  ------
1504
- InvalidParameterException
1497
+ PyegeriaInvalidParameterException
1505
1498
  one of the parameters is null or invalid or
1506
- PropertyServerException
1499
+ PyegeriaAPIException
1507
1500
  There is a problem adding the element properties to the metadata repository or
1508
- UserNotAuthorizedException
1501
+ PyegeriaUnauthorizedException
1509
1502
  the requesting user is not authorized to issue this request.
1510
1503
 
1511
1504
  Notes
1512
1505
  ----
1513
- https://egeria-project.org/concepts/governance-definition
1514
1506
 
1515
1507
  Body structure:
1516
1508
  {
1517
- "class": "MetadataSourceRequestBody",
1509
+ "class" : "DeleteRelationshipRequestBody",
1518
1510
  "externalSourceGUID": "add guid here",
1519
1511
  "externalSourceName": "add qualified name here",
1520
- "effectiveTime": "{{$isoTimestamp}}",
1521
- "forLineage": false,
1522
- "forDuplicateProcessing": false
1512
+ "effectiveTime" : "{{$isoTimestamp}}",
1513
+ "forLineage" : false,
1514
+ "forDuplicateProcessing" : false
1523
1515
  }
1524
-
1525
- """
1526
- url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/"
1527
- f"{self.url_marker}/governance-definitions/{guid}/delete")
1528
- await self._async_delete_request(url, body)
1529
- logger.info(f"Deleted governance definition: {guid} ")
1516
+ """
1517
+ url = (
1518
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/"
1519
+ f"{self.url_marker}/elements/{element_guid}/governed-by/{definition_guid}/detach"
1520
+ )
1521
+ await self._async_delete_relationship_request(url, body)
1522
+ logger.info(f"Detached governed-by relationshup between: {definition_guid} -> {element_guid}")
1530
1523
 
1531
1524
  @dynamic_catch
1532
- def delete_governance_definition(self, guid: str, body: dict | DeleteRequestBody = None) -> None:
1533
- """ Delete an information supply. Request body is optional. Async version.
1525
+ def detach_governed_by_definitio(self, element_guid: str, definition_guid: str,
1526
+ body: Optional[dict | DeleteRelationshipRequestBody] = None) -> None:
1527
+ """ Detach a governance definition from a supporting governance definition.
1528
+ Request body is optional.
1534
1529
 
1535
1530
  Parameters
1536
1531
  ----------
1537
- guid: str
1538
- GUID of the governance definition to delete.
1539
-
1540
- body: dict, optionl
1541
- A dictionary containing the definition of the governance definition to create.
1532
+ element_guid: str
1533
+ guid of the element to be governed.
1534
+ definition_guid: str
1535
+ the governance definition guid.
1536
+ body: dict
1537
+ The body describing the link between the two.
1542
1538
 
1543
1539
  Returns
1544
1540
  -------
1545
-
1546
- str - guid of the governance definition created.
1541
+ None
1547
1542
 
1548
1543
  Raises
1549
1544
  ------
1550
- InvalidParameterException
1545
+ PyegeriaInvalidParameterException
1551
1546
  one of the parameters is null or invalid or
1552
- PropertyServerException
1547
+ PyegeriaAPIException
1553
1548
  There is a problem adding the element properties to the metadata repository or
1554
- UserNotAuthorizedException
1549
+ PyegeriaUnauthorizedException
1555
1550
  the requesting user is not authorized to issue this request.
1556
1551
 
1557
1552
  Notes
1558
1553
  ----
1559
- https://egeria-project.org/concepts/governance-definition
1560
1554
 
1561
1555
  Body structure:
1562
1556
  {
1563
- "class": "MetadataSourceRequestBody",
1557
+ "class" : "DeleteRelationshipRequestBody",
1564
1558
  "externalSourceGUID": "add guid here",
1565
1559
  "externalSourceName": "add qualified name here",
1566
- "effectiveTime": "{{$isoTimestamp}}",
1567
- "forLineage": false,
1568
- "forDuplicateProcessing": false
1560
+ "effectiveTime" : "{{$isoTimestamp}}",
1561
+ "forLineage" : false,
1562
+ "forDuplicateProcessing" : false
1569
1563
  }
1564
+ """
1565
+ loop = asyncio.get_event_loop()
1566
+ loop.run_until_complete(
1567
+ self._async_detach_governed_by_definition(element_guid, definition_guid, body))
1570
1568
 
1571
- """
1572
1569
 
1573
- loop = asyncio.get_event_loop()
1574
- loop.run_until_complete(self._async_delete_governance_definition(guid, body))
1570
+
1571
+ # @dynamic_catch
1572
+ # async def _async_delete_governance_definition(self, guid: str, body: Optional[dict | DeleteElementRequestBody] = None) -> None:
1573
+ # """ Delete an information supply. Async version.
1574
+
1575
+ # Parameters
1576
+ # ----------
1577
+ # guid: str
1578
+ # GUID of the governance definition to delete.
1579
+
1580
+ # body: dict, optional
1581
+ # A dictionary containing the definition of the governance definition to create.
1582
+
1583
+ # Returns
1584
+ # -------
1585
+
1586
+ # str - guid of the governance definition created.
1587
+
1588
+ # Raises
1589
+ # ------
1590
+ # PyegeriaInvalidParameterException
1591
+ # one of the parameters is null or invalid or
1592
+ # PyegeriaAPIException
1593
+ # There is a problem adding the element properties to the metadata repository or
1594
+ # PyegeriaUnauthorizedException
1595
+ # the requesting user is not authorized to issue this request.
1596
+
1597
+ # Notes
1598
+ # ----
1599
+ # https://egeria-project.org/concepts/governance-definition
1600
+
1601
+ # Body structure:
1602
+ # {
1603
+ # "class": "MetadataSourceRequestBody",
1604
+ # "externalSourceGUID": "add guid here",
1605
+ # "externalSourceName": "add qualified name here",
1606
+ # "effectiveTime": "{{$isoTimestamp}}",
1607
+ # "forLineage": false,
1608
+ # "forDuplicateProcessing": false
1609
+ # }
1610
+
1611
+ # """
1612
+ # url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/"
1613
+ # f"{self.url_marker}/governance-definitions/{guid}/delete")
1614
+ # await self._async_delete_element_request(url, body)
1615
+ # logger.info(f"Deleted governance definition: {guid} ")
1616
+
1617
+
1618
+ # @dynamic_catch
1619
+ # def delete_governance_definition(self, guid: str, body: Optional[dict | DeleteElementRequestBody] = None) -> None:
1620
+ # """ Delete an information supply. Request body is optional. Async version.
1621
+
1622
+ # Parameters
1623
+ # ----------
1624
+ # guid: str
1625
+ # GUID of the governance definition to delete.
1626
+
1627
+ # body: dict, optionl
1628
+ # A dictionary containing the definition of the governance definition to create.
1629
+
1630
+ # Returns
1631
+ # -------
1632
+
1633
+ # str - guid of the governance definition created.
1634
+
1635
+ # Raises
1636
+ # ------
1637
+ # PyegeriaInvalidParameterException
1638
+ # one of the parameters is null or invalid or
1639
+ # PyegeriaAPIException
1640
+ # There is a problem adding the element properties to the metadata repository or
1641
+ # PyegeriaUnauthorizedException
1642
+ # the requesting user is not authorized to issue this request.
1643
+
1644
+ # Notes
1645
+ # ----
1646
+ # https://egeria-project.org/concepts/governance-definition
1647
+
1648
+ # Body structure:
1649
+ # {
1650
+ # "class": "MetadataSourceRequestBody",
1651
+ # "externalSourceGUID": "add guid here",
1652
+ # "externalSourceName": "add qualified name here",
1653
+ # "effectiveTime": "{{$isoTimestamp}}",
1654
+ # "forLineage": false,
1655
+ # "forDuplicateProcessing": false
1656
+ # }
1657
+
1658
+ # """
1659
+
1660
+ # loop = asyncio.get_event_loop()
1661
+ # loop.run_until_complete(self._async_delete_governance_definition(guid, body))
1662
+
1663
+ @dynamic_catch
1664
+ async def _async_find_governance_definitions(self, search_string: str = "*",
1665
+ starts_with: bool = True, ends_with: bool = False,
1666
+ ignore_case: bool = False,
1667
+ anchor_domain: Optional[str] = None,
1668
+ metadata_element_type: Optional[str] = None,
1669
+ metadata_element_subtypes: Optional[list[str]] = None,
1670
+ skip_relationships: Optional[list[str]] = None,
1671
+ include_only_relationships: Optional[list[str]] = None,
1672
+ skip_classified_elements: Optional[list[str]] = None,
1673
+ include_only_classified_elements: Optional[list[str]] = None,
1674
+ graph_query_depth: int = 3,
1675
+ governance_zone_filter: Optional[list[str]] = None, as_of_time: Optional[str] = None,
1676
+ effective_time: Optional[str] = None, relationship_page_size: int = 0,
1677
+ limit_results_by_status: Optional[list[str]] = None, sequencing_order: Optional[str] = None,
1678
+ sequencing_property: Optional[str] = None,
1679
+ output_format: str = "JSON",
1680
+ report_spec: str | dict = None,
1681
+ start_from: int = 0, page_size: int = 100,
1682
+ property_names: Optional[list[str]] = None,
1683
+ body: Optional[dict | SearchStringRequestBody] = None) -> list | str:
1684
+ """ Retrieve the list of governance definition metadata elements that contain the search string. Async Version.
1685
+
1686
+ Parameters
1687
+ ----------
1688
+ search_string: str
1689
+ Search string to match against - None or '*' indicate match against all governance definitions.
1690
+ starts_with : bool, [default=True], optional
1691
+ Starts with the supplied string.
1692
+ ends_with : bool, [default=False], optional
1693
+ Ends with the supplied string
1694
+ ignore_case : bool, [default=False], optional
1695
+ Ignore case when searching
1696
+ anchor_domain: str, optional
1697
+ The anchor domain to search in.
1698
+ metadata_element_type: str, optional
1699
+ The type of metadata element to search for.
1700
+ metadata_element_subtypes: list[str], optional
1701
+ The subtypes of metadata element to search for.
1702
+ skip_relationships: list[str], optional
1703
+ The types of relationships to skip.
1704
+ include_only_relationships: list[str], optional
1705
+ The types of relationships to include.
1706
+ skip_classified_elements: list[str], optional
1707
+ The types of classified elements to skip.
1708
+ include_only_classified_elements: list[str], optional
1709
+ The types of classified elements to include.
1710
+ graph_query_depth: int, [default=3], optional
1711
+ The depth of the graph query.
1712
+ governance_zone_filter: list[str], optional
1713
+ The governance zones to search in.
1714
+ as_of_time: str, optional
1715
+ The time to search as of.
1716
+ effective_time: str, optional
1717
+ The effective time to search at.
1718
+ relationship_page_size: int, [default=0], optional
1719
+ The page size for relationships.
1720
+ limit_results_by_status: list[str], optional
1721
+ The statuses to limit results by.
1722
+ sequencing_order: str, optional
1723
+ The order to sequence results by.
1724
+ sequencing_property: str, optional
1725
+ The property to sequence results by.
1726
+ output_format: str, default = "JSON"
1727
+ - one of "MD", "LIST", "FORM", "REPORT", "DICT", "MERMAID" or "JSON"
1728
+ report_spec: str | dict , optional, default = None
1729
+ - The desired output columns/fields to include.
1730
+ start_from: int, [default=0], optional
1731
+ When multiple pages of results are available, the page number to start from.
1732
+ page_size: int, [default=100]
1733
+ The number of items to return in a single page.
1734
+ property_names: list[str], optional
1735
+ The names of properties to search for.
1736
+ body: dict | SearchStringRequestBody, optional, default = None
1737
+ - if provided, the search parameters in the body will supercede other attributes, such as "search_string"
1738
+
1739
+ Returns
1740
+ -------
1741
+ List | str
1742
+
1743
+ Output depends on the output format specified.
1744
+
1745
+ Raises
1746
+ -------
1747
+
1748
+ ValidationError
1749
+ If the client passes incorrect parameters on the request that don't conform to the data model.
1750
+ PyegeriaException
1751
+ Issues raised in communicating or server side processing.
1752
+ NotAuthorizedException
1753
+ The principle specified by the user_id does not have authorization for the requested action
1754
+
1755
+ """
1756
+ url = (
1757
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/"
1758
+ f"{self.url_marker}/governance-definitions/"
1759
+ f"by-search-string")
1760
+ response = await self._async_find_request(url, _type="GovernanceDefinition", _gen_output=self._generate_governance_definition_output,
1761
+ search_string=search_string, starts_with=starts_with,
1762
+ ends_with=ends_with, ignore_case=ignore_case,
1763
+ anchor_domain=anchor_domain,
1764
+ metadata_element_type=metadata_element_type,
1765
+ metadata_element_subtypes=metadata_element_subtypes,
1766
+ skip_relationships=skip_relationships,
1767
+ include_only_relationships=include_only_relationships,
1768
+ skip_classified_elements=skip_classified_elements,
1769
+ include_only_classified_elements=include_only_classified_elements,
1770
+ graph_query_depth=graph_query_depth,
1771
+ governance_zone_filter=governance_zone_filter,
1772
+ as_of_time=as_of_time, effective_time=effective_time,
1773
+ relationship_page_size=relationship_page_size,
1774
+ limit_results_by_status=limit_results_by_status,
1775
+ sequencing_order=sequencing_order,
1776
+ sequencing_property=sequencing_property,
1777
+ output_format=output_format, report_spec=report_spec,
1778
+ start_from=start_from, page_size=page_size,
1779
+ property_names=property_names, body=body)
1780
+
1781
+ return response
1575
1782
 
1576
1783
  @dynamic_catch
1577
- async def _async_find_governance_definitions(self, search_string: str = "*", classification_names: list[str] = None,
1578
- metadata_element_types: list[str] = None,
1579
- starts_with: bool = True,
1580
- ends_with: bool = False, ignore_case: bool = False,
1581
- start_from: int = 0, page_size: int = 0,
1582
- output_format: str = 'JSON', output_format_set: dict = None,
1583
- body: dict | SearchStringRequestBody = None,
1584
- ) -> list | str:
1784
+ def find_governance_definitions(self, search_string: str = "*",
1785
+ starts_with: bool = True, ends_with: bool = False,
1786
+ ignore_case: bool = False,
1787
+ anchor_domain: Optional[str] = None,
1788
+ metadata_element_type: Optional[str] = None,
1789
+ metadata_element_subtypes: Optional[list[str]] = None,
1790
+ skip_relationships: Optional[list[str]] = None,
1791
+ include_only_relationships: Optional[list[str]] = None,
1792
+ skip_classified_elements: Optional[list[str]] = None,
1793
+ include_only_classified_elements: Optional[list[str]] = None,
1794
+ graph_query_depth: int = 3,
1795
+ governance_zone_filter: Optional[list[str]] = None, as_of_time: Optional[str] = None,
1796
+ effective_time: Optional[str] = None, relationship_page_size: int = 0,
1797
+ limit_results_by_status: Optional[list[str]] = None, sequencing_order: Optional[str] = None,
1798
+ sequencing_property: Optional[str] = None,
1799
+ output_format: str = "JSON",
1800
+ report_spec: str | dict = None,
1801
+ start_from: int = 0, page_size: int = 100,
1802
+ property_names: Optional[list[str]] = None,
1803
+ body: Optional[dict | SearchStringRequestBody] = None) -> list | str:
1585
1804
  """ Retrieve the list of governance definition metadata elements that contain the search string.
1586
- Async version.
1805
+
1806
+ Parameters
1807
+ ----------
1808
+ search_string: str
1809
+ Search string to match against - None or '*' indicate match against all governance definitions.
1810
+ starts_with : bool, [default=True], optional
1811
+ Starts with the supplied string.
1812
+ ends_with : bool, [default=False], optional
1813
+ Ends with the supplied string
1814
+ ignore_case : bool, [default=False], optional
1815
+ Ignore case when searching
1816
+ anchor_domain: str, optional
1817
+ The anchor domain to search in.
1818
+ metadata_element_type: str, optional
1819
+ The type of metadata element to search for.
1820
+ metadata_element_subtypes: list[str], optional
1821
+ The subtypes of metadata element to search for.
1822
+ skip_relationships: list[str], optional
1823
+ The types of relationships to skip.
1824
+ include_only_relationships: list[str], optional
1825
+ The types of relationships to include.
1826
+ skip_classified_elements: list[str], optional
1827
+ The types of classified elements to skip.
1828
+ include_only_classified_elements: list[str], optional
1829
+ The types of classified elements to include.
1830
+ graph_query_depth: int, [default=3], optional
1831
+ The depth of the graph query.
1832
+ governance_zone_filter: list[str], optional
1833
+ The governance zones to search in.
1834
+ as_of_time: str, optional
1835
+ The time to search as of.
1836
+ effective_time: str, optional
1837
+ The effective time to search at.
1838
+ relationship_page_size: int, [default=0], optional
1839
+ The page size for relationships.
1840
+ limit_results_by_status: list[str], optional
1841
+ The statuses to limit results by.
1842
+ sequencing_order: str, optional
1843
+ The order to sequence results by.
1844
+ sequencing_property: str, optional
1845
+ The property to sequence results by.
1846
+ output_format: str, default = "JSON"
1847
+ - one of "MD", "LIST", "FORM", "REPORT", "DICT", "MERMAID" or "JSON"
1848
+ report_spec: str | dict , optional, default = None
1849
+ - The desired output columns/fields to include.
1850
+ start_from: int, [default=0], optional
1851
+ When multiple pages of results are available, the page number to start from.
1852
+ page_size: int, [default=100]
1853
+ The number of items to return in a single page.
1854
+ property_names: list[str], optional
1855
+ The names of properties to search for.
1856
+ body: dict | SearchStringRequestBody, optional, default = None
1857
+ - if provided, the search parameters in the body will supercede other attributes, such as "search_string"
1858
+
1859
+ Returns
1860
+ -------
1861
+ List | str
1862
+
1863
+ Output depends on the output format specified.
1864
+
1865
+ Raises
1866
+ -------
1867
+
1868
+ ValidationError
1869
+ If the client passes incorrect parameters on the request that don't conform to the data model.
1870
+ PyegeriaException
1871
+ Issues raised in communicating or server side processing.
1872
+ NotAuthorizedException
1873
+ The principle specified by the user_id does not have authorization for the requested action
1874
+
1875
+ """
1876
+ loop = asyncio.get_event_loop()
1877
+ return loop.run_until_complete(self._async_find_governance_definitions(search_string=search_string,
1878
+ starts_with=starts_with,
1879
+ ends_with=ends_with,
1880
+ ignore_case=ignore_case,
1881
+ anchor_domain=anchor_domain,
1882
+ metadata_element_type=metadata_element_type,
1883
+ metadata_element_subtypes=metadata_element_subtypes,
1884
+ skip_relationships=skip_relationships,
1885
+ include_only_relationships=include_only_relationships,
1886
+ skip_classified_elements=skip_classified_elements,
1887
+ include_only_classified_elements=include_only_classified_elements,
1888
+ graph_query_depth=graph_query_depth,
1889
+ governance_zone_filter=governance_zone_filter,
1890
+ as_of_time=as_of_time,
1891
+ effective_time=effective_time,
1892
+ relationship_page_size=relationship_page_size,
1893
+ limit_results_by_status=limit_results_by_status,
1894
+ sequencing_order=sequencing_order,
1895
+ sequencing_property=sequencing_property,
1896
+ output_format=output_format,
1897
+ report_spec=report_spec,
1898
+ start_from=start_from,
1899
+ page_size=page_size,
1900
+ property_names=property_names,
1901
+ body=body))
1902
+
1903
+ @dynamic_catch
1904
+ async def _async_get_governance_definitions_by_name(self, filter_string: str,
1905
+ classification_names: Optional[list[str]] = None,
1906
+ body: Optional[dict | FilterRequestBody] = None,
1907
+ start_from: int = 0, page_size: int = 0,
1908
+ output_format: str = "JSON",
1909
+ report_spec: dict = None) -> list | str:
1910
+ """ Returns the list of governance definitions with a particular name. Async Version.
1587
1911
 
1588
1912
  Parameters
1589
1913
  ----------
1590
- search_string : str
1591
- - string to search for.
1592
- starts_with : bool, [default=False], optional
1593
- Starts with the supplied string.
1594
- ends_with : bool, [default=False], optional
1595
- Ends with the supplied string
1596
- ignore_case : bool, [default=False], optional
1597
- Ignore case when searching
1598
- body: dict, optional, default = None
1599
- - additional optional specifications for the search.
1914
+ filter_string: str
1915
+ name of the information governance definition to retrieve.
1916
+ body: dict, optional
1917
+ A dictionary containing parameters of the retrieval.
1600
1918
  output_format: str, default = 'JSON'
1601
- Type of output to produce:
1602
- JSON - output standard json
1603
- MD - output standard markdown with no preamble
1604
- FORM - output markdown with a preamble for a form
1605
- REPORT - output markdown with a preamble for a report
1606
- Mermaid - output markdown with a mermaid graph
1919
+ Type of output to produce include:
1920
+ JSON - output standard json
1921
+ MD - output standard markdown with no preamble
1922
+ FORM - output markdown with a preamble for a form
1923
+ REPORT - output markdown with a preamble for a report
1924
+ MERMAID - output mermaid markdown
1607
1925
 
1608
1926
  Returns
1609
1927
  -------
1610
- list[dict] | str
1611
- A list of information governance definition structures or a string if there are no elements found.
1928
+ [dict] | str
1929
+ A list of information governance definitions matching the name.
1612
1930
 
1613
1931
  Raises
1614
1932
  ------
1615
- InvalidParameterException
1933
+ PyegeriaInvalidParameterException
1616
1934
  one of the parameters is null or invalid or
1617
- PropertyServerException
1935
+ PyegeriaAPIException
1618
1936
  There is a problem adding the element properties to the metadata repository or
1619
- UserNotAuthorizedException
1937
+ PyegeriaUnauthorizedException
1620
1938
  the requesting user is not authorized to issue this request.
1621
1939
 
1622
1940
  Notes
1623
1941
  -----
1624
1942
  If a body is provided it overrides the filter_string parameter.
1625
-
1626
1943
  Body structure:
1627
1944
  {
1628
1945
  "class": "FilterRequestBody",
@@ -1636,68 +1953,69 @@ class GovernanceOfficer(Client2):
1636
1953
  "filter": "Add name here",
1637
1954
  "templateFilter": "NO_TEMPLATES"
1638
1955
  }
1639
- """
1956
+
1957
+ """
1640
1958
 
1641
1959
  url = (
1642
1960
  f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/"
1643
- f"{self.url_marker}/governance-definitions/"
1644
- f"by-search-string")
1645
- return await self._async_find_request(url, _type="GovernanceDefinition",
1646
- _gen_output=self._generate_governance_definition_output,
1647
- search_string=search_string, classification_names=classification_names,
1648
- metadata_element_types=metadata_element_types,
1649
- starts_with=starts_with, ends_with=ends_with, ignore_case=ignore_case,
1650
- start_from=start_from, page_size=page_size,
1651
- output_format=output_format, output_format_set=output_format_set,
1652
- body=body)
1961
+ f"{self.url_marker}/governance-definitions/by-name")
1962
+ response = await self._async_get_name_request(url, _type="GovernanceDefinition",
1963
+ _gen_output=self._generate_governance_definition_output,
1964
+ filter_string=filter_string,
1965
+ classification_names=classification_names,
1966
+ start_from=start_from, page_size=page_size,
1967
+ output_format=output_format, report_spec=report_spec,
1968
+ body=body)
1969
+
1970
+ return response
1653
1971
 
1654
1972
  @dynamic_catch
1655
- def find_governance_definitions(self, search_string: str = "*", classification_names: list[str] = None,
1656
- metadata_element_types: list[str] = None,
1657
- starts_with: bool = True, ends_with: bool = False,
1658
- ignore_case: bool = False, start_from: int = 0, page_size: int = 0,
1659
- output_format: str = 'JSON', output_format_set: dict = None,
1660
- body: dict | SearchStringRequestBody = None, ) -> list | str:
1661
- """ Retrieve the list of governance definition metadata elements that contain the search string.
1973
+ def get_governance_definitions_by_name(self, filter_string: str, classification_names: Optional[list[str]] = None,
1974
+ body: Optional[dict | FilterRequestBody] = None,
1975
+ start_from: int = 0, page_size: int = 0,
1976
+ output_format: str = "JSON",
1977
+ report_spec: dict = None) -> list | str:
1978
+ """ Returns the list of governance definitions with a particular name."""
1979
+
1980
+ """ Returns the list of information governance definitions with a particular name. Async Version.
1662
1981
 
1663
1982
  Parameters
1664
1983
  ----------
1665
- search_string : str
1666
- - filter_string string to search for.
1667
- starts_with : bool, [default=False], optional
1668
- Starts with the supplied string.
1669
- ends_with : bool, [default=False], optional
1670
- Ends with the supplied string
1671
- ignore_case : bool, [default=False], optional
1672
- Ignore case when searching
1673
- body: dict, optional, default = None
1674
- - additional optional specifications for the search.
1984
+ filter_string: str
1985
+ name of the information governance definition to retrieve.
1986
+ body: dict, optional
1987
+ A dictionary containing parameters of the retrieval.
1988
+ add_implementation: bool, optional
1989
+ Whether to add the implementation details to the response.
1990
+ start_from: int, [default=0], optional
1991
+ When multiple pages of results are available, the page number to start from.
1992
+ page_size: int, [default=0], optional
1993
+ The number of items to return in a single page. If not specified, the default will be taken from
1994
+ the class instance.
1675
1995
  output_format: str, default = 'JSON'
1676
1996
  Type of output to produce:
1677
- JSON - output standard json
1678
- MD - output standard markdown with no preamble
1679
- FORM - output markdown with a preamble for a form
1680
- REPORT - output markdown with a preamble for a report
1681
- Mermaid - output markdown with a mermaid graph
1997
+ JSON - output standard json
1998
+ MD - output standard markdown with no preamble
1999
+ FORM - output markdown with a preamble for a form
2000
+ REPORT - output markdown with a preamble for a report
2001
+ MERMAID - output mermaid markdown
1682
2002
 
1683
2003
  Returns
1684
2004
  -------
1685
- list[dict] | str
1686
- A list of information governance definition structures or a string if there are no elements found.
2005
+ [dict] | str
2006
+ A list of information governance definitions matching the name.
1687
2007
 
1688
2008
  Raises
1689
2009
  ------
1690
- InvalidParameterException
2010
+ PyegeriaInvalidParameterException
1691
2011
  one of the parameters is null or invalid or
1692
- PropertyServerException
2012
+ PyegeriaAPIException
1693
2013
  There is a problem adding the element properties to the metadata repository or
1694
- UserNotAuthorizedException
2014
+ PyegeriaUnauthorizedException
1695
2015
  the requesting user is not authorized to issue this request.
1696
2016
 
1697
2017
  Notes
1698
2018
  -----
1699
- If a body is provided it overrides the filter_string parameter.
1700
-
1701
2019
  Body structure:
1702
2020
  {
1703
2021
  "class": "FilterRequestBody",
@@ -1711,28 +2029,26 @@ class GovernanceOfficer(Client2):
1711
2029
  "filter": "Add name here",
1712
2030
  "templateFilter": "NO_TEMPLATES"
1713
2031
  }
1714
- """
1715
2032
 
2033
+ """
1716
2034
  loop = asyncio.get_event_loop()
1717
2035
  response = loop.run_until_complete(
1718
- self._async_find_governance_definitions(search_string, classification_names, metadata_element_types,
1719
- starts_with, ends_with, ignore_case, start_from,
1720
- page_size, output_format, output_format_set, body))
2036
+ self._async_get_governance_definitions_by_name(filter_string, classification_names, body,
2037
+ start_from, page_size, output_format, report_spec))
1721
2038
  return response
2039
+
1722
2040
 
1723
- @dynamic_catch
1724
- async def _async_get_governance_definitions_by_name(self, filter_string: str,
1725
- classification_names: list[str] = None,
1726
- body: dict | FilterRequestBody = None,
1727
- start_from: int = 0, page_size: int = 0,
2041
+ async def _async_get_governance_definition_by_guid(self, definition_guid: str,
2042
+ element_type: Optional[str] = None,
2043
+ body: Optional[dict | GetRequestBody] = None,
1728
2044
  output_format: str = "JSON",
1729
- output_format_set: dict = None) -> list | str:
1730
- """ Returns the list of governance definitions with a particular name. Async Version.
2045
+ report_spec: dict = None) -> list | str:
2046
+ """ Returns the governance definitions with a particular GUID. Async Version.
1731
2047
 
1732
2048
  Parameters
1733
2049
  ----------
1734
- filter_string: str
1735
- name of the information governance definition to retrieve.
2050
+ definition_guid: str
2051
+ identity of the information governance definition to retrieve.
1736
2052
  body: dict, optional
1737
2053
  A dictionary containing parameters of the retrieval.
1738
2054
  output_format: str, default = 'JSON'
@@ -1750,11 +2066,11 @@ class GovernanceOfficer(Client2):
1750
2066
 
1751
2067
  Raises
1752
2068
  ------
1753
- InvalidParameterException
2069
+ PyegeriaInvalidParameterException
1754
2070
  one of the parameters is null or invalid or
1755
- PropertyServerException
2071
+ PyegeriaAPIException
1756
2072
  There is a problem adding the element properties to the metadata repository or
1757
- UserNotAuthorizedException
2073
+ PyegeriaUnauthorizedException
1758
2074
  the requesting user is not authorized to issue this request.
1759
2075
 
1760
2076
  Notes
@@ -1762,56 +2078,51 @@ class GovernanceOfficer(Client2):
1762
2078
  If a body is provided it overrides the filter_string parameter.
1763
2079
  Body structure:
1764
2080
  {
1765
- "class": "FilterRequestBody",
1766
- "asOfTime": {{isotime}},
1767
- "effectiveTime": {{isotime}},
1768
- "forLineage": false,
1769
- "forDuplicateProcessing": false,
1770
- "limitResultsByStatus": ["ACTIVE"],
1771
- "sequencingOrder": "PROPERTY_ASCENDING",
1772
- "sequencingProperty": "qualifiedName",
1773
- "filter": "Add name here",
1774
- "templateFilter": "NO_TEMPLATES"
2081
+ "class" : "GetRequestBody",
2082
+ "metadataElementTypeName": "GovernancePolicy",
2083
+ "metadataElementSubtypeNames": [],
2084
+ "skipRelationships": [],
2085
+ "includeOnlyRelationships": [],
2086
+ "relationshipsPageSize": 100,
2087
+ "skipClassifiedElements": [],
2088
+ "includeOnlyClassifiedElements": [],
2089
+ "asOfTime" : "{{$isoTimestamp}}",
2090
+ "effectiveTime" : "{{$isoTimestamp}}",
2091
+ "forLineage" : false,
2092
+ "forDuplicateProcessing" : false
1775
2093
  }
1776
2094
 
1777
2095
  """
1778
2096
 
1779
2097
  url = (
1780
2098
  f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/"
1781
- f"{self.url_marker}/governance-definitions/by-name")
1782
- response = await self._async_get_name_request(url, _type="GovernanceDefinition",
2099
+ f"{self.url_marker}/governance-definitions/{definition_guid}/retrieve")
2100
+
2101
+ element_type = element_type if element_type else "GovernanceDefinition"
2102
+ response = await self._async_get_guid_request(url, _type=element_type,
1783
2103
  _gen_output=self._generate_governance_definition_output,
1784
- filter_string=filter_string,
1785
- classification_names=classification_names,
1786
- start_from=start_from, page_size=page_size,
1787
- output_format=output_format, output_format_set=output_format_set,
2104
+ output_format=output_format, report_spec=report_spec,
1788
2105
  body=body)
1789
2106
 
1790
2107
  return response
1791
2108
 
1792
2109
  @dynamic_catch
1793
- def get_governance_definitions_by_name(self, filter_string: str, classification_names: list[str] = None,
1794
- body: dict | FilterRequestBody = None,
1795
- start_from: int = 0, page_size: int = 0,
2110
+ def get_governance_definition_by_guid(self, definition_guid: str,
2111
+ element_type: Optional[str] = None,
2112
+ body: Optional[dict | GetRequestBody] = None,
1796
2113
  output_format: str = "JSON",
1797
- output_format_set: dict = None) -> list | str:
1798
- """ Returns the list of governance definitions with a particular name."""
1799
-
1800
- """ Returns the list of information governance definitions with a particular name. Async Version.
2114
+ report_spec: dict = None) -> list | str:
2115
+ """ Returns the a governance definitions with a particular GUID.
1801
2116
 
1802
2117
  Parameters
1803
2118
  ----------
1804
- filter_string: str
1805
- name of the information governance definition to retrieve.
2119
+ definition_guid: str
2120
+ GUID of the information governance definition to retrieve.
2121
+ element_type: str
2122
+ Type of element to retrieve.
1806
2123
  body: dict, optional
1807
2124
  A dictionary containing parameters of the retrieval.
1808
- add_implementation: bool, optional
1809
- Whether to add the implementation details to the response.
1810
- start_from: int, [default=0], optional
1811
- When multiple pages of results are available, the page number to start from.
1812
- page_size: int, [default=0], optional
1813
- The number of items to return in a single page. If not specified, the default will be taken from
1814
- the class instance.
2125
+
1815
2126
  output_format: str, default = 'JSON'
1816
2127
  Type of output to produce:
1817
2128
  JSON - output standard json
@@ -1827,50 +2138,53 @@ class GovernanceOfficer(Client2):
1827
2138
 
1828
2139
  Raises
1829
2140
  ------
1830
- InvalidParameterException
2141
+ PyegeriaInvalidParameterException
1831
2142
  one of the parameters is null or invalid or
1832
- PropertyServerException
2143
+ PyegeriaAPIException
1833
2144
  There is a problem adding the element properties to the metadata repository or
1834
- UserNotAuthorizedException
2145
+ PyegeriaUnauthorizedException
1835
2146
  the requesting user is not authorized to issue this request.
1836
2147
 
1837
2148
  Notes
1838
2149
  -----
1839
2150
  Body structure:
1840
- {
1841
- "class": "FilterRequestBody",
1842
- "asOfTime": {{isotime}},
1843
- "effectiveTime": {{isotime}},
1844
- "forLineage": false,
1845
- "forDuplicateProcessing": false,
1846
- "limitResultsByStatus": ["ACTIVE"],
1847
- "sequencingOrder": "PROPERTY_ASCENDING",
1848
- "sequencingProperty": "qualifiedName",
1849
- "filter": "Add name here",
1850
- "templateFilter": "NO_TEMPLATES"
2151
+ {
2152
+ "class" : "GetRequestBody",
2153
+ "metadataElementTypeName": "GovernancePolicy",
2154
+ "metadataElementSubtypeNames": [],
2155
+ "skipRelationships": [],
2156
+ "includeOnlyRelationships": [],
2157
+ "relationshipsPageSize": 100,
2158
+ "skipClassifiedElements": [],
2159
+ "includeOnlyClassifiedElements": [],
2160
+ "asOfTime" : "{{$isoTimestamp}}",
2161
+ "effectiveTime" : "{{$isoTimestamp}}",
2162
+ "forLineage" : false,
2163
+ "forDuplicateProcessing" : false
1851
2164
  }
1852
-
1853
2165
  """
1854
2166
  loop = asyncio.get_event_loop()
1855
2167
  response = loop.run_until_complete(
1856
- self._async_get_governance_definitions_by_name(filter_string, classification_names, body,
1857
- start_from, page_size, output_format, output_format_set))
2168
+ self._async_get_governance_definition_by_guid(definition_guid, element_type, body,
2169
+ output_format, report_spec))
1858
2170
  return response
2171
+
2172
+
1859
2173
 
1860
2174
  @dynamic_catch
1861
- async def _async_get_governance_definition_by_guid(self, guid: str, element_type: str = None,
1862
- body: dict | FilterRequestBody = None,
2175
+ async def _async_get_governance_process_graph(self, guid: str, element_type: Optional[str] = None,
2176
+ body: Optional[dict | FilterRequestBody] = None,
1863
2177
  output_format: str = "JSON",
1864
- output_format_set: dict = None) -> dict | str:
2178
+ report_spec: dict = None) -> dict | str:
1865
2179
 
1866
- """ Get governance definition by guid.
1867
- Async version.
2180
+ """ Retrieve the governance action process metadata element with the supplied unique identifier
2181
+ along with the flow definition describing its implementation. Async version.
1868
2182
 
1869
2183
  Parameters
1870
2184
  ----------
1871
2185
  guid: str
1872
2186
  GUID of the governance definition to get.
1873
-
2187
+
1874
2188
  body: dict, optional
1875
2189
  A dictionary containing the definition of the governance definition to create.
1876
2190
  output_format: str
@@ -1885,11 +2199,11 @@ class GovernanceOfficer(Client2):
1885
2199
 
1886
2200
  Raises
1887
2201
  ------
1888
- InvalidParameterException
2202
+ PyegeriaInvalidParameterException
1889
2203
  one of the parameters is null or invalid or
1890
- PropertyServerException
2204
+ PyegeriaAPIException
1891
2205
  There is a problem adding the element properties to the metadata repository or
1892
- UserNotAuthorizedException
2206
+ PyegeriaUnauthorizedException
1893
2207
  the requesting user is not authorized to issue this request.
1894
2208
 
1895
2209
  Notes
@@ -1909,29 +2223,29 @@ class GovernanceOfficer(Client2):
1909
2223
 
1910
2224
  url = (
1911
2225
  f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/"
1912
- f"{self.url_marker}/governance-definitions/"
1913
- f"{guid}/retrieve")
2226
+ f"{self.url_marker}/governance-action-processes/{guid}/graph")
1914
2227
  type = element_type if element_type else "GovernanceDefinition"
1915
2228
 
1916
2229
  response = await self._async_get_guid_request(url, _type=type,
1917
2230
  _gen_output=self._generate_governance_definition_output,
1918
- output_format=output_format, output_format_set=output_format_set,
2231
+ output_format=output_format, report_spec=report_spec,
1919
2232
  body=body)
1920
2233
 
1921
2234
  return response
1922
2235
 
1923
2236
  @dynamic_catch
1924
- def get_governance_definition_by_guid(self, guid: str, element_type: str = None, body: dict = None,
2237
+ def get_governance_process_graph(self, guid: str, element_type: Optional[str] = None, body: dict = None,
1925
2238
  output_format: str = "JSON",
1926
- output_format_set: dict = None) -> dict | str:
2239
+ report_spec: dict = None) -> dict | str:
1927
2240
 
1928
- """ Get governance definition by guid.
2241
+ """ Retrieve the governance action process metadata element with the supplied unique identifier
2242
+ along with the flow definition describing its implementation.
1929
2243
 
1930
2244
  Parameters
1931
2245
  ----------
1932
2246
  guid: str
1933
2247
  GUID of the governance definition to get.
1934
-
2248
+
1935
2249
  body: dict, optional
1936
2250
  A dictionary containing the definition of the governance definition to create.
1937
2251
  output_format: str, default = "JSON"
@@ -1946,11 +2260,11 @@ class GovernanceOfficer(Client2):
1946
2260
 
1947
2261
  Raises
1948
2262
  ------
1949
- InvalidParameterException
2263
+ PyegeriaInvalidParameterException
1950
2264
  one of the parameters is null or invalid or
1951
- PropertyServerException
2265
+ PyegeriaAPIException
1952
2266
  There is a problem adding the element properties to the metadata repository or
1953
- UserNotAuthorizedException
2267
+ PyegeriaUnauthorizedException
1954
2268
  the requesting user is not authorized to issue this request.
1955
2269
 
1956
2270
  Notes
@@ -1968,14 +2282,14 @@ class GovernanceOfficer(Client2):
1968
2282
  """
1969
2283
 
1970
2284
  loop = asyncio.get_event_loop()
1971
- response = loop.run_until_complete(self._async_get_governance_definition_by_guid(guid, element_type, body,
2285
+ response = loop.run_until_complete(self._async_get_governance_process_graph(guid, element_type, body,
1972
2286
  output_format,
1973
- output_format_set))
2287
+ report_spec))
1974
2288
  return response
1975
2289
 
1976
2290
  @dynamic_catch
1977
2291
  async def _async_link_design_to_implementation(self, design_desc_guid: str, implementation_guid: str,
1978
- body: dict | NewRelationshipRequestBody = None) -> None:
2292
+ body: Optional[dict | NewRelationshipRequestBody] = None) -> None:
1979
2293
  """ Attach a design object such as a solution component or governance definition to its implementation via the
1980
2294
  ImplementedBy relationship. Request body is optional. Async Version.
1981
2295
  https://egeria-project.org/types/7/0737-Solution-Implementation/
@@ -1995,11 +2309,11 @@ class GovernanceOfficer(Client2):
1995
2309
 
1996
2310
  Raises
1997
2311
  ------
1998
- InvalidParameterException
2312
+ PyegeriaInvalidParameterException
1999
2313
  one of the parameters is null or invalid or
2000
- PropertyServerException
2314
+ PyegeriaAPIException
2001
2315
  There is a problem adding the element properties to the metadata repository or
2002
- UserNotAuthorizedException
2316
+ PyegeriaUnauthorizedException
2003
2317
  the requesting user is not authorized to issue this request.
2004
2318
 
2005
2319
  Notes
@@ -2032,7 +2346,7 @@ class GovernanceOfficer(Client2):
2032
2346
 
2033
2347
  @dynamic_catch
2034
2348
  def link_design_to_implementation(self, design_desc_guid: str, implementation_guid: str,
2035
- body: dict | NewRelationshipRequestBody = None) -> None:
2349
+ body: Optional[dict | NewRelationshipRequestBody] = None) -> None:
2036
2350
  """ Attach a design object such as a solution component or governance definition to its implementation via the
2037
2351
  ImplementedBy relationship. Request body is optional.
2038
2352
  https://egeria-project.org/types/7/0737-Solution-Implementation/
@@ -2052,11 +2366,11 @@ class GovernanceOfficer(Client2):
2052
2366
 
2053
2367
  Raises
2054
2368
  ------
2055
- InvalidParameterException
2369
+ PyegeriaInvalidParameterException
2056
2370
  one of the parameters is null or invalid or
2057
- PropertyServerException
2371
+ PyegeriaAPIException
2058
2372
  There is a problem adding the element properties to the metadata repository or
2059
- UserNotAuthorizedException
2373
+ PyegeriaUnauthorizedException
2060
2374
  the requesting user is not authorized to issue this request.
2061
2375
 
2062
2376
  Notes
@@ -2087,7 +2401,7 @@ class GovernanceOfficer(Client2):
2087
2401
 
2088
2402
  @dynamic_catch
2089
2403
  async def _async_detach_design_from_implementation(self, design_desc_guid: str, implementation_guid: str,
2090
- body: dict | DeleteRequestBody = None) -> None:
2404
+ body: Optional[dict | DeleteElementRequestBody] = None) -> None:
2091
2405
  """ Detach a governance definition from its implementation. Async Version.
2092
2406
 
2093
2407
  Parameters
@@ -2105,11 +2419,11 @@ class GovernanceOfficer(Client2):
2105
2419
 
2106
2420
  Raises
2107
2421
  ------
2108
- InvalidParameterException
2422
+ PyegeriaInvalidParameterException
2109
2423
  one of the parameters is null or invalid or
2110
- PropertyServerException
2424
+ PyegeriaAPIException
2111
2425
  There is a problem adding the element properties to the metadata repository or
2112
- UserNotAuthorizedException
2426
+ PyegeriaUnauthorizedException
2113
2427
  the requesting user is not authorized to issue this request.
2114
2428
 
2115
2429
  Notes
@@ -2128,13 +2442,13 @@ class GovernanceOfficer(Client2):
2128
2442
 
2129
2443
  url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/{self.url_marker}/designs/"
2130
2444
  f"{design_desc_guid}/implementations/{implementation_guid}/detach")
2131
- await self._async_delete_request(url, body)
2445
+ await self._async_delete_relationship_request(url, body)
2132
2446
  logger.info(
2133
2447
  f"Detached design from implementation: {design_desc_guid} -> {implementation_guid}")
2134
2448
 
2135
2449
  @dynamic_catch
2136
2450
  def detach_design_from_implementation(self, design_desc_guid: str, implementation_guid: str,
2137
- body: dict | DeleteRequestBody = None) -> None:
2451
+ body: Optional[dict | DeleteElementRequestBody] = None) -> None:
2138
2452
  """ Detach a governance definition from its implementation. Request body is optional.
2139
2453
 
2140
2454
  Parameters
@@ -2152,11 +2466,11 @@ class GovernanceOfficer(Client2):
2152
2466
 
2153
2467
  Raises
2154
2468
  ------
2155
- InvalidParameterException
2469
+ PyegeriaInvalidParameterException
2156
2470
  one of the parameters is null or invalid or
2157
- PropertyServerException
2471
+ PyegeriaAPIException
2158
2472
  There is a problem adding the element properties to the metadata repository or
2159
- UserNotAuthorizedException
2473
+ PyegeriaUnauthorizedException
2160
2474
  the requesting user is not authorized to issue this request.
2161
2475
 
2162
2476
  Notes
@@ -2177,7 +2491,7 @@ class GovernanceOfficer(Client2):
2177
2491
 
2178
2492
  @dynamic_catch
2179
2493
  async def _async_link_implementation_resource(self, design_desc_guid: str, implementation_guid: str,
2180
- body: dict | NewRelationshipRequestBody = None) -> None:
2494
+ body: Optional[dict | NewRelationshipRequestBody] = None) -> None:
2181
2495
  """ Attach a design object such as a solution component or governance definition to one of its implementation
2182
2496
  resource via the ImplementationResource relationship. Request body is optional.
2183
2497
  https://egeria-project.org/types/7/0737-Solution-Implementation/
@@ -2197,11 +2511,11 @@ class GovernanceOfficer(Client2):
2197
2511
 
2198
2512
  Raises
2199
2513
  ------
2200
- InvalidParameterException
2514
+ PyegeriaInvalidParameterException
2201
2515
  one of the parameters is null or invalid or
2202
- PropertyServerException
2516
+ PyegeriaAPIException
2203
2517
  There is a problem adding the element properties to the metadata repository or
2204
- UserNotAuthorizedException
2518
+ PyegeriaUnauthorizedException
2205
2519
  the requesting user is not authorized to issue this request.
2206
2520
 
2207
2521
  Notes
@@ -2235,7 +2549,7 @@ class GovernanceOfficer(Client2):
2235
2549
 
2236
2550
  @dynamic_catch
2237
2551
  def link_implementation_resource(self, design_desc_guid: str, implementation_guid: str,
2238
- body: dict | NewRelationshipRequestBody = None) -> None:
2552
+ body: Optional[dict | NewRelationshipRequestBody] = None) -> None:
2239
2553
  """ Attach a design object such as a solution component or governance definition to its implementation via the
2240
2554
  ImplementedBy relationship. Request body is optional.
2241
2555
  https://egeria-project.org/types/7/0737-Solution-Implementation/
@@ -2255,11 +2569,11 @@ class GovernanceOfficer(Client2):
2255
2569
 
2256
2570
  Raises
2257
2571
  ------
2258
- InvalidParameterException
2572
+ PyegeriaInvalidParameterException
2259
2573
  one of the parameters is null or invalid or
2260
- PropertyServerException
2574
+ PyegeriaAPIException
2261
2575
  There is a problem adding the element properties to the metadata repository or
2262
- UserNotAuthorizedException
2576
+ PyegeriaUnauthorizedException
2263
2577
  the requesting user is not authorized to issue this request.
2264
2578
 
2265
2579
  Notes
@@ -2290,7 +2604,7 @@ class GovernanceOfficer(Client2):
2290
2604
 
2291
2605
  @dynamic_catch
2292
2606
  async def _async_detach_implementation_resource(self, design_desc_guid: str, implementation_guid: str,
2293
- body: dict | DeleteRequestBody = None) -> None:
2607
+ body: Optional[dict | DeleteRelationshipRequestBody] = None) -> None:
2294
2608
  """ Detach a design object such as a solution component or governance definition from one of its implementation
2295
2609
  resources. Request body is optional. Async version.
2296
2610
 
@@ -2309,11 +2623,11 @@ class GovernanceOfficer(Client2):
2309
2623
 
2310
2624
  Raises
2311
2625
  ------
2312
- InvalidParameterException
2626
+ PyegeriaInvalidParameterException
2313
2627
  one of the parameters is null or invalid or
2314
- PropertyServerException
2628
+ PyegeriaAPIException
2315
2629
  There is a problem adding the element properties to the metadata repository or
2316
- UserNotAuthorizedException
2630
+ PyegeriaUnauthorizedException
2317
2631
  the requesting user is not authorized to issue this request.
2318
2632
 
2319
2633
  Notes
@@ -2332,12 +2646,12 @@ class GovernanceOfficer(Client2):
2332
2646
 
2333
2647
  url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/{self.url_marker}/designs/"
2334
2648
  f"{design_desc_guid}/implementation-resources/{implementation_guid}/detach")
2335
- await self._async_delete_request(url, body)
2649
+ await self._async_delete_relationship_request(url, body)
2336
2650
  logger.info(
2337
2651
  f"Detached design from implementation resource: {design_desc_guid} -> {implementation_guid}")
2338
2652
 
2339
2653
  def detach_implementation_resource(self, design_desc_guid: str, implementation_guid: str,
2340
- body: dict | DeleteRequestBody = None) -> None:
2654
+ body: Optional[dict | DeleteRelationshipRequestBody] = None) -> None:
2341
2655
  """ Detach a design object such as a solution component or governance definition from one of its implementation
2342
2656
  resources. Request body is optional.
2343
2657
 
@@ -2356,11 +2670,11 @@ class GovernanceOfficer(Client2):
2356
2670
 
2357
2671
  Raises
2358
2672
  ------
2359
- InvalidParameterException
2673
+ PyegeriaInvalidParameterException
2360
2674
  one of the parameters is null or invalid or
2361
- PropertyServerException
2675
+ PyegeriaAPIException
2362
2676
  There is a problem adding the element properties to the metadata repository or
2363
- UserNotAuthorizedException
2677
+ PyegeriaUnauthorizedException
2364
2678
  the requesting user is not authorized to issue this request.
2365
2679
 
2366
2680
  Notes
@@ -2379,6 +2693,188 @@ class GovernanceOfficer(Client2):
2379
2693
  loop = asyncio.get_event_loop()
2380
2694
  loop.run_until_complete(self._async_detach_implementation_resource(design_desc_guid, implementation_guid, body))
2381
2695
 
2696
+
2697
+ @dynamic_catch
2698
+ async def _async_link_governance_results(self, gov_metric_guid: str, data_asset_guid: str,
2699
+ body: Optional[dict | NewRelationshipRequestBody] = None) -> None:
2700
+ """ Attach a governance metric to a data asset that describes where its measurements are kept.
2701
+ Request body is optional. https://egeria-project.org/concepts/governance-definition/
2702
+
2703
+ Async Version.
2704
+
2705
+ Parameters
2706
+ ----------
2707
+ gov_metric_guid: str
2708
+ guid of the governance metric to link.
2709
+ data_asset_guid: str
2710
+ guid of the data asset to link.
2711
+ body: dict, optional
2712
+ The body describing the link between the two elements.
2713
+
2714
+ Returns
2715
+ -------
2716
+ None
2717
+
2718
+ Raises
2719
+ ------
2720
+ PyegeriaException
2721
+ ValidationError
2722
+
2723
+ Notes
2724
+ ----
2725
+
2726
+ Body structure:
2727
+ {
2728
+ "class" : "NewRelationshipRequestBody",
2729
+ "properties": {
2730
+ "class": "GovernanceResultsProperties",
2731
+ "description": "",
2732
+ "effectiveFrom": "{{$isoTimestamp}}",
2733
+ "effectiveTo": "{{$isoTimestamp}}"
2734
+ },
2735
+ "externalSourceGUID": "add guid here",
2736
+ "externalSourceName": "add qualified name here",
2737
+ "effectiveTime" : "{{$isoTimestamp}}",
2738
+ "forLineage" : false,
2739
+ "forDuplicateProcessing" : false
2740
+ }
2741
+ """
2742
+
2743
+ url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/{self.url_marker}/governance-metrics/"
2744
+ f"{gov_metric_guid}/measurements/{data_asset_guid}/attach"
2745
+ )
2746
+ await self._async_new_relationship_request(url, "GovernanceResultsProperties", body)
2747
+ logger.info(f"Linked governance metric to a data asset containing its measurements.: {gov_metric_guid} -> {data_asset_guid}")
2748
+
2749
+ @dynamic_catch
2750
+ def link_governance_results(self, gov_metric_guid: str, data_asset_guid: str,
2751
+ body: Optional[dict | NewRelationshipRequestBody] = None) -> None:
2752
+ """ Attach a governance metric to a data asset that describes where its measurements are kept.
2753
+ Request body is optional. https://egeria-project.org/concepts/governance-definition/
2754
+
2755
+
2756
+ Parameters
2757
+ ----------
2758
+ gov_metric_guid: str
2759
+ guid of the governance metric to link.
2760
+ data_asset_guid: str
2761
+ guid of the data asset to link.
2762
+ body: dict, optional
2763
+ The body describing the link between the two elements.
2764
+
2765
+ Returns
2766
+ -------
2767
+ None
2768
+
2769
+ Raises
2770
+ ------
2771
+ PyegeriaException
2772
+ ValidationError
2773
+
2774
+ Notes
2775
+ ----
2776
+
2777
+ Body structure:
2778
+ {
2779
+ "class" : "NewRelationshipRequestBody",
2780
+ "properties": {
2781
+ "class": "GovernanceResultsProperties",
2782
+ "description": "",
2783
+ "effectiveFrom": "{{$isoTimestamp}}",
2784
+ "effectiveTo": "{{$isoTimestamp}}"
2785
+ },
2786
+ "externalSourceGUID": "add guid here",
2787
+ "externalSourceName": "add qualified name here",
2788
+ "effectiveTime" : "{{$isoTimestamp}}",
2789
+ "forLineage" : false,
2790
+ "forDuplicateProcessing" : false
2791
+ }
2792
+ """
2793
+ loop = asyncio.get_event_loop()
2794
+ loop.run_until_complete(self._async_link_governance_results(gov_metric_guid, data_asset_guid, body))
2795
+
2796
+ @dynamic_catch
2797
+ async def _async_detach_governance_results(self, gov_metric_guid: str, data_asset_guid: str, body: Optional[dict | DeleteRelationshipRequestBody] = None) -> None:
2798
+ """ Detach an governance metric from its measurements data set. Request body is optional.
2799
+ https://egeria-project.org/concepts/governance-definition/ Async version.
2800
+
2801
+ Parameters
2802
+ ----------
2803
+ gov_metric_guid: str
2804
+ guid of the governance metric to link.
2805
+ data_asset_guid: str
2806
+ guid of the data asset to link.
2807
+ body: dict, optional
2808
+ The body describing the link between the two elements.
2809
+
2810
+ Returns
2811
+ -------
2812
+ None
2813
+
2814
+ Raises
2815
+ ------
2816
+ PyegeriaException
2817
+ ValidationError
2818
+
2819
+ Notes
2820
+ ----
2821
+
2822
+ Body structure:
2823
+ {
2824
+ "class": "MetadataSourceRequestBody",
2825
+ "externalSourceGUID": "string",
2826
+ "externalSourceName": "string",
2827
+ "forLineage": true,
2828
+ "forDuplicateProcessing": true,
2829
+ "effectiveTime": "2025-06-13T15:13:31.339Z"
2830
+ }
2831
+ """
2832
+
2833
+ url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/{self.url_marker}/governance-metrics/"
2834
+ f"{gov_metric_guid}/measurements/{data_asset_guid}/detach")
2835
+ await self._async_delete_relationship_request(url, body)
2836
+ logger.info(
2837
+ f"Detached governance metric from the asset where measurements were stored: {gov_metric_guid} -> {data_asset_guid}")
2838
+
2839
+ def detach_governance_results(self, gov_metric_guid: str, data_asset_guid: str,
2840
+ body: Optional[dict | DeleteRelationshipRequestBody] = None) -> None:
2841
+ """ Detach an governance metric from its measurements data set. Request body is optional.
2842
+ https://egeria-project.org/concepts/governance-definition/
2843
+
2844
+ Parameters
2845
+ ----------
2846
+ gov_metric_guid: str
2847
+ guid of the governance metric to link.
2848
+ data_asset_guid: str
2849
+ guid of the data asset to link.
2850
+ body: dict, optional
2851
+ The body describing the link between the two elements.
2852
+
2853
+ Returns
2854
+ -------
2855
+ None
2856
+
2857
+ Raises
2858
+ ------
2859
+ PyegeriaException
2860
+ ValidationError
2861
+
2862
+ Notes
2863
+ ----
2864
+
2865
+ Body structure:
2866
+ {
2867
+ "class": "MetadataSourceRequestBody",
2868
+ "externalSourceGUID": "string",
2869
+ "externalSourceName": "string",
2870
+ "forLineage": true,
2871
+ "forDuplicateProcessing": true,
2872
+ "effectiveTime": "2025-06-13T15:13:31.339Z"
2873
+ }
2874
+ """
2875
+ loop = asyncio.get_event_loop()
2876
+ loop.run_until_complete(self._async_detach_governance_results(gov_metric_guid, data_asset_guid, data_asset_guid, body))
2877
+
2382
2878
  # async def _async_get_gov_def_in_context(self, guid: str, body: dict = None, output_format: str = "JSON",
2383
2879
  # start_from: int = 0,
2384
2880
  # page_size: int = 0) -> list[dict] | str:
@@ -2408,11 +2904,11 @@ class GovernanceOfficer(Client2):
2408
2904
  #
2409
2905
  # Raises
2410
2906
  # ------
2411
- # InvalidParameterException
2907
+ # PyegeriaInvalidParameterException
2412
2908
  # one of the parameters is null or invalid or
2413
- # PropertyServerException
2909
+ # PyegeriaAPIException
2414
2910
  # There is a problem adding the element properties to the metadata repository or
2415
- # UserNotAuthorizedException
2911
+ # PyegeriaUnauthorizedException
2416
2912
  # the requesting user is not authorized to issue this request.
2417
2913
  #
2418
2914
  # Notes
@@ -2477,11 +2973,11 @@ class GovernanceOfficer(Client2):
2477
2973
  #
2478
2974
  # Raises
2479
2975
  # ------
2480
- # InvalidParameterException
2976
+ # PyegeriaInvalidParameterException
2481
2977
  # one of the parameters is null or invalid or
2482
- # PropertyServerException
2978
+ # PyegeriaAPIException
2483
2979
  # There is a problem adding the element properties to the metadata repository or
2484
- # UserNotAuthorizedException
2980
+ # PyegeriaUnauthorizedException
2485
2981
  # the requesting user is not authorized to issue this request.
2486
2982
  #
2487
2983
  # Notes