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,2299 @@
1
+ """
2
+ SPDX-License-Identifier: Apache-2.0
3
+ Copyright Contributors to the ODPi Egeria project.
4
+
5
+ Runtime manager is a view service that supports user interaction with the running platforms.
6
+
7
+ """
8
+ import asyncio
9
+
10
+ from requests import Response
11
+
12
+ from pyegeria import (
13
+ Client,
14
+ max_paging_size,
15
+ body_slimmer,
16
+ InvalidParameterException,
17
+ default_time_out,
18
+ )
19
+
20
+
21
+ class RuntimeManager(Client):
22
+ """
23
+ Client to issue Runtime status requests.
24
+
25
+ Attributes:
26
+
27
+ view_server : str
28
+ Name of the server to use.
29
+ platform_url : str
30
+ URL of the server platform to connect to
31
+ user_id : str
32
+ The identity of the user calling the method - this sets a default optionally used by the methods
33
+ when the user doesn't pass the user_id on a method call.
34
+ user_pwd: str
35
+ The password associated with the user_id. Defaults to None
36
+ token: str, optional
37
+ Bearer token
38
+
39
+ Methods:
40
+
41
+ """
42
+
43
+ def __init__(
44
+ self,
45
+ view_server: str,
46
+ platform_url: str,
47
+ user_id: str,
48
+ user_pwd: str = None,
49
+ token: str = None,
50
+ time_out: int = default_time_out,
51
+ ):
52
+ self.view_server = view_server
53
+ self.time_out = time_out
54
+ Client.__init__(self, view_server, platform_url, user_id, user_pwd, token=token)
55
+ self.runtime_command_root = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/runtime-manager"
56
+ self.platform_guid = "44bf319f-1e41-4da1-b771-2753b92b631a" # this is platform @ 9443 from the core content archive
57
+ self.default_platform_name = (
58
+ "Default Local OMAG Server Platform" # this from the core content archive
59
+ )
60
+
61
+ #
62
+ # Cohorts
63
+ #
64
+ async def _async_connect_to_cohort(
65
+ self,
66
+ cohort_name: str,
67
+ server_guid: str = None,
68
+ qualified_name: str = None,
69
+ ) -> None:
70
+ """A new server needs to register the metadataCollectionId for its metadata repository with the other servers
71
+ in the open metadata repository. It only needs to do this once and uses a timestamp to record that the
72
+ registration event has been sent. If the server has already registered in the past, it sends a
73
+ reregistration request. Async version.
74
+
75
+ https://egeria-project.org/concepts/cohort-member/
76
+
77
+ Parameters
78
+ ----------
79
+ server_guid : str, default = None
80
+ Identity of the server to act on. If not specified, server_name must be.
81
+ qualified_name: str, default = None
82
+ Unique name of server to act on. If not specified, server_guid must be.
83
+ cohort_name : str
84
+ Name of the cohort to join
85
+
86
+ Returns
87
+ -------
88
+ None
89
+
90
+ Raises
91
+ ------
92
+ InvalidParameterException
93
+ PropertyServerException
94
+ UserNotAuthorizedException
95
+
96
+ """
97
+ server_guid = self.__get_guid__(server_guid, qualified_name=qualified_name)
98
+ url = (
99
+ f"{self.runtime_command_root}/cohort-members/"
100
+ f"{server_guid}/cohorts/{cohort_name}/connect"
101
+ )
102
+ await self._async_make_request("GET", url)
103
+ return
104
+
105
+ def connect_to_cohort(
106
+ self,
107
+ cohort_name: str,
108
+ server_guid: str = None,
109
+ qualified_name: str = None,
110
+ ) -> None:
111
+ """A new server needs to register the metadataCollectionId for its metadata repository with the other servers
112
+ in the open metadata repository. It only needs to do this once and uses a timestamp to record that the
113
+ registration event has been sent. If the server has already registered in the past, it sends a
114
+ reregistration request.
115
+
116
+ https://egeria-project.org/concepts/cohort-member/
117
+
118
+ Parameters
119
+ ----------
120
+ server_guid : str, default = None
121
+ Identity of the server to act on. If not specified, server_name must be.
122
+ qualified_name: str, default = None
123
+ Unique name of server to act on. If not specified, server_guid must be.
124
+ cohort_name: str
125
+ Name of the cohort to join
126
+
127
+ Returns
128
+ -------
129
+ None
130
+
131
+ Raises
132
+ ------
133
+ InvalidParameterException
134
+ PropertyServerException
135
+ UserNotAuthorizedException
136
+
137
+ """
138
+ loop = asyncio.get_event_loop()
139
+ loop.run_until_complete(
140
+ self._async_connect_to_cohort(cohort_name, server_guid, qualified_name)
141
+ )
142
+ return
143
+
144
+ async def _async_disconnect_from_cohort(
145
+ self,
146
+ cohort_name: str,
147
+ server_guid: str = None,
148
+ qualified_name: str = None,
149
+ ) -> None:
150
+ """Disconnect communications from a specific cohort. Async version.
151
+
152
+ https://egeria-project.org/concepts/cohort-member/
153
+
154
+ Parameters
155
+ ----------
156
+ server_guid : str, default = None
157
+ Identity of the server to act on. If not specified, server_name must be.
158
+ qualified_name: str, default = None
159
+ Unique name of server to act on. If not specified, server_guid must be.
160
+ cohort_name : str
161
+ Name of the cohort to join
162
+
163
+ Returns
164
+ -------
165
+ None
166
+
167
+ Raises
168
+ ------
169
+ InvalidParameterException
170
+ PropertyServerException
171
+ UserNotAuthorizedException
172
+
173
+ """
174
+ server_guid = self.__get_guid__(server_guid, qualified_name=qualified_name)
175
+ url = (
176
+ f"{self.runtime_command_root}/runtime-manager/cohort-members/"
177
+ f"{server_guid}/cohorts/{cohort_name}/disconnect"
178
+ )
179
+ await self._async_make_request("GET", url)
180
+ return
181
+
182
+ def disconnect_from_cohort(
183
+ self,
184
+ cohort_name: str,
185
+ server_guid: str = None,
186
+ qualified_name: str = None,
187
+ ) -> None:
188
+ """Disconnect communications from a specific cohort.
189
+
190
+ https://egeria-project.org/concepts/cohort-member/
191
+
192
+ Parameters
193
+ ----------
194
+ server_guid : str, default = None
195
+ Identity of the server to act on. If not specified, server_name must be.
196
+ qualified_name: str, default = None
197
+ Unique name of server to act on. If not specified, server_guid must be.
198
+ cohort_name: str
199
+ Name of the cohort to join
200
+
201
+ Returns
202
+ -------
203
+ None
204
+
205
+ Raises
206
+ ------
207
+ InvalidParameterException
208
+ PropertyServerException
209
+ UserNotAuthorizedException
210
+
211
+ """
212
+ loop = asyncio.get_event_loop()
213
+ loop.run_until_complete(
214
+ self._async_disconnect_from_cohort(cohort_name, server_guid, qualified_name)
215
+ )
216
+ return
217
+
218
+ async def _async_unregister_from_cohort(
219
+ self,
220
+ cohort_name: str,
221
+ server_guid: str = None,
222
+ qualified_name: str = None,
223
+ ) -> None:
224
+ """Unregister from a specific cohort and disconnect from cohort communications. Async version.
225
+
226
+ https://egeria-project.org/concepts/cohort-member/
227
+
228
+ Parameters
229
+ ----------
230
+ server_guid : str, default = None
231
+ Identity of the server to act on. If not specified, server_name must be.
232
+ qualified_name: str, default = None
233
+ Unique name of server to act on. If not specified, server_guid must be.
234
+ cohort_name : str
235
+ Name of the cohort to join
236
+
237
+ Returns
238
+ -------
239
+ None
240
+
241
+ Raises
242
+ ------
243
+ InvalidParameterException
244
+ PropertyServerException
245
+ UserNotAuthorizedException
246
+
247
+ """
248
+ server_guid = self.__get_guid__(server_guid, qualified_name=qualified_name)
249
+ url = (
250
+ f"{self.runtime_command_root}/cohort-members/"
251
+ f"{server_guid}/cohorts/{cohort_name}/unregister"
252
+ )
253
+ await self._async_make_request("GET", url)
254
+ return
255
+
256
+ def unregister_from_cohort(
257
+ self,
258
+ cohort_name: str,
259
+ server_guid: str = None,
260
+ qualified_name: str = None,
261
+ ) -> None:
262
+ """Unregister from a specific cohort and disconnect from cohort communications.
263
+ https://egeria-project.org/concepts/cohort-member/
264
+
265
+ Parameters
266
+ ----------
267
+ server_guid : str, default = None
268
+ Identity of the server to act on. If not specified, server_name must be.
269
+ qualified_name: str, default = None
270
+ Unique name of server to act on. If not specified, server_guid must be.
271
+ cohort_name: str
272
+ Name of the cohort to join
273
+
274
+ Returns
275
+ -------
276
+ None
277
+
278
+ Raises
279
+ ------
280
+ InvalidParameterException
281
+ PropertyServerException
282
+ UserNotAuthorizedException
283
+
284
+ """
285
+ loop = asyncio.get_event_loop()
286
+ loop.run_until_complete(
287
+ self._async_disconnect_from_cohort(cohort_name, server_guid, qualified_name)
288
+ )
289
+ return
290
+
291
+ #
292
+ # Governance Engines
293
+ #
294
+
295
+ async def _async_refresh_gov_eng_config(
296
+ self,
297
+ gov_engine_name: str = None,
298
+ server_guid: str = None,
299
+ display_name: str = None,
300
+ qualified_name: str = None,
301
+ ) -> None:
302
+ """Request that the governance engine refresh its configuration by calling the metadata server. This request is
303
+ useful if the metadata server has an outage, particularly while the governance server is initializing.
304
+ This request just ensures that the latest configuration is in use. If gov_engine_name is None, all engines
305
+ will be refreshed. Async version.
306
+
307
+ https://egeria-project.org/concepts/governance-engine-definition/
308
+
309
+ Parameters
310
+ ----------
311
+ gov_engine_name: str, default = None
312
+ If None, then all engines will be refreshed - this is the normal case. If an engine is specified only this
313
+ engine will be refreshed.
314
+ server_guid : str, default = None
315
+ Identity of the server to act on. If not specified, qualified_name or display_name must be.
316
+ display_name: str, default = None
317
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
318
+ qualified_name: str, opt, default is None.
319
+ Identity of the server to act on. Either the server_guid , qualified_name, or server_name must
320
+ be provided.
321
+
322
+ Returns
323
+ -------
324
+ None
325
+
326
+ Raises
327
+ ------
328
+ InvalidParameterException
329
+ PropertyServerException
330
+ UserNotAuthorizedException
331
+
332
+ """
333
+ server_guid = self.__get_guid__(
334
+ server_guid, display_name, "name", qualified_name, tech_type="Engine Host"
335
+ )
336
+ if gov_engine_name is None:
337
+ url = (
338
+ f"{self.runtime_command_root}/engine-hosts/"
339
+ f"{server_guid}/governance-engines/refresh-config"
340
+ )
341
+ else:
342
+ url = (
343
+ f"{self.runtime_command_root}/engine-hosts/"
344
+ f"{server_guid}/governance-engines/{gov_engine_name}/refresh-config"
345
+ )
346
+ await self._async_make_request("GET", url)
347
+ return
348
+
349
+ def refresh_gov_eng_config(
350
+ self,
351
+ gov_engine_name: str = None,
352
+ server_guid: str = None,
353
+ display_name: str = None,
354
+ qualified_name: str = None,
355
+ ) -> None:
356
+ """Request that the governance engine refresh its configuration by calling the metadata server. This request is
357
+ useful if the metadata server has an outage, particularly while the governance server is initializing.
358
+ This request just ensures that the latest configuration is in use. If gov_engine_name is None, all engines
359
+ will be refreshed. Async version.
360
+
361
+ https://egeria-project.org/concepts/governance-engine-definition/
362
+
363
+ Parameters
364
+ ----------
365
+ gov_engine_name: str, default = None
366
+ If None, then all engines will be refreshed - this is the normal case. If an engine is specified only this
367
+ engine will be refreshed.
368
+ server_guid : str, default = None
369
+ Identity of the server to act on. If not specified, qualified_name or display_name must be.
370
+ display_name: str, default = None
371
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
372
+ qualified_name: str, opt, default is None.
373
+ Identity of the server to act on. Either the server_guid , qualified_name, or server_name must
374
+ be provided.
375
+
376
+ Returns
377
+ -------
378
+ None
379
+
380
+ Raises
381
+ ------
382
+ InvalidParameterException
383
+ PropertyServerException
384
+ UserNotAuthorizedException
385
+
386
+ """
387
+ loop = asyncio.get_event_loop()
388
+ loop.run_until_complete(
389
+ self._async_refresh_gov_eng_config(
390
+ gov_engine_name, server_guid, display_name, qualified_name
391
+ )
392
+ )
393
+ return
394
+
395
+ #
396
+ # Integration Connector Methods
397
+ #
398
+ async def _async_get_integ_connector_config_properties(
399
+ self,
400
+ connector_name: str,
401
+ server_guid: str = None,
402
+ display_name: str = None,
403
+ qualified_name: str = None,
404
+ ) -> dict | str:
405
+ """Retrieve the configuration properties of the named integration connector running in the integration daemon.
406
+ Async version.
407
+
408
+ https://egeria-project.org/concepts/integration-connector/
409
+
410
+ Parameters
411
+ ----------
412
+ server_guid : str, default = None
413
+ Identity of the server to act on. If not specified, qualified_name or server_name must be.
414
+ display_name: str, default = None
415
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
416
+ qualified_name: str, default = None
417
+ Unique name of server to act on. If not specified, server_guid or server_name must be.
418
+ connector_name : str
419
+ Name of the integration connector to retrieve properties for.
420
+
421
+ Returns
422
+ -------
423
+ Dict of the connector configuration properties.
424
+
425
+ Raises
426
+ ------
427
+ InvalidParameterException
428
+ PropertyServerException
429
+ UserNotAuthorizedException
430
+
431
+ """
432
+ server_guid = self.__get_guid__(
433
+ server_guid,
434
+ display_name,
435
+ "qualifiedName",
436
+ qualified_name,
437
+ "Integration Daemon",
438
+ )
439
+ url = (
440
+ f"{self.runtime_command_root}/integration-daemons/"
441
+ f"{server_guid}/integration-connectors/{connector_name}/configuration-properties"
442
+ )
443
+ response = await self._async_make_request("GET", url)
444
+ return response.json().get("properties", "No pproperties found")
445
+
446
+ def get_integ_connector_config_properties(
447
+ self,
448
+ connector_name: str,
449
+ server_guid: str = None,
450
+ display_name: str = None,
451
+ qualified_name: str = None,
452
+ ) -> dict | str:
453
+ """Retrieve the configuration properties of the named integration connector running in the integration daemon.
454
+ Async version.
455
+
456
+ https://egeria-project.org/concepts/integration-connector/
457
+
458
+ Parameters
459
+ ----------
460
+ connector_name : str
461
+ Name of the integration connector to retrieve properties for.
462
+ server_guid : str, default = None
463
+ Identity of the server to act on. If not specified, qualified_name or server_name must be.
464
+ display_name: str, default = None
465
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
466
+ qualified_name: str, default = None
467
+ Unique name of server to act on. If not specified, server_guid or server_name must be.
468
+ Returns
469
+ -------
470
+ None
471
+
472
+ Raises
473
+ ------
474
+ InvalidParameterException
475
+ PropertyServerException
476
+ UserNotAuthorizedException
477
+
478
+ """
479
+ loop = asyncio.get_event_loop()
480
+ response = loop.run_until_complete(
481
+ self._async_get_integ_connector_config_properties(
482
+ connector_name, server_guid, display_name, qualified_name
483
+ )
484
+ )
485
+ return response
486
+
487
+ async def _async_update_connector_configuration(
488
+ self,
489
+ connector_name: str = None,
490
+ server_guid: str = None,
491
+ display_name: str = None,
492
+ qualified_name: str = None,
493
+ merge_update: bool = True,
494
+ config_properties: dict = None,
495
+ ) -> None:
496
+ """Update the configuration properties of the integration connectors, or specific integration connector
497
+ if a connector name is supplied. This update is in memory and will not persist over a server restart.
498
+ Async version.
499
+
500
+ https://egeria-project.org/concepts/integration-connector/
501
+
502
+ Parameters
503
+ ----------
504
+ connector_name : str, default = None
505
+ Name of the integration connector to update properties for. If none, all connectors will be updated.
506
+ server_guid : str, default = None
507
+ Identity of the server to act on. If not specified, qualified_name or server_name must be.
508
+ display_name: str, default = None
509
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
510
+ qualified_name: str, default = None
511
+ Unique name of server to act on. If not specified, server_guid or server_name must be.
512
+
513
+ merge_update : bool, optional, default = False
514
+ Specifies whether properties should be over-written or completely replace existing properties. If False
515
+ the values will be replaced; if True, they will be merged.
516
+ config_properties : dict, optional, default = None
517
+ A dict of Property Name, Property Value pairs.
518
+
519
+ Returns
520
+ -------
521
+ None
522
+
523
+ Raises
524
+ ------
525
+ InvalidParameterException
526
+ PropertyServerException
527
+ UserNotAuthorizedException
528
+
529
+ """
530
+ server_guid = self.__get_guid__(
531
+ server_guid,
532
+ display_name,
533
+ "qualifiedName",
534
+ qualified_name,
535
+ "Integration Daemon",
536
+ )
537
+ url = (
538
+ f"{self.runtime_command_root}/integration-daemons/"
539
+ f"{server_guid}/integration-connectors/configuration-properties"
540
+ )
541
+
542
+ body = {
543
+ "class": "ConnectorConfigPropertiesRequestBody",
544
+ "connectorName": connector_name,
545
+ "mergeUpdate": merge_update,
546
+ "configurationProperties": config_properties,
547
+ }
548
+ await self._async_make_request("POST", url, body_slimmer(body))
549
+ return
550
+
551
+ def update_connector_configuration(
552
+ self,
553
+ connector_name: str,
554
+ server_guid: str = None,
555
+ display_name: str = None,
556
+ qualified_name: str = None,
557
+ merge_update: bool = False,
558
+ config_properties: dict = None,
559
+ ) -> None:
560
+ """Update the configuration properties of the integration connectors, or specific integration connector
561
+ if a connector name is supplied. This update is in memory and will not persist over a server restart.
562
+
563
+ https://egeria-project.org/concepts/integration-connector/
564
+
565
+ Parameters
566
+ ----------
567
+ server_guid : str, default = None
568
+ Identity of the server to act on. If not specified, qualified_name or server_name must be.
569
+ display_name: str, default = None
570
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
571
+ qualified_name: str, default = None
572
+ Unique name of server to act on. If not specified, server_guid or server_name must be.
573
+ connector_name : str
574
+ Name of the integration connector to retrieve properties for.
575
+ merge_update : bool, optional, default = False
576
+ Specifies whether properties should be over-written or completely replace existing properties. If False
577
+ the values will be replaced; if True, they will be merged.
578
+ config_properties : dict, optional, default = None
579
+ A dict of Property Name, Property Value pairs.
580
+
581
+ Returns
582
+ -------
583
+ None
584
+
585
+ Raises
586
+ ------
587
+ InvalidParameterException
588
+ PropertyServerException
589
+ UserNotAuthorizedException
590
+
591
+ """
592
+ loop = asyncio.get_event_loop()
593
+ loop.run_until_complete(
594
+ self._async_update_connector_configuration(
595
+ connector_name,
596
+ server_guid,
597
+ display_name,
598
+ qualified_name,
599
+ merge_update,
600
+ config_properties,
601
+ )
602
+ )
603
+ return
604
+
605
+ async def _async_update_endpoint_address(
606
+ self,
607
+ connector_name: str,
608
+ endpoint_address: str,
609
+ server_guid: str = None,
610
+ display_name: str = None,
611
+ qualified_name: str = None,
612
+ ) -> None:
613
+ """Update the endpoint network address for a specific integration connector. Typically used for discovery.
614
+ This update is in memory and will not persist over a server restart. Async version.
615
+
616
+ https://egeria-project.org/concepts/integration-connector/
617
+
618
+ Parameters
619
+ ----------
620
+ server_guid : str, default = None
621
+ Identity of the server to act on. If not specified, qualified_name or server_name must be.
622
+ display_name: str, default = None
623
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
624
+ qualified_name: str, default = None
625
+ Unique name of server to act on. If not specified, server_guid or server_name must be.
626
+ connector_name : str
627
+ Name of the integration connector to retrieve properties for.
628
+ endpoint_address : str
629
+ Specifies the new network endpoint address. This is the full address string - can include protocol,
630
+ port, operation, etc.
631
+
632
+ Returns
633
+ -------
634
+ None
635
+
636
+ Raises
637
+ ------
638
+ InvalidParameterException
639
+ PropertyServerException
640
+ UserNotAuthorizedException
641
+
642
+ """
643
+ server_guid = self.__get_guid__(
644
+ server_guid, display_name, "qualifiedName", qualified_name, "Connection"
645
+ )
646
+ url = (
647
+ f"{self.runtime_command_root}/integration-daemons/"
648
+ f"{server_guid}/integration-connectors/{connector_name}/endpoint-network-address"
649
+ )
650
+
651
+ body = {
652
+ "class": "StringRequestBody",
653
+ "string": endpoint_address,
654
+ }
655
+ await self._async_make_request("POST", url, body)
656
+ return
657
+
658
+ def update_endpoint_address(
659
+ self,
660
+ connector_name: str,
661
+ endpoint_address: str,
662
+ server_guid: str = None,
663
+ display_name: str = None,
664
+ qualified_name: str = None,
665
+ ) -> None:
666
+ """Update the endpoint network address for a specific integration connector. Typically used for discovery.
667
+ This update is in memory and will not persist over a server restart. Async version.
668
+
669
+ https://egeria-project.org/concepts/integration-connector/
670
+
671
+ Parameters
672
+ ----------
673
+ server_guid : str, default = None
674
+ Identity of the server to act on. If not specified, qualified_name or server_name must be.
675
+ display_name: str, default = None
676
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
677
+ qualified_name: str, default = None
678
+ Unique name of server to act on. If not specified, server_guid or server_name must be.
679
+ connector_name : str
680
+ Name of the integration connector to retrieve properties for.
681
+ endpoint_address : str
682
+ Specifies the new network endpoint address. This is the full address string - can include protocol,
683
+ port, operation, etc.
684
+
685
+ Returns
686
+ -------
687
+ None
688
+
689
+ Raises
690
+ ------
691
+ InvalidParameterException
692
+ PropertyServerException
693
+ UserNotAuthorizedException
694
+
695
+ """
696
+ loop = asyncio.get_event_loop()
697
+ loop.run_until_complete(
698
+ self._async_update_endpoint_address(
699
+ connector_name,
700
+ endpoint_address,
701
+ server_guid,
702
+ display_name,
703
+ qualified_name,
704
+ )
705
+ )
706
+ return
707
+
708
+ async def _async_refresh_integration_connectors(
709
+ self,
710
+ connector_name: str = None,
711
+ server_guid: str = None,
712
+ display_name: str = None,
713
+ qualified_name: str = None,
714
+ ) -> None:
715
+ """Issue a refresh() request on all connectors running in the integration daemon, or a specific connector if
716
+ the connector name is specified. Async version.
717
+
718
+ https://egeria-project.org/concepts/integration-connector/
719
+
720
+ Parameters
721
+ ----------
722
+ server_guid : str, default = None
723
+ Identity of the server to act on. If not specified, qualified_name or server_name must be.
724
+ display_name: str, default = None
725
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
726
+ qualified_name: str, default = None
727
+ Unique name of server to act on. If not specified, server_guid or server_name must be.
728
+ connector_name : str, opt
729
+ Name of the integration connector to retrieve properties for. If None, all connectors refreshed.
730
+
731
+ Returns
732
+ -------
733
+ None
734
+
735
+ Raises
736
+ ------
737
+ InvalidParameterException
738
+ PropertyServerException
739
+ UserNotAuthorizedException
740
+
741
+ """
742
+ server_guid = self.__get_guid__(
743
+ server_guid,
744
+ display_name,
745
+ "qualifiedName",
746
+ qualified_name,
747
+ "Integration Daemon",
748
+ )
749
+ url = (
750
+ f"{self.runtime_command_root}/integration-daemons/"
751
+ f"{server_guid}/integration-connectors/refresh"
752
+ )
753
+
754
+ body = {
755
+ "class": "NameRequestBody",
756
+ "string": connector_name,
757
+ }
758
+ await self._async_make_request("POST", url, body_slimmer(body))
759
+ return
760
+
761
+ def refresh_integration_connectors(
762
+ self,
763
+ connector_name: str = None,
764
+ server_guid: str = None,
765
+ display_name: str = None,
766
+ qualified_name: str = None,
767
+ ) -> None:
768
+ """Issue a refresh() request on all connectors running in the integration daemon, or a specific connector if
769
+ the connector name is specified.
770
+
771
+ https://egeria-project.org/concepts/integration-connector/
772
+
773
+ Parameters
774
+ ----------
775
+ server_guid : str, default = None
776
+ Identity of the server to act on. If not specified, qualified_name or server_name must be.
777
+ display_name: str, default = None
778
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
779
+ qualified_name: str, default = None
780
+ Unique name of server to act on. If not specified, server_guid or server_name must be.
781
+ connector_name : str, opt
782
+ Name of the integration connector to retrieve properties for. If None, all connectors refreshed.
783
+
784
+ Returns
785
+ -------
786
+ None
787
+
788
+ Raises
789
+ ------
790
+ InvalidParameterException
791
+ PropertyServerException
792
+ UserNotAuthorizedException
793
+
794
+ """
795
+ loop = asyncio.get_event_loop()
796
+ loop.run_until_complete(
797
+ self._async_refresh_integration_connectors(
798
+ connector_name, server_guid, display_name, qualified_name
799
+ )
800
+ )
801
+ return
802
+
803
+ async def _async_restart_integration_connectors(
804
+ self,
805
+ connector_name: str = None,
806
+ server_guid: str = None,
807
+ display_name: str = None,
808
+ qualified_name: str = None,
809
+ ) -> None:
810
+ """Issue a restart() request on all connectors running in the integration daemon, or a specific connector if
811
+ the connector name is specified. Async version.
812
+
813
+ https://egeria-project.org/concepts/integration-connector/
814
+
815
+ Parameters
816
+ ----------
817
+ server_guid : str, default = None
818
+ Identity of the server to act on. If not specified, qualified_name or server_name must be.
819
+ display_name: str, default = None
820
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
821
+ qualified_name: str, default = None
822
+ Unique name of server to act on. If not specified, server_guid or server_name must be.
823
+ connector_name : str, opt
824
+ Name of the integration connector to retrieve properties for. If None, all connectors restarted.
825
+
826
+ Returns
827
+ -------
828
+ None
829
+
830
+ Raises
831
+ ------
832
+ InvalidParameterException
833
+ PropertyServerException
834
+ UserNotAuthorizedException
835
+
836
+ """
837
+ server_guid = self.__get_guid__(
838
+ server_guid,
839
+ display_name,
840
+ "qualifiedName",
841
+ qualified_name,
842
+ "Integration Daemon",
843
+ )
844
+ url = (
845
+ f"{self.runtime_command_root}/integration-daemons/"
846
+ f"{server_guid}/integration-connectors/restart"
847
+ )
848
+
849
+ body = {
850
+ "class": "NameRequestBody",
851
+ "string": connector_name,
852
+ }
853
+ await self._async_make_request("POST", url, body_slimmer(body))
854
+ return
855
+
856
+ def restart_integration_connectors(
857
+ self,
858
+ connector_name: str = None,
859
+ server_guid: str = None,
860
+ display_name: str = None,
861
+ qualified_name: str = None,
862
+ ) -> None:
863
+ """Issue a restart() request on all connectors running in the integration daemon, or a specific connector if
864
+ the connector name is specified.
865
+
866
+ https://egeria-project.org/concepts/integration-connector/
867
+
868
+ Parameters
869
+ ----------
870
+ server_guid : str, default = None
871
+ Identity of the server to act on. If not specified, qualified_name or server_name must be.
872
+ display_name: str, default = None
873
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
874
+ qualified_name: str, default = None
875
+ Unique name of server to act on. If not specified, server_guid or server_name must be.
876
+ connector_name : str, opt
877
+ Name of the integration connector to retrieve properties for. If None, all connectors restarted.
878
+
879
+ Returns
880
+ -------
881
+ None
882
+
883
+ Raises
884
+ ------
885
+ InvalidParameterException
886
+ PropertyServerException
887
+ UserNotAuthorizedException
888
+
889
+ """
890
+ loop = asyncio.get_event_loop()
891
+ loop.run_until_complete(
892
+ self._async_restart_integration_connectors(
893
+ connector_name, server_guid, display_name, qualified_name
894
+ )
895
+ )
896
+ return
897
+
898
+ async def _async_refresh_integ_group_config(
899
+ self,
900
+ integ_group_name: str = None,
901
+ server_guid: str = None,
902
+ display_name: str = None,
903
+ qualified_name: str = None,
904
+ ) -> None:
905
+ """Request that the integration group refresh its configuration by calling the metadata access server.
906
+ Changes to the connector configuration will result in the affected connectors being restarted.
907
+ This request is useful if the metadata access server has an outage, particularly while the integration
908
+ daemon is initializing. This request just ensures that the latest configuration is in use. Async version.
909
+
910
+ https://egeria-project.org/concepts/integration-connector/
911
+
912
+ Parameters
913
+ ----------
914
+ server_guid : str, default = None
915
+ Identity of the server to act on. If not specified, qualified_name or server_name must be.
916
+ display_name: str, default = None
917
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
918
+ qualified_name: str, default = None
919
+ Unique name of server to act on. If not specified, server_guid or server_name must be.
920
+ integ_group_name : str, opt, default = None
921
+ Name of the integration group to refresh. If None, all groups are refreshed.
922
+
923
+ Returns
924
+ -------
925
+ None
926
+
927
+ Raises
928
+ ------
929
+ InvalidParameterException
930
+ PropertyServerException
931
+ UserNotAuthorizedException
932
+
933
+ """
934
+ server_guid = self.__get_guid__(
935
+ server_guid,
936
+ display_name,
937
+ "qualifiedName",
938
+ qualified_name,
939
+ "Integration Daemon",
940
+ )
941
+ url = (
942
+ f"{self.runtime_command_root}/integration-daemons/"
943
+ f"{server_guid}/integration-groups/{integ_group_name}/refresh-config"
944
+ )
945
+
946
+ await self._async_make_request("GET", url)
947
+ return
948
+
949
+ def refresh_integ_group_config(
950
+ self,
951
+ integ_group_name: str = None,
952
+ server_guid: str = None,
953
+ display_name: str = None,
954
+ qualified_name: str = None,
955
+ ) -> None:
956
+ """Request that the integration group refresh its configuration by calling the metadata access server.
957
+ Changes to the connector configuration will result in the affected connectors being restarted.
958
+ This request is useful if the metadata access server has an outage, particularly while the integration
959
+ daemon is initializing. This request just ensures that the latest configuration is in use.
960
+
961
+ https://egeria-project.org/concepts/integration-connector/
962
+
963
+ Parameters
964
+ ----------
965
+ server_guid : str, default = None
966
+ Identity of the server to act on. If not specified, qualified_name or server_name must be.
967
+ display_name: str, default = None
968
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
969
+ qualified_name: str, default = None
970
+ Unique name of server to act on. If not specified, server_guid or server_name must be.
971
+ integ_group_name : str, opt, default = None
972
+ Name of the integration group to refresh. If None, all groups are refreshed.
973
+
974
+ Returns
975
+ -------
976
+ None
977
+
978
+ Raises
979
+ ------
980
+ InvalidParameterException
981
+ PropertyServerException
982
+ UserNotAuthorizedException
983
+
984
+ """
985
+ loop = asyncio.get_event_loop()
986
+ loop.run_until_complete(
987
+ self._async_refresh_integ_group_config(
988
+ integ_group_name, server_guid, display_name, qualified_name
989
+ )
990
+ )
991
+ return
992
+
993
+ #
994
+ # Open Lineage & Archives
995
+ #
996
+ async def _async_publish_open_lineage_event(
997
+ self,
998
+ ol_event: dict,
999
+ server_guid: str = None,
1000
+ display_name: str = None,
1001
+ qualified_name: str = None,
1002
+ ) -> None:
1003
+ """Send an Open Lineage event to the integration daemon. It will pass it on to the integration connectors that
1004
+ have registered a listener for open lineage events. Async version.
1005
+
1006
+ https://egeria-project.org/features/lineage-management/overview/#the-openlineage-standard
1007
+
1008
+ Parameters
1009
+ ----------
1010
+ server_guid : str, default = None
1011
+ Identity of the server to act on. If not specified, qualified_name or server_name must be.
1012
+ display_name: str, default = None
1013
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
1014
+ qualified_name: str, default = None
1015
+ Unique name of server to act on. If not specified, server_guid or server_name must be.
1016
+ ol_event : dict
1017
+ Dict containing the user specified Open Lineage event.
1018
+
1019
+ Returns
1020
+ -------
1021
+ None
1022
+
1023
+ Raises
1024
+ ------
1025
+ InvalidParameterException
1026
+ PropertyServerException
1027
+ UserNotAuthorizedException
1028
+
1029
+ """
1030
+ server_guid = self.__get_guid__(
1031
+ server_guid,
1032
+ display_name,
1033
+ "name",
1034
+ qualified_name,
1035
+ )
1036
+ url = (
1037
+ f"{self.runtime_command_root}/integration-daemons/"
1038
+ f"{server_guid}/integration-daemons/{server_guid}/open-lineage-events/publish"
1039
+ )
1040
+
1041
+ await self._async_make_request("POST", url, ol_event)
1042
+ return
1043
+
1044
+ def publish_open_lineage_event(
1045
+ self,
1046
+ ol_event: dict,
1047
+ server_guid: str = None,
1048
+ display_name: str = None,
1049
+ qualified_name: str = None,
1050
+ ) -> None:
1051
+ """Send an Open Lineage event to the integration daemon. It will pass it on to the integration connectors that
1052
+ have registered a listener for open lineage events.
1053
+
1054
+ https://egeria-project.org/features/lineage-management/overview/#the-openlineage-standard
1055
+
1056
+ Parameters
1057
+ ----------
1058
+ server_guid : str, default = None
1059
+ Identity of the server to act on. If not specified, qualified_name or server_name must be.
1060
+ display_name: str, default = None
1061
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
1062
+ qualified_name: str, default = None
1063
+ Unique name of server to act on. If not specified, server_guid or server_name must be.
1064
+ ol_event : dict
1065
+ Dict containing the user specified Open Lineage event.
1066
+
1067
+ Returns
1068
+ -------
1069
+ None
1070
+
1071
+ Raises
1072
+ ------
1073
+ InvalidParameterException
1074
+ PropertyServerException
1075
+ UserNotAuthorizedException
1076
+
1077
+ """
1078
+ loop = asyncio.get_event_loop()
1079
+ loop.run_until_complete(
1080
+ self._async_publish_open_lineage_event(ol_event, server_guid, display_name)
1081
+ )
1082
+ return
1083
+
1084
+ async def _async_add_archive_content(
1085
+ self,
1086
+ archive_content: dict,
1087
+ server_guid: str = None,
1088
+ display_name: str = None,
1089
+ qualified_name: str = None,
1090
+ time_out: int = 60,
1091
+ ) -> None:
1092
+ """An open metadata archive contains metadata types and instances.
1093
+ This operation loads the supplied open metadata archive into the local repository. It can be used with OMAG
1094
+ servers that are of type Open Metadata Store. Async version.
1095
+
1096
+ https://egeria-project.org/concepts/open-metadata-archives/
1097
+
1098
+ Parameters
1099
+ ----------
1100
+ server_guid : str, default = None
1101
+ Identity of the server to act on. If not specified, qualified_name or server_name must be.
1102
+ display_name: str, default = None
1103
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
1104
+ qualified_name: str, default = None
1105
+ Unique name of server to act on. If not specified, server_guid or server_name must be.
1106
+ archive_content : dict
1107
+ A dict containing the content of the archive to load.
1108
+ time_out : int, optional, default = 60 seconds
1109
+ Timeout for the REST call.
1110
+
1111
+ Returns
1112
+ -------
1113
+ None
1114
+
1115
+ Raises
1116
+ ------
1117
+ InvalidParameterException
1118
+ PropertyServerException
1119
+ UserNotAuthorizedException
1120
+
1121
+ """
1122
+ server_guid = self.__get_guid__(
1123
+ server_guid,
1124
+ display_name,
1125
+ "qualifiedName",
1126
+ qualified_name,
1127
+ "Metadata Access Server",
1128
+ )
1129
+ url = (
1130
+ f"{self.runtime_command_root}/metadata-access-stores/{server_guid}/instance/load/open-metadata-archives/"
1131
+ f"archive-content"
1132
+ )
1133
+
1134
+ await self._async_make_request("POST", url, archive_content, time_out=time_out)
1135
+ return
1136
+
1137
+ def add_archive_content(
1138
+ self,
1139
+ archive_content: dict,
1140
+ server_guid: str = None,
1141
+ display_name: str = None,
1142
+ qualified_name: str = None,
1143
+ time_out: int = 60,
1144
+ ) -> None:
1145
+ """An open metadata archive contains metadata types and instances.
1146
+ This operation loads the supplied open metadata archive into the local repository. It can be used with OMAG
1147
+ servers that are of type Open Metadata Store.
1148
+
1149
+ https://egeria-project.org/concepts/open-metadata-archives/
1150
+
1151
+ Parameters
1152
+ ----------
1153
+ archive_content : dict
1154
+ A dict containing the content of the archive to load.
1155
+ server_guid : str, default = None
1156
+ Identity of the server to act on. If not specified, qualified_name or server_name must be.
1157
+ display_name: str, default = None
1158
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
1159
+ qualified_name: str, default = None
1160
+ Unique name of server to act on. If not specified, server_guid or server_name must be.
1161
+ time_out : int, optional, default = 60 seconds
1162
+ Timeout for the REST call.
1163
+
1164
+ Returns
1165
+ -------
1166
+ None
1167
+
1168
+ Raises
1169
+ ------
1170
+ InvalidParameterException
1171
+ PropertyServerException
1172
+ UserNotAuthorizedException
1173
+
1174
+ """
1175
+ loop = asyncio.get_event_loop()
1176
+ loop.run_until_complete(
1177
+ self._async_add_archive_content(
1178
+ archive_content, server_guid, display_name, qualified_name, time_out
1179
+ )
1180
+ )
1181
+ return
1182
+
1183
+ async def _async_add_archive_file(
1184
+ self,
1185
+ archive_file: str,
1186
+ server_guid: str = None,
1187
+ display_name: str = None,
1188
+ qualified_name: str = None,
1189
+ time_out: int = 120,
1190
+ ) -> None:
1191
+ """Add a new open metadata archive to running OMAG Server's repository.
1192
+ An open metadata archive contains metadata types and instances. This operation loads an open metadata archive
1193
+ that is stored in the named file. It can be used with OMAG servers that are of type Open Metadata Store.
1194
+ Async version.
1195
+
1196
+ https://egeria-project.org/concepts/open-metadata-archives/
1197
+
1198
+ Parameters
1199
+ ----------
1200
+ archive_file: str
1201
+ Open metadata archive file to load.
1202
+ server_guid : str, default = None
1203
+ Identity of the server to act on. If not specified, qualified_name or server_name must be.
1204
+ display_name: str, default = None
1205
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
1206
+ qualified_name: str, default = None
1207
+ Unique name of server to act on. If not specified, server_guid or server_name must be.
1208
+ time_out: int, optional
1209
+ Time out for the rest call.
1210
+
1211
+ Returns
1212
+ -------
1213
+ Response
1214
+ None
1215
+
1216
+ Raises
1217
+ ------
1218
+ InvalidParameterException
1219
+ PropertyServerException
1220
+ UserNotAuthorizedException
1221
+
1222
+ """
1223
+ server_guid = self.__get_guid__(
1224
+ server_guid,
1225
+ display_name,
1226
+ "qualifiedName",
1227
+ qualified_name,
1228
+ "Metadata Access Server",
1229
+ )
1230
+ url = f"{self.runtime_command_root}/metadata-access-stores/{server_guid}/instance/load/open-metadata-archives/file"
1231
+
1232
+ await self._async_make_request(
1233
+ "POST-DATA", url, archive_file, time_out=time_out
1234
+ )
1235
+ return
1236
+
1237
+ def add_archive_file(
1238
+ self,
1239
+ archive_file: str,
1240
+ server_guid: str = None,
1241
+ display_name: str = None,
1242
+ qualified_name: str = None,
1243
+ time_out: int = 120,
1244
+ ) -> None:
1245
+ """Add a new open metadata archive to running OMAG Server's repository.
1246
+ An open metadata archive contains metadata types and instances. This operation loads an open metadata archive
1247
+ that is stored in the named file. It can be used with OMAG servers that are of type Open Metadata Store.
1248
+
1249
+ https://egeria-project.org/concepts/open-metadata-archives/
1250
+
1251
+ Parameters
1252
+ ----------
1253
+ archive_file: str
1254
+ Open metadata archive file to load.
1255
+ server_guid : str, default = None
1256
+ Identity of the server to act on. If not specified, qualified_name or server_name must be.
1257
+ display_name: str, default = None
1258
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
1259
+ qualified_name: str, default = None
1260
+ Unique name of server to act on. If not specified, server_guid or server_name must be.
1261
+ time_out: int, optional, default = 60 seconds
1262
+
1263
+ Returns
1264
+ -------
1265
+ Response
1266
+ None
1267
+
1268
+ Raises
1269
+ ------
1270
+ InvalidParameterException
1271
+ PropertyServerException
1272
+ UserNotAuthorizedException
1273
+
1274
+ """
1275
+
1276
+ loop = asyncio.get_event_loop()
1277
+ loop.run_until_complete(
1278
+ self._async_add_archive_file(
1279
+ archive_file, server_guid, display_name, qualified_name, time_out
1280
+ )
1281
+ )
1282
+ return
1283
+
1284
+ #
1285
+ # Server & Platform admin
1286
+ #
1287
+ async def _async_shutdown_and_unregister_server(
1288
+ self,
1289
+ server_guid: str = None,
1290
+ qualified_name: str = None,
1291
+ ) -> None:
1292
+ """Shutdown the named OMAG server. The server will also be removed from any open metadata repository cohorts
1293
+ it has registered with. Async version.
1294
+
1295
+ Parameters
1296
+ ----------
1297
+ server_guid : str, default = None
1298
+ Identity of the server to act on. If not specified, qualified_name must be.
1299
+ qualified_name: str, default = None
1300
+ Unique name of server to act on. If not specified, server_guid must be.
1301
+
1302
+ Returns
1303
+ -------
1304
+ Response
1305
+ None
1306
+
1307
+ Raises
1308
+ ------
1309
+ InvalidParameterException
1310
+ PropertyServerException
1311
+ UserNotAuthorizedException
1312
+
1313
+ """
1314
+ server_guid = self.__get_guid__(
1315
+ server_guid, property_name="qualifiedName", qualified_name=qualified_name
1316
+ )
1317
+ url = f"{self.runtime_command_root}/omag-servers/{server_guid}"
1318
+
1319
+ await self._async_make_request("DELETE", url)
1320
+
1321
+ return
1322
+
1323
+ def shutdown_and_unregister_server(
1324
+ self, server_guid: str = None, qualified_name: str = None
1325
+ ) -> None:
1326
+ """Shutdown the named OMAG server. The server will also be removed from any open metadata repository cohorts
1327
+ it has registered with.
1328
+
1329
+ Parameters
1330
+ ----------
1331
+ server_guid : str, default = None
1332
+ Identity of the server to act on. If not specified, qualified_name must be.
1333
+ qualified_name: str, default = None
1334
+ Unique name of server to act on. If not specified, server_guid must be.
1335
+ Returns
1336
+ -------
1337
+ Response
1338
+ None
1339
+
1340
+ Raises
1341
+ ------
1342
+ InvalidParameterException
1343
+ PropertyServerException
1344
+ UserNotAuthorizedException
1345
+
1346
+ """
1347
+ loop = asyncio.get_event_loop()
1348
+ loop.run_until_complete(
1349
+ self._async_shutdown_and_unregister_server(server_guid, qualified_name)
1350
+ )
1351
+ return
1352
+
1353
+ async def _async_activate_server_with_stored_config(
1354
+ self,
1355
+ server_guid: str = None,
1356
+ display_name: str = None,
1357
+ qualified_name: str = None,
1358
+ timeout: int = 240,
1359
+ ) -> None:
1360
+ """Activate the named OMAG server using the appropriate configuration document found in the
1361
+ configuration store. Async version.
1362
+
1363
+ https://egeria-project.org/concepts/configuration-document
1364
+
1365
+ Parameters
1366
+ ----------
1367
+ server_guid : str, default = None
1368
+ Identity of the server to act on. If not specified, qualified_name or server_name must be.
1369
+ display_name: str, default = None
1370
+ Name of server to act on. If not specified, server_guid or qualified_name must be.
1371
+ qualified_name: str, default = None
1372
+ Unique name of server to act on. If not specified, server_guid must be.
1373
+ timeout: int, optional, default = 240 seconds
1374
+
1375
+ Returns
1376
+ -------
1377
+ None
1378
+
1379
+ Raises
1380
+ ------
1381
+ InvalidParameterException
1382
+ PropertyServerException
1383
+ UserNotAuthorizedException
1384
+
1385
+ """
1386
+ server_guid = self.__get_guid__(
1387
+ server_guid, display_name, "name", qualified_name
1388
+ )
1389
+
1390
+ url = f"{self.runtime_command_root}/omag-servers/{server_guid}/instance"
1391
+
1392
+ await self._async_make_request("POST", url, time_out=timeout)
1393
+ return
1394
+
1395
+ def activate_server_with_stored_config(
1396
+ self,
1397
+ server_guid: str = None,
1398
+ display_name: str = None,
1399
+ qualified_name: str = None,
1400
+ timeout: int = 240,
1401
+ ) -> None:
1402
+ """Activate the named OMAG server using the appropriate configuration document found in the
1403
+ configuration store.
1404
+
1405
+ https://egeria-project.org/concepts/configuration-document
1406
+
1407
+ Parameters
1408
+ ----------
1409
+ server_guid : str, default = None
1410
+ Identity of the server to act on. If not specified, server_name must be.
1411
+ display_name: str, default = None
1412
+ Name of server to act on. If not specified, server_guid must be.
1413
+ timeout: int, optional, default = 240 seconds
1414
+
1415
+ Returns
1416
+ -------
1417
+ None
1418
+
1419
+ Raises
1420
+ ------
1421
+ InvalidParameterException
1422
+ PropertyServerException
1423
+ UserNotAuthorizedException
1424
+
1425
+ """
1426
+ loop = asyncio.get_event_loop()
1427
+ loop.run_until_complete(
1428
+ self._async_activate_server_with_stored_config(
1429
+ server_guid, display_name, timeout
1430
+ )
1431
+ )
1432
+ return
1433
+
1434
+ async def _async_shutdown_server(
1435
+ self, server_guid: str = None, qualified_name: str = None
1436
+ ) -> None:
1437
+ """Temporarily shutdown the named OMAG server. This server can be restarted as a later time. Async version.
1438
+
1439
+ Parameters
1440
+ ----------
1441
+ server_guid : str, default = None
1442
+ Identity of the server to act on. If not specified, qualified_name must be.
1443
+ qualified_name: str, default = None
1444
+ Qualified name of server to act on. If not specified, server_guid must be.
1445
+
1446
+ Returns
1447
+ -------
1448
+ Response
1449
+ None
1450
+
1451
+ Raises
1452
+ ------
1453
+ InvalidParameterException
1454
+ PropertyServerException
1455
+ UserNotAuthorizedException
1456
+
1457
+ """
1458
+ server_guid = self.__get_guid__(
1459
+ server_guid, None, "qualifiedName", qualified_name
1460
+ )
1461
+ url = f"{self.runtime_command_root}/omag-servers/{server_guid}/instance"
1462
+
1463
+ await self._async_make_request("DELETE", url)
1464
+
1465
+ return
1466
+
1467
+ def shutdown_server(
1468
+ self, server_guid: str = None, qualified_name: str = None
1469
+ ) -> None:
1470
+ """Temporarily shutdown the named OMAG server. This server can be restarted as a later time.
1471
+
1472
+ Parameters
1473
+ ----------
1474
+ server_guid : str, default = None
1475
+ Identity of the server to act on. If not specified, qualified_name must be.
1476
+ qualified_name: str, default = None
1477
+ Qualified name of server to act on. If not specified, server_guid must be.
1478
+
1479
+ Returns
1480
+ -------
1481
+ Response
1482
+ None
1483
+
1484
+ Raises
1485
+ ------
1486
+ InvalidParameterException
1487
+ PropertyServerException
1488
+ UserNotAuthorizedException
1489
+
1490
+ """
1491
+ loop = asyncio.get_event_loop()
1492
+ loop.run_until_complete(
1493
+ self._async_shutdown_server(server_guid, qualified_name)
1494
+ )
1495
+ return
1496
+
1497
+ def get_platforms_by_name(
1498
+ self,
1499
+ filter: str = None,
1500
+ effective_time: str = None,
1501
+ start_from: int = 0,
1502
+ page_size: int = max_paging_size,
1503
+ ) -> str | list:
1504
+ """Returns the list of platforms with a particular name. The name is specified in the filter.
1505
+
1506
+ Parameters
1507
+ ----------
1508
+ filter : str, opt
1509
+ Filter specifies the display name or qualified name of the platforms to return information for. If the
1510
+ value is None, we will default to the default_platform_name that comes from the core content pack.
1511
+ effective_time: str, optional
1512
+ Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
1513
+ start_from : int, optional
1514
+ The index from which to start fetching the engine actions. Default is 0.
1515
+ page_size : int, optional
1516
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
1517
+
1518
+ Returns
1519
+ -------
1520
+ Response
1521
+ A lit of json dict with the platform reports.
1522
+
1523
+ Raises
1524
+ ------
1525
+ InvalidParameterException
1526
+ PropertyServerException
1527
+ UserNotAuthorizedException
1528
+ """
1529
+ loop = asyncio.get_event_loop()
1530
+ response = loop.run_until_complete(
1531
+ self._async_get_platforms_by_name(
1532
+ filter, effective_time, start_from, page_size
1533
+ )
1534
+ )
1535
+ return response
1536
+
1537
+ async def _async_get_platforms_by_name(
1538
+ self,
1539
+ filter: str = None,
1540
+ effective_time: str = None,
1541
+ start_from: int = 0,
1542
+ page_size: int = max_paging_size,
1543
+ ) -> str | list:
1544
+ """Returns the list of platforms with a particular name. The name is specified in the filter. Async version.
1545
+
1546
+ Parameters
1547
+ ----------
1548
+ filter : str, opt
1549
+ Filter specifies the display name or qualified name of the platforms to return information for. If the
1550
+ value is None, we will default to the default_platform_name that comes from the core content pack.
1551
+ effective_time: str, optional
1552
+ Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
1553
+ start_from : int, optional
1554
+ The index from which to start fetching the engine actions. Default is 0.
1555
+
1556
+ page_size : int, optional
1557
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
1558
+
1559
+ Returns
1560
+ -------
1561
+ Response
1562
+ A lit of json dict with the platform reports.
1563
+
1564
+ Raises
1565
+ ------
1566
+ InvalidParameterException
1567
+ PropertyServerException
1568
+ UserNotAuthorizedException
1569
+
1570
+ """
1571
+
1572
+ if filter is None:
1573
+ filter = self.default_platform_name
1574
+
1575
+ url = (
1576
+ f"{self.runtime_command_root}/platforms/by-name?"
1577
+ f"startFrom={start_from}&pageSize={page_size}"
1578
+ )
1579
+ if effective_time is not None:
1580
+ body = {"filter": filter, "effectiveTime": effective_time}
1581
+ else:
1582
+ body = {"filter": filter}
1583
+
1584
+ response = await self._async_make_request("POST", url, body)
1585
+
1586
+ return response.json().get("elements", "No platforms found")
1587
+
1588
+ async def _async_get_platforms_by_type(
1589
+ self,
1590
+ filter: str = None,
1591
+ effective_time: str = None,
1592
+ start_from: int = 0,
1593
+ page_size: int = max_paging_size,
1594
+ ) -> str | list:
1595
+ """Returns the list of platforms with a particular deployed implementation type. The value is specified in
1596
+ the filter. If it is null, or no request body is supplied, all platforms are returned. Async version.
1597
+
1598
+ Parameters
1599
+ ----------
1600
+ filter : str, opt
1601
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
1602
+ If the value is None, we will default to the "OMAG Server Platform".
1603
+ effective_time: str, optional
1604
+ Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
1605
+ start_from : int, optional
1606
+ The index from which to start fetching the engine actions. Default is 0.
1607
+ page_size : int, optional
1608
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
1609
+
1610
+ Returns
1611
+ -------
1612
+ Response
1613
+ A lit of json dict with the platform reports.
1614
+
1615
+ Raises
1616
+ ------
1617
+ InvalidParameterException
1618
+ PropertyServerException
1619
+ UserNotAuthorizedException
1620
+
1621
+ """
1622
+
1623
+ if filter is None:
1624
+ filter = "OMAG Server Platform"
1625
+
1626
+ url = (
1627
+ f"{self.runtime_command_root}/platforms/"
1628
+ f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}"
1629
+ )
1630
+
1631
+ if effective_time is not None:
1632
+ body = {"filter": filter, "effectiveTime": effective_time}
1633
+ else:
1634
+ body = {"filter": filter}
1635
+
1636
+ response = await self._async_make_request("POST", url, body)
1637
+ return response.json().get("elements", "No platforms found")
1638
+
1639
+ def get_platforms_by_type(
1640
+ self,
1641
+ filter: str = None,
1642
+ effective_time: str = None,
1643
+ start_from: int = 0,
1644
+ page_size: int = max_paging_size,
1645
+ ) -> str | list:
1646
+ """Returns the list of platforms with a particular deployed implementation type. The value is specified in
1647
+ the filter. If it is null, or no request body is supplied, all platforms are returned.
1648
+
1649
+ Parameters
1650
+ ----------
1651
+ filter : str, opt
1652
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
1653
+ If the value is None, we will default to the "OMAG Server Platform".
1654
+ effective_time: str, optional
1655
+ Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
1656
+ start_from : int, optional
1657
+ The index from which to start fetching the engine actions. Default is 0.
1658
+ page_size : int, optional
1659
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
1660
+
1661
+ Returns
1662
+ -------
1663
+ Response
1664
+ A lit of json dict with the platform reports.
1665
+
1666
+ Raises
1667
+ ------
1668
+ InvalidParameterException
1669
+ PropertyServerException
1670
+ UserNotAuthorizedException
1671
+
1672
+ """
1673
+ loop = asyncio.get_event_loop()
1674
+ response = loop.run_until_complete(
1675
+ self._async_get_platforms_by_type(
1676
+ filter, effective_time, start_from, page_size
1677
+ )
1678
+ )
1679
+ return response
1680
+
1681
+ async def _async_get_platform_templates_by_type(
1682
+ self,
1683
+ filter: str = None,
1684
+ effective_time: str = None,
1685
+ start_from: int = 0,
1686
+ page_size: int = max_paging_size,
1687
+ ) -> str | list:
1688
+ """Returns the list of platform templates for a particular deployed implementation type. The value is
1689
+ specified in the filter. If it is null, or no request body is supplied, all platforms are returned.
1690
+ Async version.
1691
+
1692
+ Parameters
1693
+ ----------
1694
+ filter : str, opt
1695
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
1696
+ If the value is None, we will default to the "OMAG Server Platform".
1697
+ effective_time: str, optional
1698
+ Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
1699
+ start_from : int, optional
1700
+ The index from which to start fetching the engine actions. Default is 0.
1701
+ page_size : int, optional
1702
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
1703
+
1704
+ Returns
1705
+ -------
1706
+ Response
1707
+ A lit of json dict with the platform reports.
1708
+
1709
+ Raises
1710
+ ------
1711
+ InvalidParameterException
1712
+ PropertyServerException
1713
+ UserNotAuthorizedException
1714
+
1715
+ """
1716
+
1717
+ if filter is None:
1718
+ filter = "OMAG Server Platform"
1719
+
1720
+ url = (
1721
+ f"{self.runtime_command_root}/platforms/"
1722
+ f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}&getTemplates=true"
1723
+ )
1724
+
1725
+ if effective_time is not None:
1726
+ body = {"filter": filter, "effectiveTime": effective_time}
1727
+ else:
1728
+ body = {"filter": filter}
1729
+
1730
+ response = await self._async_make_request("POST", url, body)
1731
+ return response.json().get("elements", "No platforms found")
1732
+
1733
+ def get_platform_templates_by_type(
1734
+ self,
1735
+ filter: str = None,
1736
+ effective_time: str = None,
1737
+ start_from: int = 0,
1738
+ page_size: int = max_paging_size,
1739
+ ) -> str | list:
1740
+ """Returns the list of platform templates with a particular deployed implementation type. The value is
1741
+ specified in the filter. If it is null, or no request body is supplied, all platforms are returned.
1742
+
1743
+ Parameters
1744
+ ----------
1745
+ filter : str, opt
1746
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
1747
+ If the value is None, we will default to the "OMAG Server Platform".
1748
+ effective_time: str, optional
1749
+ Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
1750
+ start_from : int, optional
1751
+ The index from which to start fetching the engine actions. Default is 0.
1752
+ page_size : int, optional
1753
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
1754
+
1755
+ Returns
1756
+ -------
1757
+ Response
1758
+ A lit of json dict with the platform reports.
1759
+
1760
+ Raises
1761
+ ------
1762
+ InvalidParameterException
1763
+ PropertyServerException
1764
+ UserNotAuthorizedException
1765
+
1766
+ """
1767
+ loop = asyncio.get_event_loop()
1768
+ response = loop.run_until_complete(
1769
+ self._async_get_platforms_by_type(
1770
+ filter, effective_time, start_from, page_size
1771
+ )
1772
+ )
1773
+ return response
1774
+
1775
+ async def _async_get_platform_report(
1776
+ self, platform_guid: str = None, platform_name: str = None
1777
+ ) -> str | list:
1778
+ """Returns details about the running platform. Async version.
1779
+
1780
+ Parameters
1781
+ ----------
1782
+ platform_guid : str
1783
+ The unique identifier for the platform. If not specified, platform_name must be.
1784
+ platform_name: str, default = None
1785
+ Name of server to act on. If not specified, platform_guid must be.
1786
+
1787
+ Returns
1788
+ -------
1789
+ Response
1790
+ A json dict with the platform report.
1791
+
1792
+ Raises
1793
+ ------
1794
+ InvalidParameterException
1795
+ PropertyServerException
1796
+ UserNotAuthorizedException
1797
+
1798
+ """
1799
+ platform_guid = self.__get_guid__(platform_guid, platform_name, "name")
1800
+ url = f"{self.runtime_command_root}/platforms/{platform_guid}/report"
1801
+
1802
+ response = await self._async_make_request("GET", url)
1803
+
1804
+ return response.json().get("element", "No platforms found")
1805
+
1806
+ def get_platform_report(
1807
+ self, platform_guid: str = None, platform_name: str = None
1808
+ ) -> str | list:
1809
+ """Returns details about the running platform.
1810
+
1811
+ Parameters
1812
+ ----------
1813
+ platform_guid : str
1814
+ The unique identifier for the platform. If not specified, platform_name must be.
1815
+ platform_name: str, default = None
1816
+ Name of server to act on. If not specified, platform_guid must be.
1817
+ Returns
1818
+ -------
1819
+ Response
1820
+ A json dict with the platform report.
1821
+
1822
+ Raises
1823
+ ------
1824
+ InvalidParameterException
1825
+ PropertyServerException
1826
+ UserNotAuthorizedException
1827
+
1828
+ """
1829
+ loop = asyncio.get_event_loop()
1830
+ response = loop.run_until_complete(
1831
+ self._async_get_platform_report(platform_guid, platform_name)
1832
+ )
1833
+ return response
1834
+
1835
+ async def _async_get_platform_by_guid(
1836
+ self,
1837
+ platform_guid: str,
1838
+ effective_time: str = None,
1839
+ ) -> str | list:
1840
+ """Returns details about the platform's catalog entry (asset). Async version.
1841
+
1842
+ Parameters
1843
+ ----------
1844
+ platform_guid : str
1845
+ Unique id of the platform to return details of.
1846
+ effective_time: str, optional
1847
+ Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
1848
+
1849
+
1850
+ Returns
1851
+ -------
1852
+ Response
1853
+ A list of json dict with the platform reports.
1854
+
1855
+ """
1856
+
1857
+ url = f"{self.runtime_command_root}/platforms/{platform_guid}"
1858
+
1859
+ if effective_time is not None:
1860
+ body = {"effectiveTime": effective_time}
1861
+ response = await self._async_make_request("POST", url, body)
1862
+
1863
+ else:
1864
+ response = await self._async_make_request("POST", url)
1865
+
1866
+ return response.json().get("element", "No platforms found")
1867
+
1868
+ def get_platform_by_guid(
1869
+ self,
1870
+ platform_guid: str,
1871
+ effective_time: str = None,
1872
+ ) -> str | list:
1873
+ """Returns details about the platform's catalog entry (asset).
1874
+
1875
+ Parameters
1876
+ ----------
1877
+ platform_guid : str, opt
1878
+ Identity of the platform to return details about.
1879
+ effective_time: str, optional
1880
+ Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
1881
+
1882
+ Returns
1883
+ -------
1884
+ Response
1885
+ A lit of json dict with the platform reports.
1886
+
1887
+ Raises
1888
+ ------
1889
+ InvalidParameterException
1890
+ PropertyServerException
1891
+ UserNotAuthorizedException
1892
+
1893
+ """
1894
+ loop = asyncio.get_event_loop()
1895
+ response = loop.run_until_complete(
1896
+ self._async_get_platform_by_guid(platform_guid, effective_time)
1897
+ )
1898
+ return response
1899
+
1900
+ async def _async_get_server_by_guid(
1901
+ self,
1902
+ server_guid: str = None,
1903
+ effective_time: str = None,
1904
+ ) -> str | dict:
1905
+ """Returns details about the server's catalog entry (asset). Async version.
1906
+
1907
+ Parameters
1908
+ ----------
1909
+ server_guid : str
1910
+ The unique identifier for the platform.
1911
+ effective_time: str, optional
1912
+ Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
1913
+
1914
+ Returns
1915
+ -------
1916
+ Response
1917
+ A lit of json dict with the platform reports.
1918
+
1919
+ Raises
1920
+ ------
1921
+ InvalidParameterException
1922
+ PropertyServerException
1923
+ UserNotAuthorizedException
1924
+
1925
+ """
1926
+
1927
+ url = f"{self.runtime_command_root}/software-servers/{server_guid}"
1928
+
1929
+ if effective_time is not None:
1930
+ body = {"effectiveTime": effective_time}
1931
+ response = await self._async_make_request("POST", url, body)
1932
+
1933
+ else:
1934
+ response = await self._async_make_request("POST", url)
1935
+
1936
+ return response.json().get("element", "No server found")
1937
+
1938
+ def get_server_by_guid(
1939
+ self,
1940
+ server_guid: str = None,
1941
+ effective_time: str = None,
1942
+ ) -> str | dict:
1943
+ """Returns details about the platform's catalog entry (asset).
1944
+
1945
+ Parameters
1946
+ ----------
1947
+ server_guid : str
1948
+ The unique identifier for the platform.
1949
+ effective_time: str, optional
1950
+ Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
1951
+
1952
+ Returns
1953
+ -------
1954
+ Response
1955
+ A lit of json dict with the platform reports.
1956
+
1957
+ Raises
1958
+ ------
1959
+ InvalidParameterException
1960
+ PropertyServerException
1961
+ UserNotAuthorizedException
1962
+
1963
+ """
1964
+ loop = asyncio.get_event_loop()
1965
+ response = loop.run_until_complete(
1966
+ self._async_get_server_by_guid(server_guid, effective_time)
1967
+ )
1968
+ return response
1969
+
1970
+ async def _async_get_servers_by_name(
1971
+ self,
1972
+ filter: str,
1973
+ effective_time: str = None,
1974
+ start_from: int = 0,
1975
+ page_size: int = max_paging_size,
1976
+ ) -> str | list:
1977
+ """Returns the list of servers with a particular name. The name is specified in the filter. Async version.
1978
+
1979
+ Parameters
1980
+ ----------
1981
+ filter : str, opt
1982
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
1983
+ If the value is None, we will default to the "OMAG Server Platform".
1984
+ effective_time: str, optional
1985
+ Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
1986
+ start_from : int, optional
1987
+ The index from which to start fetching the engine actions. Default is 0.
1988
+ page_size : int, optional
1989
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
1990
+
1991
+ Returns
1992
+ -------
1993
+ Response
1994
+ A lit of json dict with the platform reports.
1995
+
1996
+ Raises
1997
+ ------
1998
+ InvalidParameterException
1999
+ PropertyServerException
2000
+ UserNotAuthorizedException
2001
+
2002
+ """
2003
+
2004
+ url = (
2005
+ f"{self.runtime_command_root}/software-servers/by-name?"
2006
+ f"startFrom={start_from}&pageSize={page_size}"
2007
+ )
2008
+
2009
+ if effective_time is None:
2010
+ body = {"filter": filter}
2011
+ else:
2012
+ body = {"filter": filter, "effective_time": effective_time}
2013
+ response = await self._async_make_request("POST", url, body)
2014
+
2015
+ return response.json().get("elements", "No servers found")
2016
+
2017
+ def get_servers_by_name(
2018
+ self, filter: str, effective_time: str = None
2019
+ ) -> str | list:
2020
+ """Returns the list of servers with a particular name. The name is specified in the filter.
2021
+
2022
+ Parameters
2023
+ ----------
2024
+ filter : str, opt
2025
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
2026
+ If the value is None, we will default to the "OMAG Server Platform".
2027
+ effective_time: str, optional
2028
+ Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
2029
+
2030
+ Returns
2031
+ -------
2032
+ Response
2033
+ A lit of json dict with the platform reports.
2034
+
2035
+ Raises
2036
+ ------
2037
+ InvalidParameterException
2038
+ PropertyServerException
2039
+ UserNotAuthorizedException
2040
+
2041
+ """
2042
+ loop = asyncio.get_event_loop()
2043
+ response = loop.run_until_complete(
2044
+ self._async_get_servers_by_name(filter, effective_time)
2045
+ )
2046
+ return response
2047
+
2048
+ async def _async_get_servers_by_dep_impl_type(
2049
+ self,
2050
+ filter: str = "*",
2051
+ effective_time: str = None,
2052
+ start_from: int = 0,
2053
+ page_size: int = max_paging_size,
2054
+ ) -> str | list:
2055
+ """Returns the list of servers with a particular deployed implementation type. The value is specified
2056
+ in the filter. If it is null, or no request body is supplied, all servers are returned.
2057
+ Async version.
2058
+
2059
+ Parameters
2060
+ ----------
2061
+ filter : str, opt
2062
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
2063
+ If the value is None, we will default to the "OMAG Server Platform".
2064
+ effective_time: str, optional
2065
+ Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
2066
+ start_from : int, optional
2067
+ The index from which to start fetching the engine actions. Default is 0.
2068
+ page_size : int, optional
2069
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
2070
+
2071
+ Returns
2072
+ -------
2073
+ Response
2074
+ A lit of json dict with the platform reports.
2075
+
2076
+ Raises
2077
+ ------
2078
+ InvalidParameterException
2079
+ PropertyServerException
2080
+ UserNotAuthorizedException
2081
+
2082
+ """
2083
+
2084
+ if filter == "*":
2085
+ filter = None
2086
+
2087
+ url = (
2088
+ f"{self.runtime_command_root}/software-servers/"
2089
+ f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}"
2090
+ )
2091
+
2092
+ body = body_slimmer({"filter": filter, "effective_time": effective_time})
2093
+
2094
+ response = await self._async_make_request("POST", url, body)
2095
+
2096
+ return response.json().get("elements", "No servers found")
2097
+
2098
+ def get_servers_by_dep_impl_type(
2099
+ self,
2100
+ filter: str = "*",
2101
+ effective_time: str = None,
2102
+ start_from: int = 0,
2103
+ page_size: int = max_paging_size,
2104
+ ) -> str | list:
2105
+ """Returns the list of servers with a particular deployed implementation type.
2106
+ The value is specified in the filter. If it is null, or no request body is supplied,
2107
+ all servers are returned.
2108
+
2109
+ Parameters
2110
+ ----------
2111
+ filter : str, opt
2112
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
2113
+ If the value is None, we will default to the "OMAG Server Platform".
2114
+ effective_time: str, optional
2115
+ Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
2116
+ start_from : int, optional
2117
+ The index from which to start fetching the engine actions. Default is 0.
2118
+ page_size : int, optional
2119
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
2120
+
2121
+ Returns
2122
+ -------
2123
+ Response
2124
+ A lit of json dict with the platform reports.
2125
+
2126
+ Raises
2127
+ ------
2128
+ InvalidParameterException
2129
+ PropertyServerException
2130
+ UserNotAuthorizedException
2131
+
2132
+ """
2133
+ loop = asyncio.get_event_loop()
2134
+ response = loop.run_until_complete(
2135
+ self._async_get_servers_by_dep_impl_type(
2136
+ filter, effective_time, start_from, page_size
2137
+ )
2138
+ )
2139
+ return response
2140
+
2141
+ async def _async_get_server_templates_by_dep_impl_type(
2142
+ self,
2143
+ filter: str = "*",
2144
+ effective_time: str = None,
2145
+ start_from: int = 0,
2146
+ page_size: int = max_paging_size,
2147
+ ) -> str | list:
2148
+ """Returns the list of server templates with a particular deployed implementation type. The value is
2149
+ specified in the filter. If it is null, or no request body is supplied, all servers are returned.
2150
+ Async version.
2151
+
2152
+ Parameters
2153
+ ----------
2154
+ filter : str, opt
2155
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
2156
+ If the value is None, we will default to the "OMAG Server Platform".
2157
+ effective_time: str, optional
2158
+ Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
2159
+ start_from : int, optional
2160
+ The index from which to start fetching the engine actions. Default is 0.
2161
+ page_size : int, optional
2162
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
2163
+
2164
+ Returns
2165
+ -------
2166
+ Response
2167
+ A lit of json dict with the platform reports.
2168
+
2169
+ Raises
2170
+ ------
2171
+ InvalidParameterException
2172
+ PropertyServerException
2173
+ UserNotAuthorizedException
2174
+
2175
+ """
2176
+
2177
+ if filter == "*":
2178
+ filter = None
2179
+
2180
+ url = (
2181
+ f"{self.runtime_command_root}/software-servers/"
2182
+ f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}&getTemplates=true"
2183
+ )
2184
+
2185
+ body = body_slimmer({"filter": filter, "effective_time": effective_time})
2186
+
2187
+ response = await self._async_make_request("POST", url, body)
2188
+
2189
+ return response.json().get("elements", "No platforms found")
2190
+
2191
+ def get_server_templates_by_dep_impl_type(
2192
+ self,
2193
+ filter: str = "*",
2194
+ effective_time: str = None,
2195
+ start_from: int = 0,
2196
+ page_size: int = max_paging_size,
2197
+ ) -> str | list:
2198
+ """Returns the list of server templates with a particular deployed implementation type.
2199
+ The value is specified in the filter. If it is null, or no request body is supplied,
2200
+ all servers are returned.
2201
+
2202
+ Parameters
2203
+ ----------
2204
+ filter : str, opt
2205
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
2206
+ If the value is None, we will default to the "OMAG Server Platform".
2207
+ effective_time: str, optional
2208
+ Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
2209
+ start_from : int, optional
2210
+ The index from which to start fetching the engine actions. Default is 0.
2211
+ page_size : int, optional
2212
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
2213
+
2214
+ Returns
2215
+ -------
2216
+ Response
2217
+ A lit of json dict with the platform reports.
2218
+
2219
+ Raises
2220
+ ------
2221
+ InvalidParameterException
2222
+ PropertyServerException
2223
+ UserNotAuthorizedException
2224
+
2225
+ """
2226
+ loop = asyncio.get_event_loop()
2227
+ response = loop.run_until_complete(
2228
+ self._async_get_server_templates_by_dep_impl_type(
2229
+ filter, effective_time, start_from, page_size
2230
+ )
2231
+ )
2232
+ return response
2233
+
2234
+ async def _async_get_server_report(
2235
+ self, server_guid: str = None, server_name: str = None
2236
+ ) -> str | list:
2237
+ """Returns details about the running server. Async version.
2238
+
2239
+ Parameters
2240
+ ----------
2241
+ server_guid : str, default = None
2242
+ Identity of the server to act on. If not specified, server_name must be.
2243
+ server_name: str, default = None
2244
+ Name of server to act on. If not specified, server_guid must be.
2245
+
2246
+ Returns
2247
+ -------
2248
+ Response
2249
+ A list of json dict with the platform reports.
2250
+
2251
+ Raises
2252
+ ------
2253
+ InvalidParameterException
2254
+ PropertyServerException
2255
+ UserNotAuthorizedException
2256
+
2257
+ """
2258
+ server_guid = self.__get_guid__(
2259
+ server_guid, server_name, "name", tech_type="Integration Daemon"
2260
+ )
2261
+ url = f"{self.runtime_command_root}/omag-servers/{server_guid}/instance/report"
2262
+
2263
+ response = await self._async_make_request("GET", url)
2264
+
2265
+ return response.json().get("element", "No server found")
2266
+
2267
+ def get_server_report(
2268
+ self, server_guid: str = None, server_name: str = None
2269
+ ) -> str | list:
2270
+ """Returns details about the running server.
2271
+
2272
+ Parameters
2273
+ ----------
2274
+ server_guid : str, default = None
2275
+ Identity of the server to act on. If not specified, server_name must be.
2276
+ server_name: str, default = None
2277
+ Name of server to act on. If not specified, server_guid must be.
2278
+
2279
+ Returns
2280
+ -------
2281
+ Response
2282
+ A list of json dict with the platform reports.
2283
+
2284
+ Raises
2285
+ ------
2286
+ InvalidParameterException
2287
+ PropertyServerException
2288
+ UserNotAuthorizedException
2289
+
2290
+ """
2291
+ loop = asyncio.get_event_loop()
2292
+ response = loop.run_until_complete(
2293
+ self._async_get_server_report(server_guid, server_name)
2294
+ )
2295
+ return response
2296
+
2297
+
2298
+ if __name__ == "__main__":
2299
+ print("Main-Runtime Manager")