pyegeria 0.5.5.22__py3-none-any.whl → 0.5.5.23__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.
@@ -29,7 +29,7 @@ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
29
29
  EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
30
30
 
31
31
 
32
- def main():
32
+ def main(ep: str):
33
33
 
34
34
  disable_ssl_warnings = True
35
35
  console = Console(width=200)
@@ -40,11 +40,11 @@ def main():
40
40
 
41
41
  # Define the Kafka consumer configuration.
42
42
  config = {
43
- 'bootstrap.servers': EGERIA_KAFKA_ENDPOINT, # replace with your Kafka broker(s)
43
+ 'bootstrap.servers': ep, # replace with your Kafka broker(s)
44
44
  'group.id': f"view_asset_events:{current_time}", # replace with your consumer group
45
45
  'auto.offset.reset': earliest_latest # can be set to 'earliest' or 'latest'
46
46
  }
47
-
47
+ print(f"Kafka config is {json.dumps(config)}")
48
48
  # Initialize a Kafka consumer.
49
49
  consumer = Consumer(config)
50
50
 
@@ -53,7 +53,7 @@ def main():
53
53
 
54
54
  try:
55
55
  while True:
56
- msg = consumer.poll(1.0) # timeout set to 1 second
56
+ msg = consumer.poll(2.0) # timeout set to 1 second
57
57
 
58
58
  if msg is None:
59
59
  continue
@@ -87,4 +87,11 @@ def main():
87
87
  consumer.close()
88
88
 
89
89
  if __name__ == "__main__":
90
- main()
90
+ parser = argparse.ArgumentParser()
91
+
92
+ parser.add_argument("--ep", help="Endpoint to connect to")
93
+ args = parser.parse_args()
94
+
95
+ ep = args.ep if args.ep is not None else EGERIA_KAFKA_ENDPOINT
96
+
97
+ main(ep)
@@ -1922,8 +1922,11 @@ class AutomatedCuration(Client):
1922
1922
  return response
1923
1923
 
1924
1924
  async def _async_add_catalog_target(self, integ_connector_guid: str, metadata_element_guid: str,
1925
- catalog_target_name: str, metadata_src_qual_name: str = None,
1926
- config_properties: dict = None, server: str = None) -> str:
1925
+ catalog_target_name: str, connection_name: str= None,
1926
+ metadata_src_qual_name: str = None,
1927
+ config_properties: dict = None, template_properties: dict = None,
1928
+ permitted_sync: str = "BOTH_DIRECTIONS", delete_method: str = "ARCHIVE",
1929
+ server: str = None) -> str:
1927
1930
  """ Add a catalog target to an integration connector and .
1928
1931
  Async version.
1929
1932
 
@@ -1935,12 +1938,21 @@ class AutomatedCuration(Client):
1935
1938
  The specific metadata element target we want to retrieve.
1936
1939
  catalog_target_name : dict
1937
1940
  Name of the catalog target to add.
1941
+ connection_name: str, default = None
1942
+ Optional name of connection to use for this catalog target when multiple connections defined.
1938
1943
  metadata_src_qual_name: str
1939
1944
  The qualified name of the metadata source for the catalog target
1940
1945
  config_properties: dict
1941
1946
  Configuration properties for the catalog target
1947
+ template_properties: dict
1948
+ Template properties to pass
1949
+ permitted_sync: str, default = BOTH_DIRECTIONS
1950
+ Direction the metadata is allowed to flow (BOTH_DIRECTIONS, FROM_THIRD_PARTH, TO_THIRD_PARTY
1951
+ delete_method: str, default = ARCHIVE
1952
+ Controls the type of delete. Use ARCHIVE for lineage considerations. Alternative is SOFT_DELETE.
1942
1953
  server: str, optional
1943
1954
  The name of the server. If None, will use the default server specified in the instance will be used.
1955
+
1944
1956
  Returns:
1945
1957
  -------
1946
1958
  Relationship GUID for the catalog target,
@@ -1959,14 +1971,21 @@ class AutomatedCuration(Client):
1959
1971
  url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/integration-connectors/"
1960
1972
  f"{integ_connector_guid}/catalog-targets/{metadata_element_guid}")
1961
1973
  body = {"catalogTargetName": catalog_target_name, "metadataSourceQualifiedName": metadata_src_qual_name,
1962
- "configProperties": config_properties}
1974
+ "configProperties": config_properties, "templateProperties": template_properties,
1975
+ "connectionName": connection_name, "permittedSynchronization": permitted_sync,
1976
+ "deleteMethod": delete_method
1977
+ }
1978
+
1963
1979
  response = await self._async_make_request("POST", url, body)
1964
1980
  return response.json().get('guid', "No Guid returned")
1965
1981
 
1966
- def add_catalog_target(self, integ_connector_guid: str, metadata_element_guid: str, catalog_target_name: str,
1967
- metadata_src_qual_name: str = None, config_properties: dict = None,
1968
- server: str = None) -> str:
1969
- """ Add a catalog target to an integration connector.
1982
+ def add_catalog_target(self, integ_connector_guid: str, metadata_element_guid: str,
1983
+ catalog_target_name: str, connection_name: str= None,
1984
+ metadata_src_qual_name: str = None,
1985
+ config_properties: dict = None, template_properties: dict = None,
1986
+ permitted_sync: str = "BOTH_DIRECTIONS", delete_method: str = "ARCHIVE",
1987
+ server: str = None) -> str:
1988
+ """ Add a catalog target to an integration connector and .
1970
1989
 
1971
1990
  Parameters:
1972
1991
  ----------
@@ -1976,15 +1995,24 @@ class AutomatedCuration(Client):
1976
1995
  The specific metadata element target we want to retrieve.
1977
1996
  catalog_target_name : dict
1978
1997
  Name of the catalog target to add.
1998
+ connection_name: str, default = None
1999
+ Optional name of connection to use for this catalog target when multiple connections defined.
1979
2000
  metadata_src_qual_name: str
1980
2001
  The qualified name of the metadata source for the catalog target
1981
2002
  config_properties: dict
1982
2003
  Configuration properties for the catalog target
2004
+ template_properties: dict
2005
+ Template properties to pass
2006
+ permitted_sync: str, default = BOTH_DIRECTIONS
2007
+ Direction the metadata is allowed to flow (BOTH_DIRECTIONS, FROM_THIRD_PARTH, TO_THIRD_PARTY
2008
+ delete_method: str, default = ARCHIVE
2009
+ Controls the type of delete. Use ARCHIVE for lineage considerations. Alternative is SOFT_DELETE.
1983
2010
  server: str, optional
1984
2011
  The name of the server. If None, will use the default server specified in the instance will be used.
2012
+
1985
2013
  Returns:
1986
2014
  -------
1987
- None
2015
+ Relationship GUID for the catalog target,
1988
2016
 
1989
2017
  Raises:
1990
2018
  ------
@@ -1996,28 +2024,42 @@ class AutomatedCuration(Client):
1996
2024
  loop = asyncio.get_event_loop()
1997
2025
  response = loop.run_until_complete(
1998
2026
  self._async_add_catalog_target(integ_connector_guid, metadata_element_guid, catalog_target_name,
1999
- metadata_src_qual_name, config_properties, server))
2027
+ connection_name, metadata_src_qual_name, config_properties,
2028
+ template_properties, permitted_sync, delete_method,
2029
+ server))
2000
2030
  return response
2001
2031
 
2002
2032
  async def _async_update_catalog_target(self, relationship_guid: str,
2003
- catalog_target_name: str, metadata_src_qual_name: str = None,
2004
- config_properties: dict = None, server: str = None) -> None:
2033
+ catalog_target_name: str, connection_name: str = None,
2034
+ metadata_src_qual_name: str = None,
2035
+ config_properties: dict = None, template_properties: dict = None,
2036
+ permitted_sync: str = "BOTH_DIRECTIONS", delete_method: str = "ARCHIVE",
2037
+ server: str = None
2038
+ ) -> None:
2005
2039
  """ Update a catalog target to an integration connector.
2006
2040
  Async version.
2007
2041
 
2008
2042
  Parameters:
2009
2043
  ----------
2010
2044
  relationship_guid: str
2011
- The GUID (Globally Unique Identifier) of the integration connector used to retrieve catalog targets.
2012
-
2045
+ The GUID (Globally Unique Identifier) of the relationship used to retrieve catalog targets.
2013
2046
  catalog_target_name : dict
2014
2047
  Name of the catalog target to add.
2048
+ connection_name: str, default = None
2049
+ Optional name of connection to use for this catalog target when multiple connections defined.
2015
2050
  metadata_src_qual_name: str
2016
2051
  The qualified name of the metadata source for the catalog target
2017
2052
  config_properties: dict
2018
2053
  Configuration properties for the catalog target
2054
+ template_properties: dict
2055
+ Template properties to pass
2056
+ permitted_sync: str, default = BOTH_DIRECTIONS
2057
+ Direction the metadata is allowed to flow (BOTH_DIRECTIONS, FROM_THIRD_PARTH, TO_THIRD_PARTY
2058
+ delete_method: str, default = ARCHIVE
2059
+ Controls the type of delete. Use ARCHIVE for lineage considerations. Alternative is SOFT_DELETE.
2019
2060
  server: str, optional
2020
2061
  The name of the server. If None, will use the default server specified in the instance will be used.
2062
+
2021
2063
  Returns:
2022
2064
  -------
2023
2065
  None
@@ -2035,42 +2077,49 @@ class AutomatedCuration(Client):
2035
2077
  url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/catalog-targets/"
2036
2078
  f"{relationship_guid}/update")
2037
2079
  body = {"catalogTargetName": catalog_target_name, "metadataSourceQualifiedName": metadata_src_qual_name,
2038
- "configProperties": config_properties}
2039
- response = await self._async_make_request("POST", url, body)
2080
+ "configProperties": config_properties, "templateProperties": template_properties,
2081
+ "connectionName": connection_name, "permittedSynchronization": permitted_sync,
2082
+ "deleteMethod": delete_method
2083
+ }
2084
+ await self._async_make_request("POST", url, body)
2040
2085
  return
2041
2086
 
2042
- def update_catalog_target(self, relationship_guid: str, catalog_target_name: str,
2043
- metadata_src_qual_name: str = None, config_properties: dict = None,
2044
- server: str = None) -> None:
2045
- """ Add a catalog target to an integration connector.
2087
+ def update_catalog_target(self, relationship_guid: str,
2088
+ catalog_target_name: str, connection_name: str = None,
2089
+ metadata_src_qual_name: str = None,
2090
+ config_properties: dict = None, template_properties: dict = None,
2091
+ permitted_sync: str = "BOTH_DIRECTIONS", delete_method: str = "ARCHIVE",
2092
+ server: str = None
2093
+ ) -> None:
2094
+ """ Update a catalog target to an integration connector.
2046
2095
 
2047
- Parameters:
2048
- ----------
2049
- relationship_guid: str
2050
- The GUID (Globally Unique Identifier) of the integration connector used to retrieve catalog targets.
2051
- catalog_target_name : dict
2052
- Name of the catalog target to add.
2053
- metadata_src_qual_name: str
2054
- The qualified name of the metadata source for the catalog target
2055
- config_properties: dict
2056
- Configuration properties for the catalog target
2057
- server: str, optional
2058
- The name of the server. If None, will use the default server specified in the instance will be used.
2059
- Returns:
2060
- -------
2061
- None
2096
+ Parameters:
2097
+ ----------
2098
+ relationship_guid: str
2099
+ The GUID (Globally Unique Identifier) of the relationship used to retrieve catalog targets.
2100
+ catalog_target_name : dict
2101
+ Name of the catalog target to add.
2102
+ connection_name: str, default = None
2103
+ Optional name of connection to use for this catalog target when multiple connections defined.
2104
+ metadata_src_qual_name: str
2105
+ The qualified name of the metadata source for the catalog target
2106
+ config_properties: dict
2107
+ Configuration properties for the catalog target
2108
+ template_properties: dict
2109
+ Template properties to pass
2110
+ permitted_sync: str, default = BOTH_DIRECTIONS
2111
+ Direction the metadata is allowed to flow (BOTH_DIRECTIONS, FROM_THIRD_PARTH, TO_THIRD_PARTY
2112
+ delete_method: str, default = ARCHIVE
2113
+ Controls the type of delete. Use ARCHIVE for lineage considerations. Alternative is SOFT_DELETE.
2114
+ server: str, optional
2115
+ """
2062
2116
 
2063
- Raises:
2064
- ------
2065
- InvalidParameterException: If the API response indicates an error (non-200 status code),
2066
- this exception is raised with details from the response content.
2067
- PropertyServerException: If the API response indicates a server side error.
2068
- UserNotAuthorizedException:
2069
- """
2070
2117
  loop = asyncio.get_event_loop()
2071
2118
  loop.run_until_complete(
2072
2119
  self._async_update_catalog_target(relationship_guid, catalog_target_name,
2073
- metadata_src_qual_name, config_properties, server))
2120
+ connection_name,metadata_src_qual_name,
2121
+ config_properties, template_properties,permitted_sync,
2122
+ delete_method,server))
2074
2123
  return
2075
2124
 
2076
2125
  async def _async_remove_catalog_target(self, relationship_guid: str, server: str = None) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 0.5.5.22
3
+ Version: 0.5.5.23
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -21,7 +21,7 @@ examples/widgets/operational/__init__.py,sha256=8ebdyTD7i-XXyZr0vDx6jnXalE6QjhCv
21
21
  examples/widgets/operational/get_tech_type_elements.py,sha256=_wSZOShJ17kuMlgh8xC-iAzByi1A0JeB4cmEiAL87M0,5846
22
22
  examples/widgets/operational/get_tech_type_template.py,sha256=qIb-JYcoI_YR7NHUKH7TSdq56QI1H4QuyqWTvldNKNo,5866
23
23
  examples/widgets/operational/refresh_integration_daemon.py,sha256=7GF_xzO83nhvTaxJR2DMI7fsHg6TA4xaIy7z8YNbSlk,2274
24
- examples/widgets/operational/view_asset_events.py,sha256=yQa8Z19x6ipdR1QHCta1D-yih90pQ_TW2L6l_ekr2tA,3419
24
+ examples/widgets/operational/view_asset_events.py,sha256=XagfKloRfoeKO8-YOGBWJ4IPFdlUOB35tFmWJSDAbpg,3662
25
25
  examples/widgets/operational/view_coco_status.py,sha256=QloMgVcXL2Fx2XHyk71PKCwmzRfc_Q_cAvpyomcYi_Y,3322
26
26
  examples/widgets/operational/view_eng_action_status.py,sha256=Qj3ySRG58rsYFyFzgyxsHUMLclSMG3Qn3WQG2ERknMs,6108
27
27
  examples/widgets/operational/view_gov_eng_status.py,sha256=6HI_cp_cOPptWYQ5WMoDdWctwwfzTqYLmJMOoIGb6ec,4543
@@ -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=yp5d7D_nNRrx92MU8Z72zw5nloTzBDJVfxvwZrvlVWk,118212
49
+ pyegeria/automated_curation_omvs.py,sha256=jArTmCh7n3XDSc2ozoh6qftaqh2k2_U03JVQPv0bH5M,121625
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.22.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
67
- pyegeria-0.5.5.22.dist-info/METADATA,sha256=WWZiHAWAWxf6heVJfraaR0Fl_JUqiFcbJB-gKEDFIgg,2612
68
- pyegeria-0.5.5.22.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
69
- pyegeria-0.5.5.22.dist-info/entry_points.txt,sha256=WgNY6OkZlWQ5uwE_qtyfVyuOX-dnOKyH0cW2JlKRIJ0,2038
70
- pyegeria-0.5.5.22.dist-info/RECORD,,
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,,