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,1854 @@
1
+ """
2
+ PDX-License-Identifier: Apache-2.0
3
+ Copyright Contributors to the ODPi Egeria project.
4
+
5
+ Create, maintain and explore projects.
6
+ https://egeria-project.org/concepts/project
7
+
8
+ """
9
+ import asyncio
10
+ import time
11
+
12
+ # import json
13
+ from pyegeria._client import Client
14
+ from pyegeria._validators import (
15
+ validate_guid,
16
+ validate_search_string,
17
+ )
18
+ from pyegeria.utils import body_slimmer
19
+
20
+
21
+ class ProjectManager(Client):
22
+ """
23
+ Create and manage projects. Projects may be organized in a hierarchy.
24
+ See https://egeria-project.org/types/1/0130-Projects
25
+
26
+ Attributes:
27
+
28
+ server_name: str
29
+ The name of the View Server to connect to.
30
+ platform_url : str
31
+ URL of the server platform to connect to
32
+ user_id : str
33
+ The identity of the user calling the method - this sets a default optionally used by the methods
34
+ when the user doesn't pass the user_id on a method call.
35
+ user_pwd: str
36
+ The password associated with the user_id. Defaults to None
37
+ """
38
+
39
+ def __init__(
40
+ self,
41
+ view_server: str,
42
+ platform_url: str,
43
+ user_id: str,
44
+ user_pwd: str = None,
45
+ token: str = None,
46
+ ):
47
+ self.view_server = view_server
48
+ self.platform_url = platform_url
49
+ self.user_id = user_id
50
+ self.user_pwd = user_pwd
51
+ self.project_command_base: str = (
52
+ f"/api/open-metadata/project-manager/metadata-elements"
53
+ )
54
+ Client.__init__(self, view_server, platform_url, user_id, user_pwd, token)
55
+
56
+ #
57
+ # Retrieving Projects= Information - https://egeria-project.org/concepts/project
58
+ #
59
+ async def _async_get_linked_projects(
60
+ self,
61
+ parent_guid: str,
62
+ project_status: str = None,
63
+ effective_time: str = None,
64
+ start_from: int = 0,
65
+ page_size: int = None,
66
+ ) -> list | str:
67
+ """Returns the list of projects that are linked off of the supplied element. Any relationship will do.
68
+ The request body is optional, but if supplied acts as a filter on project status. Async version.
69
+
70
+ Parameters
71
+ ----------
72
+ parent_guid: str
73
+ The identity of the parent to find linked projects from.
74
+ project_status: str, optional
75
+ Optionally, filter results by project status.
76
+ effective_time: str, optional
77
+ Time at which to query for projects. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
78
+
79
+ start_from: int, [default=0], optional
80
+ When multiple pages of results are available, the page number to start from.
81
+ page_size: int, [default=None]
82
+ The number of items to return in a single page. If not specified, the default will be taken from
83
+ the class instance.
84
+ Returns
85
+ -------
86
+ List | str
87
+
88
+ A list of projects linked off of the supplied element filtered by project status and effective time.
89
+
90
+ Raises
91
+ ------
92
+
93
+ InvalidParameterException
94
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
95
+ PropertyServerException
96
+ Raised by the server when an issue arises in processing a valid request
97
+ NotAuthorizedException
98
+ The principle specified by the user_id does not have authorization for the requested action
99
+
100
+ """
101
+
102
+ if page_size is None:
103
+ page_size = self.page_size
104
+
105
+ body = {
106
+ "filter": project_status,
107
+ "effectiveTime": effective_time,
108
+ }
109
+ body_s = body_slimmer(body)
110
+ url = (
111
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/"
112
+ f"metadata-elements/{parent_guid}/projects?startFrom={start_from}&pageSize={page_size}"
113
+ )
114
+
115
+ resp = await self._async_make_request("POST", url, body_s)
116
+ return resp.json().get("elements", "No linked projects found")
117
+
118
+ def get_linked_projects(
119
+ self,
120
+ parent_guid: str,
121
+ project_status: str = None,
122
+ effective_time: str = None,
123
+ start_from: int = 0,
124
+ page_size: int = None,
125
+ ) -> list | str:
126
+ """Returns the list of projects that are linked off of the supplied element. Any relationship will do.
127
+ The request body is optional, but if supplied acts as a filter on project status.
128
+
129
+ Parameters
130
+ ----------
131
+ parent_guid: str
132
+ The identity of the parent to find linked projects from
133
+ project_status: str, optional
134
+ Optionally, filter results by project status.
135
+ effective_time: str, optional
136
+ Time at which to query for projects. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
137
+
138
+ start_from: int, [default=0], optional
139
+ When multiple pages of results are available, the page number to start from.
140
+ page_size: int, [default=None]
141
+ The number of items to return in a single page. If not specified, the default will be taken from
142
+ the class instance.
143
+ Returns
144
+ -------
145
+ List | str
146
+
147
+ A list of projects linked off of the supplied element filtered by project status and effective time.
148
+
149
+ Raises
150
+ ------
151
+
152
+ InvalidParameterException
153
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
154
+ PropertyServerException
155
+ Raised by the server when an issue arises in processing a valid request
156
+ NotAuthorizedException
157
+ The principle specified by the user_id does not have authorization for the requested action
158
+
159
+ """
160
+ loop = asyncio.get_event_loop()
161
+ resp = loop.run_until_complete(
162
+ self._async_get_linked_projects(
163
+ parent_guid,
164
+ project_status,
165
+ effective_time,
166
+ start_from,
167
+ page_size,
168
+ )
169
+ )
170
+ return resp
171
+
172
+ async def _async_get_classified_projects(
173
+ self,
174
+ project_classification: str,
175
+ effective_time: str = None,
176
+ start_from: int = 0,
177
+ page_size: int = None,
178
+ ) -> list | str:
179
+ """Returns the list of projects with a particular classification. The name of the classification is
180
+ supplied in the request body. Examples of these classifications include StudyProject, PersonalProject,
181
+ Campaign or Task. There is also GlossaryProject and GovernanceProject. Async version.
182
+
183
+ Parameters
184
+ ----------
185
+ project_classification: str
186
+ The project classification to search for.
187
+ effective_time: str, optional
188
+ Time at which to query for projects. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
189
+
190
+ start_from: int, [default=0], optional
191
+ When multiple pages of results are available, the page number to start from.
192
+ page_size: int, [default=None]
193
+ The number of items to return in a single page. If not specified, the default will be taken from
194
+ the class instance.
195
+ Returns
196
+ -------
197
+ List | str
198
+
199
+ A list of projects filtered by project classification, and effective time.
200
+
201
+ Raises
202
+ ------
203
+
204
+ InvalidParameterException
205
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
206
+ PropertyServerException
207
+ Raised by the server when an issue arises in processing a valid request
208
+ NotAuthorizedException
209
+ The principle specified by the user_id does not have authorization for the requested action
210
+
211
+ """
212
+
213
+ if page_size is None:
214
+ page_size = self.page_size
215
+
216
+ body = {
217
+ "filter": project_classification,
218
+ "effectiveTime": effective_time,
219
+ }
220
+ body_s = body_slimmer(body)
221
+ url = (
222
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/"
223
+ f"projects/by-classifications?startFrom={start_from}&pageSize={page_size}"
224
+ )
225
+
226
+ resp = await self._async_make_request("POST", url, body_s)
227
+ return resp.json()
228
+
229
+ def get_classified_projects(
230
+ self,
231
+ project_classification: str,
232
+ effective_time: str = None,
233
+ start_from: int = 0,
234
+ page_size: int = None,
235
+ ) -> list | str:
236
+ """Returns the list of projects with a particular classification. The name of the classification is
237
+ supplied in the request body. Examples of these classifications include StudyProject, PersonalProject,
238
+ Campaign or Task. There is also GlossaryProject and GovernanceProject.
239
+
240
+ Parameters
241
+ ----------
242
+ project_classification: str
243
+ The project classification to search for.
244
+ effective_time: str, optional
245
+ Time at which to query for projects. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
246
+
247
+ start_from: int, [default=0], optional
248
+ When multiple pages of results are available, the page number to start from.
249
+ page_size: int, [default=None]
250
+ The number of items to return in a single page. If not specified, the default will be taken from
251
+ the class instance.
252
+ Returns
253
+ -------
254
+ List | str
255
+
256
+ A list of projects filtered by project classification, and effective time.
257
+
258
+ Raises
259
+ ------
260
+
261
+ InvalidParameterException
262
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
263
+ PropertyServerException
264
+ Raised by the server when an issue arises in processing a valid request
265
+ NotAuthorizedException
266
+ The principle specified by the user_id does not have authorization for the requested action
267
+
268
+ """
269
+ loop = asyncio.get_event_loop()
270
+ resp = loop.run_until_complete(
271
+ self._async_get_classified_projects(
272
+ project_classification,
273
+ effective_time,
274
+ start_from,
275
+ page_size,
276
+ )
277
+ )
278
+ return resp
279
+
280
+ async def _async_get_project_team(
281
+ self,
282
+ project_guid: str,
283
+ team_role: str = None,
284
+ effective_time: str = None,
285
+ start_from: int = 0,
286
+ page_size: int = None,
287
+ ) -> list | str:
288
+ """Returns the list of actors that are linked off of the project. This includes the project managers.
289
+ The optional request body allows a teamRole to be specified as a filter. To filter out the project managers,
290
+ specify ProjectManagement as the team role. See https://egeria-project.org/concepts/project for details.
291
+ Async version.
292
+
293
+ Parameters
294
+ ----------
295
+ project_guid: str
296
+ The identity of the project to return team information about.
297
+ team_role: str, optional
298
+ team role to filter on. Project managers would be "ProjectManagement".
299
+ effective_time: str, optional
300
+ Time at which to query the team role. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
301
+
302
+ start_from: int, [default=0], optional
303
+ When multiple pages of results are available, the page number to start from.
304
+ page_size: int, [default=None]
305
+ The number of items to return in a single page. If not specified, the default will be taken from
306
+ the class instance.
307
+
308
+ Returns
309
+ -------
310
+ list | str
311
+ The list of actors linked off the project, including project managers Returns a string if none found.
312
+
313
+ Raises
314
+ ------
315
+ InvalidParameterException
316
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values.
317
+ PropertyServerException
318
+ Raised by the server when an issue arises in processing a valid request.
319
+ NotAuthorizedException
320
+ The principle specified by the user_id does not have authorization for the requested action.
321
+ Notes
322
+ -----
323
+ """
324
+
325
+ if page_size is None:
326
+ page_size = self.page_size
327
+
328
+ body = {effective_time: effective_time, "filter": team_role}
329
+ body_s = body_slimmer(body)
330
+ url = (
331
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/"
332
+ f"{project_guid}/team?startFrom={start_from}&pageSize={page_size}"
333
+ )
334
+
335
+ resp = await self._async_make_request("POST", url, body_s)
336
+
337
+ result = resp.json().get("elements", "No elements found")
338
+ return result
339
+
340
+ def get_project_team(
341
+ self,
342
+ project_guid: str,
343
+ team_role: str = None,
344
+ effective_time: str = None,
345
+ start_from: int = 0,
346
+ page_size: int = None,
347
+ ) -> list | str:
348
+ """Returns the list of actors that are linked off of the project. This includes the project managers.
349
+ The optional request body allows a teamRole to be specified as a filter. To filter out the project managers,
350
+ specify ProjectManagement as the team role. See https://egeria-project.org/concepts/project for details.
351
+ Async version.
352
+
353
+ Parameters
354
+ ----------
355
+ project_guid: str
356
+ The identity of the project to return team information about.
357
+ team_role: str, optional
358
+ team role to filter on. Project managers would be "ProjectManagement".
359
+ effective_time: str, optional
360
+ Time at which to query the team role. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
361
+
362
+ start_from: int, [default=0], optional
363
+ When multiple pages of results are available, the page number to start from.
364
+ page_size: int, [default=None]
365
+ The number of items to return in a single page. If not specified, the default will be taken from
366
+ the class instance.
367
+
368
+ Returns
369
+ -------
370
+ list | str
371
+ The list of actors linked off the project, including project managers Returns a string if none found.
372
+
373
+ Raises
374
+ ------
375
+ InvalidParameterException
376
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values.
377
+ PropertyServerException
378
+ Raised by the server when an issue arises in processing a valid request.
379
+ NotAuthorizedException
380
+ The principle specified by the user_id does not have authorization for the requested action.
381
+ Notes
382
+ -----
383
+ """
384
+ loop = asyncio.get_event_loop()
385
+ resp = loop.run_until_complete(
386
+ self._async_get_project_team(
387
+ project_guid,
388
+ team_role,
389
+ effective_time,
390
+ start_from,
391
+ page_size,
392
+ )
393
+ )
394
+ return resp
395
+
396
+ async def _async_find_projects(
397
+ self,
398
+ search_string: str,
399
+ effective_time: str = None,
400
+ starts_with: bool = False,
401
+ ends_with: bool = False,
402
+ ignore_case: bool = False,
403
+ start_from: int = 0,
404
+ page_size: int = None,
405
+ ) -> list | str:
406
+ """Returns the list of projects matching the search string.
407
+ The search string is located in the request body and is interpreted as a plain string.
408
+ The request parameters, startsWith, endsWith and ignoreCase can be used to allow a fuzzy search.
409
+ Async version.
410
+
411
+ Parameters
412
+ ----------
413
+ search_string: str,
414
+ Search string to use to find matching projects. If the search string is '*' then all projects returned.
415
+ effective_time: str, [default=None], optional
416
+ Effective time of the query. If not specified will default to any time.
417
+
418
+ starts_with : bool, [default=False], optional
419
+ Starts with the supplied string.
420
+ ends_with : bool, [default=False], optional
421
+ Ends with the supplied string
422
+ ignore_case : bool, [default=False], optional
423
+ Ignore case when searching
424
+ start_from: int, [default=0], optional
425
+ When multiple pages of results are available, the page number to start from.
426
+ page_size: int, [default=None]
427
+ The number of items to return in a single page. If not specified, the default will be taken from
428
+ the class instance.
429
+ Returns
430
+ -------
431
+ List | str
432
+
433
+ A list of projects matching the search string. Returns a string if none found.
434
+
435
+ Raises
436
+ ------
437
+
438
+ InvalidParameterException
439
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
440
+ PropertyServerException
441
+ Raised by the server when an issue arises in processing a valid request
442
+ NotAuthorizedException
443
+ The principle specified by the user_id does not have authorization for the requested action
444
+
445
+ """
446
+
447
+ if page_size is None:
448
+ page_size = self.page_size
449
+ starts_with_s = str(starts_with).lower()
450
+ ends_with_s = str(ends_with).lower()
451
+ ignore_case_s = str(ignore_case).lower()
452
+
453
+ validate_search_string(search_string)
454
+
455
+ if search_string == "*":
456
+ search_string = None
457
+
458
+ body = {
459
+ "filter": search_string,
460
+ "effective_time": effective_time,
461
+ }
462
+ body_s = body_slimmer(body)
463
+ url = (
464
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/"
465
+ f"by-search-string?startFrom={start_from}&pageSize={page_size}&startsWith={starts_with_s}&"
466
+ f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}"
467
+ )
468
+
469
+ resp = await self._async_make_request("POST", url, body_s)
470
+ return resp.json().get("elements", "No elements found")
471
+
472
+ def find_projects(
473
+ self,
474
+ search_string: str,
475
+ effective_time: str = None,
476
+ starts_with: bool = False,
477
+ ends_with: bool = False,
478
+ ignore_case: bool = False,
479
+ start_from: int = 0,
480
+ page_size: int = None,
481
+ ) -> list | str:
482
+ """Returns the list of projects matching the search string.
483
+ The search string is located in the request body and is interpreted as a plain string.
484
+ The request parameters, startsWith, endsWith and ignoreCase can be used to allow a fuzzy search.
485
+
486
+ Parameters
487
+ ----------
488
+ search_string: str,
489
+ Search string to use to find matching projects. If the search string is '*' then all projects returned.
490
+ effective_time: str, [default=None], optional
491
+ Effective time of the query. If not specified will default to any time.
492
+
493
+ starts_with : bool, [default=False], optional
494
+ Starts with the supplied string.
495
+ ends_with : bool, [default=False], optional
496
+ Ends with the supplied string
497
+ ignore_case : bool, [default=False], optional
498
+ Ignore case when searching
499
+ start_from: int, [default=0], optional
500
+ When multiple pages of results are available, the page number to start from.
501
+ page_size: int, [default=None]
502
+ The number of items to return in a single page. If not specified, the default will be taken from
503
+ the class instance.
504
+ Returns
505
+ -------
506
+ List | str
507
+
508
+ A list of projects matching the search string. Returns a string if none found.
509
+
510
+ Raises
511
+ ------
512
+
513
+ InvalidParameterException
514
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
515
+ PropertyServerException
516
+ Raised by the server when an issue arises in processing a valid request
517
+ NotAuthorizedException
518
+ The principle specified by the user_id does not have authorization for the requested action
519
+
520
+ """
521
+ loop = asyncio.get_event_loop()
522
+ resp = loop.run_until_complete(
523
+ self._async_find_projects(
524
+ search_string,
525
+ effective_time,
526
+ starts_with,
527
+ ends_with,
528
+ ignore_case,
529
+ start_from,
530
+ page_size,
531
+ )
532
+ )
533
+
534
+ return resp
535
+
536
+ async def _async_get_projects_by_name(
537
+ self,
538
+ name: str,
539
+ effective_time: str = None,
540
+ start_from: int = 0,
541
+ page_size: int = None,
542
+ ) -> list | str:
543
+ """Returns the list of projects with a particular name. Async version.
544
+
545
+ Parameters
546
+ ----------
547
+ name: str,
548
+ name to use to find matching collections.
549
+ effective_time: str, [default=None], optional
550
+ Effective time of the query. If not specified will default to any time. ISO 8601 format.
551
+
552
+ start_from: int, [default=0], optional
553
+ When multiple pages of results are available, the page number to start from.
554
+ page_size: int, [default=None]
555
+ The number of items to return in a single page. If not specified, the default will be taken from
556
+ the class instance.
557
+ Returns
558
+ -------
559
+ List | str
560
+
561
+ A list of collections match matching the name. Returns a string if none found.
562
+
563
+ Raises
564
+ ------
565
+
566
+ InvalidParameterException
567
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
568
+ PropertyServerException
569
+ Raised by the server when an issue arises in processing a valid request
570
+ NotAuthorizedException
571
+ The principle specified by the user_id does not have authorization for the requested action
572
+
573
+ """
574
+
575
+ if page_size is None:
576
+ page_size = self.page_size
577
+
578
+ validate_search_string(name)
579
+
580
+ body = {
581
+ "filter": name,
582
+ "effective_time": effective_time,
583
+ }
584
+ body_s = body_slimmer(body)
585
+ url = (
586
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/"
587
+ f"by-name?startFrom={start_from}&pageSize={page_size}"
588
+ )
589
+
590
+ resp = await self._async_make_request("POST", url, body_s)
591
+ return resp.json().get("elements", "No elements found")
592
+
593
+ def get_projects_by_name(
594
+ self,
595
+ name: str,
596
+ effective_time: str = None,
597
+ start_from: int = 0,
598
+ page_size: int = None,
599
+ ) -> list | str:
600
+ """Returns the list of projects with a particular name.
601
+
602
+ Parameters
603
+ ----------
604
+ name: str,
605
+ name to use to find matching collections.
606
+ effective_time: str, [default=None], optional
607
+ Effective time of the query. If not specified will default to any time. ISO 8601 format.
608
+
609
+ start_from: int, [default=0], optional
610
+ When multiple pages of results are available, the page number to start from.
611
+ page_size: int, [default=None]
612
+ The number of items to return in a single page. If not specified, the default will be taken from
613
+ the class instance.
614
+ Returns
615
+ -------
616
+ List | str
617
+
618
+ A list of collections match matching the name. Returns a string if none found.
619
+
620
+ Raises
621
+ ------
622
+
623
+ InvalidParameterException
624
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
625
+ PropertyServerException
626
+ Raised by the server when an issue arises in processing a valid request
627
+ NotAuthorizedException
628
+ The principle specified by the user_id does not have authorization for the requested action
629
+
630
+ """
631
+ loop = asyncio.get_event_loop()
632
+ resp = loop.run_until_complete(
633
+ self._async_get_projects_by_name(
634
+ name, effective_time, start_from, page_size
635
+ )
636
+ )
637
+
638
+ return resp
639
+
640
+ async def _async_get_project(
641
+ self,
642
+ project_guid: str,
643
+ effective_time: str = None,
644
+ ) -> dict | str:
645
+ """Return the properties of a specific project. Async version.
646
+
647
+ Parameters
648
+ ----------
649
+ project_guid: str,
650
+ unique identifier of the project.
651
+ effective_time: str, [default=None], optional
652
+ Effective time of the query. If not specified will default to any time. Time in ISO8601 format is assumed.
653
+
654
+
655
+ Returns
656
+ -------
657
+ dict | str
658
+
659
+ A JSON dict representing the specified project. Returns a string if none found.
660
+
661
+ Raises
662
+ ------
663
+
664
+ InvalidParameterException
665
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
666
+ PropertyServerException
667
+ Raised by the server when an issue arises in processing a valid request
668
+ NotAuthorizedException
669
+ The principle specified by the user_id does not have authorization for the requested action
670
+
671
+ """
672
+
673
+ validate_guid(project_guid)
674
+ body = {
675
+ "effective_time": effective_time,
676
+ }
677
+ url = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/{project_guid}"
678
+
679
+ resp = await self._async_make_request("GET", url, body)
680
+ return resp.json()
681
+
682
+ def get_project(self, project_guid: str, effective_time: str = None) -> dict | str:
683
+ """Return the properties of a specific project.
684
+
685
+ Parameters
686
+ ----------
687
+ project_guid: str,
688
+ unique identifier of the project.
689
+ effective_time: str, [default=None], optional
690
+ Effective time of the query. If not specified will default to any time. Time in ISO8601 format is assumed.
691
+
692
+
693
+ Returns
694
+ -------
695
+ dict | str
696
+
697
+ A JSON dict representing the specified project. Returns a string if none found.
698
+
699
+ Raises
700
+ ------
701
+
702
+ InvalidParameterException
703
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
704
+ PropertyServerException
705
+ Raised by the server when an issue arises in processing a valid request
706
+ NotAuthorizedException
707
+ The principle specified by the user_id does not have authorization for the requested action
708
+
709
+ """
710
+ loop = asyncio.get_event_loop()
711
+ resp = loop.run_until_complete(
712
+ self._async_get_project(project_guid, effective_time)
713
+ )
714
+
715
+ return resp
716
+
717
+ #
718
+ # Create project methods
719
+ #
720
+ async def _async_create_project_w_body(
721
+ self,
722
+ body: dict,
723
+ classification: str = None,
724
+ ) -> str:
725
+ """Create project: https://egeria-project.org/concepts/project Async version.
726
+
727
+ Parameters
728
+ ----------.
729
+ body: dict
730
+ A dict representing the details of the project to create.
731
+ classification: str, optional
732
+ An optional project classification. See https://egeria-project.org/types/1/0130-Projects for values.
733
+ view_server: str, optional, defaults to None
734
+ The name of the server to configure. If not provided, the server name associated with the
735
+ instance is used.
736
+
737
+ Returns
738
+ -------
739
+ str - the guid of the created project
740
+
741
+ Raises
742
+ ------
743
+ InvalidParameterException
744
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
745
+ PropertyServerException
746
+ Raised by the server when an issue arises in processing a valid request
747
+ NotAuthorizedException
748
+ The principle specified by the user_id does not have authorization for the requested action
749
+ Notes
750
+ -----
751
+
752
+ Body structure like:
753
+ {
754
+ "anchorGUID" : "anchor GUID, if set then isOwnAnchor=false",
755
+ "isOwnAnchor" : False,
756
+ "parentGUID" : "parent GUID, if set, set all parameters beginning 'parent'",
757
+ "parentRelationshipTypeName" : "open metadata type name",
758
+ "parentAtEnd1": True,
759
+ "projectProperties": {
760
+ "class" : "ProjectProperties",
761
+ "qualifiedName": "Must provide a unique name here",
762
+ "identifier" : "Add business identifier",
763
+ "name" : "Add display name here",
764
+ "description" : "Add description of the project here",
765
+ "projectStatus": "Add appropriate valid value for type",
766
+ "projectPhase" : "Add appropriate valid value for phase",
767
+ "projectHealth" : "Add appropriate valid value for health",
768
+ "startDate" : "date/time",
769
+ "plannedEndDate" : "date/time"
770
+ }
771
+ }
772
+
773
+ """
774
+
775
+ if classification is None:
776
+ url = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects"
777
+ else:
778
+ url = (
779
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects?"
780
+ f"classificationName={classification}"
781
+ )
782
+ body_s = body_slimmer(body)
783
+ resp = await self._async_make_request("POST", url, body_s)
784
+ return resp.json().get("guid", "No GUID returned")
785
+
786
+ def create_project_w_body(
787
+ self,
788
+ body: dict,
789
+ classification: str = None,
790
+ ) -> str:
791
+ """Create project: https://egeria-project.org/concepts/project
792
+
793
+ Parameters
794
+ ----------.
795
+ body: dict
796
+ A dict representing the details of the project to create.
797
+ classification: str, optional
798
+ An optional project classification. See https://egeria-project.org/types/1/0130-Projects for values.
799
+ view_server: str, optional, defaults to None
800
+ The name of the server to configure. If not provided, the server name associated with the instance
801
+ is used.
802
+
803
+ Returns
804
+ -------
805
+ str - the guid of the created collection
806
+
807
+ Raises
808
+ ------
809
+ InvalidParameterException
810
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
811
+ PropertyServerException
812
+ Raised by the server when an issue arises in processing a valid request
813
+ NotAuthorizedException
814
+ The principle specified by the user_id does not have authorization for the requested action
815
+
816
+ Notes
817
+ -----
818
+ Body structure like:
819
+ {
820
+ "anchorGUID" : "anchor GUID, if set then isOwnAnchor=false",
821
+ "isOwnAnchor" : False,
822
+ "parentGUID" : "parent GUID, if set, set all parameters beginning 'parent'",
823
+ "parentRelationshipTypeName" : "open metadata type name",
824
+ "parentAtEnd1": True,
825
+ "projectProperties": {
826
+ "class" : "ProjectProperties",
827
+ "qualifiedName": "Must provide a unique name here",
828
+ "identifier" : "Add business identifier",
829
+ "name" : "Add display name here",
830
+ "description" : "Add description of the project here",
831
+ "projectStatus": "Add appropriate valid value for type",
832
+ "projectPhase" : "Add appropriate valid value for phase",
833
+ "projectHealth" : "Add appropriate valid value for health",
834
+ "startDate" : "date/time",
835
+ "plannedEndDate" : "date/time"
836
+ }
837
+ }
838
+
839
+ """
840
+ loop = asyncio.get_event_loop()
841
+ resp = loop.run_until_complete(
842
+ self._async_create_project_w_body(body, classification)
843
+ )
844
+ return resp
845
+
846
+ async def _async_create_project(
847
+ self,
848
+ anchor_guid: str,
849
+ parent_guid: str,
850
+ parent_relationship_type_name: str,
851
+ parent_at_end1: bool,
852
+ display_name: str,
853
+ description: str,
854
+ classification_name: str = None,
855
+ identifier: str = None,
856
+ is_own_anchor: bool = False,
857
+ project_status: str = None,
858
+ project_phase: str = None,
859
+ project_health: str = None,
860
+ start_date: str = None,
861
+ planned_end_date: str = None,
862
+ ) -> str:
863
+ """Create Project: https://egeria-project.org/concepts/project Async version.
864
+
865
+ Parameters
866
+ ----------
867
+ classification_name: str, optional
868
+ Type of project to create; "PersonalProject", "Campaign", etc. If not provided, project will not
869
+ be classified.
870
+ anchor_guid: str
871
+ The unique identifier of the element that should be the anchor for the new element. Set to null if no
872
+ anchor, or if this collection is to be its own anchor.
873
+ parent_guid: str
874
+ The optional unique identifier for an element that should be connected to the newly created element.
875
+ If this property is specified, parentRelationshipTypeName must also be specified
876
+ parent_relationship_type_name: str
877
+ The name of the relationship, if any, that should be established between the new element and the parent
878
+ element. Examples could be "ResourceList".
879
+ parent_at_end1: bool
880
+ Identifies which end any parent entity sits on the relationship.
881
+ display_name: str
882
+ The display name of the element. Will also be used as the basis of the qualified_name.
883
+ description: str
884
+ A description of the collection.
885
+ identifier: str
886
+ A project identifier.
887
+ is_own_anchor: bool, optional, defaults to False
888
+ Indicates if the collection should be classified as its own anchor or not.
889
+ project_status: str, optional
890
+ The project status
891
+ project_phase: str, optional
892
+ Project phase as defined in valid values
893
+ project_health: str, optional
894
+ Project health as defined in valid values
895
+ start_date: str, optional, defaults to None
896
+ Start date of the project in ISO 8601 string format.
897
+ planned_end_date: str, optional, defaults to None
898
+ Planned completion date in ISO 8601 string format.
899
+
900
+
901
+ Returns
902
+ -------
903
+ str - the guid of the created project
904
+
905
+ Raises
906
+ ------
907
+ InvalidParameterException
908
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
909
+ PropertyServerException
910
+ Raised by the server when an issue arises in processing a valid request
911
+ NotAuthorizedException
912
+ The principle specified by the user_id does not have authorization for the requested action
913
+
914
+ """
915
+
916
+ if parent_guid is None:
917
+ is_own_anchor = False
918
+
919
+ if classification_name is None:
920
+ url = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects"
921
+ else:
922
+ url = (
923
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects?"
924
+ f"classificationName={classification_name}"
925
+ )
926
+
927
+ body = {
928
+ "anchorGUID": anchor_guid,
929
+ "isOwnAnchor": str(is_own_anchor).lower(),
930
+ "parentGUID": parent_guid,
931
+ "parentRelationshipTypeName": parent_relationship_type_name,
932
+ "parentAtEnd1": str(parent_at_end1).lower(),
933
+ "projectProperties": {
934
+ "class": "ProjectProperties",
935
+ "qualifiedName": f"{classification_name}-{display_name}-{time.asctime()}",
936
+ "identifier": identifier,
937
+ "name": display_name,
938
+ "description": description,
939
+ "projectStatus": project_status,
940
+ "projectPhase": project_phase,
941
+ "projectHealth": project_health,
942
+ "startDate": start_date,
943
+ "plannedEndDate": planned_end_date,
944
+ },
945
+ }
946
+ body_s = body_slimmer(body)
947
+ resp = await self._async_make_request("POST", url, body_s)
948
+ return resp.json().get("guid", "No GUID returned")
949
+
950
+ def create_project(
951
+ self,
952
+ anchor_guid: str,
953
+ parent_guid: str,
954
+ parent_relationship_type_name: str,
955
+ parent_at_end1: bool,
956
+ display_name: str,
957
+ description: str,
958
+ classification_name: str,
959
+ identifier: str = None,
960
+ is_own_anchor: bool = False,
961
+ project_status: str = None,
962
+ project_phase: str = None,
963
+ project_health: str = None,
964
+ start_date: str = None,
965
+ planned_end_date: str = None,
966
+ ) -> str:
967
+ """Create Project: https://egeria-project.org/concepts/project
968
+
969
+ Parameters
970
+ ----------
971
+ classification_name: str
972
+ Type of project to create; "PersonalProject", "Campaign", etc. If not provided, the project will not
973
+ have a project classification.
974
+ anchor_guid: str
975
+ The unique identifier of the element that should be the anchor for the new element. Set to null if no
976
+ anchor, or if this collection is to be its own anchor.
977
+ parent_guid: str
978
+ The optional unique identifier for an element that should be connected to the newly created element.
979
+ If this property is specified, parentRelationshipTypeName must also be specified
980
+ parent_relationship_type_name: str
981
+ The name of the relationship, if any, that should be established between the new element and the parent
982
+ element. Examples could be "ResourceList".
983
+ parent_at_end1: bool
984
+ Identifies which end any parent entity sits on the relationship.
985
+ display_name: str
986
+ The display name of the element. Will also be used as the basis of the qualified_name.
987
+ description: str
988
+ A description of the collection.
989
+ identifier: str
990
+ A project identifier.
991
+ is_own_anchor: bool, optional, defaults to False
992
+ Indicates if the collection should be classified as its own anchor or not.
993
+ project_status: str, optional
994
+ The project status
995
+ project_phase: str, optional
996
+ Project phase as defined in valid values
997
+ project_health: str, optional
998
+ Project health as defined in valid values
999
+ start_date: str, optional, defaults to None
1000
+ Start date of the project in ISO 8601 string format.
1001
+ planned_end_date: str, optional, defaults to None
1002
+ Planned completion date in ISO 8601 string format.
1003
+
1004
+
1005
+ Returns
1006
+ -------
1007
+ str - the guid of the created project
1008
+
1009
+ Raises
1010
+ ------
1011
+ InvalidParameterException
1012
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1013
+ PropertyServerException
1014
+ Raised by the server when an issue arises in processing a valid request
1015
+ NotAuthorizedException
1016
+ The principle specified by the user_id does not have authorization for the requested action
1017
+
1018
+ """
1019
+ loop = asyncio.get_event_loop()
1020
+ resp = loop.run_until_complete(
1021
+ self._async_create_project(
1022
+ anchor_guid,
1023
+ parent_guid,
1024
+ parent_relationship_type_name,
1025
+ parent_at_end1,
1026
+ display_name,
1027
+ description,
1028
+ classification_name,
1029
+ identifier,
1030
+ is_own_anchor,
1031
+ project_status,
1032
+ project_phase,
1033
+ project_health,
1034
+ start_date,
1035
+ planned_end_date,
1036
+ )
1037
+ )
1038
+ return resp
1039
+
1040
+ async def _async_create_project_task(
1041
+ self,
1042
+ project_guid: str,
1043
+ display_name: str,
1044
+ identifier: str = None,
1045
+ description: str = None,
1046
+ project_status: str = None,
1047
+ project_phase: str = None,
1048
+ project_health: str = None,
1049
+ start_date: str = None,
1050
+ planned_end_date: str = None,
1051
+ ) -> str:
1052
+ """Create a new project with the Task classification and link it to a project. Async version.
1053
+
1054
+ Parameters
1055
+ ----------
1056
+ project_guid: str
1057
+ The unique identifier of the project to create the task for (the parent).
1058
+ display_name: str
1059
+ The display name of the element. Will also be used as the basis of the qualified_name.
1060
+ identifier: str
1061
+ A project identifier.
1062
+ description: str
1063
+ A description of the collection.
1064
+ project_status: str, optional, defaults to "OTHER"
1065
+ The project status
1066
+ project_phase: str, optional
1067
+ Project phase as defined in valid values
1068
+ project_health: str, optional
1069
+ Project health as defined in valid values
1070
+ start_date: str, optional, defaults to None
1071
+ Start date of the project in ISO 8601 string format.
1072
+ planned_end_date: str, optional, defaults to None
1073
+ Planned completion date in ISO 8601 string format.
1074
+
1075
+ Returns
1076
+ -------
1077
+ str - the guid of the created project task
1078
+
1079
+ Raises
1080
+ ------
1081
+ InvalidParameterException
1082
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1083
+ PropertyServerException
1084
+ Raised by the server when an issue arises in processing a valid request
1085
+ NotAuthorizedException
1086
+ The principle specified by the user_id does not have authorization for the requested action
1087
+
1088
+ """
1089
+
1090
+ url = (
1091
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/"
1092
+ f"{project_guid}/task"
1093
+ )
1094
+
1095
+ body = {
1096
+ "class": "ProjectProperties",
1097
+ "qualifiedName": f"task-{display_name}-{time.asctime()}",
1098
+ "identifier": identifier,
1099
+ "name": display_name,
1100
+ "description": description,
1101
+ "projectStatus": project_status,
1102
+ "projectPhase": project_phase,
1103
+ "projectHealth": project_health,
1104
+ "startDate": start_date,
1105
+ "plannedEndDate": planned_end_date,
1106
+ }
1107
+ body_s = body_slimmer(body)
1108
+ resp = await self._async_make_request("POST", url, body_s)
1109
+ return resp.json().get("guid", "No GUID Returned")
1110
+
1111
+ def create_project_task(
1112
+ self,
1113
+ project_guid: str,
1114
+ display_name: str,
1115
+ identifier: str = None,
1116
+ description: str = None,
1117
+ project_status: str = None,
1118
+ project_phase: str = None,
1119
+ project_health: str = None,
1120
+ start_date: str = None,
1121
+ planned_end_date: str = None,
1122
+ ) -> str:
1123
+ """Create a new project with the Task classification and link it to a project.
1124
+
1125
+ Parameters
1126
+ ----------
1127
+ project_guid: str
1128
+ The unique identifier of the project to create the task for.The parent.
1129
+ display_name: str
1130
+ The display name of the element. Will also be used as the basis of the qualified_name.
1131
+ identifier: str
1132
+ A project identifier.
1133
+ description: str
1134
+ A description of the collection.
1135
+ project_status: str, optional, defaults to "OTHER"
1136
+ The project status
1137
+ project_phase: str, optional
1138
+ Project phase as defined in valid values
1139
+ project_health: str, optional
1140
+ Project health as defined in valid values
1141
+ start_date: str, optional, defaults to None
1142
+ Start date of the project in ISO 8601 string format.
1143
+ planned_end_date: str, optional, defaults to None
1144
+ Planned completion date in ISO 8601 string format.
1145
+
1146
+ Returns
1147
+ -------
1148
+ str - the guid of the created project task
1149
+
1150
+ Raises
1151
+ ------
1152
+ InvalidParameterException
1153
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1154
+ PropertyServerException
1155
+ Raised by the server when an issue arises in processing a valid request
1156
+ NotAuthorizedException
1157
+ The principle specified by the user_id does not have authorization for the requested action
1158
+
1159
+ """
1160
+ loop = asyncio.get_event_loop()
1161
+ resp = loop.run_until_complete(
1162
+ self._async_create_project_task(
1163
+ project_guid,
1164
+ display_name,
1165
+ identifier,
1166
+ description,
1167
+ project_status,
1168
+ project_phase,
1169
+ project_health,
1170
+ start_date,
1171
+ planned_end_date,
1172
+ )
1173
+ )
1174
+ return resp
1175
+
1176
+ async def _async_create_project_from_template(
1177
+ self,
1178
+ body: dict,
1179
+ ) -> str:
1180
+ """Create a new metadata element to represent a project using an existing metadata element as a template.
1181
+ The template defines additional classifications and relationships that should be added to the new project.
1182
+ Async version.
1183
+
1184
+ Parameters
1185
+ ----------
1186
+
1187
+ body: dict
1188
+ A dict representing the details of the collection to create.
1189
+
1190
+
1191
+ Returns
1192
+ -------
1193
+ str - the guid of the created project.
1194
+
1195
+ Raises
1196
+ ------
1197
+ InvalidParameterException
1198
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1199
+ PropertyServerException
1200
+ Raised by the server when an issue arises in processing a valid request
1201
+ NotAuthorizedException
1202
+ The principle specified by the user_id does not have authorization for the requested action
1203
+
1204
+ Notes
1205
+ -----
1206
+ JSON Structure looks like:
1207
+ {
1208
+ "class": "TemplateRequestBody",
1209
+ "anchorGUID": "anchor GUID, if set then isOwnAnchor=false",
1210
+ "isOwnAnchor": false,
1211
+ "parentGUID": "parent GUID, if set, set all parameters beginning 'parent'",
1212
+ "parentRelationshipTypeName": "open metadata type name",
1213
+ "parentAtEnd1": true,
1214
+ "templateGUID": "template GUID",
1215
+ "replacementProperties": {
1216
+ "class": "ElementProperties",
1217
+ "propertyValueMap" : {
1218
+ "propertyName" : {
1219
+ "class": "PrimitiveTypePropertyValue",
1220
+ "typeName": "string",
1221
+ "primitiveTypeCategory" : "OM_PRIMITIVE_TYPE_STRING",
1222
+ "primitiveValue" : "value of property"
1223
+ }
1224
+ }
1225
+ },
1226
+ "placeholderPropertyValues" : {
1227
+ "placeholderProperty1Name" : "property1Value",
1228
+ "placeholderProperty2Name" : "property2Value"
1229
+ }
1230
+ }
1231
+
1232
+
1233
+ """
1234
+
1235
+ url = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/from-template"
1236
+ body_s = body_slimmer(body)
1237
+ resp = await self._async_make_request("POST", url, body_s)
1238
+ return resp.json().get("guid", "No GUID Returned")
1239
+
1240
+ def create_project_from_template(
1241
+ self,
1242
+ body: dict,
1243
+ ) -> str:
1244
+ """Create a new metadata element to represent a project using an existing metadata element as a template.
1245
+ The template defines additional classifications and relationships that should be added to the new project.
1246
+
1247
+ Parameters
1248
+ ----------
1249
+
1250
+ body: dict
1251
+ A dict representing the details of the collection to create.
1252
+
1253
+
1254
+ Returns
1255
+ -------
1256
+ str - the guid of the created project.
1257
+
1258
+ Raises
1259
+ ------
1260
+ InvalidParameterException
1261
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1262
+ PropertyServerException
1263
+ Raised by the server when an issue arises in processing a valid request
1264
+ NotAuthorizedException
1265
+ The principle specified by the user_id does not have authorization for the requested action
1266
+
1267
+ Notes
1268
+ -----
1269
+ JSON Structure looks like:
1270
+ {
1271
+ "class": "TemplateRequestBody",
1272
+ "anchorGUID": "anchor GUID, if set then isOwnAnchor=false",
1273
+ "isOwnAnchor": false,
1274
+ "parentGUID": "parent GUID, if set, set all parameters beginning 'parent'",
1275
+ "parentRelationshipTypeName": "open metadata type name",
1276
+ "parentAtEnd1": true,
1277
+ "templateGUID": "template GUID",
1278
+ "replacementProperties": {
1279
+ "class": "ElementProperties",
1280
+ "propertyValueMap" : {
1281
+ "propertyName" : {
1282
+ "class": "PrimitiveTypePropertyValue",
1283
+ "typeName": "string",
1284
+ "primitiveTypeCategory" : "OM_PRIMITIVE_TYPE_STRING",
1285
+ "primitiveValue" : "value of property"
1286
+ }
1287
+ }
1288
+ },
1289
+ "placeholderPropertyValues" : {
1290
+ "placeholderProperty1Name" : "property1Value",
1291
+ "placeholderProperty2Name" : "property2Value"
1292
+ }
1293
+ }
1294
+ """
1295
+ loop = asyncio.get_event_loop()
1296
+ resp = loop.run_until_complete(self._async_create_project_from_template(body))
1297
+ return resp
1298
+
1299
+ async def _async_update_project(
1300
+ self,
1301
+ project_guid: str,
1302
+ qualified_name: str = None,
1303
+ identifier: str = None,
1304
+ display_name: str = None,
1305
+ description: str = None,
1306
+ project_status: str = None,
1307
+ project_phase: str = None,
1308
+ project_health: str = None,
1309
+ start_date: str = None,
1310
+ planned_end_date: str = None,
1311
+ replace_all_props: bool = False,
1312
+ ) -> None:
1313
+ """Update the properties of a project. Async Version.
1314
+
1315
+ Parameters
1316
+ ----------
1317
+ project_guid: str
1318
+ Unique identifier for the project.
1319
+ qualified_name: str, optional, defaults to None
1320
+ The unique identifier of the project.
1321
+ identifier: str
1322
+ A project identifier.
1323
+ display_name: str
1324
+ The display name of the element. Will also be used as the basis of the qualified_name.
1325
+ description: str
1326
+ A description of the collection.
1327
+ project_status: str, optional
1328
+ The project status
1329
+ project_phase: str, optional
1330
+ Project phase as defined in valid values
1331
+ project_health: str, optional
1332
+ Project health as defined in valid values
1333
+ start_date: str, optional, defaults to None
1334
+ Start date of the project in ISO 8601 string format.
1335
+ planned_end_date: str, optional, defaults to None
1336
+ Planned completion date in ISO 8601 string format.
1337
+ replace_all_props: bool, optional, defaults to False
1338
+ If True, then all the properties of the project will be replaced with the specified properties.
1339
+
1340
+ Returns
1341
+ -------
1342
+ str - the guid of the created project task
1343
+
1344
+ Raises
1345
+ ------
1346
+ InvalidParameterException
1347
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1348
+ PropertyServerException
1349
+ Raised by the server when an issue arises in processing a valid request
1350
+ NotAuthorizedException
1351
+ The principle specified by the user_id does not have authorization for the requested action
1352
+ """
1353
+
1354
+ replace_all_props_s = str(replace_all_props).lower()
1355
+ url = (
1356
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/{project_guid}/"
1357
+ f"update?replaceAllProperties={replace_all_props_s}"
1358
+ )
1359
+
1360
+ body = {
1361
+ "class": "ProjectProperties",
1362
+ "qualifiedName": qualified_name,
1363
+ "identifier": identifier,
1364
+ "name": display_name,
1365
+ "description": description,
1366
+ "projectStatus": project_status,
1367
+ "projectPhase": project_phase,
1368
+ "projectHealth": project_health,
1369
+ "startDate": start_date,
1370
+ "plannedEndDate": planned_end_date,
1371
+ }
1372
+ body_s = body_slimmer(body)
1373
+ await self._async_make_request("POST", url, body_s)
1374
+ return
1375
+
1376
+ def update_project(
1377
+ self,
1378
+ project_guid: str,
1379
+ qualified_name: str = None,
1380
+ identifier: str = None,
1381
+ display_name: str = None,
1382
+ description: str = None,
1383
+ project_status: str = None,
1384
+ project_phase: str = None,
1385
+ project_health: str = None,
1386
+ start_date: str = None,
1387
+ planned_end_date: str = None,
1388
+ replace_all_props: bool = False,
1389
+ ) -> None:
1390
+ """Update the properties of a project.
1391
+
1392
+ Parameters
1393
+ ----------
1394
+ project_guid: str
1395
+ Unique identifier for the project.
1396
+ qualified_name: str, optional, defaults to None
1397
+ The unique identifier of the project.
1398
+ identifier: str
1399
+ A project identifier.
1400
+ display_name: str
1401
+ The display name of the element. Will also be used as the basis of the qualified_name.
1402
+ description: str
1403
+ A description of the collection.
1404
+ project_status: str, optional
1405
+ The project status
1406
+ project_phase: str, optional
1407
+ Project phase as defined in valid values
1408
+ project_health: str, optional
1409
+ Project health as defined in valid values
1410
+ start_date: str, optional, defaults to None
1411
+ Start date of the project in ISO 8601 string format.
1412
+ planned_end_date: str, optional, defaults to None
1413
+ Planned completion date in ISO 8601 string format.
1414
+ replace_all_props: bool, optional, defaults to False
1415
+ If True, then all the properties of the project will be replaced with the specified properties.
1416
+
1417
+ Returns
1418
+ -------
1419
+ str - the guid of the created project task
1420
+
1421
+ Raises
1422
+ ------
1423
+ InvalidParameterException
1424
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1425
+ PropertyServerException
1426
+ Raised by the server when an issue arises in processing a valid request
1427
+ NotAuthorizedException
1428
+ The principle specified by the user_id does not have authorization for the requested action
1429
+ """
1430
+ loop = asyncio.get_event_loop()
1431
+ loop.run_until_complete(
1432
+ self._async_update_project(
1433
+ project_guid,
1434
+ qualified_name,
1435
+ identifier,
1436
+ display_name,
1437
+ description,
1438
+ project_status,
1439
+ project_phase,
1440
+ project_health,
1441
+ start_date,
1442
+ planned_end_date,
1443
+ replace_all_props,
1444
+ )
1445
+ )
1446
+ return
1447
+
1448
+ async def _async_delete_project(
1449
+ self,
1450
+ project_guid: str,
1451
+ ) -> None:
1452
+ """Delete a project. It is detected from all parent elements. Async version
1453
+
1454
+ Parameters
1455
+ ----------
1456
+ project_guid: str
1457
+ The guid of the project to update.
1458
+
1459
+
1460
+ Returns
1461
+ -------
1462
+ Nothing
1463
+
1464
+ Raises
1465
+ ------
1466
+ InvalidParameterException
1467
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1468
+ PropertyServerException
1469
+ Raised by the server when an issue arises in processing a valid request
1470
+ NotAuthorizedException
1471
+ The principle specified by the user_id does not have authorization for the requested action
1472
+
1473
+ """
1474
+
1475
+ url = (
1476
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/"
1477
+ f"{project_guid}/delete"
1478
+ )
1479
+
1480
+ body = {"class": "NullRequestBody"}
1481
+
1482
+ await self._async_make_request("POST", url, body)
1483
+ return
1484
+
1485
+ def delete_project(
1486
+ self,
1487
+ project_guid: str,
1488
+ ) -> None:
1489
+ """Delete a project. It is detected from all parent elements.
1490
+
1491
+ Parameters
1492
+ ----------
1493
+ project_guid: str
1494
+ The guid of the collection to update.
1495
+
1496
+
1497
+ Returns
1498
+ -------
1499
+ Nothing
1500
+
1501
+ Raises
1502
+ ------
1503
+
1504
+ InvalidParameterException
1505
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1506
+ PropertyServerException
1507
+ Raised by the server when an issue arises in processing a valid request
1508
+ NotAuthorizedException
1509
+ The principle specified by the user_id does not have authorization for the requested action
1510
+
1511
+ """
1512
+ loop = asyncio.get_event_loop()
1513
+ loop.run_until_complete(self._async_delete_project(project_guid))
1514
+ return
1515
+
1516
+ async def _async_add_to_project_team(
1517
+ self,
1518
+ project_guid: str,
1519
+ actor_guid: str,
1520
+ team_role: str = None,
1521
+ effective_from: str = None,
1522
+ effective_to: str = None,
1523
+ ) -> None:
1524
+ """Add an actor to a project. The request body is optional. If supplied, it contains the name of the role that
1525
+ the actor plays in the project. Async version.
1526
+
1527
+ Parameters
1528
+ ----------
1529
+ project_guid: str
1530
+ identity of the project to update.
1531
+ actor_guid: str
1532
+ identity of the actor to add.
1533
+ team_role: str, optional, defaults to None
1534
+ Name of the role the actor plays in the project.
1535
+ effective_from: str, optional, defaults to None
1536
+ Date at which the actor becomes active in the project. Date format is ISO 8601 string format.
1537
+ effective_to: str, optional, defaults to None
1538
+ Date at which the actor is no longer active in the project. Date format is ISO 8601 string format.
1539
+
1540
+ Returns
1541
+ -------
1542
+ None
1543
+
1544
+ Raises
1545
+ ------
1546
+
1547
+ InvalidParameterException
1548
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1549
+ PropertyServerException
1550
+ Raised by the server when an issue arises in processing a valid request
1551
+ NotAuthorizedException
1552
+ The principle specified by the user_id does not have authorization for the requested action
1553
+
1554
+ """
1555
+
1556
+ url = (
1557
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/{project_guid}/"
1558
+ f"members/{actor_guid}/attach"
1559
+ )
1560
+ body = {
1561
+ "class": "ProjectTeamProperties",
1562
+ "teamRole": team_role,
1563
+ "effectiveFrom": effective_from,
1564
+ "effectiveTo": effective_to,
1565
+ }
1566
+ body_s = body_slimmer(body)
1567
+ if body_s is None:
1568
+ await self._async_make_request("POST", url)
1569
+ else:
1570
+ await self._async_make_request("POST", url, body_s)
1571
+ return
1572
+
1573
+ def add_to_project_team(
1574
+ self,
1575
+ project_guid: str,
1576
+ actor_guid: str,
1577
+ team_role: str = None,
1578
+ effective_from: str = None,
1579
+ effective_to: str = None,
1580
+ ) -> None:
1581
+ """Add an actor to a project. The request body is optional. If supplied, it contains the name of the role that
1582
+ the actor plays in the project.
1583
+
1584
+ Parameters
1585
+ ----------
1586
+ project_guid: str
1587
+ identity of the project to update.
1588
+ actor_guid: str
1589
+ identity of the actor to add.
1590
+ team_role: str, optional, defaults to None
1591
+ Name of the role the actor plays in the project.
1592
+ effective_from: str, optional, defaults to None
1593
+ Date at which the actor becomes active in the project. Date format is ISO 8601 string format.
1594
+ effective_to: str, optional, defaults to None
1595
+ Date at which the actor is no longer active in the project. Date format is ISO 8601 string format.
1596
+
1597
+ Returns
1598
+ -------
1599
+ None
1600
+
1601
+ Raises
1602
+ ------
1603
+
1604
+ InvalidParameterException
1605
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1606
+ PropertyServerException
1607
+ Raised by the server when an issue arises in processing a valid request
1608
+ NotAuthorizedException
1609
+ The principle specified by the user_id does not have authorization for the requested action
1610
+
1611
+ """
1612
+ loop = asyncio.get_event_loop()
1613
+ loop.run_until_complete(
1614
+ self._async_add_to_project_team(
1615
+ project_guid,
1616
+ actor_guid,
1617
+ team_role,
1618
+ effective_from,
1619
+ effective_to,
1620
+ )
1621
+ )
1622
+ return
1623
+
1624
+ async def _async_remove_from_project_team(
1625
+ self,
1626
+ project_guid: str,
1627
+ actor_guid: str,
1628
+ ) -> None:
1629
+ """Remove an actor from a project. Async version.
1630
+
1631
+ Parameters
1632
+ ----------
1633
+ project_guid: str
1634
+ identity of the project to remove members from.
1635
+ actor_guid: str
1636
+ identity of the actor to remove.
1637
+
1638
+ Returns
1639
+ -------
1640
+ None
1641
+
1642
+ Raises
1643
+ ------
1644
+
1645
+ InvalidParameterException
1646
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1647
+ PropertyServerException
1648
+ Raised by the server when an issue arises in processing a valid request
1649
+ NotAuthorizedException
1650
+ The principle specified by the user_id does not have authorization for the requested action
1651
+
1652
+ """
1653
+
1654
+ url = (
1655
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/{project_guid}/"
1656
+ f"members/{actor_guid}/detach"
1657
+ )
1658
+
1659
+ body = {"class": "NullRequestBody"}
1660
+ await self._async_make_request("POST", url, body)
1661
+ return
1662
+
1663
+ def remove_from_project_team(
1664
+ self,
1665
+ project_guid: str,
1666
+ actor_guid: str,
1667
+ ) -> None:
1668
+ """Remove an actor from a project.
1669
+
1670
+ Parameters
1671
+ ----------
1672
+ project_guid: str
1673
+ identity of the project.
1674
+ actor_guid: str
1675
+ identity of the actor to remove.
1676
+
1677
+ Returns
1678
+ -------
1679
+ None
1680
+
1681
+ Raises
1682
+ ------
1683
+
1684
+ InvalidParameterException
1685
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1686
+ PropertyServerException
1687
+ Raised by the server when an issue arises in processing a valid request
1688
+ NotAuthorizedException
1689
+ The principle specified by the user_id does not have authorization for the requested action
1690
+
1691
+ """
1692
+ loop = asyncio.get_event_loop()
1693
+ loop.run_until_complete(
1694
+ self._async_remove_from_project_team(project_guid, actor_guid)
1695
+ )
1696
+ return
1697
+
1698
+ async def _async_setup_project_management_role(
1699
+ self,
1700
+ project_guid: str,
1701
+ project_role_guid: str,
1702
+ ) -> None:
1703
+ """Create a ProjectManagement relationship between a project and a person role to show that anyone appointed to
1704
+ the role is a member of the project. Async version.
1705
+
1706
+ Parameters
1707
+ ----------
1708
+ project_guid: str
1709
+ identity of the project.
1710
+ project_role_guid: str
1711
+ guid of the role to assign to the project.
1712
+
1713
+
1714
+ Returns
1715
+ -------
1716
+ None
1717
+
1718
+ Raises
1719
+ ------
1720
+
1721
+ InvalidParameterException
1722
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1723
+ PropertyServerException
1724
+ Raised by the server when an issue arises in processing a valid request
1725
+ NotAuthorizedException
1726
+ The principle specified by the user_id does not have authorization for the requested action
1727
+
1728
+ """
1729
+
1730
+ url = (
1731
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/{project_guid}/"
1732
+ f"project-management-roles/{project_role_guid}/attach"
1733
+ )
1734
+
1735
+ body = {"class": "NullRequestBody"}
1736
+ await self._async_make_request("POST", url, body)
1737
+ return
1738
+
1739
+ def setup_project_management_role(
1740
+ self,
1741
+ project_guid: str,
1742
+ project_role_guid: str,
1743
+ ) -> None:
1744
+ """Create a ProjectManagement relationship between a project and a person role to show that anyone appointed to
1745
+ the role is a member of the project. Async version.
1746
+
1747
+ Parameters
1748
+ ----------
1749
+ project_guid: str
1750
+ identity of the project.
1751
+ project_role_guid: str
1752
+ guid of the role to assign to the project.
1753
+
1754
+
1755
+ Returns
1756
+ -------
1757
+ None
1758
+
1759
+ Raises
1760
+ ------
1761
+
1762
+ InvalidParameterException
1763
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1764
+ PropertyServerException
1765
+ Raised by the server when an issue arises in processing a valid request
1766
+ NotAuthorizedException
1767
+ The principle specified by the user_id does not have authorization for the requested action
1768
+
1769
+ """
1770
+ loop = asyncio.get_event_loop()
1771
+ loop.run_until_complete(
1772
+ self._async_setup_project_management_role(project_guid, project_role_guid)
1773
+ )
1774
+ return
1775
+
1776
+ async def _async_clear_project_management_role(
1777
+ self,
1778
+ project_guid: str,
1779
+ project_role_guid: str,
1780
+ ) -> None:
1781
+ """Remove a ProjectManagement relationship between a project and a person role. Async version.
1782
+
1783
+ Parameters
1784
+ ----------
1785
+ project_guid: str
1786
+ identity of the project.
1787
+ project_role_guid: str
1788
+ guid of the role to assign to the project.
1789
+
1790
+
1791
+ Returns
1792
+ -------
1793
+ None
1794
+
1795
+ Raises
1796
+ ------
1797
+
1798
+ InvalidParameterException
1799
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1800
+ PropertyServerException
1801
+ Raised by the server when an issue arises in processing a valid request
1802
+ NotAuthorizedException
1803
+ The principle specified by the user_id does not have authorization for the requested action
1804
+
1805
+ """
1806
+
1807
+ url = (
1808
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/{project_guid}/"
1809
+ f"project-management-roles/{project_role_guid}/detach"
1810
+ )
1811
+
1812
+ body = {"class": "NullRequestBody"}
1813
+ await self._async_make_request("POST", url, body)
1814
+ return
1815
+
1816
+ def clear_project_management_role(
1817
+ self,
1818
+ project_guid: str,
1819
+ project_role_guid: str,
1820
+ ) -> None:
1821
+ """Clear a ProjectManagement relationship between a project and a person role.
1822
+
1823
+ Parameters
1824
+ ----------
1825
+ project_guid: str
1826
+ identity of the project.
1827
+ project_role_guid: str
1828
+ guid of the role to assign to the project.
1829
+
1830
+
1831
+ Returns
1832
+ -------
1833
+ None
1834
+
1835
+ Raises
1836
+ ------
1837
+
1838
+ InvalidParameterException
1839
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1840
+ PropertyServerException
1841
+ Raised by the server when an issue arises in processing a valid request
1842
+ NotAuthorizedException
1843
+ The principle specified by the user_id does not have authorization for the requested action
1844
+
1845
+ """
1846
+ loop = asyncio.get_event_loop()
1847
+ loop.run_until_complete(
1848
+ self._async_clear_project_management_role(project_guid, project_role_guid)
1849
+ )
1850
+ return
1851
+
1852
+
1853
+ if __name__ == "__main__":
1854
+ print("Main-Project Manager")