pyegeria 0.2.4__py3-none-any.whl → 5.3.0.dev3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. pyegeria/README.md +35 -0
  2. pyegeria/__init__.py +345 -14
  3. pyegeria/_client.py +376 -126
  4. pyegeria/_deprecated_gov_engine.py +451 -0
  5. pyegeria/_exceptions.py +6 -6
  6. pyegeria/_globals.py +7 -1
  7. pyegeria/_validators.py +9 -6
  8. pyegeria/asset_catalog_omvs.py +807 -0
  9. pyegeria/automated_curation_omvs.py +3760 -0
  10. pyegeria/classification_manager_omvs.py +5238 -0
  11. pyegeria/collection_manager_omvs.py +2727 -0
  12. pyegeria/commands/README.md +47 -0
  13. pyegeria/commands/__init__.py +22 -0
  14. pyegeria/commands/cat/README.md +16 -0
  15. pyegeria/commands/cat/__init__.py +1 -0
  16. pyegeria/commands/cat/exp_list_glossaries.py +156 -0
  17. pyegeria/commands/cat/get_asset_graph.py +319 -0
  18. pyegeria/commands/cat/get_collection.py +148 -0
  19. pyegeria/commands/cat/get_project_dependencies.py +168 -0
  20. pyegeria/commands/cat/get_project_structure.py +168 -0
  21. pyegeria/commands/cat/get_tech_type_elements.py +174 -0
  22. pyegeria/commands/cat/glossary_actions.py +362 -0
  23. pyegeria/commands/cat/list_assets.py +176 -0
  24. pyegeria/commands/cat/list_cert_types.py +194 -0
  25. pyegeria/commands/cat/list_collections.py +162 -0
  26. pyegeria/commands/cat/list_deployed_catalogs.py +217 -0
  27. pyegeria/commands/cat/list_deployed_database_schemas.py +251 -0
  28. pyegeria/commands/cat/list_deployed_databases.py +202 -0
  29. pyegeria/commands/cat/list_glossaries.py +150 -0
  30. pyegeria/commands/cat/list_projects.py +221 -0
  31. pyegeria/commands/cat/list_servers_deployed_imp.py +158 -0
  32. pyegeria/commands/cat/list_tech_type_elements.py +190 -0
  33. pyegeria/commands/cat/list_tech_types.py +140 -0
  34. pyegeria/commands/cat/list_terms.py +242 -0
  35. pyegeria/commands/cat/list_todos.py +189 -0
  36. pyegeria/commands/cat/list_user_ids.py +145 -0
  37. pyegeria/commands/cli/__init__.py +13 -0
  38. pyegeria/commands/cli/egeria.py +1844 -0
  39. pyegeria/commands/cli/egeria_cat.py +638 -0
  40. pyegeria/commands/cli/egeria_login_tui.py +313 -0
  41. pyegeria/commands/cli/egeria_my.py +248 -0
  42. pyegeria/commands/cli/egeria_ops.py +502 -0
  43. pyegeria/commands/cli/egeria_tech.py +618 -0
  44. pyegeria/commands/cli/ops_config.py +45 -0
  45. pyegeria/commands/cli/txt_custom_v2.tcss +19 -0
  46. pyegeria/commands/doc/README.md +145 -0
  47. pyegeria/commands/doc/Visual Command Reference/README.md +511 -0
  48. pyegeria/commands/doc/Visual Command Reference/cat/show/assets/asset-graph 2024-11-20 at 15.56.42.png +0 -0
  49. pyegeria/commands/doc/Visual Command Reference/cat/show/assets/assets-in-domain 2024-11-20 at 15.49.55@2x.png +0 -0
  50. pyegeria/commands/doc/Visual Command Reference/cat/show/assets/elements-of-type 2024-11-20 at 16.01.35.png +0 -0
  51. pyegeria/commands/doc/Visual Command Reference/cat/show/assets/tech-type-elements 2024-11-20 at 16.05.05.png +0 -0
  52. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs 2024-12-17 at 15.43.27@2x.png +0 -0
  53. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs-2024-11-20 at 16.17.43@2x.png +0 -0
  54. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-11-25 at 20.14.50@2x.png +0 -0
  55. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-12-17 at 15.48.38@2x.png +0 -0
  56. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-11-25 at 20.21.25@2x.png +0 -0
  57. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-12-17 at 15.52.16@2x.png +0 -0
  58. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed_databases 2024-12-16 at 16.40.31@2x.png +0 -0
  59. pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-glossaries 2024-11-25 at 20.30.02.png +0 -0
  60. pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-terms 2024-11-25 at 20.32.11.png +0 -0
  61. pyegeria/commands/doc/Visual Command Reference/cat/show/info/asset-types 2024-11-25 at 20.34.19@2x.png +0 -0
  62. pyegeria/commands/doc/Visual Command Reference/cat/show/info/certification-types 2024-11-25 at 20.37.07.png +0 -0
  63. pyegeria/commands/doc/Visual Command Reference/cat/show/info/collection-graph 2024-12-12 at 11.33.18@2x.png +0 -0
  64. pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-collections 2024-12-10 at 14.25.51@2x.png +0 -0
  65. pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-todos 2024-12-12 at 11.46.30@2x.png +0 -0
  66. pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-user-ids 2024-12-12 at 11.51.09@2x.png +0 -0
  67. pyegeria/commands/doc/Visual Command Reference/cat/show/info/tech-types 2024-12-12 at 11.37.20@2x.png +0 -0
  68. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_dependencies 2024-12-14 at 16.24.39@2x.png +0 -0
  69. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_structure 2024-12-14 at 16.21.35@2x.png +0 -0
  70. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/projects 2024-12-14 at 16.18.10@2x.png +0 -0
  71. pyegeria/commands/doc/Visual Command Reference/hey_egeria tui 2024-12-16 at 16.58.22@2x.png +0 -0
  72. pyegeria/commands/doc/Visual Command Reference/my/show/my_profile 2024-12-14 at 16.29.27@2x.png +0 -0
  73. pyegeria/commands/doc/Visual Command Reference/my/show/my_roles 2024-12-14 at 16.32.10@2x.png +0 -0
  74. pyegeria/commands/doc/Visual Command Reference/my/show/my_todos 2024-12-15 at 16.24.13@2x.png +0 -0
  75. pyegeria/commands/doc/Visual Command Reference/my/show/open_todos 2024-12-14 at 16.36.12@2x.png +0 -0
  76. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/list_engine_activity compressed 2024-12-15 at 16.48.48@2x.png +0 -0
  77. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity 2024-12-15 at 16.32.55@2x.png +0 -0
  78. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity compressed 2024-12-15 at 16.38.29@2x.png +0 -0
  79. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_status 2024-12-15 at 16.51.26.jpeg +0 -0
  80. pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_daemon_status 2024-12-15 at 16.57.12@2x.png +0 -0
  81. pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_targets 2024-12-15 at 17.02.19@2x.png +0 -0
  82. pyegeria/commands/doc/Visual Command Reference/ops/show/platforms/monitor_platform_status 2024-12-15 at 19.53.18@2x.png +0 -0
  83. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status 2024-12-15 at 19.59.39@2x.png +0 -0
  84. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status full 2024-12-15 at 20.01.57@2x.png +0 -0
  85. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_startup_servers 2024-12-15 at 19.56.07@2x.png +0 -0
  86. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_anchored_elements 2024-12-15 at 21.25.41@2x.png +0 -0
  87. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_elements_of_om_type 2024-12-16 at 14.39.59@2x.png +0 -0
  88. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/info_for_guid 2024-12-16 at 11.35.29@2x.png +0 -0
  89. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type 2024-12-16 at 14.24.18@2x.png +0 -0
  90. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type extended 2024-12-16 at 14.28.46@2x.png +0 -0
  91. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_of_om_type_by_classification 2024-12-16 at 14.35.26@2x.png +0 -0
  92. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/related_elements 2024-12-16 at 14.55.01@2x.png +0 -0
  93. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/show_related_specifications 2024-12-16 at 15.04.55@2x.png +0 -0
  94. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/asset_types 2024-12-16 at 15.10.16@2x.png +0 -0
  95. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/detailed_governance_action_processes 2024-12-16 at 15.16.26@2x.png +0 -0
  96. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/governance_action_processes 2024-12-16 at 15.13.01@2x.png +0 -0
  97. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/registered_services 2024-12-16 at 16.44.54@2x.png +0 -0
  98. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-16 at 16.20.34@2x.png +0 -0
  99. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-19 at 10.51.54@2x.png +0 -0
  100. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/valid_metadata_values 2024-12-16 at 15.31.56@2x.png +0 -0
  101. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_tech_type_template_specs 2024-12-16 at 16.03.22@2x.png +0 -0
  102. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_technology_types 2024-12-16 at 15.39.20@2x.png +0 -0
  103. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_details 2024-12-16 at 15.37.21@2x.png +0 -0
  104. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_templates 2024-12-16 at 16.11.48@2x.png +0 -0
  105. pyegeria/commands/doc/glossary/basic-glossary-tui.md +109 -0
  106. pyegeria/commands/doc/glossary/images/delete-glossary-step1 2024-11-06 at 15.47.23@2x.png +0 -0
  107. pyegeria/commands/doc/glossary/images/delete-glossary-step2 2024-11-06 at 15.51.29@2x.png +0 -0
  108. pyegeria/commands/doc/glossary/images/delete-glossary-step3 2024-11-06 at 15.53.19@2x.png +0 -0
  109. pyegeria/commands/doc/glossary/images/delete-glossary-step4 2024-11-06 at 15.55.11@2x.png +0 -0
  110. pyegeria/commands/doc/glossary/images/out-create-glossary example 2024-11-05 at 20.38.04@2x.png +0 -0
  111. pyegeria/commands/doc/glossary/images/out-create-term 2024-11-06 at 20.48.29.png +0 -0
  112. pyegeria/commands/doc/glossary/images/out-delete-term 2024-11-07 at 03.57.25.png +0 -0
  113. pyegeria/commands/doc/glossary/images/out-display-terms-for-glossary-test 2024-11-06 at 20.51.28.png +0 -0
  114. pyegeria/commands/doc/glossary/images/out-export-example 2024-11-07 at 09.54.57.png +0 -0
  115. pyegeria/commands/doc/glossary/images/out-exported-terms 2024-11-06 at 21.06.32.png +0 -0
  116. pyegeria/commands/doc/glossary/images/out-glossary-list example 2024-11-05 at 20.41.02@2x.png +0 -0
  117. pyegeria/commands/doc/glossary/images/out-import-terms 2024-11-07 at 08.15.18.png +0 -0
  118. pyegeria/commands/doc/glossary/images/out-list-all-terms 2024-11-06 at 16.22.20@2x.png +0 -0
  119. pyegeria/commands/doc/glossary/images/out-list-terms-for-example 2024-11-06 at 16.40.12.png +0 -0
  120. pyegeria/commands/doc/glossary/images/out-list-terms-second 2024-11-06 at 16.45.13.png +0 -0
  121. pyegeria/commands/doc/glossary/images/out-pipx install pyegeria 2024-11-10 at 18.12.21.png +0 -0
  122. pyegeria/commands/doc/glossary/images/out-server-status-full 2024-11-10 at 18.25.14.png +0 -0
  123. pyegeria/commands/doc/glossary/images/out-servers-status 2024-11-10 at 18.15.42.png +0 -0
  124. pyegeria/commands/doc/glossary/images/out-upsert-import 2024-11-07 at 19.37.00.png +0 -0
  125. pyegeria/commands/doc/glossary/images/tui-2024-11-10 at 18.26.29.png +0 -0
  126. pyegeria/commands/doc/glossary/images/tui-create-glossary example 2024-11-05 at 20.34.24@2x.png +0 -0
  127. pyegeria/commands/doc/glossary/images/tui-create-term 2024-11-06 at 20.46.35.png +0 -0
  128. pyegeria/commands/doc/glossary/images/tui-delete-term 2024-11-07 at 03.51.57.png +0 -0
  129. pyegeria/commands/doc/glossary/images/tui-display-terms-for-example 2024-11-06 at 20.56.49.png +0 -0
  130. pyegeria/commands/doc/glossary/images/tui-export-example 2024-11-07 at 09.52.59.png +0 -0
  131. pyegeria/commands/doc/glossary/images/tui-hey-egeria 2024-11-10 at 18.31.01.png +0 -0
  132. pyegeria/commands/doc/glossary/images/tui-import-upsert-example 2024-11-07 at 10.08.37.png +0 -0
  133. pyegeria/commands/doc/glossary/images/tui-list-terms-second 2024-11-06 at 16.46.34.png +0 -0
  134. pyegeria/commands/doc/glossary/images/tui-load-archive.png +0 -0
  135. pyegeria/commands/doc/glossary/images/tui-server-status-full 2024-11-10 at 19.14.36.png +0 -0
  136. pyegeria/commands/doc/glossary/images/tui-show-glossaries 2024-11-07 at 20.00.05.png +0 -0
  137. pyegeria/commands/doc/glossary/images/tui-show-glossary-terms 2024-11-05 at 19.37.53@2x.png +0 -0
  138. pyegeria/commands/doc/glossary/images/tui-upsert 2024-11-07 at 11.49.04.png +0 -0
  139. pyegeria/commands/doc/glossary/images/upsert-example.om-terms 2024-11-07 at 11.44.05.png +0 -0
  140. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/README.md +346 -0
  141. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/CleanShot 2024-11-18 at 21.32.03@2x.png +0 -0
  142. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/Xmind 1731421782704.png +0 -0
  143. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/Xmind 1731422134920.png +0 -0
  144. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/hey_egeria 2024-11-12 at 20.38.43.png +0 -0
  145. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/hey_egeria cat 2024-11-12 at 21.41.43.png +0 -0
  146. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-integ-status-list 2024-11-12 at 16.45.26.png +0 -0
  147. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-integ-status-live 2024-11-12 at 16.44.12@2x.png +0 -0
  148. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-server-status 2024-11-10 at 18.15.42@2x.png +0 -0
  149. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-server-status-full 2024-11-10 at 18.25.14@2x.png +0 -0
  150. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/short-cut commands 2024-11-12 at 22.22.13.png +0 -0
  151. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-hey-egeria.png +0 -0
  152. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-integration-status-paging.png +0 -0
  153. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-load-archive 2024-11-10 at 19.19.09@2x.png +0 -0
  154. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-show-server-status 2024-11-10 at 18.52.01@2x.png +0 -0
  155. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-show-server-status-full 2024-11-10.png +0 -0
  156. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-status-paging 2024-11-12 at 16.26.14@2x.png +0 -0
  157. pyegeria/commands/my/README.md +17 -0
  158. pyegeria/commands/my/__init__.py +0 -0
  159. pyegeria/commands/my/list_my_profile.py +163 -0
  160. pyegeria/commands/my/list_my_roles.py +151 -0
  161. pyegeria/commands/my/monitor_my_todos.py +205 -0
  162. pyegeria/commands/my/monitor_open_todos.py +175 -0
  163. pyegeria/commands/my/todo_actions.py +242 -0
  164. pyegeria/commands/ops/README.md +24 -0
  165. pyegeria/commands/ops/__init__.py +22 -0
  166. pyegeria/commands/ops/gov_server_actions.py +177 -0
  167. pyegeria/commands/ops/list_archives.py +161 -0
  168. pyegeria/commands/ops/list_catalog_targets.py +203 -0
  169. pyegeria/commands/ops/load_archive.py +75 -0
  170. pyegeria/commands/ops/monitor_asset_events.py +107 -0
  171. pyegeria/commands/ops/monitor_engine_activity.py +270 -0
  172. pyegeria/commands/ops/monitor_engine_activity_c.py +286 -0
  173. pyegeria/commands/ops/monitor_gov_eng_status.py +288 -0
  174. pyegeria/commands/ops/monitor_integ_daemon_status.py +321 -0
  175. pyegeria/commands/ops/monitor_platform_status.py +188 -0
  176. pyegeria/commands/ops/monitor_server_startup.py +117 -0
  177. pyegeria/commands/ops/monitor_server_status.py +182 -0
  178. pyegeria/commands/ops/orig_monitor_server_list.py +140 -0
  179. pyegeria/commands/ops/orig_monitor_server_status.py +124 -0
  180. pyegeria/commands/ops/refresh_integration_daemon.py +83 -0
  181. pyegeria/commands/ops/restart_integration_daemon.py +82 -0
  182. pyegeria/commands/ops/table_integ_daemon_status.py +237 -0
  183. pyegeria/commands/ops/x_engine_actions.py +76 -0
  184. pyegeria/commands/tech/README.md +24 -0
  185. pyegeria/commands/tech/__init__.py +0 -0
  186. pyegeria/commands/tech/get_element_info.py +144 -0
  187. pyegeria/commands/tech/get_guid_info.py +134 -0
  188. pyegeria/commands/tech/get_tech_details.py +173 -0
  189. pyegeria/commands/tech/get_tech_type_template.py +166 -0
  190. pyegeria/commands/tech/list_anchored_elements.py +205 -0
  191. pyegeria/commands/tech/list_asset_types.py +123 -0
  192. pyegeria/commands/tech/list_elements.py +168 -0
  193. pyegeria/commands/tech/list_elements_for_classification.py +171 -0
  194. pyegeria/commands/tech/list_elements_x.py +191 -0
  195. pyegeria/commands/tech/list_gov_action_processes.py +139 -0
  196. pyegeria/commands/tech/list_registered_services.py +180 -0
  197. pyegeria/commands/tech/list_related_elements.py +207 -0
  198. pyegeria/commands/tech/list_related_specification.py +169 -0
  199. pyegeria/commands/tech/list_relationship_types.py +164 -0
  200. pyegeria/commands/tech/list_relationships.py +179 -0
  201. pyegeria/commands/tech/list_tech_templates.py +360 -0
  202. pyegeria/commands/tech/list_valid_metadata_values.py +178 -0
  203. pyegeria/commands/tech/table_tech_templates.py +238 -0
  204. pyegeria/commands/tech/x_list_related_elements.py +165 -0
  205. pyegeria/core_omag_server_config.py +550 -313
  206. pyegeria/create_tech_guid_lists.py +105 -0
  207. pyegeria/egeria_cat_client.py +78 -0
  208. pyegeria/egeria_client.py +117 -0
  209. pyegeria/egeria_config_client.py +45 -0
  210. pyegeria/egeria_my_client.py +56 -0
  211. pyegeria/egeria_tech_client.py +93 -0
  212. pyegeria/feedback_manager_omvs.py +4573 -0
  213. pyegeria/full_omag_server_config.py +1337 -0
  214. pyegeria/glossary_browser_omvs.py +2507 -0
  215. pyegeria/glossary_manager_omvs.py +3597 -0
  216. pyegeria/mermaid_utilities.py +218 -0
  217. pyegeria/metadata_explorer_omvs.py +2371 -0
  218. pyegeria/my_profile_omvs.py +1021 -0
  219. pyegeria/platform_services.py +259 -218
  220. pyegeria/project_manager_omvs.py +1854 -0
  221. pyegeria/registered_info.py +111 -108
  222. pyegeria/runtime_manager_omvs.py +2299 -0
  223. pyegeria/server_operations.py +178 -71
  224. pyegeria/template_manager_omvs.py +1414 -0
  225. pyegeria/utils.py +75 -85
  226. pyegeria/valid_metadata_omvs.py +1911 -0
  227. pyegeria/x_action_author_omvs.py +200 -0
  228. pyegeria-5.3.0.dev3.dist-info/METADATA +70 -0
  229. pyegeria-5.3.0.dev3.dist-info/RECORD +232 -0
  230. {pyegeria-0.2.4.dist-info → pyegeria-5.3.0.dev3.dist-info}/WHEEL +1 -1
  231. pyegeria-5.3.0.dev3.dist-info/entry_points.txt +81 -0
  232. pyegeria/config.toml +0 -11
  233. pyegeria/curation_omvs.py +0 -458
  234. pyegeria/exceptions.py +0 -382
  235. pyegeria/glossary_omvs.py +0 -639
  236. pyegeria/gov_engine.py +0 -573
  237. pyegeria-0.2.4.dist-info/METADATA +0 -57
  238. pyegeria-0.2.4.dist-info/RECORD +0 -19
  239. {pyegeria-0.2.4.dist-info/licenses → pyegeria-5.3.0.dev3.dist-info}/LICENSE +0 -0
@@ -0,0 +1,1337 @@
1
+ """
2
+ SPDX-License-Identifier: Apache-2.0
3
+ Copyright Contributors to the ODPi Egeria project.
4
+
5
+ OMAG Server configuration functions. These functions add definitions to an OMAG server's configuration document.
6
+ This class encompasses the full set of configuration methods.
7
+ """
8
+
9
+ import json
10
+
11
+ from pyegeria import Client
12
+ from pyegeria import InvalidParameterException
13
+ from pyegeria._globals import enable_ssl_check
14
+ from pyegeria._validators import validate_name, validate_url
15
+ from .core_omag_server_config import CoreServerConfig
16
+
17
+
18
+ class FullServerConfig(CoreServerConfig):
19
+ """
20
+ This class represents a client for configuring the OMAG Server.
21
+
22
+ Parameters
23
+ ----------
24
+ server_name : str
25
+ The name of the server to connect to.
26
+ platform_url : str
27
+ The URL of the platform where the server is running.
28
+ user_id : str
29
+ The user ID for authentication.
30
+ user_pwd : str, optional
31
+ The password for authentication (default: None).
32
+ verify_flag : bool, optional
33
+ Flag to enable/disable SSL certificate verification (default: enable_ssl_check).
34
+
35
+ """
36
+
37
+ def __init__(
38
+ self,
39
+ server_name: str,
40
+ platform_url: str,
41
+ user_id: str,
42
+ user_pwd: str = None,
43
+ ):
44
+ self.full_config_command_root: str
45
+ CoreServerConfig.__init__(self, server_name, platform_url, user_id, user_pwd)
46
+ self.full_config_command_root = (
47
+ self.platform_url + "/open-metadata/admin-services/users/" + user_id
48
+ )
49
+
50
+ def get_access_services_topic_names(
51
+ self, access_service_name: str, server_name: str = None
52
+ ) -> list[str]:
53
+ """Retrieve the topic names for this access service.
54
+ Parameters
55
+ ----------
56
+ access_service_name : str
57
+ The name of the access service.
58
+
59
+ server_name : str, optional
60
+ The name of the server. If not provided, the server name of the instance is used.
61
+
62
+ Returns
63
+ -------
64
+ list[str]
65
+ A list of topic names associated with the specified access service.
66
+
67
+ """
68
+ if server_name is None:
69
+ server_name = self.server_name
70
+ validate_name(access_service_name)
71
+ url = (
72
+ self.full_config_command_root
73
+ + "/servers/"
74
+ + server_name
75
+ + "/access-services/"
76
+ + access_service_name
77
+ + "/topic-names"
78
+ )
79
+ response = self.make_request("GET", url)
80
+
81
+ return response.json() # todo fix
82
+
83
+ def get_all_access_services_topic_names(self, server_name: str = None) -> list:
84
+ """Retrieve the topic names for all access services.
85
+ Parameters
86
+ ----------
87
+ server_name : str, optional
88
+ The name of the server. If not provided, the default server name will be used.
89
+
90
+ Returns
91
+ -------
92
+ list
93
+ The JSON response containing the access services topic names.
94
+
95
+ """
96
+ if server_name is None:
97
+ server_name = self.server_name
98
+
99
+ url = (
100
+ self.full_config_command_root
101
+ + "/servers/"
102
+ + server_name
103
+ + "/access-services/topic-names"
104
+ )
105
+ response = self.make_request("GET", url)
106
+
107
+ return response.json() # todo fix
108
+
109
+ def set_access_services_configuration(
110
+ self, access_services_body: str, server_name: str = None
111
+ ) -> None:
112
+ """Set up the configuration for selected open metadata access services (OMASs).
113
+ This overrides the current configured values.
114
+
115
+ Parameters
116
+ ----------
117
+ access_services_body: str
118
+ The body of the access services configuration. This should be a string representation of the desired
119
+ configuration.
120
+
121
+ server_name: str, optional
122
+ The name of the server. If not provided, the default server will be used.
123
+
124
+ Returns
125
+ -------
126
+ None
127
+
128
+ """
129
+ if server_name is None:
130
+ server_name = self.server_name
131
+
132
+ url = (
133
+ self.full_config_command_root
134
+ + "/servers/"
135
+ + server_name
136
+ + "/access-services/configuration"
137
+ )
138
+ self.make_request("POST", url, access_services_body)
139
+ return
140
+
141
+ def override_access_service_in_topic_name(
142
+ self, access_service_name: str, new_topic_name: str, server_name: str = None
143
+ ) -> None:
144
+ """override the in topic for the access service"""
145
+ if server_name is None:
146
+ server_name = self.server_name
147
+
148
+ url = (
149
+ self.full_config_command_root
150
+ + "/servers/"
151
+ + server_name
152
+ + "/access-services/"
153
+ + access_service_name
154
+ + "/topic-names/in-topic"
155
+ )
156
+ self.make_request("POST", url, new_topic_name)
157
+ return
158
+
159
+ def override_access_service_out_topic_name(
160
+ self, access_service_name: str, new_topic_name: str, server_name: str = None
161
+ ) -> None:
162
+ """override the out topic for the access service"""
163
+ if server_name is None:
164
+ server_name = self.server_name
165
+
166
+ url = (
167
+ self.full_config_command_root
168
+ + "/servers/"
169
+ + server_name
170
+ + "/access-services/"
171
+ + access_service_name
172
+ + "/topic-names/out-topic"
173
+ )
174
+ self.make_request("POST", url, new_topic_name)
175
+ return
176
+
177
+ def set_audit_log_destinations(
178
+ self, audit_dest_body: str, server_name: str = None
179
+ ) -> None:
180
+ """Sets the audit log destinations for a server
181
+
182
+ /open-metadata/admin-services/users/{userId}/servers/{serverName}/audit-log-destinations
183
+
184
+ Parameters
185
+ ----------
186
+ audit_dest_body : str
187
+ A JSON document describing the audit destinations for this server.
188
+
189
+ server_name : str
190
+ Name of the server to update.
191
+
192
+ Returns
193
+ -------
194
+ None
195
+
196
+ Raises
197
+ ------
198
+
199
+ InvalidParameterException
200
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
201
+ PropertyServerException
202
+ Raised by the server when an issue arises in processing a valid request
203
+ NotAuthorizedException
204
+ The principle specified by the user_id does not have authorization for the requested action
205
+
206
+ """
207
+ if server_name is None:
208
+ server_name = self.server_name
209
+
210
+ url = (
211
+ self.full_config_command_root
212
+ + "/servers/"
213
+ + server_name
214
+ + "/audit-log-destinations"
215
+ )
216
+ self.make_request("POST", url, audit_dest_body)
217
+ return
218
+
219
+ def update_audit_log_destination(
220
+ self, connection_name: str, audit_dest_body: str, server_name: str = None
221
+ ) -> None:
222
+ """Update an audit log destination that is identified with the supplied destination name
223
+ with the supplied connection object.
224
+ Parameters
225
+ ----------
226
+ connection_name : str
227
+ The name of the connection for the audit log destination.
228
+ audit_dest_body : str
229
+ The body of the audit log destination.
230
+ server_name : str, optional
231
+ The name of the server. If not provided, the server name associated with the instance will be used.
232
+
233
+ Returns
234
+ -------
235
+ None
236
+
237
+ Raises
238
+ ------
239
+ InvalidParameterException
240
+ If the response status code is not 200 and the related HTTP code is not 200.
241
+
242
+ """
243
+ if server_name is None:
244
+ server_name = self.server_name
245
+
246
+ url = (
247
+ self.full_config_command_root
248
+ + "/servers/"
249
+ + server_name
250
+ + "/audit-log-destinations/connection/"
251
+ + connection_name
252
+ )
253
+ self.make_request("POST", url, audit_dest_body)
254
+ return
255
+
256
+ def add_audit_log_destination(
257
+ self, connection_body: str, server_name: str = None
258
+ ) -> None:
259
+ """Adds an audit log destination to a server.
260
+
261
+ /open-metadata/admin-services/users/{userId}/servers/{serverName}/audit-log-destinations/connection
262
+
263
+ Parameters
264
+ ----------
265
+ connection_body : str
266
+ JSON string containing the connection properties for the audit log destination.
267
+ server_name : str
268
+ Name of the server to update.
269
+
270
+ Returns
271
+ -------
272
+ None
273
+
274
+ Raises
275
+ ------
276
+ InvalidParameterException:
277
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
278
+ PropertyServerException:
279
+ Raised by the server when an issue arises in processing a valid request
280
+ NotAuthorizedException:
281
+ The principle specified by the user_id does not have authorization for the requested action
282
+ ConfigurationErrorException:
283
+ Raised when configuration parameters passed on earlier calls turn out to be
284
+ invalid or make the new call invalid.
285
+
286
+ """
287
+ if server_name is None:
288
+ server_name = self.server_name
289
+
290
+ url = (
291
+ self.full_config_command_root
292
+ + "/servers/"
293
+ + server_name
294
+ + "/audit-log-destinations/connection"
295
+ )
296
+ self.make_request("POST", url, connection_body)
297
+ return
298
+
299
+ def set_cohort_config(
300
+ self, cohort_name: str, cohort_config_body: str, server_name: str = None
301
+ ) -> None:
302
+ """Set up the configuration properties for a cohort. This may reconfigure an existing cohort or
303
+ create a cohort. Use setCohortMode to delete a cohort.
304
+ Parameters
305
+ ----------
306
+ cohort_name : str
307
+ The name of the cohort for which the configuration is being set.
308
+ cohort_config_body : str
309
+ The body of the cohort configuration.
310
+ server_name : str, optional
311
+ The name of the server. If not provided, the method will use the server name that is already set.
312
+
313
+ Returns
314
+ -------
315
+ None
316
+
317
+ Raises
318
+ ------
319
+ InvalidParameterException
320
+ If the cohort_config_body is None.
321
+
322
+ """
323
+ if server_name is None:
324
+ server_name = self.server_name
325
+ validate_name(cohort_name)
326
+ if cohort_config_body is None:
327
+ raise InvalidParameterException(cohort_config_body)
328
+
329
+ url = (
330
+ self.full_config_command_root
331
+ + "/servers/"
332
+ + server_name
333
+ + "/cohorts/"
334
+ + cohort_name
335
+ + "/configuration"
336
+ )
337
+ self.make_request("POST", url, cohort_config_body)
338
+ return
339
+
340
+ def clear_cohort_configuration(
341
+ self, cohort_name: str, server_name: str = None
342
+ ) -> None:
343
+ """Retrieves the stored configurations for a server
344
+ Parameters
345
+ ----------
346
+ cohort_name : str
347
+
348
+ server_name : str, optional
349
+
350
+ Returns
351
+ -------
352
+
353
+ Raises
354
+ ------
355
+ InvalidParameterException
356
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
357
+ PropertyServerException
358
+ Raised by the server when an issue arises in processing a valid request
359
+ NotAuthorizedException
360
+ The principle specified by the user_id does not have authorization for the requested action
361
+
362
+ """
363
+ if server_name is None:
364
+ server_name = self.server_name
365
+ url = f"{self.full_config_command_root}/servers/{server_name}/cohorts/{cohort_name}"
366
+ validate_name(cohort_name)
367
+
368
+ self.make_request("DELETE", url)
369
+
370
+ def get_dedicated_cohort_topic_names(
371
+ self, cohort_name: str, server_name: str = None
372
+ ) -> list:
373
+ """Retrieve the current topic name for the cohort. This call can only be made once the cohort is set up with
374
+ add_cohort_registration().
375
+
376
+ Parameters
377
+ ----------
378
+ cohort_name : str
379
+ The name of the cohort for which to retrieve the dedicated topic names.
380
+
381
+ server_name : str, optional
382
+ The name of the server on which the cohort resides. If not provided, the default server name will be used.
383
+
384
+ Returns
385
+ -------
386
+ list
387
+ A list of topic names that are dedicated to the specified cohort.
388
+
389
+ """
390
+ if server_name is None:
391
+ server_name = self.server_name
392
+
393
+ validate_name(cohort_name)
394
+
395
+ url = (
396
+ self.full_config_command_root
397
+ + "/servers/"
398
+ + server_name
399
+ + "/cohorts/"
400
+ + cohort_name
401
+ + "/dedicated-topic-names"
402
+ )
403
+ response = self.make_request("POST", url)
404
+ return response.json().get("topicNames")
405
+
406
+ def get_cohort_topic_name(self, cohort_name: str, server_name: str = None) -> str:
407
+ """Retrieve the current topic name for the cohort. This call can only be made once the
408
+ cohort is set up with add_cohort_registration().
409
+ Parameters
410
+ ----------
411
+ cohort_name : str
412
+ The name of the cohort for which to retrieve the topic name.
413
+ server_name : str, optional
414
+ The name of the server on which the cohort is located. If not provided, the default server name will be used.
415
+
416
+ Returns
417
+ -------
418
+ str
419
+ The topic name associated with the specified cohort.
420
+
421
+ Raises
422
+ ------
423
+ InvalidParameterException
424
+ If the request to retrieve the topic name fails or returns an invalid parameter code.
425
+
426
+ """
427
+ if server_name is None:
428
+ server_name = self.server_name
429
+ validate_name(cohort_name)
430
+
431
+ url = f"{self.full_config_command_root}/servers/{server_name}/cohorts/{cohort_name}/topic-name"
432
+ response = self.make_request("GET", url)
433
+ return response.json().get("topicName")
434
+
435
+ def override_cohort_topic_name(
436
+ self, cohort_name: str, topic_override: str, server_name: str = None
437
+ ) -> None:
438
+ """Override the current name for the single topic for the cohort. This call can only be made once the
439
+ cohort is set up with add_cohort_registration().
440
+ Parameters
441
+ ----------
442
+ cohort_name : str
443
+ The name of the cohort for which the topic name is to be overridden.
444
+
445
+ topic_override : str
446
+ The new topic name to override the original topic name.
447
+
448
+ server_name : str, optional
449
+ The name of the server. If not provided, the default server name will be used.
450
+
451
+ """
452
+ if server_name is None:
453
+ server_name = self.server_name
454
+ validate_name(cohort_name)
455
+ validate_name(topic_override)
456
+
457
+ url = (
458
+ self.full_config_command_root
459
+ + "/servers/"
460
+ + server_name
461
+ + "/cohorts/"
462
+ + cohort_name
463
+ + "/topic-name-override"
464
+ )
465
+ self.make_request("POST", url, topic_override)
466
+ return
467
+
468
+ def override_instances_cohort_topic_name(
469
+ self, cohort_name: str, topic_override: str, server_name: str = None
470
+ ) -> None:
471
+ """Override the current name for the "instances" topic for the cohort. This call can only be made once
472
+ the cohort is set up with add_cohort_registration().
473
+ Parameters
474
+ ----------
475
+ cohort_name : str
476
+ The name of the cohort to override the topic name for.
477
+
478
+ topic_override : str
479
+ The new topic name to override for the cohort.
480
+
481
+ server_name : str, optional
482
+ The name of the server where the cohort is located. If not specified,
483
+ the default server name will be used.
484
+
485
+ """
486
+ if server_name is None:
487
+ server_name = self.server_name
488
+ validate_name(cohort_name)
489
+ validate_name(topic_override)
490
+
491
+ url = (
492
+ self.full_config_command_root
493
+ + "/servers/"
494
+ + server_name
495
+ + "/cohorts/"
496
+ + cohort_name
497
+ + "/topic-name-override/instances"
498
+ )
499
+ self.make_request("POST", url, topic_override)
500
+ return
501
+
502
+ def override_registration_cohort_topic_name(
503
+ self, cohort_name: str, topic_override: str, server_name: str = None
504
+ ) -> None:
505
+ """Override the current name for the registration topic for the cohort. This call can only be made once
506
+ the cohort is set up with add_cohort_registration().
507
+ Parameters
508
+ ----------
509
+ cohort_name : str
510
+ Name of the cohort to override the topic name for.
511
+ topic_override : str
512
+ The overriding topic name for the cohort.
513
+ server_name : str, optional
514
+ Name of the server. If not provided, the default server name will be used.
515
+
516
+ Returns
517
+ -------
518
+ None
519
+ This method does not return any value.
520
+
521
+ """
522
+ if server_name is None:
523
+ server_name = self.server_name
524
+ validate_name(cohort_name)
525
+ validate_name(topic_override)
526
+
527
+ url = (
528
+ self.full_config_command_root
529
+ + "/servers/"
530
+ + server_name
531
+ + "/cohorts/"
532
+ + cohort_name
533
+ + "/topic-name-override/registration"
534
+ )
535
+ self.make_request("POST", url, topic_override)
536
+ return
537
+
538
+ def override_types_cohort_topic_name(
539
+ self, cohort_name: str, topic_override: str, server_name: str = None
540
+ ) -> None:
541
+ """Override the current name for the "types" topic for the cohort. This call can only be made once
542
+ the cohort is set up with add_cohort_registration().
543
+ Parameters
544
+ ----------
545
+ cohort_name : str
546
+ The name of the cohort.
547
+ topic_override : str
548
+ The topic override to be set for the cohort.
549
+ server_name : str, optional
550
+ The name of the server. If not provided, it will use the default server name from the class.
551
+
552
+ Raises
553
+ ------
554
+ InvalidParameterException
555
+ If the response from the server has a relatedHTTPCode other than 200.
556
+
557
+ """
558
+ if server_name is None:
559
+ server_name = self.server_name
560
+ validate_name(cohort_name)
561
+ validate_name(topic_override)
562
+
563
+ url = (
564
+ self.full_config_command_root
565
+ + "/servers/"
566
+ + server_name
567
+ + "/cohorts/"
568
+ + cohort_name
569
+ + "/topic-name-override/types"
570
+ )
571
+ self.make_request("POST", url, topic_override)
572
+ return
573
+
574
+ def add_full_cohort_registration(
575
+ self, cohort_name: str, topic_structure: str, server_name: str = None
576
+ ) -> None:
577
+ """add a full cohort registration
578
+
579
+ Parameters
580
+ ----------
581
+ cohort_name : str
582
+ Name of the cohort to be registered.
583
+ topic_structure : str
584
+ Topic structure for the cohort. This is a string from an enumerated list.
585
+ 'Dedicated Cohort Topics', description='The cohort members use three topics to exchange information.
586
+ One for registration requests, one for type validation and one for exchange of instances stored by the
587
+ cohort members.
588
+ This is the preferred and optimal approach
589
+ 'Single Topic', description='All asynchronous communication between cohort members is via a single topic.
590
+ This is the original design and may still be used when communicating with back level cohort members.
591
+ 'Both Single and Dedicated Topics', description='Both the single cohort topic and the dedicated topics are
592
+ set up and used. This is necessary when the cohort has members with different capabilities.
593
+ This configuration may cause some events to be processed twice.'
594
+ server_name : str, optional
595
+ Name of the server to which the cohort should be added. Defaults to None.
596
+
597
+ Returns
598
+ -------
599
+ None
600
+
601
+ Raises
602
+ ------
603
+ InvalidParameterException
604
+ If the response code is not 200 after making the POST request.
605
+
606
+ """
607
+ if server_name is None:
608
+ server_name = self.server_name
609
+ validate_name(cohort_name)
610
+
611
+ url = f"{self.full_config_command_root}/servers/{server_name}/cohorts/{cohort_name}/topic-structure/{topic_structure}"
612
+ self.make_request("POST", url)
613
+
614
+ def set_server_configuration(
615
+ self, config_body: str, server_name: str = None
616
+ ) -> None | str:
617
+ """Sets the configurations for a server
618
+ Parameters
619
+ ----------
620
+
621
+ Returns
622
+ -------
623
+ str
624
+ The stored configurations for the given server.
625
+
626
+ Raises
627
+ ------
628
+ InvalidParameterException
629
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
630
+ PropertyServerException
631
+ Raised by the server when an issue arises in processing a valid request
632
+ NotAuthorizedException
633
+ The principle specified by the user_id does not have authorization for the requested action
634
+ ConfigurationErrorException
635
+ Raised when configuration parameters passed on earlier calls turn out to be
636
+ invalid or make the new call invalid.
637
+
638
+ """
639
+ if server_name is None:
640
+ server_name = self.server_name
641
+ url = (
642
+ self.full_config_command_root + "/servers/" + server_name + "/configuration"
643
+ )
644
+ response = self.make_request("POST", url, config_body)
645
+ if response.status_code != 200:
646
+ return str(response.status_code) # should never get here?
647
+
648
+ related_code = response.json().get("relatedHTTPCode")
649
+ if related_code == 200:
650
+ return
651
+ else:
652
+ raise InvalidParameterException(response.content)
653
+
654
+ def clear_stored_configuration(self, server_name: str = None) -> None | str:
655
+ """Retrieves the stored configurations for a server
656
+ Parameters
657
+ ----------
658
+
659
+ Returns
660
+ -------
661
+ str
662
+ The stored configurations for the given server.
663
+
664
+ Raises
665
+ ------
666
+ InvalidParameterException
667
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
668
+ PropertyServerException
669
+ Raised by the server when an issue arises in processing a valid request
670
+ NotAuthorizedException
671
+ The principle specified by the user_id does not have authorization for the requested action
672
+ ConfigurationErrorException
673
+ Raised when configuration parameters passed on earlier calls turn out to be
674
+ invalid or make the new call invalid.
675
+
676
+ """
677
+ if server_name is None:
678
+ server_name = self.server_name
679
+ url = (
680
+ self.full_config_command_root + "/servers/" + server_name + "/configuration"
681
+ )
682
+ response = self.make_request("DELETE", url)
683
+ if response.status_code != 200:
684
+ return str(response.status_code) # should never get here?
685
+
686
+ related_code = response.json().get("relatedHTTPCode")
687
+ if related_code == 200:
688
+ return
689
+ else:
690
+ raise InvalidParameterException(response.content)
691
+
692
+ def deploy_stored_configurations(
693
+ self, target_url_root: str, server_name: str = None
694
+ ) -> None:
695
+ """Push the configuration for the server to another OMAG Server Platform.
696
+ Parameters
697
+ ----------
698
+ target_url_root : str
699
+ The target URL root where the configurations will be deployed.
700
+ server_name : str, optional
701
+ The name of the server to which the configurations will be deployed.
702
+ If not provided, the default server name will be used.
703
+
704
+ Raises
705
+ ------
706
+ InvalidParameterException
707
+ If the response status code is not 200 and the related HTTP code is also not 200.
708
+ PropertyServerException:
709
+ Raised by the server when an issue arises in processing a valid request
710
+ NotAuthorizedException:
711
+ The principle specified by the user_id does not have authorization for the requested action
712
+
713
+ """
714
+ if server_name is None:
715
+ server_name = self.server_name
716
+
717
+ url = f"{self.full_config_command_root}/servers/{server_name}/configuration/deploy"
718
+
719
+ self.make_request("POST", url, target_url_root)
720
+
721
+ def get_event_bus(self, server_name: str = None) -> dict:
722
+ """Returns the event bus configuration for the specified server
723
+
724
+ Parameters
725
+ ----------
726
+ server_name: str, optional
727
+ The name of the server to retrieve the event bus configuration from. If not provided, the default
728
+ server name specified in the class instance will be used.
729
+
730
+ Returns
731
+ -------
732
+ The event bus configuration as a JSON dictionary
733
+
734
+ Raises
735
+ ------
736
+ InvalidParameterException
737
+ If the response status code is not 200 and the related HTTP code is also not 200.
738
+ PropertyServerException:
739
+ Raised by the server when an issue arises in processing a valid request
740
+ NotAuthorizedException:
741
+ The principle specified by the user_id does not have authorization for the requested action
742
+
743
+ """
744
+ if server_name is None:
745
+ server_name = self.server_name
746
+ url = f"{self.full_config_command_root}/servers/{server_name}/event-bus"
747
+
748
+ response = self.make_request("GET", url)
749
+ return response.json().get("config")
750
+
751
+ def set_event_bus_detailed(
752
+ self, connector_provider: str, topic_url_root: str, server_name: str = None
753
+ ) -> None:
754
+ """
755
+ Parameters
756
+ ----------
757
+
758
+ connector_provider : str
759
+ Name of the connector provider
760
+
761
+ topic_url_root : str
762
+ URL for the topic
763
+
764
+ server_name : str, optional
765
+ The name of the server to retrieve the event bus configuration from. If not provided, the default server
766
+ name specified in the class instance will be used.
767
+
768
+ Returns
769
+ -------
770
+ None
771
+
772
+ Raises
773
+ ------
774
+ InvalidParameterException
775
+ If the response status code is not 200 and the related HTTP code is also not 200.
776
+
777
+ Description
778
+ -----------
779
+ Set up the default event bus for embedding in event-driven connector.
780
+ The resulting connector will be used for example, in the OMRS Topic Connector for each cohort,
781
+ the in and out topics for each Access Service and possibly the local repository's event mapper.
782
+ When the event bus is configured, it is used only on future configuration.
783
+ It does not affect existing configuration.
784
+
785
+ """
786
+
787
+ if server_name is None:
788
+ server_name = self.server_name
789
+
790
+ url = (
791
+ f"{self.full_config_command_root}/servers/{server_name}/event-bus?connectorProvider="
792
+ f"{connector_provider}&topicURLRoot={topic_url_root}"
793
+ )
794
+ self.make_request("POST", url)
795
+
796
+ def delete_event_bus(self, server_name: str = None) -> None:
797
+ """Delete the event bus configuration for the given server.
798
+
799
+ Parameters
800
+ ----------
801
+
802
+ server_name : str, optional
803
+ The name of the server to retrieve the event bus configuration from. If not provided, the default server
804
+ name specified in the class instance will be used.
805
+
806
+ Returns
807
+ -------
808
+
809
+ Raises
810
+ ------
811
+ InvalidParameterException
812
+ If the response status code is not 200 and the related HTTP code is also not 200.
813
+
814
+ Description
815
+ -----------
816
+ Delete the current configuration for the event bus. This does not impact that existing configuration for the
817
+ server, only future configuration requests.
818
+ """
819
+
820
+ if server_name is None:
821
+ server_name = self.server_name
822
+
823
+ url = f"{self.full_config_command_root}/servers/{server_name}/event-bus"
824
+ self.make_request("DELETE", url)
825
+
826
+ def set_server_url_root(self, url_root: str, server_name: str = None) -> None:
827
+ if server_name is None:
828
+ server_name = self.server_name
829
+ url = f"{self.full_config_command_root}/servers/{server_name}/server-url-root-for-caller"
830
+ body = {"urlRoot": url_root}
831
+ response = self.make_request("POST", url, payload=body)
832
+ related_code = response.json().get("relatedHTTPCode")
833
+ if related_code != 200:
834
+ raise InvalidParameterException(response.content)
835
+ else:
836
+ return
837
+
838
+ def set_max_page_size(self, max_page_size: int, server_name: str = None) -> None:
839
+ """
840
+ Set the maximum page size for a server.
841
+
842
+ Parameters
843
+ ----------
844
+ max_page_size : int
845
+ The maximum page size to set.
846
+ server_name : str, optional
847
+ The name of the server for which to set the maximum page size. If not specified, the default server name
848
+ will be used.
849
+
850
+ Returns
851
+ -------
852
+ None
853
+ This method does not return any value.
854
+
855
+ Raises
856
+ ------
857
+ InvalidParameterException
858
+ If the response code is not 200.
859
+ PropertyServerException:
860
+ Raised by the server when an issue arises in processing a valid request
861
+ NotAuthorizedException:
862
+ The principle specified by the user_id does not have authorization for the requested action
863
+
864
+
865
+ """
866
+ if server_name is None:
867
+ server_name = self.server_name
868
+ url = f"{self.full_config_command_root}/servers/{server_name}/max-page-size?limit={max_page_size}"
869
+ self.make_request("POST", url)
870
+
871
+ def set_server_user_id(self, server_user_id: str, server_name: str = None) -> None:
872
+ if server_name is None:
873
+ server_name = self.server_name
874
+ url = f"{self.full_config_command_root}/servers/{server_name}/server-user-id?id={server_user_id}"
875
+ response = self.make_request("POST", url)
876
+ related_code = response.json().get("relatedHTTPCode")
877
+ if related_code != 200:
878
+ raise InvalidParameterException(response.content)
879
+ else:
880
+ return
881
+
882
+ def set_server_user_password(
883
+ self, server_user_pwd: str, server_name: str = None
884
+ ) -> None:
885
+ if server_name is None:
886
+ server_name = self.server_name
887
+ url = f"{self.full_config_command_root}/servers/{server_name}/server-user-password?password={server_user_pwd}"
888
+ response = self.make_request("POST", url)
889
+ related_code = response.json().get("relatedHTTPCode")
890
+ if related_code != 200:
891
+ raise InvalidParameterException(response.content)
892
+ else:
893
+ return
894
+
895
+ def set_organization_name(self, org_name: str, server_name: str = None) -> None:
896
+ if server_name is None:
897
+ server_name = self.server_name
898
+ url = f"{self.full_config_command_root}/servers/{server_name}/organization-name?name={org_name}"
899
+ response = self.make_request("POST", url)
900
+ related_code = response.json().get("relatedHTTPCode")
901
+ if related_code != 200:
902
+ raise InvalidParameterException(response.content)
903
+ else:
904
+ return
905
+
906
+ def set_local_repository_config(
907
+ self, repository_body: str, server_name: str = None
908
+ ) -> None:
909
+ if server_name is None:
910
+ server_name = self.server_name
911
+ url = (
912
+ self.full_config_command_root
913
+ + "/servers/"
914
+ + server_name
915
+ + "/local-repository/configuration"
916
+ )
917
+ response = self.make_request("POST", url, payload=repository_body)
918
+ related_code = response.json().get("relatedHTTPCode")
919
+ if related_code != 200:
920
+ raise InvalidParameterException(response.content)
921
+ else:
922
+ return
923
+
924
+ def set_plug_in_repository_connection(
925
+ self, repository_connection_body: str, server_name: str = None
926
+ ) -> None:
927
+ if server_name is None:
928
+ server_name = self.server_name
929
+ url = f"{self.full_config_command_root}/servers/{server_name}/local-repository/mode/plugin-repository/connection"
930
+ self.make_request("POST", url, payload=repository_connection_body)
931
+
932
+ def set_plug_in_repository_connection_provider(
933
+ self, repository_connection_provider: str, server_name: str = None
934
+ ) -> None:
935
+ """Set the local repository connection with a user specified connection provider
936
+
937
+ Parameters
938
+ ----------
939
+ repository_connection_provider : str
940
+ The name of the connection provider for the plugin repository.
941
+
942
+ server_name : str, optional
943
+ The name of the server. If not provided, the default server name will be used.
944
+
945
+ Returns
946
+ -------
947
+ None
948
+
949
+ Raises
950
+ ------
951
+ InvalidParameterException
952
+ If the response code is not 200.
953
+ PropertyServerException:
954
+ Raised by the server when an issue arises in processing a valid request
955
+ NotAuthorizedException:
956
+ The principle specified by the user_id does not have authorization for the requested action
957
+
958
+ """
959
+ if server_name is None:
960
+ server_name = self.server_name
961
+ url = (
962
+ f"{self.full_config_command_root}/servers/{server_name}/local-repository/mode/plugin-repository/"
963
+ f"details?connectionProvider={repository_connection_provider}"
964
+ )
965
+ self.make_request("POST", url)
966
+
967
+ def set_open_metadata_archives(
968
+ self, archives_list_body: str, server_name: str = None
969
+ ) -> None:
970
+ if server_name is None:
971
+ server_name = self.server_name
972
+ url = f"{self.full_config_command_root}/servers/{server_name}/open-metadata-archives"
973
+ response = self.make_request("POST", url, payload=archives_list_body)
974
+ related_code = response.json().get("relatedHTTPCode")
975
+ if related_code != 200:
976
+ raise InvalidParameterException(response.content)
977
+ else:
978
+ return
979
+
980
+ def set_descriptive_server_type(
981
+ self, type_name: str, server_name: str = None
982
+ ) -> None:
983
+ """Set descriptiveServerType for this OMAG server
984
+
985
+ Parameters
986
+ ----------
987
+ type_name : str
988
+ The name of the descriptive server type to set.
989
+
990
+ server_name : str, optional
991
+ The name of the server for which the descriptive server type is being set. If not provided, the
992
+ default server name associated with the object is used.
993
+
994
+ Returns
995
+ -------
996
+ None
997
+
998
+ Raises
999
+ ------
1000
+ InvalidParameterException
1001
+ If the response code is not 200.
1002
+ PropertyServerException:
1003
+ Raised by the server when an issue arises in processing a valid request
1004
+ NotAuthorizedException:
1005
+ The principle specified by the user_id does not have authorization for the requested action
1006
+
1007
+ """
1008
+ if server_name is None:
1009
+ server_name = self.server_name
1010
+ url = f"{self.full_config_command_root}/servers/{server_name}/server-type?typeName={type_name}"
1011
+ self.make_request("POST", url)
1012
+
1013
+ def set_server_description(self, server_desc: str, server_name: str = None) -> None:
1014
+ if server_name is None:
1015
+ server_name = self.server_name
1016
+ url = (
1017
+ f"{self.full_config_command_root}/servers/{server_name}/server-description"
1018
+ )
1019
+ response = self.make_request("POST", url, server_desc)
1020
+ related_code = response.json().get("relatedHTTPCode")
1021
+ if related_code != 200:
1022
+ raise InvalidParameterException(response.content)
1023
+ else:
1024
+ return
1025
+
1026
+ def set_server_type(self, server_type: str, server_name: str = None) -> None:
1027
+ """Sets the server type for the given server
1028
+
1029
+ Parameters
1030
+ ----------
1031
+ server_type : str
1032
+ The type of server to set
1033
+
1034
+ server_name : str, optional
1035
+ The name of the server. If None, the default server name will be used.
1036
+
1037
+ Returns
1038
+ -------
1039
+ None
1040
+
1041
+ Raises
1042
+ ------
1043
+ InvalidParameterException
1044
+ If the response code is not 200.
1045
+ PropertyServerException:
1046
+ Raised by the server when an issue arises in processing a valid request
1047
+ NotAuthorizedException:
1048
+ The principle specified by the user_id does not have authorization for the requested action
1049
+
1050
+ Notes
1051
+ -----
1052
+
1053
+ See https://egeria-project.org/concepts/omag-server/#server-name for details.
1054
+
1055
+ """
1056
+ if server_name is None:
1057
+ server_name = self.server_name
1058
+
1059
+ url = (
1060
+ f"{self.full_config_command_root}/servers/{server_name}/"
1061
+ f"server-type?typename={server_type}"
1062
+ )
1063
+ self.make_request("POST", url)
1064
+
1065
+ def clear_server_type(self, server_name: str = None) -> None:
1066
+ """Clears the server type for the given server
1067
+
1068
+ Parameters
1069
+ ----------
1070
+ server_name : str, optional
1071
+ The name of the server. If None, the default server name will be used.
1072
+
1073
+ Returns
1074
+ -------
1075
+ None
1076
+
1077
+ Raises
1078
+ ------
1079
+ InvalidParameterException
1080
+ If the response code is not 200.
1081
+ PropertyServerException:
1082
+ Raised by the server when an issue arises in processing a valid request
1083
+ NotAuthorizedException:
1084
+ The principle specified by the user_id does not have authorization for the requested action
1085
+
1086
+ """
1087
+ if server_name is None:
1088
+ server_name = self.server_name
1089
+ url = f"{self.full_config_command_root}/servers/{server_name}/server-type?typeName="
1090
+ self.make_request("POST", url)
1091
+
1092
+ def config_view_service(
1093
+ self, service_url_marker: str, view_service_body: dict, server_name: str = None
1094
+ ) -> None:
1095
+ """Configure a the view service specified by the service_url_marker using the view_service_body.
1096
+
1097
+ Parameters
1098
+ ----------
1099
+ service_url_marker : str
1100
+ The service URL marker. A list can be retrieved through the `list_registered_view_svcs` of the
1101
+ `registered_info` module.
1102
+
1103
+ view_service_body : dict
1104
+ The body of the view service request.
1105
+
1106
+ server_name : str, optional
1107
+ The name of the server. If not provided, the value of `self.view_server` will be used.
1108
+
1109
+ Returns
1110
+ -------
1111
+ None
1112
+
1113
+ Raises
1114
+ ------
1115
+ InvalidParameterException
1116
+ If the response code is not 200.
1117
+ PropertyServerException:
1118
+ Raised by the server when an issue arises in processing a valid request
1119
+ NotAuthorizedException:
1120
+ The principle specified by the user_id does not have authorization for the requested action
1121
+
1122
+ Notes
1123
+ -----
1124
+
1125
+ Details on view services configuration can be found at:
1126
+ https://egeria-project.org/guides/admin/servers/configuring-the-view-services/?h=view#integration-view-services
1127
+
1128
+ """
1129
+
1130
+ if server_name is None:
1131
+ server_name = self.server_name
1132
+ validate_name(service_url_marker)
1133
+
1134
+ url = f"{self.full_config_command_root}/servers/{server_name}/view-services/{service_url_marker}"
1135
+ self.make_request("POST", url, view_service_body)
1136
+
1137
+ # todo - this may not be used anymore - old
1138
+ def set_view_svcs_config(
1139
+ self, view_svcs_config_body: dict, server_name: str = None
1140
+ ) -> None:
1141
+ """Set up the configuration for all the open metadata integration groups. This overrides the current values.
1142
+
1143
+ Parameters
1144
+ ----------
1145
+ view_svcs_config_body : dict
1146
+ The configuration body for the view services.
1147
+
1148
+ server_name : str, optional
1149
+ The name of the server. If not provided, the default server name will be used.
1150
+
1151
+ Returns
1152
+ -------
1153
+ None
1154
+ This method does not return any value.
1155
+
1156
+ Raises
1157
+ ------
1158
+ InvalidParameterException
1159
+ If the response code is not 200.
1160
+ PropertyServerException:
1161
+ Raised by the server when an issue arises in processing a valid request
1162
+ NotAuthorizedException:
1163
+ The principle specified by the user_id does not have authorization for the requested action
1164
+
1165
+ Notes
1166
+ -----
1167
+
1168
+ Details on view services configuration can be found at:
1169
+ https://egeria-project.org/guides/admin/servers/configuring-the-view-services/?h=view#integration-view-services
1170
+
1171
+ """
1172
+ if server_name is None:
1173
+ server_name = self.server_name
1174
+ url = f"{self.full_config_command_root}/servers/{server_name}/view-services/configuration"
1175
+ self.make_request("POST", url, view_svcs_config_body)
1176
+
1177
+ def set_integration_groups_config(
1178
+ self, integration_groups_config_body: dict, server_name: str = None
1179
+ ) -> None:
1180
+ """Set up the configuration for all the open metadata integration groups. This overrides the current values.
1181
+ Parameters
1182
+ ----------
1183
+ integration_groups_config_body : dict
1184
+ The configuration body for the integration groups.
1185
+
1186
+ server_name : str, optional
1187
+ The name of the server. If not provided, the default server name will be used.
1188
+
1189
+ Returns
1190
+ -------
1191
+ None
1192
+ This method does not return any value.
1193
+
1194
+ Raises
1195
+ ------
1196
+ InvalidParameterException
1197
+ If the response code is not 200.
1198
+ PropertyServerException:
1199
+ Raised by the server when an issue arises in processing a valid request
1200
+ NotAuthorizedException:
1201
+ The principle specified by the user_id does not have authorization for the requested action
1202
+
1203
+ Notes
1204
+ -----
1205
+
1206
+ Details on integration group configuration can be found at:
1207
+ https://egeria-project.org/concepts/integration-group/
1208
+
1209
+ body format is:
1210
+ [
1211
+ {
1212
+ "integrationGroupQualifiedName": "string",
1213
+ "omagserverPlatformRootURL": "string",
1214
+ "omagserverName": "string"
1215
+ }
1216
+ ]
1217
+ """
1218
+ if server_name is None:
1219
+ server_name = self.server_name
1220
+ url = f"{self.full_config_command_root}/servers/{server_name}/integration-groups/configuration/all"
1221
+ self.make_request("POST", url, integration_groups_config_body)
1222
+
1223
+ def set_engine_host_services(self):
1224
+ # handles an array of engine list - pass in JSON
1225
+
1226
+ pass
1227
+
1228
+ def set_integration_daemon_services_configuration(self):
1229
+ # pass a json list
1230
+ pass
1231
+
1232
+ def config_integration_service(
1233
+ self,
1234
+ remote_omag_server: str,
1235
+ remote_omag_platform_url: str,
1236
+ service_url_marker: str,
1237
+ integration_service_options: dict,
1238
+ connector_configs: list,
1239
+ server_name: str = None,
1240
+ ) -> None:
1241
+ if server_name is None:
1242
+ server_name = self.server_name
1243
+
1244
+ if not isinstance(connector_configs, list):
1245
+ exc_msg = " ==> connector_configs must be a list of dictionaries"
1246
+ raise Exception(exc_msg)
1247
+
1248
+ validate_name(remote_omag_server)
1249
+ validate_url(remote_omag_platform_url)
1250
+
1251
+ validate_name(service_url_marker)
1252
+
1253
+ request_body = {
1254
+ "class": "IntegrationServiceRequestBody",
1255
+ "omagserverPlatformRootURL": remote_omag_platform_url,
1256
+ "omagserverName": remote_omag_server,
1257
+ "integrationServiceOptions": integration_service_options,
1258
+ "integrationConnectorConfigs": connector_configs,
1259
+ }
1260
+
1261
+ url = f"{self.full_config_command_root}/servers/{server_name}/integration-services/{service_url_marker}"
1262
+ # print(f"URL is : {url}")
1263
+ # print(f"body is : \n{json.dumps(request_body, indent=4)}")
1264
+
1265
+ self.make_request("POST", url, request_body)
1266
+ return
1267
+
1268
+ def config_all_integration_services(
1269
+ self,
1270
+ remote_omag_server: str,
1271
+ remote_omag_platform_url: str,
1272
+ integration_service_options: dict,
1273
+ connector_configs: dict,
1274
+ server_name: str = None,
1275
+ ) -> None:
1276
+ if server_name is None:
1277
+ server_name = self.server_name
1278
+ validate_name(remote_omag_server)
1279
+ validate_url(remote_omag_platform_url)
1280
+
1281
+ request_body = {
1282
+ "IntegrationConnectorConfigs": [
1283
+ {
1284
+ "class": "IntegrationServiceRequestBody",
1285
+ "omagserverPlatformRootURL": remote_omag_platform_url,
1286
+ "omagserverName": remote_omag_server,
1287
+ "integrationServiceOptions": integration_service_options,
1288
+ "integrationConnectorConfigs": connector_configs,
1289
+ }
1290
+ ]
1291
+ }
1292
+
1293
+ url = f"{self.full_config_command_root}/servers/{server_name}/integration-services"
1294
+ print(f"URL is : {url}")
1295
+ print(f"body is : \n{json.dumps(request_body, indent=4)}")
1296
+
1297
+ self.make_request("POST", url, request_body)
1298
+
1299
+ def clear_integration_service(
1300
+ self, service_url_marker: str, server_name: str = None
1301
+ ) -> None:
1302
+ if server_name is None:
1303
+ server_name = self.server_name
1304
+ validate_name(service_url_marker)
1305
+
1306
+ url = f"{self.full_config_command_root}/servers/{server_name}/integration-services/{service_url_marker}"
1307
+ self.make_request("DELETE", url)
1308
+
1309
+ def get_integration_service_config(
1310
+ self, service_url_marker: str, server_name: str = None
1311
+ ) -> dict | str:
1312
+ if server_name is None:
1313
+ server_name = self.server_name
1314
+ validate_name(service_url_marker)
1315
+ url = f"{self.full_config_command_root}/servers/{server_name}/integration-services/{service_url_marker}/configuration"
1316
+ response = self.make_request("GET", url)
1317
+ return response.json().get("config", "No configuration found")
1318
+
1319
+ def get_integration_services_configs(self, server_name: str = None) -> dict | str:
1320
+ if server_name is None:
1321
+ server_name = self.server_name
1322
+
1323
+ url = f"{self.full_config_command_root}/servers/{server_name}/integration-services/configuration"
1324
+ response = self.make_request("GET", url)
1325
+ return response.json().get("services", "No configuration found")
1326
+
1327
+ def set_lineage_warehouse_services(self, body: dict, lineage_server: str) -> None:
1328
+ url = f"{self.full_config_command_root}/servers/{lineage_server}/lineage-warehouse/configuration"
1329
+ self.make_request("POST", url, body)
1330
+
1331
+ def remove_lineage_warehouse_services(self, lineage_server: str = None) -> None:
1332
+ url = f"{self.full_config_command_root}/servers/{lineage_server}/lineage-warehouse/configuration"
1333
+ self.make_request("DELETE", url)
1334
+
1335
+
1336
+ if __name__ == "__main__":
1337
+ print("Main-Full OMAG Server Config")