pyegeria 0.8.4.30__py3-none-any.whl → 0.8.4.32__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/list_glossary.py +2 -2
- commands/ops/load_archive.py +5 -2
- pyegeria/asset_catalog_omvs.py +35 -105
- pyegeria/automated_curation_omvs.py +212 -486
- pyegeria/runtime_manager_omvs.py +370 -163
- {pyegeria-0.8.4.30.dist-info → pyegeria-0.8.4.32.dist-info}/METADATA +2 -2
- {pyegeria-0.8.4.30.dist-info → pyegeria-0.8.4.32.dist-info}/RECORD +10 -10
- {pyegeria-0.8.4.30.dist-info → pyegeria-0.8.4.32.dist-info}/LICENSE +0 -0
- {pyegeria-0.8.4.30.dist-info → pyegeria-0.8.4.32.dist-info}/WHEEL +0 -0
- {pyegeria-0.8.4.30.dist-info → pyegeria-0.8.4.32.dist-info}/entry_points.txt +0 -0
@@ -44,19 +44,19 @@ class AutomatedCuration(Client):
|
|
44
44
|
user_pwd: str = None,
|
45
45
|
token: str = None,
|
46
46
|
):
|
47
|
+
self.server_name = server_name
|
48
|
+
self.platform_url = platform_url
|
49
|
+
self.user_id = user_id
|
50
|
+
self.user_pwd = user_pwd
|
47
51
|
Client.__init__(self, server_name, platform_url, user_id, user_pwd, token=token)
|
48
|
-
self.cur_command_root = f"{platform_url}/servers/"
|
52
|
+
self.cur_command_root = f"{self.platform_url}/servers/{self.server_name}/api/open-metadata/automated-curation"
|
49
53
|
|
50
|
-
async def _async_create_element_from_template(
|
51
|
-
self, body: dict, server: str = None
|
52
|
-
) -> str:
|
54
|
+
async def _async_create_element_from_template(self, body: dict) -> str:
|
53
55
|
"""Create a new metadata element from a template. Async version.
|
54
56
|
Parameters
|
55
57
|
----------
|
56
58
|
body : str
|
57
59
|
The json body used to instantiate the template.
|
58
|
-
server : str, optional
|
59
|
-
The name of the view server to use. If not provided, the default server name will be used.
|
60
60
|
|
61
61
|
Returns
|
62
62
|
-------
|
@@ -95,20 +95,17 @@ class AutomatedCuration(Client):
|
|
95
95
|
}
|
96
96
|
"""
|
97
97
|
|
98
|
-
|
99
|
-
|
100
|
-
url = f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/catalog-templates/new-element"
|
98
|
+
url = f"{self.cur_command_root}/catalog-templates/new-element"
|
101
99
|
response = await self._async_make_request("POST", url, body)
|
102
100
|
return response.json().get("guid", "GUID failed to be returned")
|
103
101
|
|
104
|
-
def create_element_from_template(self, body: dict
|
102
|
+
def create_element_from_template(self, body: dict) -> str:
|
105
103
|
"""Create a new metadata element from a template. Async version.
|
106
104
|
Parameters
|
107
105
|
----------
|
108
106
|
body : str
|
109
107
|
The json body used to instantiate the template.
|
110
|
-
|
111
|
-
The name of the view server to use. If not provided, the default server name will be used.
|
108
|
+
|
112
109
|
|
113
110
|
Returns
|
114
111
|
-------
|
@@ -148,7 +145,7 @@ class AutomatedCuration(Client):
|
|
148
145
|
"""
|
149
146
|
loop = asyncio.get_event_loop()
|
150
147
|
response = loop.run_until_complete(
|
151
|
-
self._async_create_element_from_template(body
|
148
|
+
self._async_create_element_from_template(body)
|
152
149
|
)
|
153
150
|
return response
|
154
151
|
|
@@ -158,7 +155,6 @@ class AutomatedCuration(Client):
|
|
158
155
|
host_name: str,
|
159
156
|
port: str,
|
160
157
|
description: str = None,
|
161
|
-
server: str = None,
|
162
158
|
) -> str:
|
163
159
|
"""Create a Kafka server element from a template. Async version.
|
164
160
|
|
@@ -176,8 +172,7 @@ class AutomatedCuration(Client):
|
|
176
172
|
description: str, opt
|
177
173
|
A description of the Kafka server.
|
178
174
|
|
179
|
-
|
180
|
-
The name of the view server to use. Default uses the client instance.
|
175
|
+
|
181
176
|
|
182
177
|
Returns
|
183
178
|
-------
|
@@ -196,7 +191,7 @@ class AutomatedCuration(Client):
|
|
196
191
|
},
|
197
192
|
}
|
198
193
|
body_s = body_slimmer(body)
|
199
|
-
response = await self._async_create_element_from_template(body_s
|
194
|
+
response = await self._async_create_element_from_template(body_s)
|
200
195
|
return str(response)
|
201
196
|
|
202
197
|
def create_kafka_server_element_from_template(
|
@@ -205,7 +200,6 @@ class AutomatedCuration(Client):
|
|
205
200
|
host_name: str,
|
206
201
|
port: str,
|
207
202
|
description: str = None,
|
208
|
-
server: str = None,
|
209
203
|
) -> str:
|
210
204
|
"""Create a Kafka server element from a template.
|
211
205
|
|
@@ -223,8 +217,7 @@ class AutomatedCuration(Client):
|
|
223
217
|
description: str, opt
|
224
218
|
A description of the Kafka server.
|
225
219
|
|
226
|
-
|
227
|
-
The name of the view server to use. Default uses the client instance.
|
220
|
+
|
228
221
|
|
229
222
|
Returns
|
230
223
|
-------
|
@@ -234,7 +227,7 @@ class AutomatedCuration(Client):
|
|
234
227
|
loop = asyncio.get_event_loop()
|
235
228
|
response = loop.run_until_complete(
|
236
229
|
self._async_create_kafka_server_element_from_template(
|
237
|
-
kafka_server, host_name, port, description
|
230
|
+
kafka_server, host_name, port, description
|
238
231
|
)
|
239
232
|
)
|
240
233
|
return response
|
@@ -247,7 +240,6 @@ class AutomatedCuration(Client):
|
|
247
240
|
db_user: str,
|
248
241
|
db_pwd: str,
|
249
242
|
description: str = None,
|
250
|
-
server: str = None,
|
251
243
|
) -> str:
|
252
244
|
"""Create a Postgres server element from a template. Async version.
|
253
245
|
|
@@ -271,8 +263,7 @@ class AutomatedCuration(Client):
|
|
271
263
|
description: str, opt
|
272
264
|
A description of the element.
|
273
265
|
|
274
|
-
|
275
|
-
The name of the view server to use. Default uses the client instance.
|
266
|
+
|
276
267
|
|
277
268
|
Returns
|
278
269
|
-------
|
@@ -292,7 +283,7 @@ class AutomatedCuration(Client):
|
|
292
283
|
},
|
293
284
|
}
|
294
285
|
body_s = body_slimmer(body)
|
295
|
-
response = await self._async_create_element_from_template(body_s
|
286
|
+
response = await self._async_create_element_from_template(body_s)
|
296
287
|
return str(response)
|
297
288
|
|
298
289
|
def create_postgres_server_element_from_template(
|
@@ -303,7 +294,6 @@ class AutomatedCuration(Client):
|
|
303
294
|
db_user: str,
|
304
295
|
db_pwd: str,
|
305
296
|
description: str = None,
|
306
|
-
server: str = None,
|
307
297
|
) -> str:
|
308
298
|
"""Create a Postgres server element from a template.
|
309
299
|
|
@@ -318,8 +308,7 @@ class AutomatedCuration(Client):
|
|
318
308
|
port : str
|
319
309
|
The port number of the Postgres server.
|
320
310
|
|
321
|
-
|
322
|
-
The name of the view server to use. Default uses the client instance.
|
311
|
+
|
323
312
|
|
324
313
|
description: str, opt
|
325
314
|
A description of the elementr.
|
@@ -338,7 +327,7 @@ class AutomatedCuration(Client):
|
|
338
327
|
loop = asyncio.get_event_loop()
|
339
328
|
response = loop.run_until_complete(
|
340
329
|
self._async_create_postgres_server_element_from_template(
|
341
|
-
postgres_server, host_name, port, db_user, db_pwd, description
|
330
|
+
postgres_server, host_name, port, db_user, db_pwd, description
|
342
331
|
)
|
343
332
|
)
|
344
333
|
return response
|
@@ -350,7 +339,6 @@ class AutomatedCuration(Client):
|
|
350
339
|
file_system: str,
|
351
340
|
description: str = None,
|
352
341
|
version: str = None,
|
353
|
-
server: str = None,
|
354
342
|
) -> str:
|
355
343
|
"""Create a File folder element from a template.
|
356
344
|
Async version.
|
@@ -373,8 +361,7 @@ class AutomatedCuration(Client):
|
|
373
361
|
version: str, opt
|
374
362
|
version of the element - typically of the form x.y.z
|
375
363
|
|
376
|
-
|
377
|
-
The name of the view server to use. Default uses the client instance.
|
364
|
+
|
378
365
|
|
379
366
|
Returns
|
380
367
|
-------
|
@@ -393,7 +380,7 @@ class AutomatedCuration(Client):
|
|
393
380
|
},
|
394
381
|
}
|
395
382
|
body_s = body_slimmer(body)
|
396
|
-
response = await self._async_create_element_from_template(body_s
|
383
|
+
response = await self._async_create_element_from_template(body_s)
|
397
384
|
return str(response)
|
398
385
|
|
399
386
|
def create_folder_element_from_template(
|
@@ -403,7 +390,6 @@ class AutomatedCuration(Client):
|
|
403
390
|
file_system: str,
|
404
391
|
description: str = None,
|
405
392
|
version: str = None,
|
406
|
-
server: str = None,
|
407
393
|
) -> str:
|
408
394
|
"""Create a File folder element from a template.
|
409
395
|
|
@@ -425,8 +411,7 @@ class AutomatedCuration(Client):
|
|
425
411
|
version: str, opt
|
426
412
|
version of the element - typically of the form x.y.z
|
427
413
|
|
428
|
-
|
429
|
-
The name of the view server to use. Default uses the client instance.
|
414
|
+
|
430
415
|
|
431
416
|
Returns
|
432
417
|
-------
|
@@ -436,7 +421,7 @@ class AutomatedCuration(Client):
|
|
436
421
|
loop = asyncio.get_event_loop()
|
437
422
|
response = loop.run_until_complete(
|
438
423
|
self._async_create_folder_element_from_template(
|
439
|
-
path_name, folder_name, file_system, description, version
|
424
|
+
path_name, folder_name, file_system, description, version
|
440
425
|
)
|
441
426
|
)
|
442
427
|
return response
|
@@ -448,7 +433,6 @@ class AutomatedCuration(Client):
|
|
448
433
|
port: str,
|
449
434
|
description: str = None,
|
450
435
|
version: str = None,
|
451
|
-
server: str = None,
|
452
436
|
) -> str:
|
453
437
|
"""Create a Unity Catalog Server element from a template. Async version.
|
454
438
|
|
@@ -469,8 +453,7 @@ class AutomatedCuration(Client):
|
|
469
453
|
version: str, opt
|
470
454
|
version of the element - typically of the form x.y.z
|
471
455
|
|
472
|
-
|
473
|
-
The name of the view server to use. Default uses the client instance.
|
456
|
+
|
474
457
|
|
475
458
|
Returns
|
476
459
|
-------
|
@@ -489,7 +472,7 @@ class AutomatedCuration(Client):
|
|
489
472
|
},
|
490
473
|
}
|
491
474
|
body_s = body_slimmer(body)
|
492
|
-
response = await self._async_create_element_from_template(body_s
|
475
|
+
response = await self._async_create_element_from_template(body_s)
|
493
476
|
return str(response)
|
494
477
|
|
495
478
|
def create_uc_server_element_from_template(
|
@@ -499,7 +482,6 @@ class AutomatedCuration(Client):
|
|
499
482
|
port: str,
|
500
483
|
description: str = None,
|
501
484
|
version: str = None,
|
502
|
-
server: str = None,
|
503
485
|
) -> str:
|
504
486
|
"""Create a Unity Catalog Server element from a template. Async version.
|
505
487
|
|
@@ -520,8 +502,7 @@ class AutomatedCuration(Client):
|
|
520
502
|
version: str, opt
|
521
503
|
version of the element - typically of the form x.y.z
|
522
504
|
|
523
|
-
|
524
|
-
The name of the view server to use. Default uses the client instance.
|
505
|
+
|
525
506
|
|
526
507
|
Returns
|
527
508
|
-------
|
@@ -531,7 +512,7 @@ class AutomatedCuration(Client):
|
|
531
512
|
loop = asyncio.get_event_loop()
|
532
513
|
response = loop.run_until_complete(
|
533
514
|
self._async_create_uc_server_element_from_template(
|
534
|
-
server_name, host_url, port, description, version
|
515
|
+
server_name, host_url, port, description, version
|
535
516
|
)
|
536
517
|
)
|
537
518
|
return response
|
@@ -542,7 +523,6 @@ class AutomatedCuration(Client):
|
|
542
523
|
network_address: str,
|
543
524
|
description: str = None,
|
544
525
|
version: str = None,
|
545
|
-
server: str = None,
|
546
526
|
) -> str:
|
547
527
|
"""Create a Unity Catalog Catalog element from a template. Async version.
|
548
528
|
|
@@ -560,8 +540,7 @@ class AutomatedCuration(Client):
|
|
560
540
|
version: str, opt
|
561
541
|
version of the element - typically of the form x.y.z
|
562
542
|
|
563
|
-
|
564
|
-
The name of the view server to use. Default uses the client instance.
|
543
|
+
|
565
544
|
|
566
545
|
Returns
|
567
546
|
-------
|
@@ -579,7 +558,7 @@ class AutomatedCuration(Client):
|
|
579
558
|
},
|
580
559
|
}
|
581
560
|
body_s = body_slimmer(body)
|
582
|
-
response = await self._async_create_element_from_template(body_s
|
561
|
+
response = await self._async_create_element_from_template(body_s)
|
583
562
|
return str(response)
|
584
563
|
|
585
564
|
def create_uc_catalog_element_from_template(
|
@@ -588,7 +567,6 @@ class AutomatedCuration(Client):
|
|
588
567
|
network_address: str,
|
589
568
|
description: str = None,
|
590
569
|
version: str = None,
|
591
|
-
server: str = None,
|
592
570
|
) -> str:
|
593
571
|
"""Create a Unity Catalog Catalog element from a template.
|
594
572
|
|
@@ -606,8 +584,7 @@ class AutomatedCuration(Client):
|
|
606
584
|
version: str, opt
|
607
585
|
version of the element - typically of the form x.y.z
|
608
586
|
|
609
|
-
|
610
|
-
The name of the view server to use. Default uses the client instance.
|
587
|
+
|
611
588
|
|
612
589
|
Returns
|
613
590
|
-------
|
@@ -617,7 +594,7 @@ class AutomatedCuration(Client):
|
|
617
594
|
loop = asyncio.get_event_loop()
|
618
595
|
response = loop.run_until_complete(
|
619
596
|
self._async_create_uc_catalog_element_from_template(
|
620
|
-
uc_catalog, network_address, description, version
|
597
|
+
uc_catalog, network_address, description, version
|
621
598
|
)
|
622
599
|
)
|
623
600
|
return response
|
@@ -629,7 +606,6 @@ class AutomatedCuration(Client):
|
|
629
606
|
network_address: str,
|
630
607
|
description: str = None,
|
631
608
|
version: str = None,
|
632
|
-
server: str = None,
|
633
609
|
) -> str:
|
634
610
|
"""Create a Unity Catalog schema element from a template. Async version.
|
635
611
|
|
@@ -650,8 +626,7 @@ class AutomatedCuration(Client):
|
|
650
626
|
version: str, opt
|
651
627
|
version of the element - typically of the form x.y.z
|
652
628
|
|
653
|
-
|
654
|
-
The name of the view server to use. Default uses the client instance.
|
629
|
+
|
655
630
|
|
656
631
|
Returns
|
657
632
|
-------
|
@@ -670,7 +645,7 @@ class AutomatedCuration(Client):
|
|
670
645
|
},
|
671
646
|
}
|
672
647
|
body_s = body_slimmer(body)
|
673
|
-
response = await self._async_create_element_from_template(body_s
|
648
|
+
response = await self._async_create_element_from_template(body_s)
|
674
649
|
return str(response)
|
675
650
|
|
676
651
|
def create_uc_schema_element_from_template(
|
@@ -680,7 +655,6 @@ class AutomatedCuration(Client):
|
|
680
655
|
network_address: str,
|
681
656
|
description: str = None,
|
682
657
|
version: str = None,
|
683
|
-
server: str = None,
|
684
658
|
) -> str:
|
685
659
|
"""Create a Unity Catalog schema element from a template. Async version.
|
686
660
|
|
@@ -701,8 +675,7 @@ class AutomatedCuration(Client):
|
|
701
675
|
version: str, opt
|
702
676
|
version of the element - typically of the form x.y.z
|
703
677
|
|
704
|
-
|
705
|
-
The name of the view server to use. Default uses the client instance.
|
678
|
+
|
706
679
|
|
707
680
|
Returns
|
708
681
|
-------
|
@@ -712,7 +685,7 @@ class AutomatedCuration(Client):
|
|
712
685
|
loop = asyncio.get_event_loop()
|
713
686
|
response = loop.run_until_complete(
|
714
687
|
self._async_create_uc_schema_element_from_template(
|
715
|
-
uc_catalog, uc_schema, network_address, description, version
|
688
|
+
uc_catalog, uc_schema, network_address, description, version
|
716
689
|
)
|
717
690
|
)
|
718
691
|
return response
|
@@ -728,7 +701,6 @@ class AutomatedCuration(Client):
|
|
728
701
|
network_address: str,
|
729
702
|
description: str = None,
|
730
703
|
version: str = None,
|
731
|
-
server: str = None,
|
732
704
|
) -> str:
|
733
705
|
"""Create a Unity Catalog table element from a template. Async version.
|
734
706
|
|
@@ -758,8 +730,7 @@ class AutomatedCuration(Client):
|
|
758
730
|
version: str, opt
|
759
731
|
version of the element - typically of the form x.y.z
|
760
732
|
|
761
|
-
|
762
|
-
The name of the view server to use. Default uses the client instance.
|
733
|
+
|
763
734
|
|
764
735
|
Returns
|
765
736
|
-------
|
@@ -782,7 +753,7 @@ class AutomatedCuration(Client):
|
|
782
753
|
},
|
783
754
|
}
|
784
755
|
body_s = body_slimmer(body)
|
785
|
-
response = await self._async_create_element_from_template(body_s
|
756
|
+
response = await self._async_create_element_from_template(body_s)
|
786
757
|
return str(response)
|
787
758
|
|
788
759
|
def create_uc_table_element_from_template(
|
@@ -796,7 +767,6 @@ class AutomatedCuration(Client):
|
|
796
767
|
network_address: str,
|
797
768
|
description: str = None,
|
798
769
|
version: str = None,
|
799
|
-
server: str = None,
|
800
770
|
) -> str:
|
801
771
|
"""Create a Unity Catalog table element from a template.
|
802
772
|
|
@@ -826,8 +796,7 @@ class AutomatedCuration(Client):
|
|
826
796
|
version: str, opt
|
827
797
|
version of the element - typically of the form x.y.z
|
828
798
|
|
829
|
-
|
830
|
-
The name of the view server to use. Default uses the client instance.
|
799
|
+
|
831
800
|
|
832
801
|
Returns
|
833
802
|
-------
|
@@ -846,7 +815,6 @@ class AutomatedCuration(Client):
|
|
846
815
|
network_address,
|
847
816
|
description,
|
848
817
|
version,
|
849
|
-
server,
|
850
818
|
)
|
851
819
|
)
|
852
820
|
return response
|
@@ -859,7 +827,6 @@ class AutomatedCuration(Client):
|
|
859
827
|
network_address: str,
|
860
828
|
description: str = None,
|
861
829
|
version: str = None,
|
862
|
-
server: str = None,
|
863
830
|
) -> str:
|
864
831
|
"""Create a Unity Catalog function element from a template. Async version.
|
865
832
|
|
@@ -883,8 +850,7 @@ class AutomatedCuration(Client):
|
|
883
850
|
version: str, opt
|
884
851
|
version of the element - typically of the form x.y.z
|
885
852
|
|
886
|
-
|
887
|
-
The name of the view server to use. Default uses the client instance.
|
853
|
+
|
888
854
|
|
889
855
|
Returns
|
890
856
|
-------
|
@@ -904,7 +870,7 @@ class AutomatedCuration(Client):
|
|
904
870
|
},
|
905
871
|
}
|
906
872
|
body_s = body_slimmer(body)
|
907
|
-
response = await self._async_create_element_from_template(body_s
|
873
|
+
response = await self._async_create_element_from_template(body_s)
|
908
874
|
return str(response)
|
909
875
|
|
910
876
|
def create_uc_function_element_from_template(
|
@@ -915,7 +881,6 @@ class AutomatedCuration(Client):
|
|
915
881
|
network_address: str,
|
916
882
|
description: str = None,
|
917
883
|
version: str = None,
|
918
|
-
server: str = None,
|
919
884
|
) -> str:
|
920
885
|
"""Create a Unity Catalog function element from a template.
|
921
886
|
|
@@ -939,8 +904,7 @@ class AutomatedCuration(Client):
|
|
939
904
|
version: str, opt
|
940
905
|
version of the element - typically of the form x.y.z
|
941
906
|
|
942
|
-
|
943
|
-
The name of the view server to use. Default uses the client instance.
|
907
|
+
|
944
908
|
|
945
909
|
Returns
|
946
910
|
-------
|
@@ -956,7 +920,6 @@ class AutomatedCuration(Client):
|
|
956
920
|
network_address,
|
957
921
|
description,
|
958
922
|
version,
|
959
|
-
server,
|
960
923
|
)
|
961
924
|
)
|
962
925
|
return response
|
@@ -971,7 +934,6 @@ class AutomatedCuration(Client):
|
|
971
934
|
network_address: str,
|
972
935
|
description: str = None,
|
973
936
|
version: str = None,
|
974
|
-
server: str = None,
|
975
937
|
) -> str:
|
976
938
|
"""Create a Unity Catalog volume element from a template. Async version.
|
977
939
|
|
@@ -988,7 +950,7 @@ class AutomatedCuration(Client):
|
|
988
950
|
|
989
951
|
uc_vol_type: str
|
990
952
|
The volume type of the UC volume we are configuring. Currently Managed or External.
|
991
|
-
|
953
|
+
uc_storage_loc: str
|
992
954
|
The location with the data associated with this element is stored.
|
993
955
|
|
994
956
|
network_address : str
|
@@ -1000,8 +962,7 @@ class AutomatedCuration(Client):
|
|
1000
962
|
version: str, opt
|
1001
963
|
version of the element - typically of the form x.y.z
|
1002
964
|
|
1003
|
-
|
1004
|
-
The name of the view server to use. Default uses the client instance.
|
965
|
+
|
1005
966
|
|
1006
967
|
Returns
|
1007
968
|
-------
|
@@ -1023,7 +984,7 @@ class AutomatedCuration(Client):
|
|
1023
984
|
},
|
1024
985
|
}
|
1025
986
|
body_s = body_slimmer(body)
|
1026
|
-
response = await self._async_create_element_from_template(body_s
|
987
|
+
response = await self._async_create_element_from_template(body_s)
|
1027
988
|
return str(response)
|
1028
989
|
|
1029
990
|
def create_uc_volume_element_from_template(
|
@@ -1036,7 +997,6 @@ class AutomatedCuration(Client):
|
|
1036
997
|
network_address: str,
|
1037
998
|
description: str = None,
|
1038
999
|
version: str = None,
|
1039
|
-
server: str = None,
|
1040
1000
|
) -> str:
|
1041
1001
|
"""Create a Unity Catalog volume element from a template. Async version.
|
1042
1002
|
|
@@ -1053,7 +1013,8 @@ class AutomatedCuration(Client):
|
|
1053
1013
|
|
1054
1014
|
uc_vol_type: str
|
1055
1015
|
The volume type of the UC volume we are configuring. Currently Managed or External.
|
1056
|
-
|
1016
|
+
|
1017
|
+
uc_storage_loc: str
|
1057
1018
|
The location with the data associated with this element is stored.
|
1058
1019
|
|
1059
1020
|
network_address : str
|
@@ -1065,8 +1026,7 @@ class AutomatedCuration(Client):
|
|
1065
1026
|
version: str, opt
|
1066
1027
|
version of the element - typically of the form x.y.z
|
1067
1028
|
|
1068
|
-
|
1069
|
-
The name of the view server to use. Default uses the client instance.
|
1029
|
+
|
1070
1030
|
|
1071
1031
|
Returns
|
1072
1032
|
-------
|
@@ -1084,7 +1044,6 @@ class AutomatedCuration(Client):
|
|
1084
1044
|
network_address,
|
1085
1045
|
description,
|
1086
1046
|
version,
|
1087
|
-
server,
|
1088
1047
|
)
|
1089
1048
|
)
|
1090
1049
|
return response
|
@@ -1093,13 +1052,12 @@ class AutomatedCuration(Client):
|
|
1093
1052
|
# Engine Actions
|
1094
1053
|
#
|
1095
1054
|
async def _async_get_engine_actions(
|
1096
|
-
self,
|
1055
|
+
self, start_from: int = 0, page_size: int = max_paging_size
|
1097
1056
|
) -> list:
|
1098
1057
|
"""Retrieve the engine actions that are known to the server. Async version.
|
1099
1058
|
Parameters
|
1100
1059
|
----------
|
1101
|
-
|
1102
|
-
The name of the server. If not provided, it uses the default server name.
|
1060
|
+
|
1103
1061
|
start_from : int, optional
|
1104
1062
|
The starting index of the actions to retrieve. Default is 0.
|
1105
1063
|
page_size : int, optional
|
@@ -1120,10 +1078,9 @@ class AutomatedCuration(Client):
|
|
1120
1078
|
-----
|
1121
1079
|
For more information see: https://egeria-project.org/concepts/engine-action
|
1122
1080
|
"""
|
1123
|
-
server = self.server_name if server is None else server
|
1124
1081
|
|
1125
1082
|
url = (
|
1126
|
-
f"{self.
|
1083
|
+
f"{self.cur_command_root}/engine-actions?"
|
1127
1084
|
f"startFrom={start_from}&pageSize={page_size}"
|
1128
1085
|
)
|
1129
1086
|
|
@@ -1131,13 +1088,12 @@ class AutomatedCuration(Client):
|
|
1131
1088
|
return response.json().get("elements", "No elements")
|
1132
1089
|
|
1133
1090
|
def get_engine_actions(
|
1134
|
-
self,
|
1091
|
+
self, start_from: int = 0, page_size: int = max_paging_size
|
1135
1092
|
) -> list:
|
1136
1093
|
"""Retrieve the engine actions that are known to the server.
|
1137
1094
|
Parameters
|
1138
1095
|
----------
|
1139
|
-
|
1140
|
-
The name of the server. If not provided, it uses the default server name.
|
1096
|
+
|
1141
1097
|
start_from : int, optional
|
1142
1098
|
The starting index of the actions to retrieve. Default is 0.
|
1143
1099
|
page_size : int, optional
|
@@ -1160,21 +1116,18 @@ class AutomatedCuration(Client):
|
|
1160
1116
|
"""
|
1161
1117
|
loop = asyncio.get_event_loop()
|
1162
1118
|
response = loop.run_until_complete(
|
1163
|
-
self._async_get_engine_actions(
|
1119
|
+
self._async_get_engine_actions(start_from, page_size)
|
1164
1120
|
)
|
1165
1121
|
return response
|
1166
1122
|
|
1167
|
-
async def _async_get_engine_action(
|
1168
|
-
self, engine_action_guid: str, server: str = None
|
1169
|
-
) -> dict:
|
1123
|
+
async def _async_get_engine_action(self, engine_action_guid: str) -> dict:
|
1170
1124
|
"""Request the status and properties of an executing engine action request. Async version.
|
1171
1125
|
Parameters
|
1172
1126
|
----------
|
1173
1127
|
engine_action_guid : str
|
1174
1128
|
The GUID of the engine action to retrieve.
|
1175
1129
|
|
1176
|
-
|
1177
|
-
The name of the server. If not provided, the default server name will be used.
|
1130
|
+
|
1178
1131
|
|
1179
1132
|
Returns
|
1180
1133
|
-------
|
@@ -1191,25 +1144,20 @@ class AutomatedCuration(Client):
|
|
1191
1144
|
-----
|
1192
1145
|
For more information see: https://egeria-project.org/concepts/engine-action
|
1193
1146
|
"""
|
1194
|
-
server = self.server_name if server is None else server
|
1195
1147
|
|
1196
|
-
url =
|
1197
|
-
f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/engine-actions/"
|
1198
|
-
f"{engine_action_guid}"
|
1199
|
-
)
|
1148
|
+
url = f"{self.cur_command_root}/engine-actions/" f"{engine_action_guid}"
|
1200
1149
|
|
1201
1150
|
response = await self._async_make_request("GET", url)
|
1202
1151
|
return response.json().get("element", "No element found")
|
1203
1152
|
|
1204
|
-
def get_engine_action(self, engine_action_guid: str
|
1153
|
+
def get_engine_action(self, engine_action_guid: str) -> dict:
|
1205
1154
|
"""Request the status and properties of an executing engine action request.
|
1206
1155
|
Parameters
|
1207
1156
|
----------
|
1208
1157
|
engine_action_guid : str
|
1209
1158
|
The GUID of the engine action to retrieve.
|
1210
1159
|
|
1211
|
-
|
1212
|
-
The name of the server. If not provided, the default server name will be used.
|
1160
|
+
|
1213
1161
|
|
1214
1162
|
Returns
|
1215
1163
|
-------
|
@@ -1228,21 +1176,18 @@ class AutomatedCuration(Client):
|
|
1228
1176
|
"""
|
1229
1177
|
loop = asyncio.get_event_loop()
|
1230
1178
|
response = loop.run_until_complete(
|
1231
|
-
self._async_get_engine_action(engine_action_guid
|
1179
|
+
self._async_get_engine_action(engine_action_guid)
|
1232
1180
|
)
|
1233
1181
|
return response
|
1234
1182
|
|
1235
|
-
async def _async_cancel_engine_action(
|
1236
|
-
self, engine_action_guid: str, server: str = None
|
1237
|
-
) -> None:
|
1183
|
+
async def _async_cancel_engine_action(self, engine_action_guid: str) -> None:
|
1238
1184
|
"""Request that an engine action request is cancelled and any running governance service is stopped. Async Ver.
|
1239
1185
|
Parameters
|
1240
1186
|
----------
|
1241
1187
|
engine_action_guid : str
|
1242
1188
|
The GUID of the engine action to retrieve.
|
1243
1189
|
|
1244
|
-
|
1245
|
-
The name of the server. If not provided, the default server name will be used.
|
1190
|
+
|
1246
1191
|
|
1247
1192
|
Returns
|
1248
1193
|
-------
|
@@ -1259,25 +1204,21 @@ class AutomatedCuration(Client):
|
|
1259
1204
|
-----
|
1260
1205
|
For more information see: https://egeria-project.org/concepts/engine-action
|
1261
1206
|
"""
|
1262
|
-
|
1207
|
+
|
1263
1208
|
validate_guid(engine_action_guid)
|
1264
1209
|
|
1265
|
-
url =
|
1266
|
-
f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/engine-actions/"
|
1267
|
-
f"{engine_action_guid}/cancel"
|
1268
|
-
)
|
1210
|
+
url = f"{self.cur_command_root}/engine-actions/" f"{engine_action_guid}/cancel"
|
1269
1211
|
|
1270
1212
|
await self._async_make_request("POST", url)
|
1271
1213
|
|
1272
|
-
def cancel_engine_action(self, engine_action_guid: str
|
1214
|
+
def cancel_engine_action(self, engine_action_guid: str) -> None:
|
1273
1215
|
"""Request that an engine action request is cancelled and any running governance service is stopped.
|
1274
1216
|
Parameters
|
1275
1217
|
----------
|
1276
1218
|
engine_action_guid : str
|
1277
1219
|
The GUID of the engine action to retrieve.
|
1278
1220
|
|
1279
|
-
|
1280
|
-
The name of the server. If not provided, the default server name will be used.
|
1221
|
+
|
1281
1222
|
|
1282
1223
|
Returns
|
1283
1224
|
-------
|
@@ -1295,20 +1236,17 @@ class AutomatedCuration(Client):
|
|
1295
1236
|
For more information see: https://egeria-project.org/concepts/engine-action
|
1296
1237
|
"""
|
1297
1238
|
loop = asyncio.get_event_loop()
|
1298
|
-
loop.run_until_complete(
|
1299
|
-
self._async_cancel_engine_action(engine_action_guid, server)
|
1300
|
-
)
|
1239
|
+
loop.run_until_complete(self._async_cancel_engine_action(engine_action_guid))
|
1301
1240
|
return
|
1302
1241
|
|
1303
1242
|
async def _async_get_active_engine_actions(
|
1304
|
-
self,
|
1243
|
+
self, start_from: int = 0, page_size: int = max_paging_size
|
1305
1244
|
) -> list | str:
|
1306
1245
|
"""Retrieve the engine actions that are still in process. Async Version.
|
1307
1246
|
|
1308
1247
|
Parameters:
|
1309
1248
|
----------
|
1310
|
-
|
1311
|
-
The name of the server. If not provided, it uses the default server name.
|
1249
|
+
|
1312
1250
|
start_from : int, optional
|
1313
1251
|
The starting index of the actions to retrieve. Default is 0.
|
1314
1252
|
page_size : int, optional
|
@@ -1328,10 +1266,9 @@ class AutomatedCuration(Client):
|
|
1328
1266
|
For more information see: https://egeria-project.org/concepts/engine-action
|
1329
1267
|
|
1330
1268
|
"""
|
1331
|
-
server = self.server_name if server is None else server
|
1332
1269
|
|
1333
1270
|
url = (
|
1334
|
-
f"{self.
|
1271
|
+
f"{self.cur_command_root}/engine-actions/active?"
|
1335
1272
|
f"startFrom={start_from}&pageSize={page_size}"
|
1336
1273
|
)
|
1337
1274
|
|
@@ -1339,14 +1276,13 @@ class AutomatedCuration(Client):
|
|
1339
1276
|
return response.json().get("elements", "no actions")
|
1340
1277
|
|
1341
1278
|
def get_active_engine_actions(
|
1342
|
-
self,
|
1279
|
+
self, start_from: int = 0, page_size: int = 0
|
1343
1280
|
) -> list | str:
|
1344
1281
|
"""Retrieve the engine actions that are still in process.
|
1345
1282
|
|
1346
1283
|
Parameters:
|
1347
1284
|
----------
|
1348
|
-
|
1349
|
-
The name of the server. If not provided, it uses the default server name.
|
1285
|
+
|
1350
1286
|
start_from : int, optional
|
1351
1287
|
The starting index of the actions to retrieve. Default is 0.
|
1352
1288
|
page_size : int, optional
|
@@ -1367,14 +1303,13 @@ class AutomatedCuration(Client):
|
|
1367
1303
|
"""
|
1368
1304
|
loop = asyncio.get_event_loop()
|
1369
1305
|
response = loop.run_until_complete(
|
1370
|
-
self._async_get_active_engine_actions(
|
1306
|
+
self._async_get_active_engine_actions(start_from, page_size)
|
1371
1307
|
)
|
1372
1308
|
return response
|
1373
1309
|
|
1374
1310
|
async def _async_get_engine_actions_by_name(
|
1375
1311
|
self,
|
1376
1312
|
name: str,
|
1377
|
-
server: str = None,
|
1378
1313
|
start_from: int = 0,
|
1379
1314
|
page_size: int = max_paging_size,
|
1380
1315
|
) -> list | str:
|
@@ -1384,9 +1319,7 @@ class AutomatedCuration(Client):
|
|
1384
1319
|
----------
|
1385
1320
|
name : str
|
1386
1321
|
The name of the engine action to retrieve.
|
1387
|
-
|
1388
|
-
The name of the server to retrieve the engine action from. If not provided, the default server specified in
|
1389
|
-
the instance will be used.
|
1322
|
+
|
1390
1323
|
start_from : int, optional
|
1391
1324
|
The index to start retrieving engine actions from. If not provided, the default value will be used.
|
1392
1325
|
page_size : int, optional
|
@@ -1409,11 +1342,11 @@ class AutomatedCuration(Client):
|
|
1409
1342
|
For more information see: https://egeria-project.org/concepts/engine-action
|
1410
1343
|
|
1411
1344
|
"""
|
1412
|
-
|
1345
|
+
|
1413
1346
|
validate_name(name)
|
1414
1347
|
|
1415
1348
|
url = (
|
1416
|
-
f"{self.
|
1349
|
+
f"{self.cur_command_root}/engine-actions/by-name?"
|
1417
1350
|
f"startFrom={start_from}&pageSize={page_size}"
|
1418
1351
|
)
|
1419
1352
|
body = {"filter": name}
|
@@ -1423,7 +1356,6 @@ class AutomatedCuration(Client):
|
|
1423
1356
|
def get_engine_actions_by_name(
|
1424
1357
|
self,
|
1425
1358
|
name: str,
|
1426
|
-
server: str = None,
|
1427
1359
|
start_from: int = 0,
|
1428
1360
|
page_size: int = max_paging_size,
|
1429
1361
|
) -> list | str:
|
@@ -1434,9 +1366,7 @@ class AutomatedCuration(Client):
|
|
1434
1366
|
----------
|
1435
1367
|
name : str
|
1436
1368
|
The name of the engine action to retrieve.
|
1437
|
-
|
1438
|
-
The name of the server to retrieve the engine action from. If not provided, the default server specified in
|
1439
|
-
the instance will be used.
|
1369
|
+
|
1440
1370
|
start_from : int, optional
|
1441
1371
|
The index to start retrieving engine actions from. If not provided, the default value will be used.
|
1442
1372
|
page_size : int, optional
|
@@ -1461,14 +1391,13 @@ class AutomatedCuration(Client):
|
|
1461
1391
|
"""
|
1462
1392
|
loop = asyncio.get_event_loop()
|
1463
1393
|
response = loop.run_until_complete(
|
1464
|
-
self._async_get_engine_actions_by_name(name,
|
1394
|
+
self._async_get_engine_actions_by_name(name, start_from, page_size)
|
1465
1395
|
)
|
1466
1396
|
return response
|
1467
1397
|
|
1468
1398
|
async def _async_find_engine_actions(
|
1469
1399
|
self,
|
1470
1400
|
search_string: str,
|
1471
|
-
server: str = None,
|
1472
1401
|
starts_with: bool = False,
|
1473
1402
|
ends_with: bool = False,
|
1474
1403
|
ignore_case: bool = False,
|
@@ -1481,8 +1410,7 @@ class AutomatedCuration(Client):
|
|
1481
1410
|
search_string : str
|
1482
1411
|
The string used for searching engine actions by name.
|
1483
1412
|
|
1484
|
-
|
1485
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
1413
|
+
|
1486
1414
|
|
1487
1415
|
starts_with : bool, optional
|
1488
1416
|
Whether to search engine actions that start with the given search string. Default is False.
|
@@ -1515,7 +1443,7 @@ class AutomatedCuration(Client):
|
|
1515
1443
|
-----
|
1516
1444
|
For more information see: https://egeria-project.org/concepts/engine-action
|
1517
1445
|
"""
|
1518
|
-
|
1446
|
+
|
1519
1447
|
validate_search_string(search_string)
|
1520
1448
|
if search_string == "*":
|
1521
1449
|
search_string = None
|
@@ -1524,7 +1452,7 @@ class AutomatedCuration(Client):
|
|
1524
1452
|
ignore_case_s = str(ignore_case).lower()
|
1525
1453
|
|
1526
1454
|
url = (
|
1527
|
-
f"{self.
|
1455
|
+
f"{self.cur_command_root}/engine-actions/"
|
1528
1456
|
f"by-search-string?startFrom={start_from}&pageSize={page_size}&startsWith={starts_with_s}&"
|
1529
1457
|
f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}"
|
1530
1458
|
)
|
@@ -1535,7 +1463,6 @@ class AutomatedCuration(Client):
|
|
1535
1463
|
def find_engine_actions(
|
1536
1464
|
self,
|
1537
1465
|
search_string: str = "*",
|
1538
|
-
server: str = None,
|
1539
1466
|
starts_with: bool = False,
|
1540
1467
|
ends_with: bool = False,
|
1541
1468
|
ignore_case: bool = False,
|
@@ -1548,8 +1475,7 @@ class AutomatedCuration(Client):
|
|
1548
1475
|
search_string : str
|
1549
1476
|
The string used for searching engine actions by name.
|
1550
1477
|
|
1551
|
-
|
1552
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
1478
|
+
|
1553
1479
|
|
1554
1480
|
starts_with : bool, optional
|
1555
1481
|
Whether to search engine actions that start with the given search string. Default is False.
|
@@ -1587,7 +1513,6 @@ class AutomatedCuration(Client):
|
|
1587
1513
|
response = loop.run_until_complete(
|
1588
1514
|
self._async_find_engine_actions(
|
1589
1515
|
search_string,
|
1590
|
-
server,
|
1591
1516
|
starts_with,
|
1592
1517
|
ends_with,
|
1593
1518
|
ignore_case,
|
@@ -1602,7 +1527,7 @@ class AutomatedCuration(Client):
|
|
1602
1527
|
#
|
1603
1528
|
|
1604
1529
|
async def _async_get_governance_action_process_by_guid(
|
1605
|
-
self, process_guid: str
|
1530
|
+
self, process_guid: str
|
1606
1531
|
) -> dict | str:
|
1607
1532
|
"""Retrieve the governance action process metadata element with the supplied unique identifier. Async Version.
|
1608
1533
|
|
@@ -1610,8 +1535,7 @@ class AutomatedCuration(Client):
|
|
1610
1535
|
----------
|
1611
1536
|
process_guid: str
|
1612
1537
|
The GUID (Globally Unique Identifier) of the governance action process.
|
1613
|
-
|
1614
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
1538
|
+
|
1615
1539
|
|
1616
1540
|
Returns:
|
1617
1541
|
-------
|
@@ -1625,28 +1549,21 @@ class AutomatedCuration(Client):
|
|
1625
1549
|
UserNotAuthorizedException:
|
1626
1550
|
"""
|
1627
1551
|
|
1628
|
-
server = self.server_name if server is None else server
|
1629
1552
|
validate_guid(process_guid)
|
1630
1553
|
|
1631
|
-
url =
|
1632
|
-
f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/"
|
1633
|
-
f"governance-action-processes/{process_guid}"
|
1634
|
-
)
|
1554
|
+
url = f"{self.cur_command_root}/" f"governance-action-processes/{process_guid}"
|
1635
1555
|
|
1636
1556
|
response = await self._async_make_request("GET", url)
|
1637
1557
|
return response.json().get("element", "no actions")
|
1638
1558
|
|
1639
|
-
def get_governance_action_process_by_guid(
|
1640
|
-
self, process_guid: str, server: str = None
|
1641
|
-
) -> dict | str:
|
1559
|
+
def get_governance_action_process_by_guid(self, process_guid: str) -> dict | str:
|
1642
1560
|
"""Retrieve the governance action process metadata element with the supplied unique identifier.
|
1643
1561
|
|
1644
1562
|
Parameters:
|
1645
1563
|
----------
|
1646
1564
|
process_guid: str
|
1647
1565
|
The GUID (Globally Unique Identifier) of the governance action process.
|
1648
|
-
|
1649
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
1566
|
+
|
1650
1567
|
Returns:
|
1651
1568
|
-------
|
1652
1569
|
dict: The JSON representation of the governance action process element.
|
@@ -1660,12 +1577,12 @@ class AutomatedCuration(Client):
|
|
1660
1577
|
"""
|
1661
1578
|
loop = asyncio.get_event_loop()
|
1662
1579
|
response = loop.run_until_complete(
|
1663
|
-
self._async_get_governance_action_process_by_guid(process_guid
|
1580
|
+
self._async_get_governance_action_process_by_guid(process_guid)
|
1664
1581
|
)
|
1665
1582
|
return response
|
1666
1583
|
|
1667
1584
|
async def _async_get_gov_action_process_graph(
|
1668
|
-
self, process_guid: str
|
1585
|
+
self, process_guid: str
|
1669
1586
|
) -> dict | str:
|
1670
1587
|
"""Retrieve the governance action process metadata element with the supplied unique
|
1671
1588
|
identifier along with the flow definition describing its implementation. Async Version.
|
@@ -1673,8 +1590,6 @@ class AutomatedCuration(Client):
|
|
1673
1590
|
----------
|
1674
1591
|
process_guid : str
|
1675
1592
|
The process GUID to retrieve the graph for.
|
1676
|
-
server : str, optional
|
1677
|
-
The name of the server to retrieve the graph from. If not provided, the default server name will be used.
|
1678
1593
|
|
1679
1594
|
Returns
|
1680
1595
|
-------
|
@@ -1689,28 +1604,24 @@ class AutomatedCuration(Client):
|
|
1689
1604
|
UserNotAuthorizedException:
|
1690
1605
|
|
1691
1606
|
"""
|
1692
|
-
|
1607
|
+
|
1693
1608
|
validate_guid(process_guid)
|
1694
1609
|
|
1695
1610
|
url = (
|
1696
|
-
f"{self.
|
1611
|
+
f"{self.cur_command_root}/"
|
1697
1612
|
f"governance-action-processes/{process_guid}/graph"
|
1698
1613
|
)
|
1699
1614
|
|
1700
1615
|
response = await self._async_make_request("POST", url)
|
1701
1616
|
return response.json().get("element", "no actions")
|
1702
1617
|
|
1703
|
-
def get_gov_action_process_graph(
|
1704
|
-
self, process_guid: str, server: str = None
|
1705
|
-
) -> dict | str:
|
1618
|
+
def get_gov_action_process_graph(self, process_guid: str) -> dict | str:
|
1706
1619
|
"""Retrieve the governance action process metadata element with the supplied unique
|
1707
1620
|
identifier along with the flow definition describing its implementation.
|
1708
1621
|
Parameters
|
1709
1622
|
----------
|
1710
1623
|
process_guid : str
|
1711
1624
|
The process GUID to retrieve the graph for.
|
1712
|
-
server : str, optional
|
1713
|
-
The name of the server to retrieve the graph from. If not provided, the default server name will be used.
|
1714
1625
|
|
1715
1626
|
Returns
|
1716
1627
|
-------
|
@@ -1727,14 +1638,13 @@ class AutomatedCuration(Client):
|
|
1727
1638
|
"""
|
1728
1639
|
loop = asyncio.get_event_loop()
|
1729
1640
|
response = loop.run_until_complete(
|
1730
|
-
self._async_get_gov_action_process_graph(process_guid
|
1641
|
+
self._async_get_gov_action_process_graph(process_guid)
|
1731
1642
|
)
|
1732
1643
|
return response
|
1733
1644
|
|
1734
1645
|
async def _async_get_gov_action_processes_by_name(
|
1735
1646
|
self,
|
1736
1647
|
name: str,
|
1737
|
-
server: str = None,
|
1738
1648
|
start_from: int = None,
|
1739
1649
|
page_size: int = max_paging_size,
|
1740
1650
|
) -> list | str:
|
@@ -1745,9 +1655,7 @@ class AutomatedCuration(Client):
|
|
1745
1655
|
----------
|
1746
1656
|
name : str
|
1747
1657
|
The name of the engine action to retrieve.
|
1748
|
-
|
1749
|
-
The name of the server to retrieve the engine action from. If not provided, the default server specified
|
1750
|
-
in the instance will be used.
|
1658
|
+
|
1751
1659
|
start_from : int, optional
|
1752
1660
|
The index to start retrieving engine actions from. If not provided, the default value will be used.
|
1753
1661
|
page_size : int, optional
|
@@ -1765,11 +1673,11 @@ class AutomatedCuration(Client):
|
|
1765
1673
|
PropertyServerException
|
1766
1674
|
UserNotAuthorizedException
|
1767
1675
|
"""
|
1768
|
-
|
1676
|
+
|
1769
1677
|
validate_name(name)
|
1770
1678
|
|
1771
1679
|
url = (
|
1772
|
-
f"{self.
|
1680
|
+
f"{self.cur_command_root}/governance-action-processes/"
|
1773
1681
|
f"by-name?startFrom={start_from}&pageSize={page_size}"
|
1774
1682
|
)
|
1775
1683
|
body = {"filter": name}
|
@@ -1779,7 +1687,6 @@ class AutomatedCuration(Client):
|
|
1779
1687
|
def get_gov_action_processes_by_name(
|
1780
1688
|
self,
|
1781
1689
|
name: str,
|
1782
|
-
server: str = None,
|
1783
1690
|
start_from: int = 0,
|
1784
1691
|
page_size: int = max_paging_size,
|
1785
1692
|
) -> list | str:
|
@@ -1790,9 +1697,7 @@ class AutomatedCuration(Client):
|
|
1790
1697
|
----------
|
1791
1698
|
name : str
|
1792
1699
|
The name of the engine action to retrieve.
|
1793
|
-
|
1794
|
-
The name of the server to retrieve the engine action from. If not provided, the default server specified
|
1795
|
-
in the instance will be used.
|
1700
|
+
|
1796
1701
|
start_from : int, optional
|
1797
1702
|
The index to start retrieving engine actions from. If not provided, the default value will be used.
|
1798
1703
|
page_size : int, optional
|
@@ -1812,16 +1717,13 @@ class AutomatedCuration(Client):
|
|
1812
1717
|
"""
|
1813
1718
|
loop = asyncio.get_event_loop()
|
1814
1719
|
response = loop.run_until_complete(
|
1815
|
-
self._async_get_gov_action_processes_by_name(
|
1816
|
-
name, server, start_from, page_size
|
1817
|
-
)
|
1720
|
+
self._async_get_gov_action_processes_by_name(name, start_from, page_size)
|
1818
1721
|
)
|
1819
1722
|
return response
|
1820
1723
|
|
1821
1724
|
async def _async_find_gov_action_processes(
|
1822
1725
|
self,
|
1823
1726
|
search_string: str,
|
1824
|
-
server: str = None,
|
1825
1727
|
starts_with: bool = False,
|
1826
1728
|
ends_with: bool = False,
|
1827
1729
|
ignore_case: bool = False,
|
@@ -1835,8 +1737,7 @@ class AutomatedCuration(Client):
|
|
1835
1737
|
search_string : str
|
1836
1738
|
The string used for searching engine actions by name.
|
1837
1739
|
|
1838
|
-
|
1839
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
1740
|
+
|
1840
1741
|
|
1841
1742
|
starts_with : bool, optional
|
1842
1743
|
Whether to search engine actions that start with the given search string. Default is False.
|
@@ -1865,7 +1766,7 @@ class AutomatedCuration(Client):
|
|
1865
1766
|
PropertyServerException
|
1866
1767
|
UserNotAuthorizedException
|
1867
1768
|
"""
|
1868
|
-
|
1769
|
+
|
1869
1770
|
validate_search_string(search_string)
|
1870
1771
|
if search_string == "*":
|
1871
1772
|
search_string = None
|
@@ -1874,7 +1775,7 @@ class AutomatedCuration(Client):
|
|
1874
1775
|
ignore_case_s = str(ignore_case).lower()
|
1875
1776
|
|
1876
1777
|
url = (
|
1877
|
-
f"{self.
|
1778
|
+
f"{self.cur_command_root}/governance-action-processes/"
|
1878
1779
|
f"by-search-string?startFrom={start_from}&pageSize={page_size}&startsWith={starts_with_s}&"
|
1879
1780
|
f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}"
|
1880
1781
|
)
|
@@ -1890,7 +1791,6 @@ class AutomatedCuration(Client):
|
|
1890
1791
|
def find_gov_action_processes(
|
1891
1792
|
self,
|
1892
1793
|
search_string: str = "*",
|
1893
|
-
server: str = None,
|
1894
1794
|
starts_with: bool = False,
|
1895
1795
|
ends_with: bool = False,
|
1896
1796
|
ignore_case: bool = False,
|
@@ -1904,8 +1804,7 @@ class AutomatedCuration(Client):
|
|
1904
1804
|
search_string : str
|
1905
1805
|
The string used for searching engine actions by name.
|
1906
1806
|
|
1907
|
-
|
1908
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
1807
|
+
|
1909
1808
|
|
1910
1809
|
starts_with : bool, optional
|
1911
1810
|
Whether to search engine actions that start with the given search string. Default is False.
|
@@ -1939,7 +1838,6 @@ class AutomatedCuration(Client):
|
|
1939
1838
|
response = loop.run_until_complete(
|
1940
1839
|
self._async_find_gov_action_processes(
|
1941
1840
|
search_string,
|
1942
|
-
server,
|
1943
1841
|
starts_with,
|
1944
1842
|
ends_with,
|
1945
1843
|
ignore_case,
|
@@ -1958,7 +1856,6 @@ class AutomatedCuration(Client):
|
|
1958
1856
|
request_parameters: dict = None,
|
1959
1857
|
orig_service_name: str = None,
|
1960
1858
|
orig_engine_name: str = None,
|
1961
|
-
server: str = None,
|
1962
1859
|
) -> str:
|
1963
1860
|
"""Using the named governance action process as a template, initiate a chain of engine actions. Async version.
|
1964
1861
|
|
@@ -1990,15 +1887,12 @@ class AutomatedCuration(Client):
|
|
1990
1887
|
UserNotAuthorizedException
|
1991
1888
|
|
1992
1889
|
"""
|
1993
|
-
|
1890
|
+
|
1994
1891
|
start_time: datetime = (
|
1995
1892
|
datetime.datetime.now() if start_time is None else start_time
|
1996
1893
|
)
|
1997
1894
|
|
1998
|
-
url =
|
1999
|
-
f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-processes/"
|
2000
|
-
f"initiate"
|
2001
|
-
)
|
1895
|
+
url = f"{self.cur_command_root}/governance-action-processes/" f"initiate"
|
2002
1896
|
body = {
|
2003
1897
|
"class": "GovernanceActionProcessRequestBody",
|
2004
1898
|
"processQualifiedName": action_type_qualified_name,
|
@@ -2022,7 +1916,6 @@ class AutomatedCuration(Client):
|
|
2022
1916
|
request_parameters: dict = None,
|
2023
1917
|
orig_service_name: str = None,
|
2024
1918
|
orig_engine_name: str = None,
|
2025
|
-
server: str = None,
|
2026
1919
|
) -> str:
|
2027
1920
|
"""Using the named governance action process as a template, initiate a chain of engine actions.
|
2028
1921
|
|
@@ -2042,8 +1935,6 @@ class AutomatedCuration(Client):
|
|
2042
1935
|
- unique name of the requesting governance service (if initiated by a governance engine)
|
2043
1936
|
orig_engine_name: str, optional
|
2044
1937
|
- optional unique name of the governance engine (if initiated by a governance engine).
|
2045
|
-
server: str, optional
|
2046
|
-
- if not specified, the server from the class instance will be used
|
2047
1938
|
|
2048
1939
|
Returns
|
2049
1940
|
-------
|
@@ -2066,13 +1957,12 @@ class AutomatedCuration(Client):
|
|
2066
1957
|
request_parameters,
|
2067
1958
|
orig_service_name,
|
2068
1959
|
orig_engine_name,
|
2069
|
-
server,
|
2070
1960
|
)
|
2071
1961
|
)
|
2072
1962
|
return response
|
2073
1963
|
|
2074
1964
|
async def _async_get_gov_action_types_by_guid(
|
2075
|
-
self, gov_action_type_guid: str
|
1965
|
+
self, gov_action_type_guid: str
|
2076
1966
|
) -> dict | str:
|
2077
1967
|
"""Retrieve the governance action type metadata element with the supplied unique identifier. Async version.
|
2078
1968
|
|
@@ -2080,8 +1970,7 @@ class AutomatedCuration(Client):
|
|
2080
1970
|
----------
|
2081
1971
|
gov_action_type_guid: str
|
2082
1972
|
The GUID (Globally Unique Identifier) of the governance action type to retrieve.
|
2083
|
-
|
2084
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
1973
|
+
|
2085
1974
|
Returns:
|
2086
1975
|
-------
|
2087
1976
|
dict: The JSON representation of the governance action type element.
|
@@ -2093,28 +1982,25 @@ class AutomatedCuration(Client):
|
|
2093
1982
|
PropertyServerException: If the API response indicates a server side error.
|
2094
1983
|
UserNotAuthorizedException:
|
2095
1984
|
"""
|
2096
|
-
|
1985
|
+
|
2097
1986
|
validate_guid(gov_action_type_guid)
|
2098
1987
|
|
2099
1988
|
url = (
|
2100
|
-
f"{self.
|
1989
|
+
f"{self.cur_command_root}/"
|
2101
1990
|
f"governance-action-types/{gov_action_type_guid}"
|
2102
1991
|
)
|
2103
1992
|
|
2104
1993
|
response = await self._async_make_request("GET", url)
|
2105
1994
|
return response.json().get("element", "no actions")
|
2106
1995
|
|
2107
|
-
def get_gov_action_types_by_guid(
|
2108
|
-
self, gov_action_type_guid: str, server: str = None
|
2109
|
-
) -> dict | str:
|
1996
|
+
def get_gov_action_types_by_guid(self, gov_action_type_guid: str) -> dict | str:
|
2110
1997
|
"""Retrieve the governance action type metadata element with the supplied unique identifier.
|
2111
1998
|
|
2112
1999
|
Parameters:
|
2113
2000
|
----------
|
2114
2001
|
gov_action_type_guid: str
|
2115
2002
|
The GUID (Globally Unique Identifier) of the governance action type to retrieve.
|
2116
|
-
|
2117
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
2003
|
+
|
2118
2004
|
Returns:
|
2119
2005
|
-------
|
2120
2006
|
dict: The JSON representation of the governance action type element.
|
@@ -2128,14 +2014,13 @@ class AutomatedCuration(Client):
|
|
2128
2014
|
"""
|
2129
2015
|
loop = asyncio.get_event_loop()
|
2130
2016
|
response = loop.run_until_complete(
|
2131
|
-
self._async_get_gov_action_types_by_guid(gov_action_type_guid
|
2017
|
+
self._async_get_gov_action_types_by_guid(gov_action_type_guid)
|
2132
2018
|
)
|
2133
2019
|
return response
|
2134
2020
|
|
2135
2021
|
async def _async_get_gov_action_types_by_name(
|
2136
2022
|
self,
|
2137
2023
|
action_type_name,
|
2138
|
-
server: str = None,
|
2139
2024
|
start_from: int = 0,
|
2140
2025
|
page_size: int = max_paging_size,
|
2141
2026
|
) -> list | str:
|
@@ -2146,9 +2031,7 @@ class AutomatedCuration(Client):
|
|
2146
2031
|
----------
|
2147
2032
|
action_type_name: str
|
2148
2033
|
The name of the governance action type to retrieve.
|
2149
|
-
|
2150
|
-
The name of the server. If None, will use the default server specified in the instance
|
2151
|
-
will be used.
|
2034
|
+
|
2152
2035
|
Returns:
|
2153
2036
|
-------
|
2154
2037
|
dict: The JSON representation of the governance action type element.
|
@@ -2160,11 +2043,11 @@ class AutomatedCuration(Client):
|
|
2160
2043
|
PropertyServerException: If the API response indicates a server side error.
|
2161
2044
|
UserNotAuthorizedException:
|
2162
2045
|
"""
|
2163
|
-
|
2046
|
+
|
2164
2047
|
validate_name(action_type_name)
|
2165
2048
|
|
2166
2049
|
url = (
|
2167
|
-
f"{self.
|
2050
|
+
f"{self.cur_command_root}/"
|
2168
2051
|
f"governance-action-types/by-name?startFrom={start_from}&pageSize={page_size}"
|
2169
2052
|
)
|
2170
2053
|
|
@@ -2176,7 +2059,6 @@ class AutomatedCuration(Client):
|
|
2176
2059
|
def get_gov_action_types_by_name(
|
2177
2060
|
self,
|
2178
2061
|
action_type_name,
|
2179
|
-
server: str = None,
|
2180
2062
|
start_from: int = 0,
|
2181
2063
|
page_size: int = max_paging_size,
|
2182
2064
|
) -> list | str:
|
@@ -2187,8 +2069,7 @@ class AutomatedCuration(Client):
|
|
2187
2069
|
----------
|
2188
2070
|
action_type_name: str
|
2189
2071
|
The name of the governance action type to retrieve.
|
2190
|
-
|
2191
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
2072
|
+
|
2192
2073
|
Returns:
|
2193
2074
|
-------
|
2194
2075
|
dict: The JSON representation of the governance action type element.
|
@@ -2203,7 +2084,7 @@ class AutomatedCuration(Client):
|
|
2203
2084
|
loop = asyncio.get_event_loop()
|
2204
2085
|
response = loop.run_until_complete(
|
2205
2086
|
self._async_get_gov_action_types_by_name(
|
2206
|
-
action_type_name,
|
2087
|
+
action_type_name, start_from, page_size
|
2207
2088
|
)
|
2208
2089
|
)
|
2209
2090
|
return response
|
@@ -2211,7 +2092,6 @@ class AutomatedCuration(Client):
|
|
2211
2092
|
async def _async_find_gov_action_types(
|
2212
2093
|
self,
|
2213
2094
|
search_string: str = "*",
|
2214
|
-
server: str = None,
|
2215
2095
|
starts_with: bool = False,
|
2216
2096
|
ends_with: bool = False,
|
2217
2097
|
ignore_case: bool = True,
|
@@ -2226,8 +2106,7 @@ class AutomatedCuration(Client):
|
|
2226
2106
|
search_string : str
|
2227
2107
|
The string used for searching engine actions by name.
|
2228
2108
|
|
2229
|
-
|
2230
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
2109
|
+
|
2231
2110
|
|
2232
2111
|
starts_with : bool, optional
|
2233
2112
|
Whether to search engine actions that start with the given search string. Default is False.
|
@@ -2258,7 +2137,6 @@ class AutomatedCuration(Client):
|
|
2258
2137
|
|
2259
2138
|
"""
|
2260
2139
|
|
2261
|
-
server = self.server_name if server is None else server
|
2262
2140
|
validate_search_string(search_string)
|
2263
2141
|
if search_string == "*":
|
2264
2142
|
search_string = None
|
@@ -2267,7 +2145,7 @@ class AutomatedCuration(Client):
|
|
2267
2145
|
ignore_case_s = str(ignore_case).lower()
|
2268
2146
|
|
2269
2147
|
url = (
|
2270
|
-
f"{self.
|
2148
|
+
f"{self.cur_command_root}/governance-action-types/"
|
2271
2149
|
f"by-search-string?startFrom={start_from}&pageSize={page_size}&startsWith={starts_with_s}&"
|
2272
2150
|
f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}"
|
2273
2151
|
)
|
@@ -2278,7 +2156,6 @@ class AutomatedCuration(Client):
|
|
2278
2156
|
def find_gov_action_types(
|
2279
2157
|
self,
|
2280
2158
|
search_string: str = "*",
|
2281
|
-
server: str = None,
|
2282
2159
|
starts_with: bool = False,
|
2283
2160
|
ends_with: bool = False,
|
2284
2161
|
ignore_case: bool = False,
|
@@ -2292,8 +2169,6 @@ class AutomatedCuration(Client):
|
|
2292
2169
|
search_string : str
|
2293
2170
|
The string used for searching engine actions by name.
|
2294
2171
|
|
2295
|
-
server : str, optional
|
2296
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
2297
2172
|
|
2298
2173
|
starts_with : bool, optional
|
2299
2174
|
Whether to search engine actions that start with the given search string. Default is False.
|
@@ -2327,7 +2202,6 @@ class AutomatedCuration(Client):
|
|
2327
2202
|
response = loop.run_until_complete(
|
2328
2203
|
self._async_find_gov_action_types(
|
2329
2204
|
search_string,
|
2330
|
-
server,
|
2331
2205
|
starts_with,
|
2332
2206
|
ends_with,
|
2333
2207
|
ignore_case,
|
@@ -2346,7 +2220,6 @@ class AutomatedCuration(Client):
|
|
2346
2220
|
request_parameters: dict = None,
|
2347
2221
|
orig_service_name: str = None,
|
2348
2222
|
orig_engine_name: str = None,
|
2349
|
-
server: str = None,
|
2350
2223
|
) -> str:
|
2351
2224
|
"""Using the named governance action type as a template, initiate an engine action. Async version.
|
2352
2225
|
|
@@ -2366,8 +2239,6 @@ class AutomatedCuration(Client):
|
|
2366
2239
|
- unique name of the requesting governance service (if initiated by a governance engine)
|
2367
2240
|
orig_engine_name: str
|
2368
2241
|
- optional unique name of the governance engine (if initiated by a governance engine).
|
2369
|
-
server : str, optional
|
2370
|
-
- The name of the server. If None, will use the default server specified in the instance will be used.
|
2371
2242
|
|
2372
2243
|
Returns
|
2373
2244
|
-------
|
@@ -2380,11 +2251,8 @@ class AutomatedCuration(Client):
|
|
2380
2251
|
UserNotAuthorizedException
|
2381
2252
|
|
2382
2253
|
"""
|
2383
|
-
|
2384
|
-
url =
|
2385
|
-
f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
|
2386
|
-
f"initiate"
|
2387
|
-
)
|
2254
|
+
|
2255
|
+
url = f"{self.cur_command_root}/governance-action-types/" f"initiate"
|
2388
2256
|
start = int(start_time.timestamp() * 1000) if start_time else None
|
2389
2257
|
body = {
|
2390
2258
|
"class": "InitiateGovernanceActionTypeRequestBody",
|
@@ -2409,7 +2277,6 @@ class AutomatedCuration(Client):
|
|
2409
2277
|
request_parameters: dict = None,
|
2410
2278
|
orig_service_name: str = None,
|
2411
2279
|
orig_engine_name: str = None,
|
2412
|
-
server: str = None,
|
2413
2280
|
) -> str:
|
2414
2281
|
"""Using the named governance action type as a template, initiate an engine action.
|
2415
2282
|
|
@@ -2429,8 +2296,6 @@ class AutomatedCuration(Client):
|
|
2429
2296
|
- unique name of the requesting governance service (if initiated by a governance engine)
|
2430
2297
|
orig_engine_name: str
|
2431
2298
|
- optional unique name of the governance engine (if initiated by a governance engine).
|
2432
|
-
server : str, optional
|
2433
|
-
- The name of the server. If None, will use the default server specified in the instance will be used.
|
2434
2299
|
|
2435
2300
|
Returns
|
2436
2301
|
-------
|
@@ -2452,7 +2317,6 @@ class AutomatedCuration(Client):
|
|
2452
2317
|
request_parameters,
|
2453
2318
|
orig_service_name,
|
2454
2319
|
orig_engine_name,
|
2455
|
-
server,
|
2456
2320
|
)
|
2457
2321
|
)
|
2458
2322
|
return response
|
@@ -2462,14 +2326,11 @@ class AutomatedCuration(Client):
|
|
2462
2326
|
#
|
2463
2327
|
|
2464
2328
|
async def _async_initiate_postgres_database_survey(
|
2465
|
-
self, postgres_database_guid: str
|
2329
|
+
self, postgres_database_guid: str
|
2466
2330
|
) -> str:
|
2467
2331
|
"""Initiate a postgres database survey"""
|
2468
|
-
|
2469
|
-
url =
|
2470
|
-
f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
|
2471
|
-
f"initiate"
|
2472
|
-
)
|
2332
|
+
|
2333
|
+
url = f"{self.cur_command_root}/governance-action-types/" f"initiate"
|
2473
2334
|
|
2474
2335
|
body = {
|
2475
2336
|
"class": "InitiateGovernanceActionTypeRequestBody",
|
@@ -2485,25 +2346,20 @@ class AutomatedCuration(Client):
|
|
2485
2346
|
response = await self._async_make_request("POST", url, body)
|
2486
2347
|
return response.json().get("guid", "Action not initiated")
|
2487
2348
|
|
2488
|
-
def initiate_postgres_database_survey(
|
2489
|
-
self, postgres_database_guid: str, server: str = None
|
2490
|
-
) -> str:
|
2349
|
+
def initiate_postgres_database_survey(self, postgres_database_guid: str) -> str:
|
2491
2350
|
"""Initiate a postgres database survey"""
|
2492
2351
|
loop = asyncio.get_event_loop()
|
2493
2352
|
response = loop.run_until_complete(
|
2494
|
-
self._async_initiate_postgres_server_survey(postgres_database_guid
|
2353
|
+
self._async_initiate_postgres_server_survey(postgres_database_guid)
|
2495
2354
|
)
|
2496
2355
|
return response
|
2497
2356
|
|
2498
2357
|
async def _async_initiate_postgres_server_survey(
|
2499
|
-
self, postgres_server_guid: str
|
2358
|
+
self, postgres_server_guid: str
|
2500
2359
|
) -> str:
|
2501
2360
|
"""Initiate a postgres server survey - Async version"""
|
2502
|
-
|
2503
|
-
url =
|
2504
|
-
f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
|
2505
|
-
f"initiate"
|
2506
|
-
)
|
2361
|
+
|
2362
|
+
url = f"{self.cur_command_root}/governance-action-types/" f"initiate"
|
2507
2363
|
|
2508
2364
|
body = {
|
2509
2365
|
"class": "InitiateGovernanceActionTypeRequestBody",
|
@@ -2519,13 +2375,11 @@ class AutomatedCuration(Client):
|
|
2519
2375
|
response = await self._async_make_request("POST", url, body)
|
2520
2376
|
return response.json().get("guid", "Action not initiated")
|
2521
2377
|
|
2522
|
-
def initiate_postgres_server_survey(
|
2523
|
-
self, postgres_server_guid: str, server: str = None
|
2524
|
-
) -> str:
|
2378
|
+
def initiate_postgres_server_survey(self, postgres_server_guid: str) -> str:
|
2525
2379
|
"""Initiate a postgres server survey"""
|
2526
2380
|
loop = asyncio.get_event_loop()
|
2527
2381
|
response = loop.run_until_complete(
|
2528
|
-
self._async_initiate_postgres_server_survey(postgres_server_guid
|
2382
|
+
self._async_initiate_postgres_server_survey(postgres_server_guid)
|
2529
2383
|
)
|
2530
2384
|
return response
|
2531
2385
|
|
@@ -2533,7 +2387,6 @@ class AutomatedCuration(Client):
|
|
2533
2387
|
self,
|
2534
2388
|
file_folder_guid: str,
|
2535
2389
|
survey_name: str = "AssetSurvey:survey-folder",
|
2536
|
-
server: str = None,
|
2537
2390
|
) -> str:
|
2538
2391
|
"""Initiate a file folder survey - async version
|
2539
2392
|
|
@@ -2543,8 +2396,7 @@ class AutomatedCuration(Client):
|
|
2543
2396
|
The GUID of the File Folder that we wish to survey.
|
2544
2397
|
survey_name: str, optional
|
2545
2398
|
The unique name of the survey routine to execute. Default surveys all folders.
|
2546
|
-
|
2547
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
2399
|
+
|
2548
2400
|
Returns:
|
2549
2401
|
-------
|
2550
2402
|
str:
|
@@ -2567,11 +2419,8 @@ class AutomatedCuration(Client):
|
|
2567
2419
|
- AssetSurvey:survey-all-folders
|
2568
2420
|
- AssetSurvey:survey-all-folders-and-files
|
2569
2421
|
"""
|
2570
|
-
|
2571
|
-
url =
|
2572
|
-
f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
|
2573
|
-
f"initiate"
|
2574
|
-
)
|
2422
|
+
|
2423
|
+
url = f"{self.cur_command_root}/governance-action-types/" f"initiate"
|
2575
2424
|
|
2576
2425
|
body = {
|
2577
2426
|
"class": "InitiateGovernanceActionTypeRequestBody",
|
@@ -2591,7 +2440,6 @@ class AutomatedCuration(Client):
|
|
2591
2440
|
self,
|
2592
2441
|
file_folder_guid: str,
|
2593
2442
|
survey_name: str = "AssetSurvey:survey-folder",
|
2594
|
-
server: str = None,
|
2595
2443
|
) -> str:
|
2596
2444
|
"""Initiate a file folder survey - async version
|
2597
2445
|
|
@@ -2601,8 +2449,7 @@ class AutomatedCuration(Client):
|
|
2601
2449
|
The GUID of the File Folder that we wish to survey.
|
2602
2450
|
survey_name: str, optional
|
2603
2451
|
The unique name of the survey routine to execute. Default surveys all folders.
|
2604
|
-
|
2605
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
2452
|
+
|
2606
2453
|
Returns:
|
2607
2454
|
-------
|
2608
2455
|
str:
|
@@ -2629,21 +2476,14 @@ class AutomatedCuration(Client):
|
|
2629
2476
|
"""
|
2630
2477
|
loop = asyncio.get_event_loop()
|
2631
2478
|
response = loop.run_until_complete(
|
2632
|
-
self._async_initiate_file_folder_survey(
|
2633
|
-
file_folder_guid, survey_name, server
|
2634
|
-
)
|
2479
|
+
self._async_initiate_file_folder_survey(file_folder_guid, survey_name)
|
2635
2480
|
)
|
2636
2481
|
return response
|
2637
2482
|
|
2638
|
-
async def _async_initiate_file_survey(
|
2639
|
-
self, file_guid: str, server: str = None
|
2640
|
-
) -> str:
|
2483
|
+
async def _async_initiate_file_survey(self, file_guid: str) -> str:
|
2641
2484
|
"""Initiate a file survey - async version"""
|
2642
|
-
|
2643
|
-
url =
|
2644
|
-
f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
|
2645
|
-
f"initiate"
|
2646
|
-
)
|
2485
|
+
|
2486
|
+
url = f"{self.cur_command_root}/governance-action-types/" f"initiate"
|
2647
2487
|
|
2648
2488
|
body = {
|
2649
2489
|
"class": "InitiateGovernanceActionTypeRequestBody",
|
@@ -2659,37 +2499,27 @@ class AutomatedCuration(Client):
|
|
2659
2499
|
response = await self._async_make_request("POST", url, body)
|
2660
2500
|
return response.json().get("guid", "Action not initiated")
|
2661
2501
|
|
2662
|
-
def initiate_file_survey(self, file_guid: str
|
2502
|
+
def initiate_file_survey(self, file_guid: str) -> str:
|
2663
2503
|
"""Initiate a file survey"""
|
2664
2504
|
loop = asyncio.get_event_loop()
|
2665
|
-
response = loop.run_until_complete(
|
2666
|
-
self._async_initiate_file_survey(file_guid, server)
|
2667
|
-
)
|
2505
|
+
response = loop.run_until_complete(self._async_initiate_file_survey(file_guid))
|
2668
2506
|
return response
|
2669
2507
|
|
2670
|
-
async def _async_initiate_kafka_server_survey(
|
2671
|
-
self, kafka_server_guid: str, server: str = None
|
2672
|
-
) -> str:
|
2508
|
+
async def _async_initiate_kafka_server_survey(self, kafka_server_guid: str) -> str:
|
2673
2509
|
"""Initiate survey of a kafka server. Async Version.
|
2674
2510
|
Parameters
|
2675
2511
|
----------
|
2676
2512
|
kafka_server_guid : str
|
2677
2513
|
The GUID of the Kafka server to be surveyed.
|
2678
2514
|
|
2679
|
-
server : str, optional
|
2680
|
-
The name of the server. If not provided, the default server name is used.
|
2681
|
-
|
2682
2515
|
Returns
|
2683
2516
|
-------
|
2684
2517
|
str
|
2685
2518
|
The GUID of the initiated action or "Action not initiated" if the action was not initiated.
|
2686
2519
|
|
2687
2520
|
"""
|
2688
|
-
|
2689
|
-
url =
|
2690
|
-
f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
|
2691
|
-
f"initiate"
|
2692
|
-
)
|
2521
|
+
|
2522
|
+
url = f"{self.cur_command_root}/governance-action-types/" f"initiate"
|
2693
2523
|
|
2694
2524
|
body = {
|
2695
2525
|
"class": "InitiateGovernanceActionTypeRequestBody",
|
@@ -2705,17 +2535,13 @@ class AutomatedCuration(Client):
|
|
2705
2535
|
response = await self._async_make_request("POST", url, body)
|
2706
2536
|
return response.json().get("guid", "Action not initiated")
|
2707
2537
|
|
2708
|
-
def initiate_kafka_server_survey(
|
2709
|
-
self, kafka_server_guid: str, server: str = None
|
2710
|
-
) -> str:
|
2538
|
+
def initiate_kafka_server_survey(self, kafka_server_guid: str) -> str:
|
2711
2539
|
"""Initiate survey of a kafka server.
|
2712
2540
|
Parameters
|
2713
2541
|
----------
|
2714
2542
|
kafka_server_guid : str
|
2715
2543
|
The GUID of the Kafka server to be surveyed.
|
2716
2544
|
|
2717
|
-
server : str, optional
|
2718
|
-
The name of the server. If not provided, the default server name is used.
|
2719
2545
|
|
2720
2546
|
Returns
|
2721
2547
|
-------
|
@@ -2725,21 +2551,17 @@ class AutomatedCuration(Client):
|
|
2725
2551
|
"""
|
2726
2552
|
loop = asyncio.get_event_loop()
|
2727
2553
|
response = loop.run_until_complete(
|
2728
|
-
self._async_initiate_kafka_server_survey(kafka_server_guid
|
2554
|
+
self._async_initiate_kafka_server_survey(kafka_server_guid)
|
2729
2555
|
)
|
2730
2556
|
return response
|
2731
2557
|
|
2732
|
-
async def _async_initiate_uc_server_survey(
|
2733
|
-
self, uc_server_guid: str, server: str = None
|
2734
|
-
) -> str:
|
2558
|
+
async def _async_initiate_uc_server_survey(self, uc_server_guid: str) -> str:
|
2735
2559
|
"""Initiate survey of a Unity Catalog server. Async Version.
|
2736
2560
|
Parameters
|
2737
2561
|
----------
|
2738
2562
|
uc_server_guid : str
|
2739
2563
|
The GUID of the Kafka server to be surveyed.
|
2740
2564
|
|
2741
|
-
server : str, optional
|
2742
|
-
The name of the server. If not provided, the default server name is used.
|
2743
2565
|
|
2744
2566
|
Returns
|
2745
2567
|
-------
|
@@ -2747,11 +2569,8 @@ class AutomatedCuration(Client):
|
|
2747
2569
|
The GUID of the initiated action or "Action not initiated" if the action was not initiated.
|
2748
2570
|
|
2749
2571
|
"""
|
2750
|
-
|
2751
|
-
url =
|
2752
|
-
f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
|
2753
|
-
f"initiate"
|
2754
|
-
)
|
2572
|
+
|
2573
|
+
url = f"{self.cur_command_root}/governance-action-types/" f"initiate"
|
2755
2574
|
|
2756
2575
|
body = {
|
2757
2576
|
"class": "InitiateGovernanceActionTypeRequestBody",
|
@@ -2767,15 +2586,13 @@ class AutomatedCuration(Client):
|
|
2767
2586
|
response = await self._async_make_request("POST", url, body)
|
2768
2587
|
return response.json().get("guid", "Action not initiated")
|
2769
2588
|
|
2770
|
-
def initiate_uc_server_survey(self, uc_server_guid: str
|
2589
|
+
def initiate_uc_server_survey(self, uc_server_guid: str) -> str:
|
2771
2590
|
"""Initiate survey of a Unity Catalog server. Async Version.
|
2772
2591
|
Parameters
|
2773
2592
|
----------
|
2774
2593
|
uc_server_guid : str
|
2775
2594
|
The GUID of the Kafka server to be surveyed.
|
2776
2595
|
|
2777
|
-
server : str, optional
|
2778
|
-
The name of the server. If not provided, the default server name is used.
|
2779
2596
|
|
2780
2597
|
Returns
|
2781
2598
|
-------
|
@@ -2785,33 +2602,25 @@ class AutomatedCuration(Client):
|
|
2785
2602
|
"""
|
2786
2603
|
loop = asyncio.get_event_loop()
|
2787
2604
|
response = loop.run_until_complete(
|
2788
|
-
self._async_initiate_uc_server_survey(uc_server_guid
|
2605
|
+
self._async_initiate_uc_server_survey(uc_server_guid)
|
2789
2606
|
)
|
2790
2607
|
return response
|
2791
2608
|
|
2792
|
-
async def _async_initiate_uc_schema_survey(
|
2793
|
-
self, uc_schema_guid: str, server: str = None
|
2794
|
-
) -> str:
|
2609
|
+
async def _async_initiate_uc_schema_survey(self, uc_schema_guid: str) -> str:
|
2795
2610
|
"""Initiate survey of a Unity Catalog schema. Async Version.
|
2796
2611
|
Parameters
|
2797
2612
|
----------
|
2798
2613
|
uc_schema_guid : str
|
2799
2614
|
The GUID of the Kafka server to be surveyed.
|
2800
2615
|
|
2801
|
-
server : str, optional
|
2802
|
-
The name of the server. If not provided, the default server name is used.
|
2803
|
-
|
2804
2616
|
Returns
|
2805
2617
|
-------
|
2806
2618
|
str
|
2807
2619
|
The GUID of the initiated action or "Action not initiated" if the action was not initiated.
|
2808
2620
|
|
2809
2621
|
"""
|
2810
|
-
|
2811
|
-
url =
|
2812
|
-
f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
|
2813
|
-
f"initiate"
|
2814
|
-
)
|
2622
|
+
|
2623
|
+
url = f"{self.cur_command_root}/governance-action-types/" f"initiate"
|
2815
2624
|
|
2816
2625
|
body = {
|
2817
2626
|
"class": "InitiateGovernanceActionTypeRequestBody",
|
@@ -2827,15 +2636,14 @@ class AutomatedCuration(Client):
|
|
2827
2636
|
response = await self._async_make_request("POST", url, body)
|
2828
2637
|
return response.json().get("guid", "Action not initiated")
|
2829
2638
|
|
2830
|
-
def initiate_uc_schema_survey(self, uc_schema_guid: str
|
2639
|
+
def initiate_uc_schema_survey(self, uc_schema_guid: str) -> str:
|
2831
2640
|
"""Initiate survey of a Unity Catalog schema. Async Version.
|
2832
2641
|
Parameters
|
2833
2642
|
----------
|
2834
2643
|
uc_schema_guid : str
|
2835
2644
|
The GUID of the Kafka server to be surveyed.
|
2836
2645
|
|
2837
|
-
|
2838
|
-
The name of the server. If not provided, the default server name is used.
|
2646
|
+
|
2839
2647
|
|
2840
2648
|
Returns
|
2841
2649
|
-------
|
@@ -2845,11 +2653,11 @@ class AutomatedCuration(Client):
|
|
2845
2653
|
"""
|
2846
2654
|
loop = asyncio.get_event_loop()
|
2847
2655
|
response = loop.run_until_complete(
|
2848
|
-
self._async_initiate_uc_schema_survey(uc_schema_guid
|
2656
|
+
self._async_initiate_uc_schema_survey(uc_schema_guid)
|
2849
2657
|
)
|
2850
2658
|
return response
|
2851
2659
|
|
2852
|
-
# async def _async_initiate_uc_function_survey(self, uc_server_guid: str
|
2660
|
+
# async def _async_initiate_uc_function_survey(self, uc_server_guid: str) -> str:
|
2853
2661
|
# """ Initiate survey of a Unity Catalog server. Async Version.
|
2854
2662
|
# Parameters
|
2855
2663
|
# ----------
|
@@ -2866,7 +2674,7 @@ class AutomatedCuration(Client):
|
|
2866
2674
|
#
|
2867
2675
|
# """
|
2868
2676
|
# server = self.view_server if server is None else server
|
2869
|
-
# url = (f"{self.
|
2677
|
+
# url = (f"{self.cur_command_root}/governance-action-types/"
|
2870
2678
|
# f"initiate")
|
2871
2679
|
#
|
2872
2680
|
# body = {"class": "InitiateGovernanceActionTypeRequestBody",
|
@@ -2875,7 +2683,7 @@ class AutomatedCuration(Client):
|
|
2875
2683
|
# response = await self._async_make_request("POST", url, body)
|
2876
2684
|
# return response.json().get("guid", "Action not initiated")
|
2877
2685
|
#
|
2878
|
-
# def initiate_uc_function_survey(self, uc_server_guid: str
|
2686
|
+
# def initiate_uc_function_survey(self, uc_server_guid: str) -> str:
|
2879
2687
|
# """ Initiate survey of a Unity Catalog server. Async Version.
|
2880
2688
|
# Parameters
|
2881
2689
|
# ----------
|
@@ -2892,10 +2700,10 @@ class AutomatedCuration(Client):
|
|
2892
2700
|
#
|
2893
2701
|
# """
|
2894
2702
|
# loop = asyncio.get_event_loop()
|
2895
|
-
# response = loop.run_until_complete(self._async_initiate_uc_server_survey(uc_server_guid
|
2703
|
+
# response = loop.run_until_complete(self._async_initiate_uc_server_survey(uc_server_guid))
|
2896
2704
|
# return response
|
2897
2705
|
#
|
2898
|
-
# async def _async_initiate_uc_server_survey(self, uc_server_guid: str
|
2706
|
+
# async def _async_initiate_uc_server_survey(self, uc_server_guid: str) -> str:
|
2899
2707
|
# """ Initiate survey of a Unity Catalog server. Async Version.
|
2900
2708
|
# Parameters
|
2901
2709
|
# ----------
|
@@ -2912,7 +2720,7 @@ class AutomatedCuration(Client):
|
|
2912
2720
|
#
|
2913
2721
|
# """
|
2914
2722
|
# server = self.view_server if server is None else server
|
2915
|
-
# url = (f"{self.
|
2723
|
+
# url = (f"{self.cur_command_root}/governance-action-types/"
|
2916
2724
|
# f"initiate")
|
2917
2725
|
#
|
2918
2726
|
# body = {"class": "InitiateGovernanceActionTypeRequestBody",
|
@@ -2921,7 +2729,7 @@ class AutomatedCuration(Client):
|
|
2921
2729
|
# response = await self._async_make_request("POST", url, body)
|
2922
2730
|
# return response.json().get("guid", "Action not initiated")
|
2923
2731
|
#
|
2924
|
-
# def initiate_uc_server_survey(self, uc_server_guid: str
|
2732
|
+
# def initiate_uc_server_survey(self, uc_server_guid: str) -> str:
|
2925
2733
|
# """ Initiate survey of a Unity Catalog server. Async Version.
|
2926
2734
|
# Parameters
|
2927
2735
|
# ----------
|
@@ -2938,10 +2746,10 @@ class AutomatedCuration(Client):
|
|
2938
2746
|
#
|
2939
2747
|
# """
|
2940
2748
|
# loop = asyncio.get_event_loop()
|
2941
|
-
# response = loop.run_until_complete(self._async_initiate_uc_server_survey(uc_server_guid
|
2749
|
+
# response = loop.run_until_complete(self._async_initiate_uc_server_survey(uc_server_guid))
|
2942
2750
|
# return response
|
2943
2751
|
#
|
2944
|
-
# async def _async_initiate_uc_server_survey(self, uc_server_guid: str
|
2752
|
+
# async def _async_initiate_uc_server_survey(self, uc_server_guid: str) -> str:
|
2945
2753
|
# """ Initiate survey of a Unity Catalog server. Async Version.
|
2946
2754
|
# Parameters
|
2947
2755
|
# ----------
|
@@ -2958,7 +2766,7 @@ class AutomatedCuration(Client):
|
|
2958
2766
|
#
|
2959
2767
|
# """
|
2960
2768
|
# server = self.view_server if server is None else server
|
2961
|
-
# url = (f"{self.
|
2769
|
+
# url = (f"{self.cur_command_root}/governance-action-types/"
|
2962
2770
|
# f"initiate")
|
2963
2771
|
#
|
2964
2772
|
# body = {"class": "InitiateGovernanceActionTypeRequestBody",
|
@@ -2967,7 +2775,7 @@ class AutomatedCuration(Client):
|
|
2967
2775
|
# response = await self._async_make_request("POST", url, body)
|
2968
2776
|
# return response.json().get("guid", "Action not initiated")
|
2969
2777
|
#
|
2970
|
-
# def initiate_uc_server_survey(self, uc_server_guid: str
|
2778
|
+
# def initiate_uc_server_survey(self, uc_server_guid: str) -> str:
|
2971
2779
|
# """ Initiate survey of a Unity Catalog server. Async Version.
|
2972
2780
|
# Parameters
|
2973
2781
|
# ----------
|
@@ -2984,7 +2792,7 @@ class AutomatedCuration(Client):
|
|
2984
2792
|
#
|
2985
2793
|
# """
|
2986
2794
|
# loop = asyncio.get_event_loop()
|
2987
|
-
# response = loop.run_until_complete(self._async_initiate_uc_server_survey(uc_server_guid
|
2795
|
+
# response = loop.run_until_complete(self._async_initiate_uc_server_survey(uc_server_guid))
|
2988
2796
|
# return response
|
2989
2797
|
|
2990
2798
|
#
|
@@ -3007,7 +2815,6 @@ class AutomatedCuration(Client):
|
|
3007
2815
|
request_src_name: str = None,
|
3008
2816
|
originator_svc_name: str = None,
|
3009
2817
|
originator_eng_name: str = None,
|
3010
|
-
server: str = None,
|
3011
2818
|
) -> str:
|
3012
2819
|
"""Create an engine action in the metadata store that will trigger the governance service associated with
|
3013
2820
|
the supplied request type. The engine action remains to act as a record of the actions taken for auditing.
|
@@ -3046,11 +2853,8 @@ class AutomatedCuration(Client):
|
|
3046
2853
|
|
3047
2854
|
|
3048
2855
|
"""
|
3049
|
-
|
3050
|
-
url =
|
3051
|
-
f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-engines/"
|
3052
|
-
f"engine-actions/initiate"
|
3053
|
-
)
|
2856
|
+
|
2857
|
+
url = f"{self.cur_command_root}/governance-engines/" f"engine-actions/initiate"
|
3054
2858
|
body = {
|
3055
2859
|
"class": "GovernanceActionRequestBody",
|
3056
2860
|
"qualifiedName": qualified_name + str(int(start_time.timestamp())),
|
@@ -3088,7 +2892,6 @@ class AutomatedCuration(Client):
|
|
3088
2892
|
request_src_name: str = None,
|
3089
2893
|
originator_svc_name: str = None,
|
3090
2894
|
originator_eng_name: str = None,
|
3091
|
-
server: str = None,
|
3092
2895
|
) -> str:
|
3093
2896
|
"""Create an engine action in the metadata store that will trigger the governance service associated with
|
3094
2897
|
the supplied request type. The engine action remains to act as a record of the actions taken for auditing.
|
@@ -3142,7 +2945,6 @@ class AutomatedCuration(Client):
|
|
3142
2945
|
request_src_name,
|
3143
2946
|
originator_svc_name,
|
3144
2947
|
originator_eng_name,
|
3145
|
-
server,
|
3146
2948
|
)
|
3147
2949
|
)
|
3148
2950
|
return response
|
@@ -3150,7 +2952,6 @@ class AutomatedCuration(Client):
|
|
3150
2952
|
async def _async_get_catalog_targets(
|
3151
2953
|
self,
|
3152
2954
|
integ_connector_guid: str,
|
3153
|
-
server: str = None,
|
3154
2955
|
start_from: int = 0,
|
3155
2956
|
page_size: int = max_paging_size,
|
3156
2957
|
) -> list | str:
|
@@ -3161,8 +2962,6 @@ class AutomatedCuration(Client):
|
|
3161
2962
|
----------
|
3162
2963
|
integ_connector_guid: str
|
3163
2964
|
The GUID (Globally Unique Identifier) of the integration connector used to retrieve catalog targets.
|
3164
|
-
server: str, optional
|
3165
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
3166
2965
|
Returns:
|
3167
2966
|
-------
|
3168
2967
|
[dict]: The list of catalog targets JSON objects.
|
@@ -3174,11 +2973,11 @@ class AutomatedCuration(Client):
|
|
3174
2973
|
PropertyServerException: If the API response indicates a server side error.
|
3175
2974
|
UserNotAuthorizedException:
|
3176
2975
|
"""
|
3177
|
-
|
2976
|
+
|
3178
2977
|
validate_guid(integ_connector_guid)
|
3179
2978
|
|
3180
2979
|
url = (
|
3181
|
-
f"{self.
|
2980
|
+
f"{self.cur_command_root}/integration-connectors/"
|
3182
2981
|
f"{integ_connector_guid}/catalog-targets?startFrom={start_from}&pageSize={page_size}"
|
3183
2982
|
)
|
3184
2983
|
|
@@ -3188,7 +2987,6 @@ class AutomatedCuration(Client):
|
|
3188
2987
|
def get_catalog_targets(
|
3189
2988
|
self,
|
3190
2989
|
integ_connector_guid: str,
|
3191
|
-
server: str = None,
|
3192
2990
|
start_from: int = 0,
|
3193
2991
|
page_size: int = max_paging_size,
|
3194
2992
|
) -> list | str:
|
@@ -3198,8 +2996,6 @@ class AutomatedCuration(Client):
|
|
3198
2996
|
----------
|
3199
2997
|
integ_connector_guid: str
|
3200
2998
|
The GUID (Globally Unique Identifier) of the integration connector used to retrieve catalog targets.
|
3201
|
-
server: str, optional
|
3202
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
3203
2999
|
Returns:
|
3204
3000
|
-------
|
3205
3001
|
[dict]: The list of catalog targets JSON objects.
|
@@ -3214,15 +3010,11 @@ class AutomatedCuration(Client):
|
|
3214
3010
|
|
3215
3011
|
loop = asyncio.get_event_loop()
|
3216
3012
|
response = loop.run_until_complete(
|
3217
|
-
self._async_get_catalog_targets(
|
3218
|
-
integ_connector_guid, server, start_from, page_size
|
3219
|
-
)
|
3013
|
+
self._async_get_catalog_targets(integ_connector_guid, start_from, page_size)
|
3220
3014
|
)
|
3221
3015
|
return response
|
3222
3016
|
|
3223
|
-
async def _async_get_catalog_target(
|
3224
|
-
self, relationship_guid: str, server: str = None
|
3225
|
-
) -> dict | str:
|
3017
|
+
async def _async_get_catalog_target(self, relationship_guid: str) -> dict | str:
|
3226
3018
|
"""Retrieve a specific catalog target associated with an integration connector. Further Information:
|
3227
3019
|
https://egeria-project.org/concepts/integration-connector/ . Async version.
|
3228
3020
|
|
@@ -3230,8 +3022,7 @@ class AutomatedCuration(Client):
|
|
3230
3022
|
----------
|
3231
3023
|
relationship_guid: str
|
3232
3024
|
The GUID (Globally Unique Identifier) identifying the catalog targets for an integration connector.
|
3233
|
-
|
3234
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
3025
|
+
|
3235
3026
|
Returns:
|
3236
3027
|
-------
|
3237
3028
|
dict: JSON structure of the catalog target.
|
@@ -3243,20 +3034,15 @@ class AutomatedCuration(Client):
|
|
3243
3034
|
PropertyServerException: If the API response indicates a server side error.
|
3244
3035
|
UserNotAuthorizedException:
|
3245
3036
|
"""
|
3246
|
-
|
3037
|
+
|
3247
3038
|
validate_guid(relationship_guid)
|
3248
3039
|
|
3249
|
-
url =
|
3250
|
-
f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/catalog-targets/"
|
3251
|
-
f"{relationship_guid}"
|
3252
|
-
)
|
3040
|
+
url = f"{self.cur_command_root}/catalog-targets/" f"{relationship_guid}"
|
3253
3041
|
|
3254
3042
|
response = await self._async_make_request("GET", url)
|
3255
3043
|
return response.json().get("element", "no actions")
|
3256
3044
|
|
3257
|
-
def get_catalog_target(
|
3258
|
-
self, relationship_guid: str, server: str = None
|
3259
|
-
) -> dict | str:
|
3045
|
+
def get_catalog_target(self, relationship_guid: str) -> dict | str:
|
3260
3046
|
"""Retrieve a specific catalog target associated with an integration connector. Further Information:
|
3261
3047
|
https://egeria-project.org/concepts/integration-connector/ .
|
3262
3048
|
|
@@ -3264,8 +3050,7 @@ class AutomatedCuration(Client):
|
|
3264
3050
|
----------
|
3265
3051
|
relationship_guid: str
|
3266
3052
|
The GUID (Globally Unique Identifier) identifying the catalog targets for an integration connector.
|
3267
|
-
|
3268
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
3053
|
+
|
3269
3054
|
Returns:
|
3270
3055
|
-------
|
3271
3056
|
dict: JSON structure of the catalog target.
|
@@ -3280,7 +3065,7 @@ class AutomatedCuration(Client):
|
|
3280
3065
|
|
3281
3066
|
loop = asyncio.get_event_loop()
|
3282
3067
|
response = loop.run_until_complete(
|
3283
|
-
self._async_get_catalog_target(relationship_guid
|
3068
|
+
self._async_get_catalog_target(relationship_guid)
|
3284
3069
|
)
|
3285
3070
|
return response
|
3286
3071
|
|
@@ -3295,7 +3080,6 @@ class AutomatedCuration(Client):
|
|
3295
3080
|
template_properties: dict = None,
|
3296
3081
|
permitted_sync: str = "BOTH_DIRECTIONS",
|
3297
3082
|
delete_method: str = "ARCHIVE",
|
3298
|
-
server: str = None,
|
3299
3083
|
) -> str:
|
3300
3084
|
"""Add a catalog target to an integration connector and .
|
3301
3085
|
Async version.
|
@@ -3320,10 +3104,7 @@ class AutomatedCuration(Client):
|
|
3320
3104
|
Direction the metadata is allowed to flow (BOTH_DIRECTIONS, FROM_THIRD_PARTH, TO_THIRD_PARTY
|
3321
3105
|
delete_method: str, default = ARCHIVE
|
3322
3106
|
Controls the type of delete. Use ARCHIVE for lineage considerations. Alternative is SOFT_DELETE.
|
3323
|
-
|
3324
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
3325
|
-
|
3326
|
-
Returns:
|
3107
|
+
Returns:
|
3327
3108
|
-------
|
3328
3109
|
Relationship GUID for the catalog target,
|
3329
3110
|
|
@@ -3334,12 +3115,12 @@ class AutomatedCuration(Client):
|
|
3334
3115
|
PropertyServerException: If the API response indicates a server side error.
|
3335
3116
|
UserNotAuthorizedException:
|
3336
3117
|
"""
|
3337
|
-
|
3118
|
+
|
3338
3119
|
validate_guid(integ_connector_guid)
|
3339
3120
|
validate_guid(metadata_element_guid)
|
3340
3121
|
|
3341
3122
|
url = (
|
3342
|
-
f"{self.
|
3123
|
+
f"{self.cur_command_root}/integration-connectors/"
|
3343
3124
|
f"{integ_connector_guid}/catalog-targets/{metadata_element_guid}"
|
3344
3125
|
)
|
3345
3126
|
body = {
|
@@ -3366,7 +3147,6 @@ class AutomatedCuration(Client):
|
|
3366
3147
|
template_properties: dict = None,
|
3367
3148
|
permitted_sync: str = "BOTH_DIRECTIONS",
|
3368
3149
|
delete_method: str = "ARCHIVE",
|
3369
|
-
server: str = None,
|
3370
3150
|
) -> str:
|
3371
3151
|
"""Add a catalog target to an integration connector and .
|
3372
3152
|
|
@@ -3390,10 +3170,7 @@ class AutomatedCuration(Client):
|
|
3390
3170
|
Direction the metadata is allowed to flow (BOTH_DIRECTIONS, FROM_THIRD_PARTH, TO_THIRD_PARTY
|
3391
3171
|
delete_method: str, default = ARCHIVE
|
3392
3172
|
Controls the type of delete. Use ARCHIVE for lineage considerations. Alternative is SOFT_DELETE.
|
3393
|
-
|
3394
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
3395
|
-
|
3396
|
-
Returns:
|
3173
|
+
Returns:
|
3397
3174
|
-------
|
3398
3175
|
Relationship GUID for the catalog target,
|
3399
3176
|
|
@@ -3416,7 +3193,6 @@ class AutomatedCuration(Client):
|
|
3416
3193
|
template_properties,
|
3417
3194
|
permitted_sync,
|
3418
3195
|
delete_method,
|
3419
|
-
server,
|
3420
3196
|
)
|
3421
3197
|
)
|
3422
3198
|
return response
|
@@ -3431,7 +3207,6 @@ class AutomatedCuration(Client):
|
|
3431
3207
|
template_properties: dict = None,
|
3432
3208
|
permitted_sync: str = "BOTH_DIRECTIONS",
|
3433
3209
|
delete_method: str = "ARCHIVE",
|
3434
|
-
server: str = None,
|
3435
3210
|
) -> None:
|
3436
3211
|
"""Update a catalog target to an integration connector.
|
3437
3212
|
Async version.
|
@@ -3454,9 +3229,6 @@ class AutomatedCuration(Client):
|
|
3454
3229
|
Direction the metadata is allowed to flow (BOTH_DIRECTIONS, FROM_THIRD_PARTH, TO_THIRD_PARTY
|
3455
3230
|
delete_method: str, default = ARCHIVE
|
3456
3231
|
Controls the type of delete. Use ARCHIVE for lineage considerations. Alternative is SOFT_DELETE.
|
3457
|
-
server: str, optional
|
3458
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
3459
|
-
|
3460
3232
|
Returns:
|
3461
3233
|
-------
|
3462
3234
|
None
|
@@ -3468,13 +3240,10 @@ class AutomatedCuration(Client):
|
|
3468
3240
|
PropertyServerException: If the API response indicates a server side error.
|
3469
3241
|
UserNotAuthorizedException:
|
3470
3242
|
"""
|
3471
|
-
|
3243
|
+
|
3472
3244
|
validate_guid(relationship_guid)
|
3473
3245
|
|
3474
|
-
url =
|
3475
|
-
f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/catalog-targets/"
|
3476
|
-
f"{relationship_guid}/update"
|
3477
|
-
)
|
3246
|
+
url = f"{self.cur_command_root}/catalog-targets/" f"{relationship_guid}/update"
|
3478
3247
|
body = {
|
3479
3248
|
"catalogTargetName": catalog_target_name,
|
3480
3249
|
"metadataSourceQualifiedName": metadata_src_qual_name,
|
@@ -3497,7 +3266,6 @@ class AutomatedCuration(Client):
|
|
3497
3266
|
template_properties: dict = None,
|
3498
3267
|
permitted_sync: str = "BOTH_DIRECTIONS",
|
3499
3268
|
delete_method: str = "ARCHIVE",
|
3500
|
-
server: str = None,
|
3501
3269
|
) -> None:
|
3502
3270
|
"""Update a catalog target to an integration connector.
|
3503
3271
|
|
@@ -3533,22 +3301,18 @@ class AutomatedCuration(Client):
|
|
3533
3301
|
template_properties,
|
3534
3302
|
permitted_sync,
|
3535
3303
|
delete_method,
|
3536
|
-
server,
|
3537
3304
|
)
|
3538
3305
|
)
|
3539
3306
|
return
|
3540
3307
|
|
3541
|
-
async def _async_remove_catalog_target(
|
3542
|
-
self, relationship_guid: str, server: str = None
|
3543
|
-
) -> None:
|
3308
|
+
async def _async_remove_catalog_target(self, relationship_guid: str) -> None:
|
3544
3309
|
"""Remove a catalog target to an integration connector. Async version.
|
3545
3310
|
|
3546
3311
|
Parameters:
|
3547
3312
|
----------
|
3548
3313
|
relationship_guid: str
|
3549
3314
|
The GUID (Globally Unique Identifier) identifying the catalog target relationship.
|
3550
|
-
|
3551
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
3315
|
+
|
3552
3316
|
Returns:
|
3553
3317
|
-------
|
3554
3318
|
None
|
@@ -3560,26 +3324,22 @@ class AutomatedCuration(Client):
|
|
3560
3324
|
PropertyServerException: If the API response indicates a server side error.
|
3561
3325
|
UserNotAuthorizedException:
|
3562
3326
|
"""
|
3563
|
-
|
3327
|
+
|
3564
3328
|
validate_guid(relationship_guid)
|
3565
3329
|
|
3566
|
-
url =
|
3567
|
-
f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/catalog-targets/"
|
3568
|
-
f"{relationship_guid}/remove"
|
3569
|
-
)
|
3330
|
+
url = f"{self.cur_command_root}/catalog-targets/" f"{relationship_guid}/remove"
|
3570
3331
|
|
3571
3332
|
await self._async_make_request("POST", url)
|
3572
3333
|
return
|
3573
3334
|
|
3574
|
-
def remove_catalog_target(self, relationship_guid: str
|
3335
|
+
def remove_catalog_target(self, relationship_guid: str) -> None:
|
3575
3336
|
"""Remove a catalog target to an integration connector.
|
3576
3337
|
|
3577
3338
|
Parameters:
|
3578
3339
|
----------
|
3579
3340
|
relationship_guid: str
|
3580
3341
|
The GUID (Globally Unique Identifier) identifying the catalog target relationship.
|
3581
|
-
|
3582
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
3342
|
+
|
3583
3343
|
Returns:
|
3584
3344
|
-------
|
3585
3345
|
None
|
@@ -3593,9 +3353,7 @@ class AutomatedCuration(Client):
|
|
3593
3353
|
"""
|
3594
3354
|
|
3595
3355
|
loop = asyncio.get_event_loop()
|
3596
|
-
loop.run_until_complete(
|
3597
|
-
self._async_remove_catalog_target(relationship_guid, server)
|
3598
|
-
)
|
3356
|
+
loop.run_until_complete(self._async_remove_catalog_target(relationship_guid))
|
3599
3357
|
return
|
3600
3358
|
|
3601
3359
|
#
|
@@ -3606,7 +3364,6 @@ class AutomatedCuration(Client):
|
|
3606
3364
|
self,
|
3607
3365
|
type_name: str,
|
3608
3366
|
tech_name: str,
|
3609
|
-
server: str = None,
|
3610
3367
|
start_from: int = 0,
|
3611
3368
|
page_size: int = max_paging_size,
|
3612
3369
|
) -> list | str:
|
@@ -3619,8 +3376,7 @@ class AutomatedCuration(Client):
|
|
3619
3376
|
The technology type we are looking for.
|
3620
3377
|
tech_name: str
|
3621
3378
|
The technology name we are looking for.
|
3622
|
-
|
3623
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
3379
|
+
|
3624
3380
|
Returns:
|
3625
3381
|
-------
|
3626
3382
|
[dict] | str: List of elements describing the technology - or "no tech found" if not found.
|
@@ -3636,10 +3392,10 @@ class AutomatedCuration(Client):
|
|
3636
3392
|
-----
|
3637
3393
|
More information can be found at: https://egeria-project.org/types
|
3638
3394
|
"""
|
3639
|
-
|
3395
|
+
|
3640
3396
|
# validate_name(type_name)
|
3641
3397
|
url = (
|
3642
|
-
f"{self.
|
3398
|
+
f"{self.cur_command_root}/open-metadata-types/"
|
3643
3399
|
f"{type_name}/technology-types?startFrom={start_from}&pageSize={page_size}"
|
3644
3400
|
)
|
3645
3401
|
body = {"filter": tech_name}
|
@@ -3651,7 +3407,6 @@ class AutomatedCuration(Client):
|
|
3651
3407
|
self,
|
3652
3408
|
type_name: str,
|
3653
3409
|
tech_name: str,
|
3654
|
-
server: str = None,
|
3655
3410
|
start_from: int = 0,
|
3656
3411
|
page_size: int = max_paging_size,
|
3657
3412
|
) -> list | str:
|
@@ -3664,8 +3419,7 @@ class AutomatedCuration(Client):
|
|
3664
3419
|
The technology type we are looking for.
|
3665
3420
|
tech_name: str
|
3666
3421
|
The technology name we are looking for.
|
3667
|
-
|
3668
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
3422
|
+
|
3669
3423
|
Returns:
|
3670
3424
|
-------
|
3671
3425
|
[dict] | str: List of elements describing the technology - or "no tech found" if not found.
|
@@ -3684,23 +3438,19 @@ class AutomatedCuration(Client):
|
|
3684
3438
|
loop = asyncio.get_event_loop()
|
3685
3439
|
response = loop.run_until_complete(
|
3686
3440
|
self._async_get_tech_types_for_open_metadata_type(
|
3687
|
-
type_name, tech_name,
|
3441
|
+
type_name, tech_name, start_from, page_size
|
3688
3442
|
)
|
3689
3443
|
)
|
3690
3444
|
return response
|
3691
3445
|
|
3692
|
-
async def _async_get_technology_type_detail(
|
3693
|
-
self, type_name: str, server: str = None
|
3694
|
-
) -> list | str:
|
3446
|
+
async def _async_get_technology_type_detail(self, type_name: str) -> list | str:
|
3695
3447
|
"""Retrieve the details of the named technology type. This name should be the name of the technology type
|
3696
3448
|
and contain no wild cards. Async version.
|
3697
3449
|
Parameters
|
3698
3450
|
----------
|
3699
3451
|
type_name : str
|
3700
3452
|
The name of the technology type to retrieve detailed information for.
|
3701
|
-
|
3702
|
-
The name of the server to fetch the technology type from. If not provided, the default server name will
|
3703
|
-
be used.
|
3453
|
+
|
3704
3454
|
|
3705
3455
|
Returns
|
3706
3456
|
-------
|
@@ -3718,27 +3468,22 @@ class AutomatedCuration(Client):
|
|
3718
3468
|
-----
|
3719
3469
|
More information can be found at: https://egeria-project.org/concepts/deployed-implementation-type
|
3720
3470
|
"""
|
3721
|
-
|
3471
|
+
|
3722
3472
|
# validate_name(type_name)
|
3723
|
-
url = f"{self.
|
3473
|
+
url = f"{self.cur_command_root}/technology-types/by-name"
|
3724
3474
|
|
3725
3475
|
body = {"filter": type_name}
|
3726
3476
|
|
3727
3477
|
response = await self._async_make_request("POST", url, body)
|
3728
3478
|
return response.json().get("element", "no type found")
|
3729
3479
|
|
3730
|
-
def get_technology_type_detail(
|
3731
|
-
self, type_name: str, server: str = None
|
3732
|
-
) -> list | str:
|
3480
|
+
def get_technology_type_detail(self, type_name: str) -> list | str:
|
3733
3481
|
"""Retrieve the details of the named technology type. This name should be the name of the technology type
|
3734
3482
|
and contain no wild cards.
|
3735
3483
|
Parameters
|
3736
3484
|
----------
|
3737
3485
|
type_name : str
|
3738
3486
|
The name of the technology type to retrieve detailed information for.
|
3739
|
-
server : str, optional
|
3740
|
-
The name of the server to fetch the technology type from. If not provided, the default server name will
|
3741
|
-
be used.
|
3742
3487
|
|
3743
3488
|
Returns
|
3744
3489
|
-------
|
@@ -3759,14 +3504,13 @@ class AutomatedCuration(Client):
|
|
3759
3504
|
|
3760
3505
|
loop = asyncio.get_event_loop()
|
3761
3506
|
response = loop.run_until_complete(
|
3762
|
-
self._async_get_technology_type_detail(type_name
|
3507
|
+
self._async_get_technology_type_detail(type_name)
|
3763
3508
|
)
|
3764
3509
|
return response
|
3765
3510
|
|
3766
3511
|
async def _async_find_technology_types(
|
3767
3512
|
self,
|
3768
3513
|
search_string: str = "*",
|
3769
|
-
server: str = None,
|
3770
3514
|
start_from: int = 0,
|
3771
3515
|
page_size: int = max_paging_size,
|
3772
3516
|
starts_with: bool = False,
|
@@ -3779,9 +3523,6 @@ class AutomatedCuration(Client):
|
|
3779
3523
|
----------
|
3780
3524
|
type_name: str
|
3781
3525
|
The technology type we are looking for.
|
3782
|
-
server: str, optional
|
3783
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
3784
|
-
|
3785
3526
|
starts_with : bool, optional
|
3786
3527
|
Whether to search engine actions that start with the given search string. Default is False.
|
3787
3528
|
|
@@ -3811,7 +3552,6 @@ class AutomatedCuration(Client):
|
|
3811
3552
|
-----
|
3812
3553
|
For more information see: https://egeria-project.org/concepts/deployed-implementation-type
|
3813
3554
|
"""
|
3814
|
-
server = self.server_name if server is None else server
|
3815
3555
|
|
3816
3556
|
starts_with_s = str(starts_with).lower()
|
3817
3557
|
ends_with_s = str(ends_with).lower()
|
@@ -3821,7 +3561,7 @@ class AutomatedCuration(Client):
|
|
3821
3561
|
search_string = ""
|
3822
3562
|
|
3823
3563
|
url = (
|
3824
|
-
f"{self.
|
3564
|
+
f"{self.cur_command_root}/technology-types/"
|
3825
3565
|
f"by-search-string?startFrom={start_from}&pageSize={page_size}&startsWith={starts_with_s}&"
|
3826
3566
|
f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}"
|
3827
3567
|
)
|
@@ -3833,7 +3573,6 @@ class AutomatedCuration(Client):
|
|
3833
3573
|
def find_technology_types(
|
3834
3574
|
self,
|
3835
3575
|
search_string: str = "*",
|
3836
|
-
server: str = None,
|
3837
3576
|
start_from: int = 0,
|
3838
3577
|
page_size: int = max_paging_size,
|
3839
3578
|
starts_with: bool = False,
|
@@ -3846,8 +3585,7 @@ class AutomatedCuration(Client):
|
|
3846
3585
|
----------
|
3847
3586
|
type_name: str
|
3848
3587
|
The technology type we are looking for.
|
3849
|
-
|
3850
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
3588
|
+
|
3851
3589
|
Returns:
|
3852
3590
|
-------
|
3853
3591
|
[dict] | str: List of elements describing the technology - or "no tech found" if not found.
|
@@ -3868,7 +3606,6 @@ class AutomatedCuration(Client):
|
|
3868
3606
|
response = loop.run_until_complete(
|
3869
3607
|
self._async_find_technology_types(
|
3870
3608
|
search_string,
|
3871
|
-
server,
|
3872
3609
|
start_from,
|
3873
3610
|
page_size,
|
3874
3611
|
starts_with,
|
@@ -3879,18 +3616,16 @@ class AutomatedCuration(Client):
|
|
3879
3616
|
return response
|
3880
3617
|
|
3881
3618
|
async def _async_get_all_technology_types(
|
3882
|
-
self,
|
3619
|
+
self, start_from: int = 0, page_size: int = max_paging_size
|
3883
3620
|
) -> list | str:
|
3884
3621
|
"""Get all technology types - async version"""
|
3885
|
-
return await self._async_find_technology_types(
|
3886
|
-
"*", server, start_from, page_size
|
3887
|
-
)
|
3622
|
+
return await self._async_find_technology_types("*", start_from, page_size)
|
3888
3623
|
|
3889
3624
|
def get_all_technology_types(
|
3890
|
-
self,
|
3625
|
+
self, start_from: int = 0, page_size: int = max_paging_size
|
3891
3626
|
) -> list | str:
|
3892
3627
|
"""Get all technology types"""
|
3893
|
-
return self.find_technology_types("*",
|
3628
|
+
return self.find_technology_types("*", start_from, page_size)
|
3894
3629
|
|
3895
3630
|
def print_engine_action_summary(self, governance_action: dict):
|
3896
3631
|
"""print_governance_action_summary
|
@@ -3965,7 +3700,6 @@ class AutomatedCuration(Client):
|
|
3965
3700
|
self,
|
3966
3701
|
filter: str,
|
3967
3702
|
effective_time: str = None,
|
3968
|
-
server: str = None,
|
3969
3703
|
start_from: int = 0,
|
3970
3704
|
page_size: int = max_paging_size,
|
3971
3705
|
get_templates: bool = False,
|
@@ -3977,10 +3711,7 @@ class AutomatedCuration(Client):
|
|
3977
3711
|
----------
|
3978
3712
|
filter: str
|
3979
3713
|
The name of the deployed technology implementation type to retrieve elements for.
|
3980
|
-
|
3981
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
3982
|
-
|
3983
|
-
effective_time: datetime, [default=None], optional
|
3714
|
+
effective_time: datetime, [default=None], optional
|
3984
3715
|
Effective time of the query. If not specified will default to any effective time. Time format is
|
3985
3716
|
"YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
3986
3717
|
|
@@ -4005,13 +3736,12 @@ class AutomatedCuration(Client):
|
|
4005
3736
|
-----
|
4006
3737
|
For more information see: https://egeria-project.org/concepts/deployed-implementation-type
|
4007
3738
|
"""
|
4008
|
-
server = self.server_name if server is None else server
|
4009
3739
|
|
4010
3740
|
get_templates_s = str(get_templates).lower()
|
4011
3741
|
validate_name(filter)
|
4012
3742
|
|
4013
3743
|
url = (
|
4014
|
-
f"{self.
|
3744
|
+
f"{self.cur_command_root}/technology-types/elements?"
|
4015
3745
|
f"startFrom={start_from}&pageSize={page_size}&getTemplates={get_templates_s}"
|
4016
3746
|
)
|
4017
3747
|
body = {"filter": filter, "effective_time": effective_time}
|
@@ -4023,7 +3753,6 @@ class AutomatedCuration(Client):
|
|
4023
3753
|
self,
|
4024
3754
|
filter: str,
|
4025
3755
|
effective_time: str = None,
|
4026
|
-
server: str = None,
|
4027
3756
|
start_from: int = 0,
|
4028
3757
|
page_size: int = max_paging_size,
|
4029
3758
|
get_templates: bool = False,
|
@@ -4035,10 +3764,7 @@ class AutomatedCuration(Client):
|
|
4035
3764
|
----------
|
4036
3765
|
filter: str
|
4037
3766
|
The name of the deployed technology implementation type to retrieve elements for.
|
4038
|
-
|
4039
|
-
The name of the server. If None, will use the default server specified in the instance will be used.
|
4040
|
-
|
4041
|
-
effective_time: datetime, [default=None], optional
|
3767
|
+
effective_time: datetime, [default=None], optional
|
4042
3768
|
Effective time of the query. If not specified will default to any effective time. Time format is
|
4043
3769
|
"YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
4044
3770
|
|
@@ -4067,7 +3793,7 @@ class AutomatedCuration(Client):
|
|
4067
3793
|
loop = asyncio.get_event_loop()
|
4068
3794
|
response = loop.run_until_complete(
|
4069
3795
|
self._async_get_technology_type_elements(
|
4070
|
-
filter, effective_time,
|
3796
|
+
filter, effective_time, start_from, page_size, get_templates
|
4071
3797
|
)
|
4072
3798
|
)
|
4073
3799
|
return response
|