pyegeria 0.3.4__py3-none-any.whl → 0.3.6__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 (25) hide show
  1. pyegeria/__init__.py +3 -1
  2. pyegeria/automated_curation_omvs.py +73 -20
  3. pyegeria/collection_manager_omvs.py +2428 -0
  4. pyegeria/core_omag_server_config.py +5 -2
  5. pyegeria/project_manager_omvs.py +1689 -0
  6. pyegeria/valid_metadata_omvs.py +779 -0
  7. {pyegeria-0.3.4.data → pyegeria-0.3.6.data}/scripts/engine_action_status.py +8 -10
  8. {pyegeria-0.3.4.data → pyegeria-0.3.6.data}/scripts/list_asset_types.py +2 -3
  9. {pyegeria-0.3.4.data → pyegeria-0.3.6.data}/scripts/multi-server_status.py +1 -4
  10. {pyegeria-0.3.4.data → pyegeria-0.3.6.data}/scripts/view_my_profile.py +1 -1
  11. {pyegeria-0.3.4.dist-info → pyegeria-0.3.6.dist-info}/METADATA +1 -1
  12. pyegeria-0.3.6.dist-info/RECORD +36 -0
  13. pyegeria/exceptions.py +0 -382
  14. pyegeria-0.3.4.dist-info/RECORD +0 -34
  15. {pyegeria-0.3.4.data → pyegeria-0.3.6.data}/scripts/find_todos.py +0 -0
  16. {pyegeria-0.3.4.data → pyegeria-0.3.6.data}/scripts/glossary_view.py +0 -0
  17. {pyegeria-0.3.4.data → pyegeria-0.3.6.data}/scripts/gov_engine_status.py +0 -0
  18. {pyegeria-0.3.4.data → pyegeria-0.3.6.data}/scripts/integration_daemon_status.py +0 -0
  19. {pyegeria-0.3.4.data → pyegeria-0.3.6.data}/scripts/my_todos.py +0 -0
  20. {pyegeria-0.3.4.data → pyegeria-0.3.6.data}/scripts/open_todos.py +0 -0
  21. {pyegeria-0.3.4.data → pyegeria-0.3.6.data}/scripts/server_status.py +0 -0
  22. {pyegeria-0.3.4.data → pyegeria-0.3.6.data}/scripts/server_status_widget.py +0 -0
  23. {pyegeria-0.3.4.dist-info → pyegeria-0.3.6.dist-info}/LICENSE +0 -0
  24. {pyegeria-0.3.4.dist-info → pyegeria-0.3.6.dist-info}/WHEEL +0 -0
  25. {pyegeria-0.3.4.dist-info → pyegeria-0.3.6.dist-info}/top_level.txt +0 -0
pyegeria/__init__.py CHANGED
@@ -40,5 +40,7 @@ from .gov_engine import GovEng
40
40
  from .my_profile_omvs import MyProfile
41
41
  from .full_omag_server_config import FullServerConfig
42
42
  from .server_operations import ServerOps
43
-
43
+ from .collection_manager_omvs import CollectionManager
44
+ from .project_manager_omvs import ProjectManager
45
+ from .valid_metadata_omvs import ValidMetadataManager
44
46
  __version__ = "0.3"
@@ -47,6 +47,7 @@ class AutomatedCuration(Client):
47
47
  Client.__init__(self, server_name, platform_url, user_id, user_pwd, verify_flag)
48
48
  self.cur_command_root = f"{platform_url}/servers/"
49
49
 
50
+
50
51
  async def _async_create_element_from_template(self, body: dict, server: str = None) -> str:
51
52
  """ Create a new metadata element from a template. Async version.
52
53
  Parameters
@@ -596,7 +597,7 @@ class AutomatedCuration(Client):
596
597
  url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/engine-actions/by-name?"
597
598
  f"startFrom={start_from}&pageSize={page_size}")
598
599
  body = {
599
- "string": name
600
+ "filter": name
600
601
  }
601
602
  response = await self._async_make_request("POST", url, body)
602
603
  return response.json().get("elements", "no actions")
@@ -816,7 +817,7 @@ class AutomatedCuration(Client):
816
817
  )
817
818
  return response
818
819
 
819
- async def _async_gov_action_process_graph(self, process_guid: str, server: str = None) -> dict | str:
820
+ async def _async_get_gov_action_process_graph(self, process_guid: str, server: str = None) -> dict | str:
820
821
  """ Retrieve the governance action process metadata element with the supplied unique
821
822
  identifier along with the flow definition describing its implementation. Async Version.
822
823
  Parameters
@@ -848,7 +849,7 @@ class AutomatedCuration(Client):
848
849
  response = await self._async_make_request("GET", url)
849
850
  return response.json().get("element", "no actions")
850
851
 
851
- def gov_action_process_graph(self, process_guid: str, server: str = None) -> dict | str:
852
+ def get_gov_action_process_graph(self, process_guid: str, server: str = None) -> dict | str:
852
853
  """ Retrieve the governance action process metadata element with the supplied unique
853
854
  identifier along with the flow definition describing its implementation.
854
855
  Parameters
@@ -915,7 +916,7 @@ class AutomatedCuration(Client):
915
916
  "class": "NameRequestBody",
916
917
  "name": name
917
918
  }
918
- response = await self._async_make_request("GET", url, body)
919
+ response = await self._async_make_request("POST", url, body)
919
920
  return response.json().get("elements", "no actions")
920
921
 
921
922
  def get_gov_action_processes_by_name(self, name: str, server: str = None, start_from: int = 0,
@@ -1009,7 +1010,7 @@ class AutomatedCuration(Client):
1009
1010
  "class": "SearchStringRequestBody",
1010
1011
  "name": search_string
1011
1012
  }
1012
- response = await self._async_make_request("GET", url, body)
1013
+ response = await self._async_make_request("POST", url, body)
1013
1014
  return response.json().get("elements", "no actions")
1014
1015
 
1015
1016
  def find_gov_action_processes(self, search_string: str = "*", server: str = None, starts_with: bool = False,
@@ -1110,7 +1111,7 @@ class AutomatedCuration(Client):
1110
1111
  response = await self._async_make_request("POST", url, new_body)
1111
1112
  return response.json().get("guid", "Action not initiated")
1112
1113
 
1113
- def initiate_governance_action_process(self, action_type_qualified_name: str, request_source_guids: [str],
1114
+ def initiate_gov_action_process(self, action_type_qualified_name: str, request_source_guids: [str],
1114
1115
  action_targets: [str], start_time: datetime, request_parameters: dict,
1115
1116
  orig_service_name: str, orig_engine_name: str, server: str = None) -> str:
1116
1117
  """ Using the named governance action process as a template, initiate a chain of engine actions.
@@ -1153,7 +1154,7 @@ class AutomatedCuration(Client):
1153
1154
  )
1154
1155
  return response
1155
1156
 
1156
- async def _async_get_gov_action_type_by_guid(self, gov_action_type_guid: str, server: str = None) -> dict | str:
1157
+ async def _async_get_gov_action_types_by_guid(self, gov_action_type_guid: str, server: str = None) -> dict | str:
1157
1158
  """ Retrieve the governance action type metadata element with the supplied unique identifier. Async version.
1158
1159
 
1159
1160
  Parameters:
@@ -1182,7 +1183,7 @@ class AutomatedCuration(Client):
1182
1183
  response = await self._async_make_request("GET", url)
1183
1184
  return response.json().get("element", "no actions")
1184
1185
 
1185
- def get_gov_action_type_by_guid(self, gov_action_type_guid: str, server: str = None) -> dict | str:
1186
+ def get_gov_action_types_by_guid(self, gov_action_type_guid: str, server: str = None) -> dict | str:
1186
1187
  """ Retrieve the governance action type metadata element with the supplied unique identifier.
1187
1188
 
1188
1189
  Parameters:
@@ -1276,7 +1277,7 @@ class AutomatedCuration(Client):
1276
1277
 
1277
1278
  async def _async_find_gov_action_types(self, search_string: str = "*", server: str = None,
1278
1279
  starts_with: bool = False,
1279
- ends_with: bool = False, ignore_case: bool = False, start_from: int = 0,
1280
+ ends_with: bool = False, ignore_case: bool = True, start_from: int = 0,
1280
1281
  page_size: int = max_paging_size) -> list | str:
1281
1282
  """ Retrieve the list of governance action type metadata elements that contain the search string.
1282
1283
  Async Version.
@@ -1334,7 +1335,7 @@ class AutomatedCuration(Client):
1334
1335
  "class": "SearchStringRequestBody",
1335
1336
  "name": search_string
1336
1337
  }
1337
- response = await self._async_make_request("GET", url, body)
1338
+ response = await self._async_make_request("POST", url, body)
1338
1339
  return response.json().get("elements", "no action types")
1339
1340
 
1340
1341
  def find_gov_action_types(self, search_string: str = "*", server: str = None, starts_with: bool = False,
@@ -1481,6 +1482,30 @@ class AutomatedCuration(Client):
1481
1482
  )
1482
1483
  return response
1483
1484
 
1485
+ async def _async_initiate_postgres_database_survey(self, postgres_database_guid: str, server: str = None) -> str:
1486
+ server = self.server_name if server is None else server
1487
+ url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
1488
+ f"initiate")
1489
+
1490
+ body = {
1491
+ "class": "InitiateGovernanceActionTypeRequestBody",
1492
+ "governanceActionTypeQualifiedName": "Egeria:GovernanceActionType:2adeb8f1-0f59-4970-b6f2-6cc25d4d2402survey-postgres-database",
1493
+ "actionTargets": [{
1494
+ "class": "NewActionTarget",
1495
+ "actionTargetName": "serverToSurvey",
1496
+ "actionTargetGUID": postgres_database_guid
1497
+ }]
1498
+ }
1499
+ response = await self._async_make_request("POST", url, body)
1500
+ return response.json().get("guid", "Action not initiated")
1501
+
1502
+ def initiate_postgres_database_survey(self, postgres_database_guid: str, server: str = None) -> str:
1503
+ loop = asyncio.get_event_loop()
1504
+ response = loop.run_until_complete(
1505
+ self._async_initiate_postgres_server_survey(postgres_database_guid, server)
1506
+ )
1507
+ return response
1508
+
1484
1509
  async def _async_initiate_postgres_server_survey(self, postgres_server_guid: str, server: str = None) -> str:
1485
1510
  server = self.server_name if server is None else server
1486
1511
  url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
@@ -1508,6 +1533,8 @@ class AutomatedCuration(Client):
1508
1533
  )
1509
1534
  return response
1510
1535
 
1536
+
1537
+
1511
1538
  async def _async_initiate_file_folder_survey(self, file_folder_guid: str,
1512
1539
  server: str = None) -> str:
1513
1540
  server = self.server_name if server is None else server
@@ -1527,13 +1554,39 @@ class AutomatedCuration(Client):
1527
1554
  response = await self._async_make_request("POST", url, body)
1528
1555
  return response.json().get("guid", "Action not initiated")
1529
1556
 
1530
- def initiate_file_folder_survey(self, file_folder_guid: str, server: str = None) -> str:
1557
+ def initiate_file_folder_survey(self, file_folder_guid:str, server: str = None) -> str:
1531
1558
  loop = asyncio.get_event_loop()
1532
1559
  response = loop.run_until_complete(
1533
1560
  self._async_initiate_file_folder_survey(file_folder_guid, server)
1534
1561
  )
1535
1562
  return response
1536
1563
 
1564
+ async def _async_initiate_file_survey(self, file_guid: str,
1565
+ server: str = None) -> str:
1566
+ server = self.server_name if server is None else server
1567
+ url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
1568
+ f"initiate")
1569
+
1570
+ body = {
1571
+ "class": "InitiateGovernanceActionTypeRequestBody",
1572
+ "governanceActionTypeQualifiedName":
1573
+ "Egeria:GovernanceActionType:2adeb8f1-0f59-4970-b6f2-6cc25d4d2402survey-folder",
1574
+ "actionTargets": [{
1575
+ "class": "NewActionTarget",
1576
+ "actionTargetName": "fileToSurvey",
1577
+ "actionTargetGUID": file_guid
1578
+ }]
1579
+ }
1580
+ response = await self._async_make_request("POST", url, body)
1581
+ return response.json().get("guid", "Action not initiated")
1582
+
1583
+ def initiate_file_survey(self, file_guid:str, server: str = None) -> str:
1584
+ loop = asyncio.get_event_loop()
1585
+ response = loop.run_until_complete(
1586
+ self._async_initiate_file_survey(file_guid, server)
1587
+ )
1588
+ return response
1589
+
1537
1590
  async def _async_initiate_kafka_server_survey(self, kafka_server_guid: str, server: str = None) -> str:
1538
1591
  server = self.server_name if server is None else server
1539
1592
  url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
@@ -1810,7 +1863,7 @@ class AutomatedCuration(Client):
1810
1863
  return response
1811
1864
 
1812
1865
  async def _async_add_catalog_target(self, integ_connector_guid: str, metadata_element_guid: str,
1813
- catalog_target_name: str, metadata_src_qual_name: str, config_properties: dict
1866
+ catalog_target_name: str, metadata_src_qual_name: str = None, config_properties: dict = None
1814
1867
  , server: str = None) -> None:
1815
1868
  """ Add a catalog target to an integration connector.
1816
1869
  Async version.
@@ -1855,7 +1908,7 @@ class AutomatedCuration(Client):
1855
1908
  return
1856
1909
 
1857
1910
  def add_catalog_target(self, integ_connector_guid: str, metadata_element_guid: str, catalog_target_name: str,
1858
- metadata_src_qual_name: str, config_properties: dict, server: str = None) -> None:
1911
+ metadata_src_qual_name: str = None, config_properties: dict = None, server: str = None) -> None:
1859
1912
  """ Add a catalog target to an integration connector.
1860
1913
 
1861
1914
  Parameters:
@@ -1892,7 +1945,7 @@ class AutomatedCuration(Client):
1892
1945
  return
1893
1946
 
1894
1947
  async def _async_remove_catalog_target(self, integ_connector_guid: str, metadata_element_guid: str,
1895
- catalog_target_name: str, server: str = None) -> None:
1948
+ server: str = None) -> None:
1896
1949
  """ Remove a catalog target to an integration connector. Async version.
1897
1950
 
1898
1951
  Parameters:
@@ -1925,7 +1978,7 @@ class AutomatedCuration(Client):
1925
1978
  return
1926
1979
 
1927
1980
  def remove_catalog_target(self, integ_connector_guid: str, metadata_element_guid: str,
1928
- catalog_target_name: str, server: str = None) -> None:
1981
+ server: str = None) -> None:
1929
1982
  """ Remove a catalog target to an integration connector.
1930
1983
 
1931
1984
  Parameters:
@@ -1993,7 +2046,7 @@ class AutomatedCuration(Client):
1993
2046
  url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/open-metadata-types/"
1994
2047
  f"{type_name}/technology-types?startFrom={start_from}&pageSize={page_size}")
1995
2048
  body = {
1996
- "string": tech_name
2049
+ "filter": tech_name
1997
2050
  }
1998
2051
 
1999
2052
  response = await self._async_make_request("GET", url, body)
@@ -2064,7 +2117,7 @@ class AutomatedCuration(Client):
2064
2117
  validate_name(type_name)
2065
2118
  url = f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/technology-types/by-name"
2066
2119
 
2067
- body = {"string": type_name}
2120
+ body = {"filter": type_name}
2068
2121
 
2069
2122
  response = await self._async_make_request("POST", url, body)
2070
2123
  return response.json().get("element", "no type found")
@@ -2155,12 +2208,12 @@ class AutomatedCuration(Client):
2155
2208
  url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/technology-types/"
2156
2209
  f"by-search-string?startFrom={start_from}&pageSize={page_size}&startsWith={starts_with_s}&"
2157
2210
  f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}")
2158
- body = {"string": search_string}
2211
+ body = {"filter": search_string}
2159
2212
 
2160
2213
  response = await self._async_make_request("POST", url, body)
2161
2214
  return response.json().get("elements", "no tech found")
2162
2215
 
2163
- def find_technology_types(self, type_name: str = "*", server: str = None, start_from: int = 0,
2216
+ def find_technology_types(self, search_string: str = "*", server: str = None, start_from: int = 0,
2164
2217
  page_size: int = max_paging_size, starts_with: bool = False,
2165
2218
  ends_with: bool = False, ignore_case: bool = True) -> list | str:
2166
2219
  """ Retrieve the list of technology types that contain the search string. Async version.
@@ -2189,7 +2242,7 @@ class AutomatedCuration(Client):
2189
2242
 
2190
2243
  loop = asyncio.get_event_loop()
2191
2244
  response = loop.run_until_complete(
2192
- self._async_find_technology_types(type_name, server, start_from,
2245
+ self._async_find_technology_types(search_string, server, start_from,
2193
2246
  page_size, starts_with, ends_with, ignore_case)
2194
2247
  )
2195
2248
  return response