pyegeria 0.5.5.23__py3-none-any.whl → 0.5.5.25__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.
@@ -10,13 +10,9 @@ from datetime import datetime
10
10
 
11
11
  from httpx import Response
12
12
 
13
- from pyegeria import Client, max_paging_size, body_slimmer
13
+ from pyegeria import Client, max_paging_size, body_slimmer, INTEGRATION_GUIDS, TEMPLATE_GUIDS
14
14
  from pyegeria._exceptions import (InvalidParameterException, PropertyServerException, UserNotAuthorizedException)
15
15
  from ._validators import validate_name, validate_guid, validate_search_string
16
- from .core_guids import (FILEFOLDER_TEMPLATE_GUID,
17
- POSTGRESQL_SERVER_TEMPLATE_GUID,
18
- APACHE_KAFKA_SERVER_TEMPLATE_GUID,
19
- )
20
16
 
21
17
 
22
18
  class AutomatedCuration(Client):
@@ -169,7 +165,7 @@ class AutomatedCuration(Client):
169
165
  The GUID of the Kafka server element.
170
166
  """
171
167
 
172
- body = {"templateGUID":APACHE_KAFKA_SERVER_TEMPLATE_GUID, "isOwnAnchor": 'true',
168
+ body = {"templateGUID":TEMPLATE_GUIDS['Apache Kafka Server template'], "isOwnAnchor": 'true',
173
169
  "placeholderPropertyValues": {"serverName": kafka_server, "hostIdentifier": host_name,
174
170
  "portNumber": port, "description": description}}
175
171
  body_s = body_slimmer(body)
@@ -241,7 +237,7 @@ class AutomatedCuration(Client):
241
237
  str
242
238
  The GUID of the Postgres server element.
243
239
  """
244
- body = {"templateGUID":POSTGRESQL_SERVER_TEMPLATE_GUID, "isOwnAnchor": 'true',
240
+ body = {"templateGUID":TEMPLATE_GUIDS['PostgreSQL Server template'], "isOwnAnchor": 'true',
245
241
  "placeholderPropertyValues": {"serverName": postgres_server, "hostIdentifier": host_name,
246
242
  "portNumber": port, "databaseUserId": db_user, "description": description,
247
243
  "databasePassword": db_pwd}}
@@ -319,7 +315,7 @@ class AutomatedCuration(Client):
319
315
  str
320
316
  The GUID of the File Folder element.
321
317
  """
322
- body = {"templateGUID": FILEFOLDER_TEMPLATE_GUID,
318
+ body = {"templateGUID": TEMPLATE_GUIDS['FileFolder template'],
323
319
  "isOwnAnchor": 'true',
324
320
  "placeholderPropertyValues": {
325
321
  "directoryPathName": path_name,
@@ -1429,8 +1425,8 @@ class AutomatedCuration(Client):
1429
1425
  - request source elements for the resulting governance action service
1430
1426
  action_targets: [str]
1431
1427
  -list of action target names to GUIDs for the resulting governance action service
1432
- start_time: datetime
1433
- - time to start the process
1428
+ start_time: datetime, default = None
1429
+ - time to start the process, no earlier than start time. None means now.
1434
1430
  request_parameters: [str]
1435
1431
  - parameters passed into the process
1436
1432
  orig_service_name: str
@@ -1454,10 +1450,11 @@ class AutomatedCuration(Client):
1454
1450
  server = self.server_name if server is None else server
1455
1451
  url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
1456
1452
  f"initiate")
1453
+ start = int(start_time.timestamp() *1000) if start_time else None
1457
1454
  body = {"class": "InitiateGovernanceActionTypeRequestBody",
1458
1455
  "governanceActionTypeQualifiedName": action_type_qualified_name,
1459
1456
  "requestSourceGUIDs": request_source_guids,
1460
- "actionTargets": action_targets, "startDate": int(start_time.timestamp() * 1000),
1457
+ "actionTargets": action_targets, "startDate": start,
1461
1458
  "requestParameters": request_parameters, "originatorServiceName": orig_service_name,
1462
1459
  "originatorEngineName": orig_engine_name}
1463
1460
  new_body = body_slimmer(body)
@@ -1465,8 +1462,8 @@ class AutomatedCuration(Client):
1465
1462
  return response.json().get("guid", "Action not initiated")
1466
1463
 
1467
1464
  def initiate_gov_action_type(self, action_type_qualified_name: str, request_source_guids: [str],
1468
- action_targets: list, start_time: datetime, request_parameters: dict,
1469
- orig_service_name: str, orig_engine_name: str, server: str = None) -> str:
1465
+ action_targets: list, start_time: datetime = None, request_parameters: dict = None,
1466
+ orig_service_name: str = None, orig_engine_name: str = None, server: str = None) -> str:
1470
1467
  """ Using the named governance action type as a template, initiate an engine action.
1471
1468
 
1472
1469
  Parameters
@@ -1477,8 +1474,8 @@ class AutomatedCuration(Client):
1477
1474
  - request source elements for the resulting governance action service
1478
1475
  action_targets: [str]
1479
1476
  -list of action target names to GUIDs for the resulting governance action service
1480
- start_time: datetime
1481
- - time to start the process
1477
+ start_time: datetime, default = None
1478
+ - time to start the process, no earlier than start time. None means now.
1482
1479
  request_parameters: [str]
1483
1480
  - parameters passed into the process
1484
1481
  orig_service_name: str
@@ -1513,7 +1510,7 @@ class AutomatedCuration(Client):
1513
1510
 
1514
1511
  body = {"class": "InitiateGovernanceActionTypeRequestBody",
1515
1512
  "governanceActionTypeQualifiedName":
1516
- "Egeria:GovernanceActionType:2adeb8f1-0f59-4970-b6f2-6cc25d4d2402survey-postgres-database",
1513
+ "AssetSurvey-postgres-database",
1517
1514
  "actionTargets": [{"class": "NewActionTarget", "actionTargetName": "serverToSurvey",
1518
1515
  "actionTargetGUID": postgres_database_guid}]}
1519
1516
  response = await self._async_make_request("POST", url, body)
@@ -1532,7 +1529,7 @@ class AutomatedCuration(Client):
1532
1529
  f"initiate")
1533
1530
 
1534
1531
  body = {"class": "InitiateGovernanceActionTypeRequestBody",
1535
- "governanceActionTypeQualifiedName": "Egeria:GovernanceActionType:AssetSurvey:survey-postgres-server",
1532
+ "governanceActionTypeQualifiedName": "AssetSurvey:survey-postgres-server",
1536
1533
  "actionTargets": [{"class": "NewActionTarget", "actionTargetName": "serverToSurvey",
1537
1534
  "actionTargetGUID": postgres_server_guid}]}
1538
1535
  response = await self._async_make_request("POST", url, body)
@@ -1575,10 +1572,10 @@ class AutomatedCuration(Client):
1575
1572
  in the Core Content Brain.
1576
1573
 
1577
1574
  File Folder Survey Names currently include::
1578
- - Egeria:GovernanceActionType:AssetSurvey:survey-folders
1579
- - Egeria:GovernanceActionType:AssetSurvey:survey-folder-and-files
1580
- - Egeria:GovernanceActionType:AssetSurvey:survey-all-folders
1581
- - Egeria:GovernanceActionType:AssetSurvey:survey-all-folders-and-files
1575
+ - AssetSurvey:survey-folders
1576
+ - AssetSurvey:survey-folder-and-files
1577
+ - AssetSurvey:survey-all-folders
1578
+ - AssetSurvey:survey-all-folders-and-files
1582
1579
  """
1583
1580
  server = self.server_name if server is None else server
1584
1581
  url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
@@ -1672,7 +1669,7 @@ class AutomatedCuration(Client):
1672
1669
  f"initiate")
1673
1670
 
1674
1671
  body = {"class": "InitiateGovernanceActionTypeRequestBody",
1675
- "governanceActionTypeQualifiedName": "Egeria:GovernanceActionType:AssetSurvey:survey-kafka-server",
1672
+ "governanceActionTypeQualifiedName": "AssetSurvey:survey-kafka-server",
1676
1673
  "actionTargets": [{"class": "NewActionTarget", "actionTargetName": "serverToSurvey",
1677
1674
  "actionTargetGUID": kafka_server_guid}]}
1678
1675
  response = await self._async_make_request("POST", url, body)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 0.5.5.23
3
+ Version: 0.5.5.25
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -46,7 +46,7 @@ pyegeria/_globals.py,sha256=DF6851qHPpoDrY4w5JGmT-8zmMfVXf9MMG6nKlu-BYM,616
46
46
  pyegeria/_validators.py,sha256=DQuMsATRGxGSBtOrVtXlCgWXGhj6Nh-uqPtCsrUGLxk,12703
47
47
  pyegeria/action_author_omvs.py,sha256=m0wsfmyO-VxRDaPpACeIDw8eVAFu3RVbo45RPCUel9M,6340
48
48
  pyegeria/asset_catalog_omvs.py,sha256=Y-Eh0k-zkJNOChVlLbC2bsTSBVLWhk-0-ewCV4YlyDY,25802
49
- pyegeria/automated_curation_omvs.py,sha256=jArTmCh7n3XDSc2ozoh6qftaqh2k2_U03JVQPv0bH5M,121625
49
+ pyegeria/automated_curation_omvs.py,sha256=TAdV5h7Z-2RpdBuQb7ol-pjgWxqMZa03AVqchQS_Ooc,121473
50
50
  pyegeria/collection_manager_omvs.py,sha256=IyGCbqx2Blm0OwCsC2071EeoNWHXyWGl_6pEtacizAs,112642
51
51
  pyegeria/core_guids.py,sha256=JKziCsKhklbWRramQ0orRMNTudJXYB721a32TJegBl4,4320
52
52
  pyegeria/core_omag_server_config.py,sha256=16ld7aBTgO3gGhvFs-_yzwqPsatdCAiKYi005_2evZU,93096
@@ -63,8 +63,8 @@ pyegeria/server_operations.py,sha256=hEaU6YC0iNEQFvcXYvcE4J6BQKlqMJk33nViCNIEBE4
63
63
  pyegeria/tech_guids_22-07-2024 13:22.py,sha256=nsjPrCDf9gohdw3LRcO5-uwzBN_nMB7Re_vtDJIgaIY,4643
64
64
  pyegeria/utils.py,sha256=f8isUaKDy-GJxhwswWgP_bw6q1CUzBUNVcCtin8N1cA,5433
65
65
  pyegeria/valid_metadata_omvs.py,sha256=aisdRodIwJSkyArAzfm_sEnBELh69xE8k4Nea-vHu8M,36745
66
- pyegeria-0.5.5.23.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
67
- pyegeria-0.5.5.23.dist-info/METADATA,sha256=UjZwgPTlMMELgqWNN54aOZd46hvpKpAFNCKqLeznlPQ,2612
68
- pyegeria-0.5.5.23.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
69
- pyegeria-0.5.5.23.dist-info/entry_points.txt,sha256=WgNY6OkZlWQ5uwE_qtyfVyuOX-dnOKyH0cW2JlKRIJ0,2038
70
- pyegeria-0.5.5.23.dist-info/RECORD,,
66
+ pyegeria-0.5.5.25.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
67
+ pyegeria-0.5.5.25.dist-info/METADATA,sha256=bjK-XKRkUyxyCotD6n6sTiKIKLWNAsyMSdiYfwUuvQI,2612
68
+ pyegeria-0.5.5.25.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
69
+ pyegeria-0.5.5.25.dist-info/entry_points.txt,sha256=WgNY6OkZlWQ5uwE_qtyfVyuOX-dnOKyH0cW2JlKRIJ0,2038
70
+ pyegeria-0.5.5.25.dist-info/RECORD,,