pyegeria 5.4.4.6__py3-none-any.whl → 5.4.4.7__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.
- commands/cat/debug_log.2025-09-15_19-06-37_086464.log.zip +0 -0
- md_processing/data/commands.json +54 -2
- md_processing/dr-egeria-outbox/DataStruct-DrE-2025-09-19-22-35-57.md +46 -0
- md_processing/md_commands/product_manager_commands.py +5 -0
- md_processing/md_processing_utils/common_md_proc_utils.py +1 -1
- md_processing/md_processing_utils/debug_log +84 -0
- md_processing/md_processing_utils/extraction_utils.py +1 -1
- md_processing/md_processing_utils/generate_md_cmd_templates.py +1 -1
- md_processing/md_processing_utils/md_processing_constants.py +1 -1
- pyegeria/__init__.py +1 -1
- pyegeria/_client_new.py +2 -2
- pyegeria/_output_formats.py +2 -1
- pyegeria/{automated_curation_omvs.py → automated_curation.py} +673 -467
- pyegeria/data_designer.py +3 -3
- pyegeria/egeria_client.py +1 -1
- pyegeria/egeria_tech_client.py +1 -1
- pyegeria/mermaid_utilities.py +1 -1
- pyegeria/models.py +1 -1
- pyegeria/output_formatter.py +47 -7
- pyegeria/project_manager.py +1 -1
- pyegeria/reference_data.py +1 -1
- pyegeria/x_action_author_omvs.py +2 -2
- {pyegeria-5.4.4.6.dist-info → pyegeria-5.4.4.7.dist-info}/METADATA +1 -1
- {pyegeria-5.4.4.6.dist-info → pyegeria-5.4.4.7.dist-info}/RECORD +27 -25
- pyegeria/load_config_orig.py +0 -218
- {pyegeria-5.4.4.6.dist-info → pyegeria-5.4.4.7.dist-info}/LICENSE +0 -0
- {pyegeria-5.4.4.6.dist-info → pyegeria-5.4.4.7.dist-info}/WHEEL +0 -0
- {pyegeria-5.4.4.6.dist-info → pyegeria-5.4.4.7.dist-info}/entry_points.txt +0 -0
@@ -11,20 +11,18 @@ import datetime
|
|
11
11
|
|
12
12
|
from httpx import Response
|
13
13
|
|
14
|
-
from pyegeria.
|
15
|
-
from pyegeria._globals import NO_ELEMENTS_FOUND
|
16
|
-
from pyegeria._client import Client
|
17
|
-
from pyegeria import TEMPLATE_GUIDS, max_paging_size
|
14
|
+
from pyegeria._client_new import Client2
|
18
15
|
from pyegeria._exceptions import (
|
19
16
|
InvalidParameterException,
|
20
17
|
PropertyServerException,
|
21
18
|
UserNotAuthorizedException,
|
22
19
|
)
|
23
|
-
|
20
|
+
from pyegeria.models import GetRequestBody, FilterRequestBody
|
21
|
+
from pyegeria.utils import body_slimmer
|
24
22
|
from ._validators import validate_guid, validate_name, validate_search_string
|
25
23
|
|
26
24
|
|
27
|
-
class AutomatedCuration(
|
25
|
+
class AutomatedCuration(Client2):
|
28
26
|
"""Set up and maintain automation services in Egeria.
|
29
27
|
|
30
28
|
Attributes:
|
@@ -42,18 +40,18 @@ class AutomatedCuration(Client):
|
|
42
40
|
"""
|
43
41
|
|
44
42
|
def __init__(
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
43
|
+
self,
|
44
|
+
view_server: str,
|
45
|
+
platform_url: str,
|
46
|
+
user_id: str,
|
47
|
+
user_pwd: str = None,
|
48
|
+
token: str = None,
|
51
49
|
):
|
52
50
|
self.view_server = view_server
|
53
51
|
self.platform_url = platform_url
|
54
52
|
self.user_id = user_id
|
55
53
|
self.user_pwd = user_pwd
|
56
|
-
|
54
|
+
Client2.__init__(self, view_server, platform_url, user_id, user_pwd, token=token)
|
57
55
|
self.curation_command_root = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/automated-curation"
|
58
56
|
|
59
57
|
async def _async_create_element_from_template(self, body: dict) -> str:
|
@@ -101,8 +99,7 @@ class AutomatedCuration(Client):
|
|
101
99
|
"""
|
102
100
|
|
103
101
|
url = f"{self.curation_command_root}/catalog-templates/new-element"
|
104
|
-
|
105
|
-
return response.json().get("guid", "GUID failed to be returned")
|
102
|
+
return await self._async_create_elem_from_template(url, body)
|
106
103
|
|
107
104
|
def create_element_from_template(self, body: dict) -> str:
|
108
105
|
"""Create a new metadata element from a template. Async version.
|
@@ -155,11 +152,11 @@ class AutomatedCuration(Client):
|
|
155
152
|
return response
|
156
153
|
|
157
154
|
async def _async_create_kafka_server_element_from_template(
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
155
|
+
self,
|
156
|
+
kafka_server: str,
|
157
|
+
host_name: str,
|
158
|
+
port: str,
|
159
|
+
description: str = None,
|
163
160
|
) -> str:
|
164
161
|
"""Create a Kafka server element from a template. Async version.
|
165
162
|
|
@@ -184,9 +181,10 @@ class AutomatedCuration(Client):
|
|
184
181
|
str
|
185
182
|
The GUID of the Kafka server element.
|
186
183
|
"""
|
187
|
-
|
184
|
+
template_guid = await self._async_get_template_guid_for_technology_type("Apache Kafka Server")
|
188
185
|
body = {
|
189
|
-
"
|
186
|
+
"class": "TemplateRequestBody",
|
187
|
+
"templateGUID": template_guid,
|
190
188
|
"isOwnAnchor": "true",
|
191
189
|
"placeholderPropertyValues": {
|
192
190
|
"serverName": kafka_server,
|
@@ -196,15 +194,14 @@ class AutomatedCuration(Client):
|
|
196
194
|
},
|
197
195
|
}
|
198
196
|
body_s = body_slimmer(body)
|
199
|
-
|
200
|
-
return str(response)
|
197
|
+
return await self._async_create_element_from_template(body_s)
|
201
198
|
|
202
199
|
def create_kafka_server_element_from_template(
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
200
|
+
self,
|
201
|
+
kafka_server: str,
|
202
|
+
host_name: str,
|
203
|
+
port: str,
|
204
|
+
description: str = None,
|
208
205
|
) -> str:
|
209
206
|
"""Create a Kafka server element from a template.
|
210
207
|
|
@@ -237,14 +234,117 @@ class AutomatedCuration(Client):
|
|
237
234
|
)
|
238
235
|
return response
|
239
236
|
|
237
|
+
async def _async_create_csv_data_file_element_from_template(
|
238
|
+
self,
|
239
|
+
file_name: str,
|
240
|
+
file_type: str,
|
241
|
+
file_path_name: str,
|
242
|
+
version_identifier: str,
|
243
|
+
file_encoding: str = "UTF-8",
|
244
|
+
file_extension: str = "csv",
|
245
|
+
file_system_name: str = None,
|
246
|
+
description: str = None,
|
247
|
+
) -> str:
|
248
|
+
"""Create a CSV file element from a template. Async version.
|
249
|
+
|
250
|
+
Parameters
|
251
|
+
----------
|
252
|
+
file_name : str
|
253
|
+
The name of the Kafka server.
|
254
|
+
file_type : str
|
255
|
+
The host name of the Kafka server.
|
256
|
+
file_path_name : str
|
257
|
+
The port number of the Kafka server.
|
258
|
+
version_identifier : str
|
259
|
+
The version identifier of the CSV file..
|
260
|
+
file_encoding: str, opt, default UTF-8
|
261
|
+
The encoding of the CSV file.
|
262
|
+
file_extension: str, opt, default is CSV
|
263
|
+
File extension of the CSV file.
|
264
|
+
file_system_name: str, opt
|
265
|
+
Name of the file system the CSV file is hosted on.
|
266
|
+
description: str, opt
|
267
|
+
A description of the CSV file..
|
268
|
+
|
269
|
+
|
270
|
+
Returns
|
271
|
+
-------
|
272
|
+
str
|
273
|
+
The GUID of the CSV File element.
|
274
|
+
"""
|
275
|
+
template_guid = await self._async_get_template_guid_for_technology_type("CSV Data File")
|
276
|
+
body = {
|
277
|
+
"class": "TemplateRequestBody",
|
278
|
+
"templateGUID": template_guid,
|
279
|
+
"isOwnAnchor": "true",
|
280
|
+
"placeholderPropertyValues": {
|
281
|
+
"fileName": file_name,
|
282
|
+
"fileType": file_type,
|
283
|
+
"filePathName": file_path_name,
|
284
|
+
"versionIdentifier": version_identifier,
|
285
|
+
"fileEncoding": file_encoding,
|
286
|
+
"fileExtension": file_extension,
|
287
|
+
"fileSystemName": file_system_name,
|
288
|
+
"description": description
|
289
|
+
},
|
290
|
+
}
|
291
|
+
body_s = body_slimmer(body)
|
292
|
+
return await self._async_create_element_from_template(body_s)
|
293
|
+
|
294
|
+
def create_csv_data_file_element_from_template(
|
295
|
+
self,
|
296
|
+
file_name: str,
|
297
|
+
file_type: str,
|
298
|
+
file_path_name: str,
|
299
|
+
version_identifier: str,
|
300
|
+
file_encoding: str = "UTF-8",
|
301
|
+
file_extension: str = "csv",
|
302
|
+
file_system_name: str = None,
|
303
|
+
description: str = None,
|
304
|
+
) -> str:
|
305
|
+
"""Create a CSV file element from a template. Async version.
|
306
|
+
|
307
|
+
Parameters
|
308
|
+
----------
|
309
|
+
file_name : str
|
310
|
+
The name of the Kafka server.
|
311
|
+
file_type : str
|
312
|
+
The host name of the Kafka server.
|
313
|
+
file_path_name : str
|
314
|
+
The port number of the Kafka server.
|
315
|
+
version_identifier : str
|
316
|
+
The version identifier of the CSV file..
|
317
|
+
file_encoding: str, opt, default UTF-8
|
318
|
+
The encoding of the CSV file.
|
319
|
+
file_extension: str, opt, default is CSV
|
320
|
+
File extension of the CSV file.
|
321
|
+
file_system_name: str, opt
|
322
|
+
Name of the file system the CSV file is hosted on.
|
323
|
+
description: str, opt
|
324
|
+
A description of the CSV file..
|
325
|
+
|
326
|
+
Returns
|
327
|
+
-------
|
328
|
+
str
|
329
|
+
The GUID of the CSV File element.
|
330
|
+
"""
|
331
|
+
loop = asyncio.get_event_loop()
|
332
|
+
response = loop.run_until_complete(
|
333
|
+
self._async_create_csv_data_file_element_from_template(
|
334
|
+
file_name, file_type, file_path_name, version_identifier,
|
335
|
+
file_encoding, file_extension, file_system_name, description
|
336
|
+
)
|
337
|
+
)
|
338
|
+
return response
|
339
|
+
|
240
340
|
async def _async_create_postgres_server_element_from_template(
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
341
|
+
self,
|
342
|
+
postgres_server: str,
|
343
|
+
host_name: str,
|
344
|
+
port: str,
|
345
|
+
db_user: str,
|
346
|
+
db_pwd: str,
|
347
|
+
description: str = None,
|
248
348
|
) -> str:
|
249
349
|
"""Create a Postgres server element from a template. Async version.
|
250
350
|
|
@@ -275,8 +375,11 @@ class AutomatedCuration(Client):
|
|
275
375
|
str
|
276
376
|
The GUID of the Postgres server element.
|
277
377
|
"""
|
378
|
+
template_guid = await self._async_get_template_guid_for_technology_type("PostgreSQL Server")
|
379
|
+
|
278
380
|
body = {
|
279
|
-
"
|
381
|
+
"class": "TemplateRequestBody",
|
382
|
+
"templateGUID": template_guid,
|
280
383
|
"isOwnAnchor": "true",
|
281
384
|
"placeholderPropertyValues": {
|
282
385
|
"serverName": postgres_server,
|
@@ -288,17 +391,16 @@ class AutomatedCuration(Client):
|
|
288
391
|
},
|
289
392
|
}
|
290
393
|
body_s = body_slimmer(body)
|
291
|
-
|
292
|
-
return str(response)
|
394
|
+
return await self._async_create_element_from_template(body_s)
|
293
395
|
|
294
396
|
def create_postgres_server_element_from_template(
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
397
|
+
self,
|
398
|
+
postgres_server: str,
|
399
|
+
host_name: str,
|
400
|
+
port: str,
|
401
|
+
db_user: str,
|
402
|
+
db_pwd: str,
|
403
|
+
description: str = None,
|
302
404
|
) -> str:
|
303
405
|
"""Create a Postgres server element from a template.
|
304
406
|
|
@@ -338,14 +440,14 @@ class AutomatedCuration(Client):
|
|
338
440
|
return response
|
339
441
|
|
340
442
|
async def _async_create_postgres_database_element_from_template(
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
443
|
+
self,
|
444
|
+
postgres_database: str,
|
445
|
+
server_name: str,
|
446
|
+
host_identifier: str,
|
447
|
+
port: str,
|
448
|
+
db_user: str,
|
449
|
+
db_pwd: str,
|
450
|
+
description: str = None,
|
349
451
|
) -> str:
|
350
452
|
"""Create a Postgres database element from a template. Async version.
|
351
453
|
|
@@ -371,8 +473,11 @@ class AutomatedCuration(Client):
|
|
371
473
|
str
|
372
474
|
The GUID of the Postgres database element.
|
373
475
|
"""
|
476
|
+
template_guid = await self._async_get_template_guid_for_technology_type("PostgreSQL Relational Database")
|
477
|
+
|
374
478
|
body = {
|
375
|
-
"
|
479
|
+
"class": "TemplateRequestBody",
|
480
|
+
"templateGUID": template_guid,
|
376
481
|
"isOwnAnchor": "true",
|
377
482
|
"placeholderPropertyValues": {
|
378
483
|
"databaseName": postgres_database,
|
@@ -389,14 +494,14 @@ class AutomatedCuration(Client):
|
|
389
494
|
return str(response)
|
390
495
|
|
391
496
|
def create_postgres_database_element_from_template(
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
497
|
+
self,
|
498
|
+
postgres_database: str,
|
499
|
+
server_name: str,
|
500
|
+
host_identifier: str,
|
501
|
+
port: str,
|
502
|
+
db_user: str,
|
503
|
+
db_pwd: str,
|
504
|
+
description: str = None,
|
400
505
|
) -> str:
|
401
506
|
"""Create a Postgres database element from a template. Async version.
|
402
507
|
|
@@ -437,12 +542,12 @@ class AutomatedCuration(Client):
|
|
437
542
|
return response
|
438
543
|
|
439
544
|
async def _async_create_folder_element_from_template(
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
545
|
+
self,
|
546
|
+
path_name: str,
|
547
|
+
folder_name: str,
|
548
|
+
file_system: str,
|
549
|
+
description: str = None,
|
550
|
+
version: str = None,
|
446
551
|
) -> str:
|
447
552
|
"""Create a File folder element from a template.
|
448
553
|
Async version.
|
@@ -472,8 +577,11 @@ class AutomatedCuration(Client):
|
|
472
577
|
str
|
473
578
|
The GUID of the File Folder element.
|
474
579
|
"""
|
580
|
+
template_guid = await self._async_get_template_guid_for_technology_type("File System Directory")
|
581
|
+
|
475
582
|
body = {
|
476
|
-
"
|
583
|
+
"class": "TemplateRequestBody",
|
584
|
+
"templateGUID": template_guid,
|
477
585
|
"isOwnAnchor": "true",
|
478
586
|
"placeholderPropertyValues": {
|
479
587
|
"directoryPathName": path_name,
|
@@ -488,12 +596,12 @@ class AutomatedCuration(Client):
|
|
488
596
|
return str(response)
|
489
597
|
|
490
598
|
def create_folder_element_from_template(
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
599
|
+
self,
|
600
|
+
path_name: str,
|
601
|
+
folder_name: str,
|
602
|
+
file_system: str,
|
603
|
+
description: str = None,
|
604
|
+
version: str = None,
|
497
605
|
) -> str:
|
498
606
|
"""Create a File folder element from a template.
|
499
607
|
|
@@ -531,12 +639,12 @@ class AutomatedCuration(Client):
|
|
531
639
|
return response
|
532
640
|
|
533
641
|
async def _async_create_uc_server_element_from_template(
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
642
|
+
self,
|
643
|
+
server_name: str,
|
644
|
+
host_url: str,
|
645
|
+
port: str,
|
646
|
+
description: str = None,
|
647
|
+
version: str = None,
|
540
648
|
) -> str:
|
541
649
|
"""Create a Unity Catalog Server element from a template. Async version.
|
542
650
|
|
@@ -564,8 +672,11 @@ class AutomatedCuration(Client):
|
|
564
672
|
str
|
565
673
|
The GUID of the File Folder element.
|
566
674
|
"""
|
675
|
+
template_guid = await self._async_get_template_guid_for_technology_type("Unity Catalog Server")
|
676
|
+
|
567
677
|
body = {
|
568
|
-
"
|
678
|
+
"class": "TemplateRequestBody",
|
679
|
+
"templateGUID": template_guid,
|
569
680
|
"isOwnAnchor": "true",
|
570
681
|
"placeholderPropertyValues": {
|
571
682
|
"serverName": server_name,
|
@@ -580,12 +691,12 @@ class AutomatedCuration(Client):
|
|
580
691
|
return str(response)
|
581
692
|
|
582
693
|
def create_uc_server_element_from_template(
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
694
|
+
self,
|
695
|
+
server_name: str,
|
696
|
+
host_url: str,
|
697
|
+
port: str,
|
698
|
+
description: str = None,
|
699
|
+
version: str = None,
|
589
700
|
) -> str:
|
590
701
|
"""Create a Unity Catalog Server element from a template. Async version.
|
591
702
|
|
@@ -622,11 +733,11 @@ class AutomatedCuration(Client):
|
|
622
733
|
return response
|
623
734
|
|
624
735
|
async def _async_create_uc_catalog_element_from_template(
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
736
|
+
self,
|
737
|
+
uc_catalog: str,
|
738
|
+
network_address: str,
|
739
|
+
description: str = None,
|
740
|
+
version: str = None,
|
630
741
|
) -> str:
|
631
742
|
"""Create a Unity Catalog Catalog element from a template. Async version.
|
632
743
|
|
@@ -651,8 +762,11 @@ class AutomatedCuration(Client):
|
|
651
762
|
str
|
652
763
|
The GUID of the File Folder element.
|
653
764
|
"""
|
765
|
+
template_guid = await self._async_get_template_guid_for_technology_type("Unity Catalog Catalog")
|
766
|
+
|
654
767
|
body = {
|
655
|
-
"
|
768
|
+
"class": "TemplateRequestBody",
|
769
|
+
"templateGUID": template_guid,
|
656
770
|
"isOwnAnchor": "true",
|
657
771
|
"placeholderPropertyValues": {
|
658
772
|
"ucCatalogName": uc_catalog,
|
@@ -666,11 +780,11 @@ class AutomatedCuration(Client):
|
|
666
780
|
return str(response)
|
667
781
|
|
668
782
|
def create_uc_catalog_element_from_template(
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
783
|
+
self,
|
784
|
+
uc_catalog: str,
|
785
|
+
network_address: str,
|
786
|
+
description: str = None,
|
787
|
+
version: str = None,
|
674
788
|
) -> str:
|
675
789
|
"""Create a Unity Catalog Catalog element from a template.
|
676
790
|
|
@@ -704,12 +818,12 @@ class AutomatedCuration(Client):
|
|
704
818
|
return response
|
705
819
|
|
706
820
|
async def _async_create_uc_schema_element_from_template(
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
821
|
+
self,
|
822
|
+
uc_catalog: str,
|
823
|
+
uc_schema: str,
|
824
|
+
network_address: str,
|
825
|
+
description: str = None,
|
826
|
+
version: str = None,
|
713
827
|
) -> str:
|
714
828
|
"""Create a Unity Catalog schema element from a template. Async version.
|
715
829
|
|
@@ -737,8 +851,11 @@ class AutomatedCuration(Client):
|
|
737
851
|
str
|
738
852
|
The GUID of the File Folder element.
|
739
853
|
"""
|
854
|
+
template_guid = await self._async_get_template_guid_for_technology_type("Unity Catalog Schema")
|
855
|
+
|
740
856
|
body = {
|
741
|
-
"
|
857
|
+
"class": "TemplateRequestBody",
|
858
|
+
"templateGUID": template_guid,
|
742
859
|
"isOwnAnchor": "true",
|
743
860
|
"placeholderPropertyValues": {
|
744
861
|
"ucCatalogName": uc_catalog,
|
@@ -753,12 +870,12 @@ class AutomatedCuration(Client):
|
|
753
870
|
return str(response)
|
754
871
|
|
755
872
|
def create_uc_schema_element_from_template(
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
873
|
+
self,
|
874
|
+
uc_catalog: str,
|
875
|
+
uc_schema: str,
|
876
|
+
network_address: str,
|
877
|
+
description: str = None,
|
878
|
+
version: str = None,
|
762
879
|
) -> str:
|
763
880
|
"""Create a Unity Catalog schema element from a template. Async version.
|
764
881
|
|
@@ -795,16 +912,16 @@ class AutomatedCuration(Client):
|
|
795
912
|
return response
|
796
913
|
|
797
914
|
async def _async_create_uc_table_element_from_template(
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
915
|
+
self,
|
916
|
+
uc_catalog: str,
|
917
|
+
uc_schema: str,
|
918
|
+
uc_table: str,
|
919
|
+
uc_table_type: str,
|
920
|
+
uc_storage_loc: str,
|
921
|
+
uc_data_source_format: str,
|
922
|
+
network_address: str,
|
923
|
+
description: str = None,
|
924
|
+
version: str = None,
|
808
925
|
) -> str:
|
809
926
|
"""Create a Unity Catalog table element from a template. Async version.
|
810
927
|
|
@@ -841,8 +958,11 @@ class AutomatedCuration(Client):
|
|
841
958
|
str
|
842
959
|
The GUID of the File Folder element.
|
843
960
|
"""
|
961
|
+
template_guid = await self._async_get_template_guid_for_technology_type("Unity Catalog Table")
|
962
|
+
|
844
963
|
body = {
|
845
|
-
"
|
964
|
+
"class": "TemplateRequestBody",
|
965
|
+
"templateGUID": template_guid,
|
846
966
|
"isOwnAnchor": "true",
|
847
967
|
"placeholderPropertyValues": {
|
848
968
|
"ucCatalogName": uc_catalog,
|
@@ -861,16 +981,16 @@ class AutomatedCuration(Client):
|
|
861
981
|
return str(response)
|
862
982
|
|
863
983
|
def create_uc_table_element_from_template(
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
984
|
+
self,
|
985
|
+
uc_catalog: str,
|
986
|
+
uc_schema: str,
|
987
|
+
uc_table: str,
|
988
|
+
uc_table_type: str,
|
989
|
+
uc_storage_loc: str,
|
990
|
+
uc_data_source_format: str,
|
991
|
+
network_address: str,
|
992
|
+
description: str = None,
|
993
|
+
version: str = None,
|
874
994
|
) -> str:
|
875
995
|
"""Create a Unity Catalog table element from a template.
|
876
996
|
|
@@ -924,13 +1044,13 @@ class AutomatedCuration(Client):
|
|
924
1044
|
return response
|
925
1045
|
|
926
1046
|
async def _async_create_uc_function_element_from_template(
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
1047
|
+
self,
|
1048
|
+
uc_catalog: str,
|
1049
|
+
uc_schema: str,
|
1050
|
+
uc_function: str,
|
1051
|
+
network_address: str,
|
1052
|
+
description: str = None,
|
1053
|
+
version: str = None,
|
934
1054
|
) -> str:
|
935
1055
|
"""Create a Unity Catalog function element from a template. Async version.
|
936
1056
|
|
@@ -961,8 +1081,11 @@ class AutomatedCuration(Client):
|
|
961
1081
|
str
|
962
1082
|
The GUID of the File Folder element.
|
963
1083
|
"""
|
1084
|
+
template_guid = await self._async_get_template_guid_for_technology_type("Unity Catalog Function")
|
1085
|
+
|
964
1086
|
body = {
|
965
|
-
"
|
1087
|
+
"class": "TemplateRequestBody",
|
1088
|
+
"templateGUID": template_guid,
|
966
1089
|
"isOwnAnchor": "true",
|
967
1090
|
"placeholderPropertyValues": {
|
968
1091
|
"ucCatalogName": uc_catalog,
|
@@ -978,13 +1101,13 @@ class AutomatedCuration(Client):
|
|
978
1101
|
return str(response)
|
979
1102
|
|
980
1103
|
def create_uc_function_element_from_template(
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
1104
|
+
self,
|
1105
|
+
uc_catalog: str,
|
1106
|
+
uc_schema: str,
|
1107
|
+
uc_function: str,
|
1108
|
+
network_address: str,
|
1109
|
+
description: str = None,
|
1110
|
+
version: str = None,
|
988
1111
|
) -> str:
|
989
1112
|
"""Create a Unity Catalog function element from a template.
|
990
1113
|
|
@@ -1029,15 +1152,15 @@ class AutomatedCuration(Client):
|
|
1029
1152
|
return response
|
1030
1153
|
|
1031
1154
|
async def _async_create_uc_volume_element_from_template(
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1155
|
+
self,
|
1156
|
+
uc_catalog: str,
|
1157
|
+
uc_schema: str,
|
1158
|
+
uc_volume: str,
|
1159
|
+
uc_vol_type: str,
|
1160
|
+
uc_storage_loc: str,
|
1161
|
+
network_address: str,
|
1162
|
+
description: str = None,
|
1163
|
+
version: str = None,
|
1041
1164
|
) -> str:
|
1042
1165
|
"""Create a Unity Catalog volume element from a template. Async version.
|
1043
1166
|
|
@@ -1073,8 +1196,11 @@ class AutomatedCuration(Client):
|
|
1073
1196
|
str
|
1074
1197
|
The GUID of the File Folder element.
|
1075
1198
|
"""
|
1199
|
+
template_guid = await self._async_get_template_guid_for_technology_type("Unity Catalog Volume")
|
1200
|
+
|
1076
1201
|
body = {
|
1077
|
-
"
|
1202
|
+
"class": "TemplateRequestBody",
|
1203
|
+
"templateGUID": template_guid,
|
1078
1204
|
"isOwnAnchor": "true",
|
1079
1205
|
"placeholderPropertyValues": {
|
1080
1206
|
"ucCatalogName": uc_catalog,
|
@@ -1092,15 +1218,15 @@ class AutomatedCuration(Client):
|
|
1092
1218
|
return str(response)
|
1093
1219
|
|
1094
1220
|
def create_uc_volume_element_from_template(
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1221
|
+
self,
|
1222
|
+
uc_catalog: str,
|
1223
|
+
uc_schema: str,
|
1224
|
+
uc_volume: str,
|
1225
|
+
uc_vol_type: str,
|
1226
|
+
uc_storage_loc: str,
|
1227
|
+
network_address: str,
|
1228
|
+
description: str = None,
|
1229
|
+
version: str = None,
|
1104
1230
|
) -> str:
|
1105
1231
|
"""Create a Unity Catalog volume element from a template. Async version.
|
1106
1232
|
|
@@ -1156,7 +1282,7 @@ class AutomatedCuration(Client):
|
|
1156
1282
|
# Engine Actions
|
1157
1283
|
#
|
1158
1284
|
async def _async_get_engine_actions(
|
1159
|
-
|
1285
|
+
self, start_from: int = 0, page_size: int = 0, body: dict | GetRequestBody = None
|
1160
1286
|
) -> list:
|
1161
1287
|
"""Retrieve the engine actions that are known to the server. Async version.
|
1162
1288
|
Parameters
|
@@ -1166,6 +1292,8 @@ class AutomatedCuration(Client):
|
|
1166
1292
|
The starting index of the actions to retrieve. Default is 0.
|
1167
1293
|
page_size : int, optional
|
1168
1294
|
The maximum number of actions to retrieve per page. Default is the global maximum paging size.
|
1295
|
+
body: dict, optional
|
1296
|
+
If provided, supersedes the other parameters. Allows advanced options.
|
1169
1297
|
|
1170
1298
|
Returns
|
1171
1299
|
-------
|
@@ -1174,34 +1302,42 @@ class AutomatedCuration(Client):
|
|
1174
1302
|
|
1175
1303
|
Raises
|
1176
1304
|
------
|
1177
|
-
|
1178
|
-
|
1179
|
-
UserNotAuthorizedException
|
1305
|
+
PyegeriaException
|
1306
|
+
ValidationError
|
1180
1307
|
|
1181
1308
|
Notes
|
1182
1309
|
-----
|
1183
1310
|
For more information see: https://egeria-project.org/concepts/engine-action
|
1311
|
+
sample body:
|
1312
|
+
{
|
1313
|
+
"class": "GetRequestBody",
|
1314
|
+
"asOfTime": "{{$isoTimestamp}}",
|
1315
|
+
"effectiveTime": "{{$isoTimestamp}}",
|
1316
|
+
"forLineage": false,
|
1317
|
+
"forDuplicateProcessing": false
|
1318
|
+
}
|
1184
1319
|
"""
|
1185
|
-
|
1186
1320
|
url = (
|
1187
|
-
f"{self.curation_command_root}/engine-actions?"
|
1188
|
-
f"startFrom={start_from}&pageSize={page_size}"
|
1321
|
+
f"{self.curation_command_root}/engine-actions?startFrom={start_from}&pageSize={page_size}"
|
1189
1322
|
)
|
1190
1323
|
|
1324
|
+
# return await self._async_get_guid_request(url, "EngineAction", _generate_default_output,
|
1325
|
+
# output_format="JSON", output_format_set="Referenceable", body=body )
|
1191
1326
|
response = await self._async_make_request("GET", url)
|
1192
|
-
return response.json().get("
|
1327
|
+
return response.json().get("element", "No element found")
|
1193
1328
|
|
1194
1329
|
def get_engine_actions(
|
1195
|
-
|
1330
|
+
self, start_from: int = 0, page_size: int = 0, body: dict | GetRequestBody = None
|
1196
1331
|
) -> list:
|
1197
1332
|
"""Retrieve the engine actions that are known to the server.
|
1198
1333
|
Parameters
|
1199
1334
|
----------
|
1200
|
-
|
1201
1335
|
start_from : int, optional
|
1202
1336
|
The starting index of the actions to retrieve. Default is 0.
|
1203
1337
|
page_size : int, optional
|
1204
1338
|
The maximum number of actions to retrieve per page. Default is the global maximum paging size.
|
1339
|
+
body: dict, optional
|
1340
|
+
If provided, supersedes the other parameters. Allows advanced options.
|
1205
1341
|
|
1206
1342
|
Returns
|
1207
1343
|
-------
|
@@ -1210,17 +1346,24 @@ class AutomatedCuration(Client):
|
|
1210
1346
|
|
1211
1347
|
Raises
|
1212
1348
|
------
|
1213
|
-
|
1214
|
-
|
1215
|
-
UserNotAuthorizedException
|
1349
|
+
PyegeriaException
|
1350
|
+
ValidationError
|
1216
1351
|
|
1217
1352
|
Notes
|
1218
1353
|
-----
|
1219
1354
|
For more information see: https://egeria-project.org/concepts/engine-action
|
1355
|
+
sample body:
|
1356
|
+
{
|
1357
|
+
"class": "GetRequestBody",
|
1358
|
+
"asOfTime": "{{$isoTimestamp}}",
|
1359
|
+
"effectiveTime": "{{$isoTimestamp}}",
|
1360
|
+
"forLineage": false,
|
1361
|
+
"forDuplicateProcessing": false
|
1362
|
+
}
|
1220
1363
|
"""
|
1221
1364
|
loop = asyncio.get_event_loop()
|
1222
1365
|
response = loop.run_until_complete(
|
1223
|
-
self._async_get_engine_actions(start_from, page_size)
|
1366
|
+
self._async_get_engine_actions(start_from, page_size, body)
|
1224
1367
|
)
|
1225
1368
|
return response
|
1226
1369
|
|
@@ -1240,16 +1383,16 @@ class AutomatedCuration(Client):
|
|
1240
1383
|
|
1241
1384
|
Raises
|
1242
1385
|
------
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1386
|
+
PyegeriaException
|
1387
|
+
ValidationError
|
1388
|
+
|
1246
1389
|
|
1247
1390
|
Notes
|
1248
1391
|
-----
|
1249
1392
|
For more information see: https://egeria-project.org/concepts/engine-action
|
1250
1393
|
"""
|
1251
1394
|
|
1252
|
-
url = f"{self.curation_command_root}/engine-actions/
|
1395
|
+
url = f"{self.curation_command_root}/engine-actions/{engine_action_guid}"
|
1253
1396
|
|
1254
1397
|
response = await self._async_make_request("GET", url)
|
1255
1398
|
return response.json().get("element", "No element found")
|
@@ -1347,7 +1490,7 @@ class AutomatedCuration(Client):
|
|
1347
1490
|
return
|
1348
1491
|
|
1349
1492
|
async def _async_get_active_engine_actions(
|
1350
|
-
|
1493
|
+
self, start_from: int = 0, page_size: int = 0
|
1351
1494
|
) -> list | str:
|
1352
1495
|
"""Retrieve the engine actions that are still in process. Async Version.
|
1353
1496
|
|
@@ -1375,15 +1518,14 @@ class AutomatedCuration(Client):
|
|
1375
1518
|
"""
|
1376
1519
|
|
1377
1520
|
url = (
|
1378
|
-
f"{self.curation_command_root}/engine-actions/active
|
1379
|
-
f"startFrom={start_from}&pageSize={page_size}"
|
1521
|
+
f"{self.curation_command_root}/engine-actions/active"
|
1380
1522
|
)
|
1381
1523
|
|
1382
1524
|
response = await self._async_make_request("GET", url)
|
1383
1525
|
return response.json().get("elements", "no actions")
|
1384
1526
|
|
1385
1527
|
def get_active_engine_actions(
|
1386
|
-
|
1528
|
+
self, start_from: int = 0, page_size: int = 0
|
1387
1529
|
) -> list | str:
|
1388
1530
|
"""Retrieve the engine actions that are still in process.
|
1389
1531
|
|
@@ -1415,10 +1557,10 @@ class AutomatedCuration(Client):
|
|
1415
1557
|
return response
|
1416
1558
|
|
1417
1559
|
async def _async_get_engine_actions_by_name(
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1560
|
+
self,
|
1561
|
+
name: str,
|
1562
|
+
start_from: int = 0,
|
1563
|
+
page_size: int = 0,
|
1422
1564
|
) -> list | str:
|
1423
1565
|
"""Retrieve the list of engine action metadata elements with a matching qualified or display name.
|
1424
1566
|
There are no wildcards supported on this request. Async Version.
|
@@ -1453,18 +1595,17 @@ class AutomatedCuration(Client):
|
|
1453
1595
|
validate_name(name)
|
1454
1596
|
|
1455
1597
|
url = (
|
1456
|
-
f"{self.curation_command_root}/engine-actions/by-name
|
1457
|
-
f"startFrom={start_from}&pageSize={page_size}"
|
1598
|
+
f"{self.curation_command_root}/engine-actions/by-name"
|
1458
1599
|
)
|
1459
1600
|
body = {"filter": name}
|
1460
1601
|
response = await self._async_make_request("POST", url, body)
|
1461
1602
|
return response.json().get("elements", "no actions")
|
1462
1603
|
|
1463
1604
|
def get_engine_actions_by_name(
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1605
|
+
self,
|
1606
|
+
name: str,
|
1607
|
+
start_from: int = 0,
|
1608
|
+
page_size: int = 0,
|
1468
1609
|
) -> list | str:
|
1469
1610
|
"""Retrieve the list of engine action metadata elements with a matching qualified or display name.
|
1470
1611
|
There are no wildcards supported on this request.
|
@@ -1503,13 +1644,13 @@ class AutomatedCuration(Client):
|
|
1503
1644
|
return response
|
1504
1645
|
|
1505
1646
|
async def _async_find_engine_actions(
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1647
|
+
self,
|
1648
|
+
search_string: str,
|
1649
|
+
starts_with: bool = False,
|
1650
|
+
ends_with: bool = False,
|
1651
|
+
ignore_case: bool = False,
|
1652
|
+
start_from: int = 0,
|
1653
|
+
page_size: int = 0,
|
1513
1654
|
) -> list | str:
|
1514
1655
|
"""Retrieve the list of engine action metadata elements that contain the search string. Async Version.
|
1515
1656
|
Parameters
|
@@ -1532,7 +1673,7 @@ class AutomatedCuration(Client):
|
|
1532
1673
|
The index from which to start fetching the engine actions. Default is 0.
|
1533
1674
|
|
1534
1675
|
page_size : int, optional
|
1535
|
-
The maximum number of engine actions to fetch in a single request. Default is `
|
1676
|
+
The maximum number of engine actions to fetch in a single request. Default is `0`.
|
1536
1677
|
|
1537
1678
|
Returns
|
1538
1679
|
-------
|
@@ -1560,21 +1701,20 @@ class AutomatedCuration(Client):
|
|
1560
1701
|
|
1561
1702
|
url = (
|
1562
1703
|
f"{self.curation_command_root}/engine-actions/"
|
1563
|
-
f"by-search-string
|
1564
|
-
f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}"
|
1704
|
+
f"by-search-string"
|
1565
1705
|
)
|
1566
1706
|
body = {"class": "SearchStringRequestBody", "name": search_string}
|
1567
1707
|
response = await self._async_make_request("POST", url, body)
|
1568
1708
|
return response.json().get("elements", "no actions")
|
1569
1709
|
|
1570
1710
|
def find_engine_actions(
|
1571
|
-
|
1572
|
-
|
1573
|
-
|
1574
|
-
|
1575
|
-
|
1576
|
-
|
1577
|
-
|
1711
|
+
self,
|
1712
|
+
search_string: str = "*",
|
1713
|
+
starts_with: bool = False,
|
1714
|
+
ends_with: bool = False,
|
1715
|
+
ignore_case: bool = False,
|
1716
|
+
start_from: int = 0,
|
1717
|
+
page_size: int = 0,
|
1578
1718
|
) -> list | str:
|
1579
1719
|
"""Retrieve the list of engine action metadata elements that contain the search string.
|
1580
1720
|
Parameters
|
@@ -1597,7 +1737,7 @@ class AutomatedCuration(Client):
|
|
1597
1737
|
The index from which to start fetching the engine actions. Default is 0.
|
1598
1738
|
|
1599
1739
|
page_size : int, optional
|
1600
|
-
The maximum number of engine actions to fetch in a single request. Default is `
|
1740
|
+
The maximum number of engine actions to fetch in a single request. Default is `0`.
|
1601
1741
|
|
1602
1742
|
Returns
|
1603
1743
|
-------
|
@@ -1634,7 +1774,7 @@ class AutomatedCuration(Client):
|
|
1634
1774
|
#
|
1635
1775
|
|
1636
1776
|
async def _async_get_governance_action_process_by_guid(
|
1637
|
-
|
1777
|
+
self, process_guid: str
|
1638
1778
|
) -> dict | str:
|
1639
1779
|
"""Retrieve the governance action process metadata element with the supplied unique identifier. Async Version.
|
1640
1780
|
|
@@ -1692,7 +1832,7 @@ class AutomatedCuration(Client):
|
|
1692
1832
|
return response
|
1693
1833
|
|
1694
1834
|
async def _async_get_gov_action_process_graph(
|
1695
|
-
|
1835
|
+
self, process_guid: str
|
1696
1836
|
) -> dict | str:
|
1697
1837
|
"""Retrieve the governance action process metadata element with the supplied unique
|
1698
1838
|
identifier along with the flow definition describing its implementation. Async Version.
|
@@ -1753,10 +1893,10 @@ class AutomatedCuration(Client):
|
|
1753
1893
|
return response
|
1754
1894
|
|
1755
1895
|
async def _async_get_gov_action_processes_by_name(
|
1756
|
-
|
1757
|
-
|
1758
|
-
|
1759
|
-
|
1896
|
+
self,
|
1897
|
+
name: str,
|
1898
|
+
start_from: int = None,
|
1899
|
+
page_size: int = 0,
|
1760
1900
|
) -> list | str:
|
1761
1901
|
"""Retrieve the list of governance action process metadata elements with a matching qualified or display name.
|
1762
1902
|
There are no wildcards supported on this request. Async Version.
|
@@ -1788,17 +1928,17 @@ class AutomatedCuration(Client):
|
|
1788
1928
|
|
1789
1929
|
url = (
|
1790
1930
|
f"{self.curation_command_root}/governance-action-processes/"
|
1791
|
-
f"by-name
|
1931
|
+
f"by-name"
|
1792
1932
|
)
|
1793
1933
|
body = {"filter": name}
|
1794
1934
|
response = await self._async_make_request("POST", url, body)
|
1795
1935
|
return response.json().get("elements", "no actions")
|
1796
1936
|
|
1797
1937
|
def get_gov_action_processes_by_name(
|
1798
|
-
|
1799
|
-
|
1800
|
-
|
1801
|
-
|
1938
|
+
self,
|
1939
|
+
name: str,
|
1940
|
+
start_from: int = 0,
|
1941
|
+
page_size: int = 0,
|
1802
1942
|
) -> list | str:
|
1803
1943
|
"""Retrieve the list of governance action process metadata elements with a matching qualified or display name.
|
1804
1944
|
There are no wildcards supported on this request.
|
@@ -1832,13 +1972,13 @@ class AutomatedCuration(Client):
|
|
1832
1972
|
return response
|
1833
1973
|
|
1834
1974
|
async def _async_find_gov_action_processes(
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1838
|
-
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
1975
|
+
self,
|
1976
|
+
search_string: str,
|
1977
|
+
starts_with: bool = False,
|
1978
|
+
ends_with: bool = False,
|
1979
|
+
ignore_case: bool = False,
|
1980
|
+
start_from: int = 0,
|
1981
|
+
page_size: int = 0,
|
1842
1982
|
) -> list | str:
|
1843
1983
|
"""Retrieve the list of governance action process metadata elements that contain the search string. Async ver.
|
1844
1984
|
|
@@ -1862,7 +2002,7 @@ class AutomatedCuration(Client):
|
|
1862
2002
|
The index from which to start fetching the engine actions. Default is 0.
|
1863
2003
|
|
1864
2004
|
page_size : int, optional
|
1865
|
-
The maximum number of engine actions to fetch in a single request. Default is `
|
2005
|
+
The maximum number of engine actions to fetch in a single request. Default is `0`.
|
1866
2006
|
|
1867
2007
|
Returns
|
1868
2008
|
-------
|
@@ -1886,8 +2026,7 @@ class AutomatedCuration(Client):
|
|
1886
2026
|
|
1887
2027
|
url = (
|
1888
2028
|
f"{self.curation_command_root}/governance-action-processes/"
|
1889
|
-
f"by-search-string
|
1890
|
-
f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}"
|
2029
|
+
f"by-search-string"
|
1891
2030
|
)
|
1892
2031
|
|
1893
2032
|
if search_string:
|
@@ -1899,13 +2038,13 @@ class AutomatedCuration(Client):
|
|
1899
2038
|
return response.json().get("elements", "no actions")
|
1900
2039
|
|
1901
2040
|
def find_gov_action_processes(
|
1902
|
-
|
1903
|
-
|
1904
|
-
|
1905
|
-
|
1906
|
-
|
1907
|
-
|
1908
|
-
|
2041
|
+
self,
|
2042
|
+
search_string: str = "*",
|
2043
|
+
starts_with: bool = False,
|
2044
|
+
ends_with: bool = False,
|
2045
|
+
ignore_case: bool = False,
|
2046
|
+
start_from: int = 0,
|
2047
|
+
page_size: int = 0,
|
1909
2048
|
) -> list | str:
|
1910
2049
|
"""Retrieve the list of governance action process metadata elements that contain the search string.
|
1911
2050
|
|
@@ -1929,7 +2068,7 @@ class AutomatedCuration(Client):
|
|
1929
2068
|
The index from which to start fetching the engine actions. Default is 0.
|
1930
2069
|
|
1931
2070
|
page_size : int, optional
|
1932
|
-
The maximum number of engine actions to fetch in a single request. Default is `
|
2071
|
+
The maximum number of engine actions to fetch in a single request. Default is `0`.
|
1933
2072
|
|
1934
2073
|
Returns
|
1935
2074
|
-------
|
@@ -1958,14 +2097,14 @@ class AutomatedCuration(Client):
|
|
1958
2097
|
return response
|
1959
2098
|
|
1960
2099
|
async def _async_initiate_gov_action_process(
|
1961
|
-
|
1962
|
-
|
1963
|
-
|
1964
|
-
|
1965
|
-
|
1966
|
-
|
1967
|
-
|
1968
|
-
|
2100
|
+
self,
|
2101
|
+
action_type_qualified_name: str,
|
2102
|
+
request_source_guids: [str] = None,
|
2103
|
+
action_targets: list = None,
|
2104
|
+
start_time: datetime = None,
|
2105
|
+
request_parameters: dict = None,
|
2106
|
+
orig_service_name: str = None,
|
2107
|
+
orig_engine_name: str = None,
|
1969
2108
|
) -> str:
|
1970
2109
|
"""Using the named governance action process as a template, initiate a chain of engine actions. Async version.
|
1971
2110
|
|
@@ -2018,14 +2157,14 @@ class AutomatedCuration(Client):
|
|
2018
2157
|
return response.json().get("guid", "Action not initiated")
|
2019
2158
|
|
2020
2159
|
def initiate_gov_action_process(
|
2021
|
-
|
2022
|
-
|
2023
|
-
|
2024
|
-
|
2025
|
-
|
2026
|
-
|
2027
|
-
|
2028
|
-
|
2160
|
+
self,
|
2161
|
+
action_type_qualified_name: str,
|
2162
|
+
request_source_guids: [str] = None,
|
2163
|
+
action_targets: [str] = None,
|
2164
|
+
start_time: datetime = None,
|
2165
|
+
request_parameters: dict = None,
|
2166
|
+
orig_service_name: str = None,
|
2167
|
+
orig_engine_name: str = None,
|
2029
2168
|
) -> str:
|
2030
2169
|
"""Using the named governance action process as a template, initiate a chain of engine actions.
|
2031
2170
|
|
@@ -2072,7 +2211,7 @@ class AutomatedCuration(Client):
|
|
2072
2211
|
return response
|
2073
2212
|
|
2074
2213
|
async def _async_get_gov_action_types_by_guid(
|
2075
|
-
|
2214
|
+
self, gov_action_type_guid: str
|
2076
2215
|
) -> dict | str:
|
2077
2216
|
"""Retrieve the governance action type metadata element with the supplied unique identifier. Async version.
|
2078
2217
|
|
@@ -2129,10 +2268,10 @@ class AutomatedCuration(Client):
|
|
2129
2268
|
return response
|
2130
2269
|
|
2131
2270
|
async def _async_get_gov_action_types_by_name(
|
2132
|
-
|
2133
|
-
|
2134
|
-
|
2135
|
-
|
2271
|
+
self,
|
2272
|
+
action_type_name,
|
2273
|
+
start_from: int = 0,
|
2274
|
+
page_size: int = 0,
|
2136
2275
|
) -> list | str:
|
2137
2276
|
"""Retrieve the list of governance action type metadata elements with a matching qualified or display name.
|
2138
2277
|
There are no wildcards supported on this request. Async version.
|
@@ -2158,7 +2297,7 @@ class AutomatedCuration(Client):
|
|
2158
2297
|
|
2159
2298
|
url = (
|
2160
2299
|
f"{self.curation_command_root}/"
|
2161
|
-
f"governance-action-types/by-name
|
2300
|
+
f"governance-action-types/by-name"
|
2162
2301
|
)
|
2163
2302
|
|
2164
2303
|
body = {"filter": action_type_name}
|
@@ -2167,10 +2306,10 @@ class AutomatedCuration(Client):
|
|
2167
2306
|
return response.json().get("elements", "no actions")
|
2168
2307
|
|
2169
2308
|
def get_gov_action_types_by_name(
|
2170
|
-
|
2171
|
-
|
2172
|
-
|
2173
|
-
|
2309
|
+
self,
|
2310
|
+
action_type_name,
|
2311
|
+
start_from: int = 0,
|
2312
|
+
page_size: int = 0,
|
2174
2313
|
) -> list | str:
|
2175
2314
|
"""Retrieve the list of governance action type metadata elements with a matching qualified or display name.
|
2176
2315
|
There are no wildcards supported on this request. Async version.
|
@@ -2200,13 +2339,13 @@ class AutomatedCuration(Client):
|
|
2200
2339
|
return response
|
2201
2340
|
|
2202
2341
|
async def _async_find_gov_action_types(
|
2203
|
-
|
2204
|
-
|
2205
|
-
|
2206
|
-
|
2207
|
-
|
2208
|
-
|
2209
|
-
|
2342
|
+
self,
|
2343
|
+
search_string: str = "*",
|
2344
|
+
starts_with: bool = False,
|
2345
|
+
ends_with: bool = False,
|
2346
|
+
ignore_case: bool = True,
|
2347
|
+
start_from: int = 0,
|
2348
|
+
page_size: int = 0,
|
2210
2349
|
) -> list | str:
|
2211
2350
|
"""Retrieve the list of governance action type metadata elements that contain the search string.
|
2212
2351
|
Async Version.
|
@@ -2231,7 +2370,7 @@ class AutomatedCuration(Client):
|
|
2231
2370
|
The index from which to start fetching the engine actions. Default is 0.
|
2232
2371
|
|
2233
2372
|
page_size : int, optional
|
2234
|
-
The maximum number of engine actions to fetch in a single request. Default is `
|
2373
|
+
The maximum number of engine actions to fetch in a single request. Default is `0`.
|
2235
2374
|
|
2236
2375
|
Returns
|
2237
2376
|
-------
|
@@ -2256,21 +2395,20 @@ class AutomatedCuration(Client):
|
|
2256
2395
|
|
2257
2396
|
url = (
|
2258
2397
|
f"{self.curation_command_root}/governance-action-types/"
|
2259
|
-
f"by-search-string
|
2260
|
-
f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}"
|
2398
|
+
f"by-search-string"
|
2261
2399
|
)
|
2262
2400
|
body = {"filter": search_string}
|
2263
2401
|
response = await self._async_make_request("POST", url, body)
|
2264
2402
|
return response.json().get("elements", "no action types")
|
2265
2403
|
|
2266
2404
|
def find_gov_action_types(
|
2267
|
-
|
2268
|
-
|
2269
|
-
|
2270
|
-
|
2271
|
-
|
2272
|
-
|
2273
|
-
|
2405
|
+
self,
|
2406
|
+
search_string: str = "*",
|
2407
|
+
starts_with: bool = False,
|
2408
|
+
ends_with: bool = False,
|
2409
|
+
ignore_case: bool = False,
|
2410
|
+
start_from: int = 0,
|
2411
|
+
page_size: int = 0,
|
2274
2412
|
) -> list | str:
|
2275
2413
|
"""Retrieve the list of governance action type metadata elements that contain the search string.
|
2276
2414
|
|
@@ -2293,7 +2431,7 @@ class AutomatedCuration(Client):
|
|
2293
2431
|
The index from which to start fetching the engine actions. Default is 0.
|
2294
2432
|
|
2295
2433
|
page_size : int, optional
|
2296
|
-
The maximum number of engine actions to fetch in a single request. Default is `
|
2434
|
+
The maximum number of engine actions to fetch in a single request. Default is `0`.
|
2297
2435
|
|
2298
2436
|
Returns
|
2299
2437
|
-------
|
@@ -2322,14 +2460,14 @@ class AutomatedCuration(Client):
|
|
2322
2460
|
return response
|
2323
2461
|
|
2324
2462
|
async def _async_initiate_gov_action_type(
|
2325
|
-
|
2326
|
-
|
2327
|
-
|
2328
|
-
|
2329
|
-
|
2330
|
-
|
2331
|
-
|
2332
|
-
|
2463
|
+
self,
|
2464
|
+
action_type_qualified_name: str,
|
2465
|
+
request_source_guids: [str],
|
2466
|
+
action_targets: list,
|
2467
|
+
start_time: datetime = None,
|
2468
|
+
request_parameters: dict = None,
|
2469
|
+
orig_service_name: str = None,
|
2470
|
+
orig_engine_name: str = None,
|
2333
2471
|
) -> str:
|
2334
2472
|
"""Using the named governance action type as a template, initiate an engine action. Async version.
|
2335
2473
|
|
@@ -2362,7 +2500,7 @@ class AutomatedCuration(Client):
|
|
2362
2500
|
|
2363
2501
|
"""
|
2364
2502
|
|
2365
|
-
url = f"{self.curation_command_root}/governance-action-types/
|
2503
|
+
url = f"{self.curation_command_root}/governance-action-types/initiate"
|
2366
2504
|
start = int(start_time.timestamp() * 1000) if start_time else None
|
2367
2505
|
body = {
|
2368
2506
|
"class": "InitiateGovernanceActionTypeRequestBody",
|
@@ -2379,14 +2517,14 @@ class AutomatedCuration(Client):
|
|
2379
2517
|
return response.json().get("guid", "Action not initiated")
|
2380
2518
|
|
2381
2519
|
def initiate_gov_action_type(
|
2382
|
-
|
2383
|
-
|
2384
|
-
|
2385
|
-
|
2386
|
-
|
2387
|
-
|
2388
|
-
|
2389
|
-
|
2520
|
+
self,
|
2521
|
+
action_type_qualified_name: str,
|
2522
|
+
request_source_guids: [str],
|
2523
|
+
action_targets: list,
|
2524
|
+
start_time: datetime = None,
|
2525
|
+
request_parameters: dict = None,
|
2526
|
+
orig_service_name: str = None,
|
2527
|
+
orig_engine_name: str = None,
|
2390
2528
|
) -> str:
|
2391
2529
|
"""Using the named governance action type as a template, initiate an engine action.
|
2392
2530
|
|
@@ -2489,9 +2627,9 @@ class AutomatedCuration(Client):
|
|
2489
2627
|
return response
|
2490
2628
|
|
2491
2629
|
def initiate_file_folder_survey(
|
2492
|
-
|
2493
|
-
|
2494
|
-
|
2630
|
+
self,
|
2631
|
+
file_folder_guid: str,
|
2632
|
+
survey_name: str = "FileSurveys:survey-folder",
|
2495
2633
|
) -> str:
|
2496
2634
|
"""Initiate a file folder survey - async version
|
2497
2635
|
|
@@ -2753,21 +2891,21 @@ class AutomatedCuration(Client):
|
|
2753
2891
|
#
|
2754
2892
|
|
2755
2893
|
async def _async_initiate_engine_action(
|
2756
|
-
|
2757
|
-
|
2758
|
-
|
2759
|
-
|
2760
|
-
|
2761
|
-
|
2762
|
-
|
2763
|
-
|
2764
|
-
|
2765
|
-
|
2766
|
-
|
2767
|
-
|
2768
|
-
|
2769
|
-
|
2770
|
-
|
2894
|
+
self,
|
2895
|
+
qualified_name: str,
|
2896
|
+
domain_identifier: int,
|
2897
|
+
display_name: str,
|
2898
|
+
description: str,
|
2899
|
+
request_source_guids: str,
|
2900
|
+
action_targets: str,
|
2901
|
+
received_guards: [str],
|
2902
|
+
start_time: datetime,
|
2903
|
+
request_type: str,
|
2904
|
+
request_parameters: dict,
|
2905
|
+
process_name: str,
|
2906
|
+
request_src_name: str = None,
|
2907
|
+
originator_svc_name: str = None,
|
2908
|
+
originator_eng_name: str = None,
|
2771
2909
|
) -> str:
|
2772
2910
|
"""Create an engine action in the metadata store that will trigger the governance service associated with
|
2773
2911
|
the supplied request type. The engine action remains to act as a record of the actions taken for auditing.
|
@@ -2833,21 +2971,21 @@ class AutomatedCuration(Client):
|
|
2833
2971
|
return response.json().get("guid", "Action not initiated")
|
2834
2972
|
|
2835
2973
|
def initiate_engine_action(
|
2836
|
-
|
2837
|
-
|
2838
|
-
|
2839
|
-
|
2840
|
-
|
2841
|
-
|
2842
|
-
|
2843
|
-
|
2844
|
-
|
2845
|
-
|
2846
|
-
|
2847
|
-
|
2848
|
-
|
2849
|
-
|
2850
|
-
|
2974
|
+
self,
|
2975
|
+
qualified_name: str,
|
2976
|
+
domain_identifier: int,
|
2977
|
+
display_name: str,
|
2978
|
+
description: str,
|
2979
|
+
request_source_guids: str,
|
2980
|
+
action_targets: str,
|
2981
|
+
received_guards: [str],
|
2982
|
+
start_time: datetime,
|
2983
|
+
request_type: str,
|
2984
|
+
request_parameters: dict,
|
2985
|
+
process_name: str,
|
2986
|
+
request_src_name: str = None,
|
2987
|
+
originator_svc_name: str = None,
|
2988
|
+
originator_eng_name: str = None,
|
2851
2989
|
) -> str:
|
2852
2990
|
"""Create an engine action in the metadata store that will trigger the governance service associated with
|
2853
2991
|
the supplied request type. The engine action remains to act as a record of the actions taken for auditing.
|
@@ -2906,10 +3044,10 @@ class AutomatedCuration(Client):
|
|
2906
3044
|
return response
|
2907
3045
|
|
2908
3046
|
async def _async_get_catalog_targets(
|
2909
|
-
|
2910
|
-
|
2911
|
-
|
2912
|
-
|
3047
|
+
self,
|
3048
|
+
integ_connector_guid: str,
|
3049
|
+
start_from: int = 0,
|
3050
|
+
page_size: int = 0,
|
2913
3051
|
) -> list | str:
|
2914
3052
|
"""Retrieve the details of the metadata elements identified as catalog targets with an integration connector.
|
2915
3053
|
Async version.
|
@@ -2934,17 +3072,17 @@ class AutomatedCuration(Client):
|
|
2934
3072
|
|
2935
3073
|
url = (
|
2936
3074
|
f"{self.curation_command_root}/integration-connectors/"
|
2937
|
-
f"{integ_connector_guid}/catalog-targets
|
3075
|
+
f"{integ_connector_guid}/catalog-targets"
|
2938
3076
|
)
|
2939
3077
|
|
2940
3078
|
response = await self._async_make_request("GET", url)
|
2941
3079
|
return response.json().get("elements", "no targets")
|
2942
3080
|
|
2943
3081
|
def get_catalog_targets(
|
2944
|
-
|
2945
|
-
|
2946
|
-
|
2947
|
-
|
3082
|
+
self,
|
3083
|
+
integ_connector_guid: str,
|
3084
|
+
start_from: int = 0,
|
3085
|
+
page_size: int = 0,
|
2948
3086
|
) -> list | str:
|
2949
3087
|
"""Retrieve the details of the metadata elements identified as catalog targets with an integration connector.
|
2950
3088
|
|
@@ -2993,7 +3131,7 @@ class AutomatedCuration(Client):
|
|
2993
3131
|
|
2994
3132
|
validate_guid(relationship_guid)
|
2995
3133
|
|
2996
|
-
url = f"{self.curation_command_root}/catalog-targets/
|
3134
|
+
url = f"{self.curation_command_root}/catalog-targets/{relationship_guid}"
|
2997
3135
|
|
2998
3136
|
response = await self._async_make_request("GET", url)
|
2999
3137
|
return response.json().get("element", "no actions")
|
@@ -3026,16 +3164,16 @@ class AutomatedCuration(Client):
|
|
3026
3164
|
return response
|
3027
3165
|
|
3028
3166
|
async def _async_add_catalog_target(
|
3029
|
-
|
3030
|
-
|
3031
|
-
|
3032
|
-
|
3033
|
-
|
3034
|
-
|
3035
|
-
|
3036
|
-
|
3037
|
-
|
3038
|
-
|
3167
|
+
self,
|
3168
|
+
integ_connector_guid: str,
|
3169
|
+
metadata_element_guid: str,
|
3170
|
+
catalog_target_name: str,
|
3171
|
+
connection_name: str = None,
|
3172
|
+
metadata_src_qual_name: str = None,
|
3173
|
+
config_properties: dict = None,
|
3174
|
+
template_properties: dict = None,
|
3175
|
+
permitted_sync: str = "BOTH_DIRECTIONS",
|
3176
|
+
delete_method: str = "ARCHIVE",
|
3039
3177
|
) -> str:
|
3040
3178
|
"""Add a catalog target to an integration connector and .
|
3041
3179
|
Async version.
|
@@ -3093,16 +3231,16 @@ class AutomatedCuration(Client):
|
|
3093
3231
|
return response.json().get("guid", "No Guid returned")
|
3094
3232
|
|
3095
3233
|
def add_catalog_target(
|
3096
|
-
|
3097
|
-
|
3098
|
-
|
3099
|
-
|
3100
|
-
|
3101
|
-
|
3102
|
-
|
3103
|
-
|
3104
|
-
|
3105
|
-
|
3234
|
+
self,
|
3235
|
+
integ_connector_guid: str,
|
3236
|
+
metadata_element_guid: str,
|
3237
|
+
catalog_target_name: str,
|
3238
|
+
connection_name: str = None,
|
3239
|
+
metadata_src_qual_name: str = None,
|
3240
|
+
config_properties: dict = None,
|
3241
|
+
template_properties: dict = None,
|
3242
|
+
permitted_sync: str = "BOTH_DIRECTIONS",
|
3243
|
+
delete_method: str = "ARCHIVE",
|
3106
3244
|
) -> str:
|
3107
3245
|
"""Add a catalog target to an integration connector and .
|
3108
3246
|
|
@@ -3154,15 +3292,15 @@ class AutomatedCuration(Client):
|
|
3154
3292
|
return response
|
3155
3293
|
|
3156
3294
|
async def _async_update_catalog_target(
|
3157
|
-
|
3158
|
-
|
3159
|
-
|
3160
|
-
|
3161
|
-
|
3162
|
-
|
3163
|
-
|
3164
|
-
|
3165
|
-
|
3295
|
+
self,
|
3296
|
+
relationship_guid: str,
|
3297
|
+
catalog_target_name: str,
|
3298
|
+
connection_name: str = None,
|
3299
|
+
metadata_src_qual_name: str = None,
|
3300
|
+
config_properties: dict = None,
|
3301
|
+
template_properties: dict = None,
|
3302
|
+
permitted_sync: str = "BOTH_DIRECTIONS",
|
3303
|
+
delete_method: str = "ARCHIVE",
|
3166
3304
|
) -> None:
|
3167
3305
|
"""Update a catalog target to an integration connector.
|
3168
3306
|
Async version.
|
@@ -3216,15 +3354,15 @@ class AutomatedCuration(Client):
|
|
3216
3354
|
return
|
3217
3355
|
|
3218
3356
|
def update_catalog_target(
|
3219
|
-
|
3220
|
-
|
3221
|
-
|
3222
|
-
|
3223
|
-
|
3224
|
-
|
3225
|
-
|
3226
|
-
|
3227
|
-
|
3357
|
+
self,
|
3358
|
+
relationship_guid: str,
|
3359
|
+
catalog_target_name: str,
|
3360
|
+
connection_name: str = None,
|
3361
|
+
metadata_src_qual_name: str = None,
|
3362
|
+
config_properties: dict = None,
|
3363
|
+
template_properties: dict = None,
|
3364
|
+
permitted_sync: str = "BOTH_DIRECTIONS",
|
3365
|
+
delete_method: str = "ARCHIVE",
|
3228
3366
|
) -> None:
|
3229
3367
|
"""Update a catalog target to an integration connector.
|
3230
3368
|
|
@@ -3323,11 +3461,11 @@ class AutomatedCuration(Client):
|
|
3323
3461
|
#
|
3324
3462
|
|
3325
3463
|
async def _async_get_tech_types_for_open_metadata_type(
|
3326
|
-
|
3327
|
-
|
3328
|
-
|
3329
|
-
|
3330
|
-
|
3464
|
+
self,
|
3465
|
+
type_name: str,
|
3466
|
+
tech_name: str,
|
3467
|
+
start_from: int = 0,
|
3468
|
+
page_size: int = 0,
|
3331
3469
|
) -> list | str:
|
3332
3470
|
"""Retrieve the list of deployed implementation type metadata elements linked to a particular
|
3333
3471
|
open metadata type.. Async version.
|
@@ -3358,19 +3496,19 @@ class AutomatedCuration(Client):
|
|
3358
3496
|
# validate_name(type_name)
|
3359
3497
|
url = (
|
3360
3498
|
f"{self.curation_command_root}/open-metadata-types/"
|
3361
|
-
f"{type_name}/technology-types
|
3499
|
+
f"{type_name}/technology-types"
|
3362
3500
|
)
|
3363
3501
|
body = {"filter": tech_name}
|
3364
3502
|
|
3365
|
-
response = await self._async_make_request("
|
3503
|
+
response = await self._async_make_request("POST", url, body)
|
3366
3504
|
return response.json().get("elements", "no tech found")
|
3367
3505
|
|
3368
3506
|
def get_tech_types_for_open_metadata_type(
|
3369
|
-
|
3370
|
-
|
3371
|
-
|
3372
|
-
|
3373
|
-
|
3507
|
+
self,
|
3508
|
+
type_name: str,
|
3509
|
+
tech_name: str,
|
3510
|
+
start_from: int = 0,
|
3511
|
+
page_size: int = 0,
|
3374
3512
|
) -> list | str:
|
3375
3513
|
"""Retrieve the list of deployed implementation type metadata elements linked to a particular
|
3376
3514
|
open metadata type.
|
@@ -3405,13 +3543,19 @@ class AutomatedCuration(Client):
|
|
3405
3543
|
)
|
3406
3544
|
return response
|
3407
3545
|
|
3408
|
-
async def _async_get_technology_type_detail(self, type_name: str
|
3546
|
+
async def _async_get_technology_type_detail(self, type_name: str, template_only: bool = False,
|
3547
|
+
body: dict | FilterRequestBody = None) -> list | str:
|
3409
3548
|
"""Retrieve the details of the named technology type. This name should be the name of the technology type
|
3410
3549
|
and contain no wild cards. Async version.
|
3411
3550
|
Parameters
|
3412
3551
|
----------
|
3413
3552
|
type_name : str
|
3414
3553
|
The name of the technology type to retrieve detailed information for.
|
3554
|
+
template_only : bool
|
3555
|
+
If true, only the template information will be returned.
|
3556
|
+
body: dict | FilterRequestBody
|
3557
|
+
If provided, the information in the body supersedes the other parameters and allows more advanced requests.
|
3558
|
+
|
3415
3559
|
|
3416
3560
|
|
3417
3561
|
Returns
|
@@ -3421,63 +3565,116 @@ class AutomatedCuration(Client):
|
|
3421
3565
|
If the technology type is not found, returns the string "no type found".
|
3422
3566
|
Raises
|
3423
3567
|
------
|
3424
|
-
|
3425
|
-
|
3426
|
-
PropertyServerException: If the API response indicates a server side error.
|
3427
|
-
UserNotAuthorizedException:
|
3568
|
+
PyegeriaException
|
3569
|
+
ValidationError
|
3428
3570
|
|
3429
3571
|
Notes
|
3430
3572
|
-----
|
3431
3573
|
More information can be found at: https://egeria-project.org/concepts/deployed-implementation-type
|
3574
|
+
Sample body:
|
3575
|
+
{
|
3576
|
+
"class" : "FilterRequestBody",
|
3577
|
+
"filter" : "Root Technology Type",
|
3578
|
+
"startFrom": 0,
|
3579
|
+
"pageSize": 10,
|
3580
|
+
"asOfTime" : "{{$isoTimestamp}}",
|
3581
|
+
"effectiveTime" : "{{$isoTimestamp}}",
|
3582
|
+
"includeOnlyClassifiedElements" : ["Template"]
|
3583
|
+
"forLineage" : false,
|
3584
|
+
"forDuplicateProcessing" : false,
|
3585
|
+
"limitResultsByStatus" : ["ACTIVE"],
|
3586
|
+
"sequencingOrder" : "PROPERTY_ASCENDING",
|
3587
|
+
"sequencingProperty" : "qualifiedName"
|
3588
|
+
}
|
3432
3589
|
"""
|
3433
3590
|
|
3434
3591
|
# validate_name(type_name)
|
3435
3592
|
url = f"{self.curation_command_root}/technology-types/by-name"
|
3436
|
-
|
3437
|
-
|
3593
|
+
if body is None:
|
3594
|
+
classified_elements = ["Template"] if template_only else []
|
3595
|
+
body = {
|
3596
|
+
"class": "FilterRequestBody",
|
3597
|
+
"filter": type_name,
|
3598
|
+
"includeOnlyClassifiedElements": classified_elements
|
3599
|
+
}
|
3438
3600
|
|
3439
3601
|
response = await self._async_make_request("POST", url, body)
|
3440
3602
|
return response.json().get("element", "no type found")
|
3441
3603
|
|
3442
|
-
def get_technology_type_detail(self, type_name: str
|
3604
|
+
def get_technology_type_detail(self, type_name: str, template_only: bool = False,
|
3605
|
+
body: dict | FilterRequestBody = None) -> list | str:
|
3443
3606
|
"""Retrieve the details of the named technology type. This name should be the name of the technology type
|
3444
|
-
|
3445
|
-
|
3446
|
-
|
3447
|
-
|
3448
|
-
|
3607
|
+
and contain no wild cards.
|
3608
|
+
Parameters
|
3609
|
+
----------
|
3610
|
+
type_name : str
|
3611
|
+
The name of the technology type to retrieve detailed information for.
|
3612
|
+
template_only : bool
|
3613
|
+
If true, only the template information will be returned.
|
3614
|
+
body: dict | FilterRequestBody
|
3615
|
+
If provided, the information in the body supersedes the other parameters and allows more advanced requests.
|
3616
|
+
|
3617
|
+
|
3618
|
+
|
3619
|
+
Returns
|
3620
|
+
-------
|
3621
|
+
list[dict] | str
|
3622
|
+
A list of dictionaries containing the detailed information for the specified technology type.
|
3623
|
+
If the technology type is not found, returns the string "no type found".
|
3624
|
+
Raises
|
3625
|
+
------
|
3626
|
+
PyegeriaException
|
3627
|
+
ValidationError
|
3628
|
+
|
3629
|
+
Notes
|
3630
|
+
-----
|
3631
|
+
More information can be found at: https://egeria-project.org/concepts/deployed-implementation-type
|
3632
|
+
Sample body:
|
3633
|
+
{
|
3634
|
+
"class" : "FilterRequestBody",
|
3635
|
+
"filter" : "Root Technology Type",
|
3636
|
+
"startFrom": 0,
|
3637
|
+
"pageSize": 10,
|
3638
|
+
"asOfTime" : "{{$isoTimestamp}}",
|
3639
|
+
"effectiveTime" : "{{$isoTimestamp}}",
|
3640
|
+
"includeOnlyClassifiedElements" : ["Template"]
|
3641
|
+
"forLineage" : false,
|
3642
|
+
"forDuplicateProcessing" : false,
|
3643
|
+
"limitResultsByStatus" : ["ACTIVE"],
|
3644
|
+
"sequencingOrder" : "PROPERTY_ASCENDING",
|
3645
|
+
"sequencingProperty" : "qualifiedName"
|
3646
|
+
}
|
3647
|
+
"""
|
3449
3648
|
|
3450
|
-
|
3451
|
-
|
3452
|
-
|
3453
|
-
|
3454
|
-
|
3455
|
-
Raises
|
3456
|
-
------
|
3457
|
-
InvalidParameterException: If the API response indicates an error (non-200 status code),
|
3458
|
-
this exception is raised with details from the response content.
|
3459
|
-
PropertyServerException: If the API response indicates a server side error.
|
3460
|
-
UserNotAuthorizedException:
|
3649
|
+
loop = asyncio.get_event_loop()
|
3650
|
+
response = loop.run_until_complete(
|
3651
|
+
self._async_get_technology_type_detail(type_name, template_only=template_only, body=body)
|
3652
|
+
)
|
3653
|
+
return response
|
3461
3654
|
|
3462
|
-
|
3463
|
-
|
3464
|
-
|
3465
|
-
|
3655
|
+
async def _async_get_template_guid_for_technology_type(self, type_name: str) -> str:
|
3656
|
+
details = await self._async_get_technology_type_detail(type_name)
|
3657
|
+
if isinstance(details, dict):
|
3658
|
+
return details.get("catalogTemplates", {})[0].get("relatedElement", {}).get("elementHeader", {}).get("guid",
|
3659
|
+
None)
|
3660
|
+
else:
|
3661
|
+
return None
|
3466
3662
|
|
3663
|
+
def get_template_guid_for_technology_type(self, type_name: str) -> str:
|
3467
3664
|
loop = asyncio.get_event_loop()
|
3468
3665
|
response = loop.run_until_complete(
|
3469
|
-
self.
|
3666
|
+
self._async_get_template_guid_for_technology_type(type_name)
|
3470
3667
|
)
|
3471
3668
|
return response
|
3472
3669
|
|
3473
3670
|
async def _async_find_technology_types(
|
3474
|
-
|
3475
|
-
|
3476
|
-
|
3477
|
-
|
3478
|
-
|
3479
|
-
|
3480
|
-
|
3671
|
+
self,
|
3672
|
+
search_string: str = "*",
|
3673
|
+
start_from: int = 0,
|
3674
|
+
page_size: int = 0,
|
3675
|
+
starts_with: bool = False,
|
3676
|
+
ends_with: bool = False,
|
3677
|
+
ignore_case: bool = True,
|
3481
3678
|
) -> list | str:
|
3482
3679
|
"""Retrieve the list of technology types that contain the search string. Async version.
|
3483
3680
|
|
@@ -3498,7 +3695,7 @@ class AutomatedCuration(Client):
|
|
3498
3695
|
The index from which to start fetching the engine actions. Default is 0.
|
3499
3696
|
|
3500
3697
|
page_size : int, optional
|
3501
|
-
The maximum number of engine actions to fetch in a single request. Default is `
|
3698
|
+
The maximum number of engine actions to fetch in a single request. Default is `0`.
|
3502
3699
|
Returns:
|
3503
3700
|
-------
|
3504
3701
|
[dict] | str: List of elements describing the technology - or "no tech found" if not found.
|
@@ -3520,26 +3717,36 @@ class AutomatedCuration(Client):
|
|
3520
3717
|
ignore_case_s = str(ignore_case).lower()
|
3521
3718
|
validate_name(search_string)
|
3522
3719
|
if search_string == "*":
|
3523
|
-
search_string =
|
3720
|
+
search_string = None
|
3524
3721
|
|
3525
3722
|
url = (
|
3526
3723
|
f"{self.curation_command_root}/technology-types/"
|
3527
|
-
f"by-search-string
|
3528
|
-
f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}"
|
3724
|
+
f"by-search-string"
|
3529
3725
|
)
|
3530
|
-
body = {
|
3726
|
+
body = {
|
3727
|
+
"class": "SearchStringRequestBody",
|
3728
|
+
"searchString": search_string,
|
3729
|
+
"startsWith": True,
|
3730
|
+
"endsWith": False,
|
3731
|
+
"ignoreCase": True,
|
3732
|
+
"startFrom": 0,
|
3733
|
+
"pageSize": 0,
|
3734
|
+
"limitResultsByStatus": ["ACTIVE"],
|
3735
|
+
"sequencingOrder": "PROPERTY_ASCENDING",
|
3736
|
+
"sequencingProperty": "qualifiedName"
|
3737
|
+
}
|
3531
3738
|
|
3532
3739
|
response = await self._async_make_request("POST", url, body)
|
3533
3740
|
return response.json().get("elements", "no tech found")
|
3534
3741
|
|
3535
3742
|
def find_technology_types(
|
3536
|
-
|
3537
|
-
|
3538
|
-
|
3539
|
-
|
3540
|
-
|
3541
|
-
|
3542
|
-
|
3743
|
+
self,
|
3744
|
+
search_string: str = "*",
|
3745
|
+
start_from: int = 0,
|
3746
|
+
page_size: int = 0,
|
3747
|
+
starts_with: bool = False,
|
3748
|
+
ends_with: bool = False,
|
3749
|
+
ignore_case: bool = True,
|
3543
3750
|
) -> list | str:
|
3544
3751
|
"""Retrieve the list of technology types that contain the search string. Async version.
|
3545
3752
|
|
@@ -3578,13 +3785,13 @@ class AutomatedCuration(Client):
|
|
3578
3785
|
return response
|
3579
3786
|
|
3580
3787
|
async def _async_get_all_technology_types(
|
3581
|
-
|
3788
|
+
self, start_from: int = 0, page_size: int = 0
|
3582
3789
|
) -> list | str:
|
3583
3790
|
"""Get all technology types - async version"""
|
3584
3791
|
return await self._async_find_technology_types("*", start_from, page_size)
|
3585
3792
|
|
3586
3793
|
def get_all_technology_types(
|
3587
|
-
|
3794
|
+
self, start_from: int = 0, page_size: int = 0
|
3588
3795
|
) -> list | str:
|
3589
3796
|
"""Get all technology types"""
|
3590
3797
|
return self.find_technology_types("*", start_from, page_size)
|
@@ -3659,12 +3866,12 @@ class AutomatedCuration(Client):
|
|
3659
3866
|
self.print_engine_action_summary(governance_actions[x])
|
3660
3867
|
|
3661
3868
|
async def _async_get_technology_type_elements(
|
3662
|
-
|
3663
|
-
|
3664
|
-
|
3665
|
-
|
3666
|
-
|
3667
|
-
|
3869
|
+
self,
|
3870
|
+
filter: str,
|
3871
|
+
effective_time: str = None,
|
3872
|
+
start_from: int = 0,
|
3873
|
+
page_size: int = 0,
|
3874
|
+
get_templates: bool = False,
|
3668
3875
|
) -> list | str:
|
3669
3876
|
"""Retrieve the elements for the requested deployed implementation type. There are no wildcards allowed
|
3670
3877
|
in the name. Async version.
|
@@ -3681,7 +3888,7 @@ class AutomatedCuration(Client):
|
|
3681
3888
|
The index from which to start fetching the engine actions. Default is 0.
|
3682
3889
|
|
3683
3890
|
page_size : int, optional
|
3684
|
-
The maximum number of engine actions to fetch in a single request. Default is `
|
3891
|
+
The maximum number of engine actions to fetch in a single request. Default is `0`.
|
3685
3892
|
|
3686
3893
|
Returns:
|
3687
3894
|
-------
|
@@ -3703,8 +3910,7 @@ class AutomatedCuration(Client):
|
|
3703
3910
|
validate_name(filter)
|
3704
3911
|
|
3705
3912
|
url = (
|
3706
|
-
f"{self.curation_command_root}/technology-types/elements
|
3707
|
-
f"startFrom={start_from}&pageSize={page_size}&getTemplates={get_templates_s}"
|
3913
|
+
f"{self.curation_command_root}/technology-types/elements"
|
3708
3914
|
)
|
3709
3915
|
body = {"filter": filter, "effective_time": effective_time}
|
3710
3916
|
|
@@ -3712,12 +3918,12 @@ class AutomatedCuration(Client):
|
|
3712
3918
|
return response.json().get("elements", "no tech found")
|
3713
3919
|
|
3714
3920
|
def get_technology_type_elements(
|
3715
|
-
|
3716
|
-
|
3717
|
-
|
3718
|
-
|
3719
|
-
|
3720
|
-
|
3921
|
+
self,
|
3922
|
+
filter: str,
|
3923
|
+
effective_time: str = None,
|
3924
|
+
start_from: int = 0,
|
3925
|
+
page_size: int = 0,
|
3926
|
+
get_templates: bool = False,
|
3721
3927
|
) -> list | str:
|
3722
3928
|
"""Retrieve the elements for the requested deployed implementation type. There are no wildcards allowed
|
3723
3929
|
in the name.
|
@@ -3734,7 +3940,7 @@ class AutomatedCuration(Client):
|
|
3734
3940
|
The index from which to start fetching the engine actions. Default is 0.
|
3735
3941
|
|
3736
3942
|
page_size : int, optional
|
3737
|
-
The maximum number of engine actions to fetch in a single request. Default is `
|
3943
|
+
The maximum number of engine actions to fetch in a single request. Default is `0`.
|
3738
3944
|
|
3739
3945
|
Returns:
|
3740
3946
|
-------
|