pyegeria 0.6.8__py3-none-any.whl → 0.7.0__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.
- pyegeria/classification_manager_omvs.py +1638 -199
- {pyegeria-0.6.8.dist-info → pyegeria-0.7.0.dist-info}/METADATA +1 -1
- {pyegeria-0.6.8.dist-info → pyegeria-0.7.0.dist-info}/RECORD +6 -6
- {pyegeria-0.6.8.dist-info → pyegeria-0.7.0.dist-info}/LICENSE +0 -0
- {pyegeria-0.6.8.dist-info → pyegeria-0.7.0.dist-info}/WHEEL +0 -0
- {pyegeria-0.6.8.dist-info → pyegeria-0.7.0.dist-info}/entry_points.txt +0 -0
@@ -17,11 +17,6 @@ from pyegeria._client import Client, max_paging_size
|
|
17
17
|
from pyegeria._globals import enable_ssl_check, default_time_out
|
18
18
|
|
19
19
|
|
20
|
-
def jprint(info, comment=None):
|
21
|
-
if comment:
|
22
|
-
print(comment)
|
23
|
-
print(json.dumps(info, indent=2))
|
24
|
-
|
25
20
|
|
26
21
|
def query_seperator(current_string):
|
27
22
|
if current_string == "":
|
@@ -113,19 +108,19 @@ class ClassificationManager(Client):
|
|
113
108
|
"""
|
114
109
|
|
115
110
|
def __init__(self, server_name: str, platform_url: str, token: str = None, user_id: str = None,
|
116
|
-
|
111
|
+
user_pwd: str = None, verify_flag: bool = enable_ssl_check, sync_mode: bool = True, ):
|
117
112
|
self.admin_command_root: str
|
118
113
|
Client.__init__(self, server_name, platform_url, user_id=user_id, user_pwd=user_pwd, token=token,
|
119
|
-
|
114
|
+
async_mode=sync_mode, )
|
120
115
|
|
121
116
|
#
|
122
117
|
# Get elements
|
123
118
|
#
|
124
119
|
|
125
|
-
|
126
120
|
async def _async_get_elements(self, open_metadata_type_name: str = None, effective_time: str = None,
|
127
|
-
|
128
|
-
|
121
|
+
for_lineage: bool = None, for_duplicate_processing: bool = None, start_from: int = 0,
|
122
|
+
page_size: int = max_paging_size, server_name: str = None,
|
123
|
+
time_out: int = default_time_out) -> list | str:
|
129
124
|
"""
|
130
125
|
Retrieve elements of the requested type name. If no type name is specified, then any type of element may
|
131
126
|
be returned.
|
@@ -170,10 +165,10 @@ class ClassificationManager(Client):
|
|
170
165
|
|
171
166
|
possible_query_params = query_string(
|
172
167
|
[("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
|
173
|
-
|
168
|
+
("forDuplicateProcessing", for_duplicate_processing)])
|
174
169
|
|
175
170
|
body = {"class": "FindProperties", "openMetadataTypeName": open_metadata_type_name,
|
176
|
-
|
171
|
+
"effectiveTime": effective_time, }
|
177
172
|
|
178
173
|
url = f"{base_path(self, server_name)}/elements/by-type{possible_query_params}"
|
179
174
|
response: Response = await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
@@ -184,8 +179,8 @@ class ClassificationManager(Client):
|
|
184
179
|
return elements
|
185
180
|
|
186
181
|
def get_elements(self, open_metadata_type_name: str = None, effective_time: str = None, for_lineage: bool = None,
|
187
|
-
|
188
|
-
|
182
|
+
for_duplicate_processing: bool = None, start_from: int = 0, page_size: int = max_paging_size,
|
183
|
+
server_name: str = None, time_out: int = default_time_out) -> list | str:
|
189
184
|
"""
|
190
185
|
Retrieve elements of the requested type name. If no type name is specified, then any type of element may
|
191
186
|
be returned.
|
@@ -229,13 +224,15 @@ class ClassificationManager(Client):
|
|
229
224
|
loop = asyncio.get_event_loop()
|
230
225
|
response = loop.run_until_complete(
|
231
226
|
self._async_get_elements(open_metadata_type_name, effective_time, for_lineage, for_duplicate_processing,
|
232
|
-
|
227
|
+
start_from, page_size, server_name, time_out))
|
233
228
|
return response
|
234
229
|
|
235
230
|
async def _async_get_elements_by_property_value(self, property_value: str, property_names: [str],
|
236
|
-
|
237
|
-
|
238
|
-
|
231
|
+
open_metadata_type_name: str = None, effective_time: str = None,
|
232
|
+
for_lineage: bool = None, for_duplicate_processing: bool = None,
|
233
|
+
start_from: int = 0, page_size: int = max_paging_size,
|
234
|
+
server_name: str = None,
|
235
|
+
time_out: int = default_time_out) -> list | str:
|
239
236
|
"""
|
240
237
|
Retrieve elements by a value found in one of the properties specified. The value must match exactly.
|
241
238
|
An open metadata type name may be supplied to restrict the results. Async version.
|
@@ -284,10 +281,10 @@ class ClassificationManager(Client):
|
|
284
281
|
|
285
282
|
possible_query_params = query_string(
|
286
283
|
[("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
|
287
|
-
|
284
|
+
("forDuplicateProcessing", for_duplicate_processing)])
|
288
285
|
|
289
286
|
body = {"class": "FindPropertyNamesProperties", "openMetadataTypeName": open_metadata_type_name,
|
290
|
-
|
287
|
+
"propertyValue": property_value, "propertyNames": property_names, "effectiveTime": effective_time, }
|
291
288
|
|
292
289
|
url = f"{base_path(self, server_name)}/elements/by-exact-property-value{possible_query_params}"
|
293
290
|
|
@@ -300,9 +297,10 @@ class ClassificationManager(Client):
|
|
300
297
|
return elements
|
301
298
|
|
302
299
|
def get_elements_by_property_value(self, property_value: str, property_names: [str],
|
303
|
-
|
304
|
-
|
305
|
-
|
300
|
+
open_metadata_type_name: str = None, effective_time: str = None,
|
301
|
+
for_lineage: bool = None, for_duplicate_processing: bool = None,
|
302
|
+
start_from: int = 0, page_size: int = max_paging_size, server_name: str = None,
|
303
|
+
time_out: int = default_time_out) -> list | str:
|
306
304
|
"""
|
307
305
|
Retrieve elements by a value found in one of the properties specified. The value must match exactly.
|
308
306
|
An open metadata type name may be supplied to restrict the results.
|
@@ -350,13 +348,16 @@ class ClassificationManager(Client):
|
|
350
348
|
loop = asyncio.get_event_loop()
|
351
349
|
response = loop.run_until_complete(
|
352
350
|
self._async_get_elements_by_property_value(property_value, property_names, open_metadata_type_name,
|
353
|
-
|
351
|
+
effective_time, for_lineage, for_duplicate_processing,
|
352
|
+
start_from, page_size, server_name, time_out))
|
354
353
|
return response
|
355
354
|
|
356
355
|
async def _async_find_elements_by_property_value(self, property_value: str, property_names: [str],
|
357
|
-
|
358
|
-
|
359
|
-
|
356
|
+
open_metadata_type_name: str = None, effective_time: str = None,
|
357
|
+
for_lineage: bool = None, for_duplicate_processing: bool = None,
|
358
|
+
start_from: int = 0, page_size: int = max_paging_size,
|
359
|
+
server_name: str = None,
|
360
|
+
time_out: int = default_time_out) -> list | str:
|
360
361
|
"""
|
361
362
|
Retrieve elements by a value found in one of the properties specified. The value must be contained in the
|
362
363
|
properties rather than needing to be an exact match. An open metadata type name may be supplied to restrict
|
@@ -406,10 +407,10 @@ class ClassificationManager(Client):
|
|
406
407
|
|
407
408
|
possible_query_params = query_string(
|
408
409
|
[("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
|
409
|
-
|
410
|
+
("forDuplicateProcessing", for_duplicate_processing)])
|
410
411
|
|
411
412
|
body = {"class": "FindPropertyNamesProperties", "openMetadataTypeName": open_metadata_type_name,
|
412
|
-
|
413
|
+
"propertyValue": property_value, "propertyNames": property_names, "effectiveTime": effective_time, }
|
413
414
|
|
414
415
|
url = f"{base_path(self, server_name)}/elements/by-property-value-search{possible_query_params}"
|
415
416
|
response: Response = await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
@@ -420,9 +421,10 @@ class ClassificationManager(Client):
|
|
420
421
|
return elements
|
421
422
|
|
422
423
|
def find_elements_by_property_value(self, property_value: str, property_names: [str],
|
423
|
-
|
424
|
-
|
425
|
-
|
424
|
+
open_metadata_type_name: str = None, effective_time: str = None,
|
425
|
+
for_lineage: bool = None, for_duplicate_processing: bool = None,
|
426
|
+
start_from: int = 0, page_size: int = max_paging_size, server_name: str = None,
|
427
|
+
time_out: int = default_time_out) -> list | str:
|
426
428
|
"""
|
427
429
|
Retrieve elements by a value found in one of the properties specified. The value must be contained in the
|
428
430
|
properties rather than needing to be an exact match. An open metadata type name may be supplied to restrict
|
@@ -471,16 +473,18 @@ class ClassificationManager(Client):
|
|
471
473
|
loop = asyncio.get_event_loop()
|
472
474
|
response = loop.run_until_complete(
|
473
475
|
self._async_find_elements_by_property_value(property_value, property_names, open_metadata_type_name,
|
474
|
-
|
476
|
+
effective_time, for_lineage, for_duplicate_processing,
|
477
|
+
start_from, page_size, server_name, time_out))
|
475
478
|
return response
|
476
479
|
|
477
480
|
#
|
478
481
|
# Elements by classification
|
479
482
|
#
|
480
483
|
async def _async_get_elements_by_classification(self, classification_name: str, open_metadata_type_name: str = None,
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
+
effective_time: str = None, for_lineage: bool = None,
|
485
|
+
for_duplicate_processing: bool = None, start_from: int = 0,
|
486
|
+
page_size: int = max_paging_size, server_name: str = None,
|
487
|
+
time_out: int = default_time_out) -> list | str:
|
484
488
|
"""
|
485
489
|
Retrieve elements with the requested classification name. It is also possible to limit the results
|
486
490
|
by specifying a type name for the elements that should be returned. If no type name is specified then
|
@@ -528,10 +532,10 @@ class ClassificationManager(Client):
|
|
528
532
|
|
529
533
|
possible_query_params = query_string(
|
530
534
|
[("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
|
531
|
-
|
535
|
+
("forDuplicateProcessing", for_duplicate_processing)])
|
532
536
|
|
533
537
|
body = {"class": "FindProperties", "openMetadataTypeName": open_metadata_type_name,
|
534
|
-
|
538
|
+
"effectiveTime": effective_time, }
|
535
539
|
|
536
540
|
url = (f"{base_path(self, server_name)}/elements/by-classification/{classification_name}"
|
537
541
|
f"{possible_query_params}")
|
@@ -543,9 +547,10 @@ class ClassificationManager(Client):
|
|
543
547
|
return elements
|
544
548
|
|
545
549
|
def get_elements_by_classification(self, classification_name: str, open_metadata_type_name: str = None,
|
546
|
-
|
547
|
-
|
548
|
-
|
550
|
+
effective_time: str = None, for_lineage: bool = None,
|
551
|
+
for_duplicate_processing: bool = None, start_from: int = 0,
|
552
|
+
page_size: int = max_paging_size, server_name: str = None,
|
553
|
+
time_out: int = default_time_out) -> list | str:
|
549
554
|
"""
|
550
555
|
Retrieve elements with the requested classification name. It is also possible to limit the results
|
551
556
|
by specifying a type name for the elements that should be returned. If no type name is specified then
|
@@ -592,13 +597,20 @@ class ClassificationManager(Client):
|
|
592
597
|
loop = asyncio.get_event_loop()
|
593
598
|
response = loop.run_until_complete(
|
594
599
|
self._async_get_elements_by_classification(classification_name, open_metadata_type_name, effective_time,
|
595
|
-
|
600
|
+
for_lineage, for_duplicate_processing, start_from, page_size,
|
601
|
+
server_name, time_out))
|
596
602
|
return response
|
597
603
|
|
598
604
|
async def _async_get_elements_by_classification_with_property_value(self, classification_name: str,
|
599
|
-
|
600
|
-
|
601
|
-
|
605
|
+
property_value: str, property_names: [str],
|
606
|
+
open_metadata_type_name: str = None,
|
607
|
+
effective_time: str = None,
|
608
|
+
for_lineage: bool = None,
|
609
|
+
for_duplicate_processing: bool = None,
|
610
|
+
start_from: int = 0,
|
611
|
+
page_size: int = max_paging_size,
|
612
|
+
server_name: str = None,
|
613
|
+
time_out: int = default_time_out) -> list | str:
|
602
614
|
"""
|
603
615
|
Retrieve elements with the requested classification name and with the requested a value found in one of the
|
604
616
|
classification's properties specified. The value must match exactly. An open metadata type name may be supplied
|
@@ -650,10 +662,10 @@ class ClassificationManager(Client):
|
|
650
662
|
|
651
663
|
possible_query_params = query_string(
|
652
664
|
[("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
|
653
|
-
|
665
|
+
("forDuplicateProcessing", for_duplicate_processing)])
|
654
666
|
|
655
667
|
body = {"class": "FindPropertyNamesProperties", "openMetadataTypeName": open_metadata_type_name,
|
656
|
-
|
668
|
+
"propertyValue": property_value, "propertyNames": property_names, "effectiveTime": effective_time, }
|
657
669
|
|
658
670
|
url = (f"{base_path(self, server_name)}/elements/by-classification/{classification_name}/"
|
659
671
|
f"with-exact-property-value{possible_query_params}")
|
@@ -665,9 +677,11 @@ class ClassificationManager(Client):
|
|
665
677
|
return elements
|
666
678
|
|
667
679
|
def get_elements_by_classification_with_property_value(self, classification_name: str, property_value: str,
|
668
|
-
|
669
|
-
|
670
|
-
|
680
|
+
property_names: [str], open_metadata_type_name: str = None,
|
681
|
+
effective_time: str = None, for_lineage: bool = None,
|
682
|
+
for_duplicate_processing: bool = None, start_from: int = 0,
|
683
|
+
page_size: int = max_paging_size, server_name: str = None,
|
684
|
+
time_out: int = default_time_out) -> list | str:
|
671
685
|
"""
|
672
686
|
Retrieve elements by a value found in one of the properties specified. The value must match exactly.
|
673
687
|
An open metadata type name may be supplied to restrict the results.
|
@@ -717,14 +731,22 @@ class ClassificationManager(Client):
|
|
717
731
|
loop = asyncio.get_event_loop()
|
718
732
|
response = loop.run_until_complete(
|
719
733
|
self._async_get_elements_by_classification_with_property_value(classification_name, property_value,
|
720
|
-
|
721
|
-
|
734
|
+
property_names, open_metadata_type_name,
|
735
|
+
effective_time, for_lineage,
|
736
|
+
for_duplicate_processing, start_from,
|
737
|
+
page_size, server_name, time_out))
|
722
738
|
return response
|
723
739
|
|
724
740
|
async def _async_find_elements_by_classification_with_property_value(self, classification_name: str,
|
725
|
-
|
726
|
-
|
727
|
-
|
741
|
+
property_value: str, property_names: [str],
|
742
|
+
open_metadata_type_name: str = None,
|
743
|
+
effective_time: str = None,
|
744
|
+
for_lineage: bool = None,
|
745
|
+
for_duplicate_processing: bool = None,
|
746
|
+
start_from: int = 0,
|
747
|
+
page_size: int = max_paging_size,
|
748
|
+
server_name: str = None,
|
749
|
+
time_out: int = default_time_out) -> list | str:
|
728
750
|
"""
|
729
751
|
Retrieve elements with the requested classification name and with the requested value found in
|
730
752
|
one of the classification's properties specified. The value must only be contained in the
|
@@ -777,10 +799,10 @@ class ClassificationManager(Client):
|
|
777
799
|
|
778
800
|
possible_query_params = query_string(
|
779
801
|
[("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
|
780
|
-
|
802
|
+
("forDuplicateProcessing", for_duplicate_processing)])
|
781
803
|
|
782
804
|
body = {"class": "FindPropertyNamesProperties", "openMetadataTypeName": open_metadata_type_name,
|
783
|
-
|
805
|
+
"propertyValue": property_value, "propertyNames": property_names, "effectiveTime": effective_time, }
|
784
806
|
|
785
807
|
url = (f"{base_path(self, server_name)}/elements/by-classification/{classification_name}/"
|
786
808
|
f"with-property-value-search{possible_query_params}")
|
@@ -792,9 +814,11 @@ class ClassificationManager(Client):
|
|
792
814
|
return elements
|
793
815
|
|
794
816
|
def find_elements_by_classification_with_property_value(self, classification_name: str, property_value: str,
|
795
|
-
|
796
|
-
|
797
|
-
|
817
|
+
property_names: [str], open_metadata_type_name: str = None,
|
818
|
+
effective_time: str = None, for_lineage: bool = None,
|
819
|
+
for_duplicate_processing: bool = None, start_from: int = 0,
|
820
|
+
page_size: int = max_paging_size, server_name: str = None,
|
821
|
+
time_out: int = default_time_out) -> list | str:
|
798
822
|
"""
|
799
823
|
Retrieve elements with the requested classification name and with the requested a value found in
|
800
824
|
one of the classification's properties specified. The value must only be contained in the
|
@@ -846,17 +870,20 @@ class ClassificationManager(Client):
|
|
846
870
|
loop = asyncio.get_event_loop()
|
847
871
|
response = loop.run_until_complete(
|
848
872
|
self._async_find_elements_by_classification_with_property_value(classification_name, property_value,
|
849
|
-
|
850
|
-
|
873
|
+
property_names, open_metadata_type_name,
|
874
|
+
effective_time, for_lineage,
|
875
|
+
for_duplicate_processing, start_from,
|
876
|
+
page_size, server_name, time_out))
|
851
877
|
return response
|
852
878
|
|
853
879
|
#
|
854
880
|
# related elements
|
855
881
|
#
|
856
882
|
async def _async_get_all_related_elements(self, element_guid: str, open_metadata_type_name: str = None,
|
857
|
-
|
858
|
-
|
859
|
-
|
883
|
+
start_at_end: int = 1, effective_time: str = None,
|
884
|
+
for_lineage: bool = None, for_duplicate_processing: bool = None,
|
885
|
+
start_from: int = 0, page_size: int = max_paging_size,
|
886
|
+
server_name: str = None, time_out: int = default_time_out) -> list | str:
|
860
887
|
"""
|
861
888
|
Retrieve elements linked any relationship type name. It is also possible to limit the results by
|
862
889
|
specifying a type name for the elements that should be returned. If no type name is specified then any type of
|
@@ -906,10 +933,10 @@ class ClassificationManager(Client):
|
|
906
933
|
|
907
934
|
possible_query_params = query_string(
|
908
935
|
[("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
|
909
|
-
|
936
|
+
("forDuplicateProcessing", for_duplicate_processing), ("startAtEnd", start_at_end)])
|
910
937
|
|
911
938
|
body = {"class": "FindProperties", "openMetadataTypeName": open_metadata_type_name,
|
912
|
-
|
939
|
+
"effectiveTime": effective_time, }
|
913
940
|
|
914
941
|
url = (f"{base_path(self, server_name)}/elements/{element_guid}/by-relationship"
|
915
942
|
f"{possible_query_params}")
|
@@ -921,9 +948,10 @@ class ClassificationManager(Client):
|
|
921
948
|
return elements
|
922
949
|
|
923
950
|
def get_all_related_elements(self, element_guid: str, open_metadata_type_name: str = None, start_at_end: int = 1,
|
924
|
-
|
925
|
-
|
926
|
-
|
951
|
+
effective_time: str = None, for_lineage: bool = None,
|
952
|
+
for_duplicate_processing: bool = None, start_from: int = 0,
|
953
|
+
page_size: int = max_paging_size, server_name: str = None,
|
954
|
+
time_out: int = default_time_out) -> list | str:
|
927
955
|
"""
|
928
956
|
Retrieve elements linked via any relationship type name. It is also possible to limit the results by
|
929
957
|
specifying a type name for the elements that should be returned. If no type name is specified then any type of
|
@@ -972,13 +1000,16 @@ class ClassificationManager(Client):
|
|
972
1000
|
loop = asyncio.get_event_loop()
|
973
1001
|
response = loop.run_until_complete(
|
974
1002
|
self._async_get_all_related_elements(element_guid, open_metadata_type_name, start_at_end, effective_time,
|
975
|
-
|
1003
|
+
for_lineage, for_duplicate_processing, start_from, page_size,
|
1004
|
+
server_name, time_out))
|
976
1005
|
return response
|
977
1006
|
|
978
1007
|
async def _async_get_related_elements(self, element_guid: str, relationship_type: str,
|
979
|
-
|
980
|
-
|
981
|
-
|
1008
|
+
open_metadata_type_name: str = None, start_at_end: int = 1,
|
1009
|
+
effective_time: str = None, for_lineage: bool = None,
|
1010
|
+
for_duplicate_processing: bool = None, start_from: int = 0,
|
1011
|
+
page_size: int = max_paging_size, server_name: str = None,
|
1012
|
+
time_out: int = default_time_out) -> list | str:
|
982
1013
|
"""
|
983
1014
|
Retrieve elements linked any relationship type name. It is also possible to limit the results by
|
984
1015
|
specifying a type name for the elements that should be returned. If no type name is specified then any type of
|
@@ -1030,10 +1061,10 @@ class ClassificationManager(Client):
|
|
1030
1061
|
|
1031
1062
|
possible_query_params = query_string(
|
1032
1063
|
[("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
|
1033
|
-
|
1064
|
+
("forDuplicateProcessing", for_duplicate_processing), ("startAtEnd", start_at_end)])
|
1034
1065
|
|
1035
1066
|
body = {"class": "FindProperties", "openMetadataTypeName": open_metadata_type_name,
|
1036
|
-
|
1067
|
+
"effectiveTime": effective_time, }
|
1037
1068
|
|
1038
1069
|
url = (f"{base_path(self, server_name)}/elements/{element_guid}/by-relationship/"
|
1039
1070
|
f"{relationship_type}{possible_query_params}")
|
@@ -1045,9 +1076,10 @@ class ClassificationManager(Client):
|
|
1045
1076
|
return elements
|
1046
1077
|
|
1047
1078
|
def get_related_elements(self, element_guid: str, relationship_type: str, open_metadata_type_name: str = None,
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1079
|
+
start_at_end: int = 1, effective_time: str = None, for_lineage: bool = None,
|
1080
|
+
for_duplicate_processing: bool = None, start_from: int = 0,
|
1081
|
+
page_size: int = max_paging_size, server_name: str = None,
|
1082
|
+
time_out: int = default_time_out) -> list | str:
|
1051
1083
|
"""
|
1052
1084
|
Retrieve elements linked via any relationship type name. It is also possible to limit the results by
|
1053
1085
|
specifying a type name for the elements that should be returned. If no type name is specified then any type of
|
@@ -1098,14 +1130,19 @@ class ClassificationManager(Client):
|
|
1098
1130
|
loop = asyncio.get_event_loop()
|
1099
1131
|
response = loop.run_until_complete(
|
1100
1132
|
self._async_get_related_elements(element_guid, relationship_type, open_metadata_type_name, start_at_end,
|
1101
|
-
|
1133
|
+
effective_time, for_lineage, for_duplicate_processing, start_from,
|
1134
|
+
page_size, server_name, time_out))
|
1102
1135
|
return response
|
1103
1136
|
|
1104
1137
|
async def _async_get_related_elements_with_property_value(self, element_guid: str, relationship_type: str,
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1138
|
+
property_value: str, property_names: [str],
|
1139
|
+
open_metadata_type_name: str = None,
|
1140
|
+
start_at_end: int = 1, effective_time: str = None,
|
1141
|
+
for_lineage: bool = None,
|
1142
|
+
for_duplicate_processing: bool = None,
|
1143
|
+
start_from: int = 0, page_size: int = max_paging_size,
|
1144
|
+
server_name: str = None,
|
1145
|
+
time_out: int = default_time_out) -> list | str:
|
1109
1146
|
"""
|
1110
1147
|
Retrieve elements linked via the requested relationship type name and with the requested a value found in one of
|
1111
1148
|
the classification's properties specified. The value must match exactly. An open metadata type name may be
|
@@ -1162,10 +1199,10 @@ class ClassificationManager(Client):
|
|
1162
1199
|
|
1163
1200
|
possible_query_params = query_string(
|
1164
1201
|
[("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
|
1165
|
-
|
1202
|
+
("forDuplicateProcessing", for_duplicate_processing), ("startAtEnd", start_at_end)])
|
1166
1203
|
|
1167
1204
|
body = {"class": "FindPropertyNamesProperties", "openMetadataTypeName": open_metadata_type_name,
|
1168
|
-
|
1205
|
+
"propertyValue": property_value, "propertyNames": property_names, "effectiveTime": effective_time, }
|
1169
1206
|
|
1170
1207
|
url = (f"{base_path(self, server_name)}/elements/{element_guid}/by-relationship/"
|
1171
1208
|
f"{relationship_type}/with-exact-property-value{possible_query_params}")
|
@@ -1178,10 +1215,12 @@ class ClassificationManager(Client):
|
|
1178
1215
|
return elements
|
1179
1216
|
|
1180
1217
|
def get_related_elements_with_property_value(self, element_guid: str, relationship_type: str, property_value: str,
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1218
|
+
property_names: [str], open_metadata_type_name: str = None,
|
1219
|
+
start_at_end: int = 1, effective_time: str = None,
|
1220
|
+
for_lineage: bool = None, for_duplicate_processing: bool = None,
|
1221
|
+
start_from: int = 0, page_size: int = max_paging_size,
|
1222
|
+
server_name: str = None,
|
1223
|
+
time_out: int = default_time_out) -> list | str:
|
1185
1224
|
"""
|
1186
1225
|
Retrieve elements linked via the requested relationship type name and with the requested a value found in one of
|
1187
1226
|
the classification's properties specified. The value must match exactly. An open metadata type name may be
|
@@ -1236,15 +1275,20 @@ class ClassificationManager(Client):
|
|
1236
1275
|
loop = asyncio.get_event_loop()
|
1237
1276
|
response = loop.run_until_complete(
|
1238
1277
|
self._async_get_related_elements_with_property_value(element_guid, relationship_type, property_value,
|
1239
|
-
|
1240
|
-
|
1278
|
+
property_names, open_metadata_type_name, start_at_end,
|
1279
|
+
effective_time, for_lineage, for_duplicate_processing,
|
1280
|
+
start_from, page_size, server_name, time_out))
|
1241
1281
|
return response
|
1242
1282
|
|
1243
1283
|
async def _async_find_related_elements_with_property_value(self, element_guid: str, relationship_type: str,
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1284
|
+
property_value: str, property_names: [str],
|
1285
|
+
open_metadata_type_name: str = None,
|
1286
|
+
start_at_end: int = 1, effective_time: str = None,
|
1287
|
+
for_lineage: bool = None,
|
1288
|
+
for_duplicate_processing: bool = None,
|
1289
|
+
start_from: int = 0, page_size: int = max_paging_size,
|
1290
|
+
server_name: str = None,
|
1291
|
+
time_out: int = default_time_out) -> list | str:
|
1248
1292
|
"""
|
1249
1293
|
Retrieve elements linked via the requested relationship type name and with the requested a value found in one of
|
1250
1294
|
the classification's properties specified. The value must only be contained in the properties rather than
|
@@ -1302,10 +1346,10 @@ class ClassificationManager(Client):
|
|
1302
1346
|
|
1303
1347
|
possible_query_params = query_string(
|
1304
1348
|
[("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
|
1305
|
-
|
1349
|
+
("forDuplicateProcessing", for_duplicate_processing), ("startAtEnd", start_at_end)])
|
1306
1350
|
|
1307
1351
|
body = {"class": "FindPropertyNamesProperties", "openMetadataTypeName": open_metadata_type_name,
|
1308
|
-
|
1352
|
+
"propertyValue": property_value, "propertyNames": property_names, "effectiveTime": effective_time, }
|
1309
1353
|
|
1310
1354
|
url = (f"{base_path(self, server_name)}/elements/{element_guid}/by-relationship/"
|
1311
1355
|
f"{relationship_type}/with-property-value-search{possible_query_params}")
|
@@ -1319,10 +1363,12 @@ class ClassificationManager(Client):
|
|
1319
1363
|
return elements
|
1320
1364
|
|
1321
1365
|
def find_related_elements_with_property_value(self, element_guid: str, relationship_type: str, property_value: str,
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1366
|
+
property_names: [str], open_metadata_type_name: str = None,
|
1367
|
+
start_at_end: int = 1, effective_time: str = None,
|
1368
|
+
for_lineage: bool = None, for_duplicate_processing: bool = None,
|
1369
|
+
start_from: int = 0, page_size: int = max_paging_size,
|
1370
|
+
server_name: str = None,
|
1371
|
+
time_out: int = default_time_out) -> list | str:
|
1326
1372
|
"""
|
1327
1373
|
Retrieve elements linked via the requested relationship type name and with the requested a value found in one of
|
1328
1374
|
the classification's properties specified. The value must only be contained in the properties rather than
|
@@ -1378,16 +1424,18 @@ class ClassificationManager(Client):
|
|
1378
1424
|
loop = asyncio.get_event_loop()
|
1379
1425
|
response = loop.run_until_complete(
|
1380
1426
|
self._async_find_related_elements_with_property_value(element_guid, relationship_type, property_value,
|
1381
|
-
|
1382
|
-
|
1427
|
+
property_names, open_metadata_type_name, start_at_end,
|
1428
|
+
effective_time, for_lineage, for_duplicate_processing,
|
1429
|
+
start_from, page_size, server_name, time_out))
|
1383
1430
|
return response
|
1384
1431
|
|
1385
1432
|
#
|
1386
1433
|
# relationships
|
1387
1434
|
|
1388
1435
|
async def _async_get_relationships(self, relationship_type: str, effective_time: str = None,
|
1389
|
-
|
1390
|
-
|
1436
|
+
for_lineage: bool = None, for_duplicate_processing: bool = None,
|
1437
|
+
start_from: int = 0, page_size: int = max_paging_size, server_name: str = None,
|
1438
|
+
time_out: int = default_time_out) -> list | str:
|
1391
1439
|
"""
|
1392
1440
|
Retrieve relationships of the requested relationship type name. Async version.
|
1393
1441
|
|
@@ -1429,7 +1477,7 @@ class ClassificationManager(Client):
|
|
1429
1477
|
|
1430
1478
|
possible_query_params = query_string(
|
1431
1479
|
[("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
|
1432
|
-
|
1480
|
+
("forDuplicateProcessing", for_duplicate_processing)])
|
1433
1481
|
|
1434
1482
|
body = {"class": "FindProperties", "effectiveTime": effective_time}
|
1435
1483
|
|
@@ -1445,8 +1493,8 @@ class ClassificationManager(Client):
|
|
1445
1493
|
return rels
|
1446
1494
|
|
1447
1495
|
def get_relationships(self, relationship_type: str, effective_time: str = None, for_lineage: bool = None,
|
1448
|
-
|
1449
|
-
|
1496
|
+
for_duplicate_processing: bool = None, start_from: int = 0, page_size: int = max_paging_size,
|
1497
|
+
server_name: str = None, time_out: int = default_time_out) -> list | str:
|
1450
1498
|
"""
|
1451
1499
|
Retrieve relationships of the requested relationship type name.
|
1452
1500
|
|
@@ -1487,13 +1535,15 @@ class ClassificationManager(Client):
|
|
1487
1535
|
loop = asyncio.get_event_loop()
|
1488
1536
|
response = loop.run_until_complete(
|
1489
1537
|
self._async_get_relationships(relationship_type, effective_time, for_lineage, for_duplicate_processing,
|
1490
|
-
|
1538
|
+
start_from, page_size, server_name, time_out))
|
1491
1539
|
return response
|
1492
1540
|
|
1493
1541
|
async def _async_get_relationships_with_property_value(self, relationship_type: str, property_value: str,
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1542
|
+
property_names: [str], effective_time: str = None,
|
1543
|
+
for_lineage: bool = None,
|
1544
|
+
for_duplicate_processing: bool = None, start_from: int = 0,
|
1545
|
+
page_size: int = max_paging_size, server_name: str = None,
|
1546
|
+
time_out: int = default_time_out) -> list | str:
|
1497
1547
|
"""
|
1498
1548
|
Retrieve relationships of the requested relationship type name and with the requested a value found in
|
1499
1549
|
one of the relationship's properties specified. The value must match exactly. Async version.
|
@@ -1542,10 +1592,10 @@ class ClassificationManager(Client):
|
|
1542
1592
|
|
1543
1593
|
possible_query_params = query_string(
|
1544
1594
|
[("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
|
1545
|
-
|
1595
|
+
("forDuplicateProcessing", for_duplicate_processing)])
|
1546
1596
|
|
1547
1597
|
body = {"class": "FindPropertyNamesProperties", "propertyValue": property_value,
|
1548
|
-
|
1598
|
+
"propertyNames": property_names, "effectiveTime": effective_time, }
|
1549
1599
|
|
1550
1600
|
url = (f"{base_path(self, server_name)}/relationships/{relationship_type}/"
|
1551
1601
|
f"with-exact-property-value{possible_query_params}")
|
@@ -1558,9 +1608,10 @@ class ClassificationManager(Client):
|
|
1558
1608
|
return rels
|
1559
1609
|
|
1560
1610
|
def get_relationships_with_property_value(self, relationship_type: str, property_value: str, property_names: [str],
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
1611
|
+
effective_time: str = None, for_lineage: bool = None,
|
1612
|
+
for_duplicate_processing: bool = None, start_from: int = 0,
|
1613
|
+
page_size: int = max_paging_size, server_name: str = None,
|
1614
|
+
time_out: int = default_time_out) -> list | str:
|
1564
1615
|
"""
|
1565
1616
|
Retrieve relationships of the requested relationship type name and with the requested a value found in
|
1566
1617
|
one of the relationship's properties specified. The value must match exactly.
|
@@ -1606,13 +1657,16 @@ class ClassificationManager(Client):
|
|
1606
1657
|
loop = asyncio.get_event_loop()
|
1607
1658
|
response = loop.run_until_complete(
|
1608
1659
|
self._async_get_relationships_with_property_value(relationship_type, property_value, property_names,
|
1609
|
-
|
1660
|
+
effective_time, for_lineage, for_duplicate_processing,
|
1661
|
+
start_from, page_size, server_name, time_out))
|
1610
1662
|
return response
|
1611
1663
|
|
1612
1664
|
async def _async_find_relationships_with_property_value(self, relationship_type: str, property_value: str,
|
1613
|
-
|
1614
|
-
|
1615
|
-
|
1665
|
+
property_names: [str], effective_time: str = None,
|
1666
|
+
for_lineage: bool = None,
|
1667
|
+
for_duplicate_processing: bool = None, start_from: int = 0,
|
1668
|
+
page_size: int = max_paging_size, server_name: str = None,
|
1669
|
+
time_out: int = default_time_out) -> list | str:
|
1616
1670
|
"""
|
1617
1671
|
Retrieve relationships of the requested relationship type name and with the requested a value found in one of
|
1618
1672
|
the relationship's properties specified. The value must only be contained in the properties rather than
|
@@ -1660,10 +1714,10 @@ class ClassificationManager(Client):
|
|
1660
1714
|
|
1661
1715
|
possible_query_params = query_string(
|
1662
1716
|
[("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
|
1663
|
-
|
1717
|
+
("forDuplicateProcessing", for_duplicate_processing)])
|
1664
1718
|
|
1665
1719
|
body = {"class": "FindPropertyNamesProperties", "propertyValue": property_value,
|
1666
|
-
|
1720
|
+
"propertyNames": property_names, "effectiveTime": effective_time, }
|
1667
1721
|
|
1668
1722
|
url = (f"{base_path(self, server_name)}/relationships/"
|
1669
1723
|
f"{relationship_type}/with-property-value-search{possible_query_params}")
|
@@ -1677,9 +1731,10 @@ class ClassificationManager(Client):
|
|
1677
1731
|
return rels
|
1678
1732
|
|
1679
1733
|
def find_relationships_with_property_value(self, relationship_type: str, property_value: str, property_names: [str],
|
1680
|
-
|
1681
|
-
|
1682
|
-
|
1734
|
+
effective_time: str = None, for_lineage: bool = None,
|
1735
|
+
for_duplicate_processing: bool = None, start_from: int = 0,
|
1736
|
+
page_size: int = max_paging_size, server_name: str = None,
|
1737
|
+
time_out: int = default_time_out) -> list | str:
|
1683
1738
|
"""
|
1684
1739
|
Retrieve relationships of the requested relationship type name and with the requested a value found in one of
|
1685
1740
|
the relationship's properties specified. The value must only be contained in the properties rather than
|
@@ -1728,7 +1783,8 @@ class ClassificationManager(Client):
|
|
1728
1783
|
loop = asyncio.get_event_loop()
|
1729
1784
|
response = loop.run_until_complete(
|
1730
1785
|
self._async_find_relationships_with_property_value(relationship_type, property_value, property_names,
|
1731
|
-
|
1786
|
+
effective_time, for_lineage, for_duplicate_processing,
|
1787
|
+
start_from, page_size, server_name, time_out))
|
1732
1788
|
return response
|
1733
1789
|
|
1734
1790
|
#
|
@@ -1736,8 +1792,8 @@ class ClassificationManager(Client):
|
|
1736
1792
|
#
|
1737
1793
|
|
1738
1794
|
async def _async_retrieve_instance_for_guid(self, guid: str, effective_time: str = None, for_lineage: bool = None,
|
1739
|
-
|
1740
|
-
|
1795
|
+
for_duplicate_processing: bool = None, server_name: str = None,
|
1796
|
+
time_out: int = default_time_out) -> list | str:
|
1741
1797
|
"""
|
1742
1798
|
Retrieve the header for the instance identified by the supplied unique identifier.
|
1743
1799
|
It may be an element (entity) or a relationship between elements. Async version.
|
@@ -1784,11 +1840,9 @@ class ClassificationManager(Client):
|
|
1784
1840
|
element = response.json().get('element', 'No elements found')
|
1785
1841
|
return element
|
1786
1842
|
|
1787
|
-
|
1788
|
-
|
1789
1843
|
def retrieve_instance_for_guid(self, guid: str, effective_time: str = None, for_lineage: bool = None,
|
1790
|
-
|
1791
|
-
|
1844
|
+
for_duplicate_processing: bool = None, server_name: str = None,
|
1845
|
+
time_out: int = default_time_out) -> list | str:
|
1792
1846
|
"""
|
1793
1847
|
Retrieve the header for the instance identified by the supplied unique identifier.
|
1794
1848
|
It may be an element (entity) or a relationship between elements.
|
@@ -1826,16 +1880,15 @@ class ClassificationManager(Client):
|
|
1826
1880
|
loop = asyncio.get_event_loop()
|
1827
1881
|
response = loop.run_until_complete(
|
1828
1882
|
self._async_retrieve_instance_for_guid(guid, effective_time, for_lineage, for_duplicate_processing,
|
1829
|
-
|
1883
|
+
server_name, time_out))
|
1830
1884
|
return response
|
1831
1885
|
|
1832
|
-
|
1833
1886
|
#
|
1834
1887
|
# Classification CRUD
|
1835
1888
|
#
|
1836
1889
|
|
1837
|
-
async def _async_set_confidence_classification(self, element_guid: str, body: dict,
|
1838
|
-
|
1890
|
+
async def _async_set_confidence_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
|
1891
|
+
for_duplicate_processing: bool = None, server_name: str = None,
|
1839
1892
|
time_out: int = default_time_out) -> None:
|
1840
1893
|
"""
|
1841
1894
|
Classify/reclassify the element (typically an asset) to indicate the level of confidence that the organization
|
@@ -1898,19 +1951,16 @@ class ClassificationManager(Client):
|
|
1898
1951
|
server_name = self.server_name
|
1899
1952
|
|
1900
1953
|
possible_query_params = query_string(
|
1901
|
-
[
|
1902
|
-
|
1954
|
+
[("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
|
1903
1955
|
|
1904
1956
|
url = (f"{base_path(self, server_name)}/elements/{element_guid}/confidence"
|
1905
|
-
f"{possible_query_params}"
|
1906
|
-
)
|
1957
|
+
f"{possible_query_params}")
|
1907
1958
|
|
1908
1959
|
await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
1909
1960
|
|
1910
|
-
|
1911
1961
|
def set_confidence_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
|
1912
|
-
|
1913
|
-
|
1962
|
+
for_duplicate_processing: bool = None, server_name: str = None,
|
1963
|
+
time_out: int = default_time_out) -> None:
|
1914
1964
|
"""
|
1915
1965
|
Classify/reclassify the element (typically an asset) to indicate the level of confidence that the organization
|
1916
1966
|
has that the data is complete, accurate and up-to-date. The level of confidence is expressed by the
|
@@ -1972,13 +2022,12 @@ class ClassificationManager(Client):
|
|
1972
2022
|
loop = asyncio.get_event_loop()
|
1973
2023
|
loop.run_until_complete(
|
1974
2024
|
self._async_set_confidence_classification(element_guid, body, for_lineage, for_duplicate_processing,
|
1975
|
-
|
1976
|
-
|
2025
|
+
server_name, time_out))
|
1977
2026
|
|
1978
|
-
async def _async_clear_confidence_classification(self, element_guid: str,
|
1979
|
-
|
1980
|
-
|
1981
|
-
|
2027
|
+
async def _async_clear_confidence_classification(self, element_guid: str, for_lineage: bool = None,
|
2028
|
+
for_duplicate_processing: bool = None, effective_time: str = None,
|
2029
|
+
server_name: str = None,
|
2030
|
+
time_out: int = default_time_out) -> None:
|
1982
2031
|
"""
|
1983
2032
|
Remove the confidence classification from the element. This normally occurs when the organization has lost
|
1984
2033
|
track of the level of confidence to assign to the element. Async Version.
|
@@ -1993,6 +2042,8 @@ class ClassificationManager(Client):
|
|
1993
2042
|
- determines if elements classified as Memento should be returned - normally false
|
1994
2043
|
for_duplicate_processing: bool, default is set by server
|
1995
2044
|
- Normally false. Set true when the caller is part of a deduplication function
|
2045
|
+
effective_time: str, default = None
|
2046
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
1996
2047
|
server_name: str, default = None
|
1997
2048
|
- name of the server instances for this request.
|
1998
2049
|
time_out: int, default = default_time_out
|
@@ -2021,14 +2072,18 @@ class ClassificationManager(Client):
|
|
2021
2072
|
[("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
|
2022
2073
|
|
2023
2074
|
url = (f"{base_path(self, server_name)}/elements/{element_guid}/confidence/remove"
|
2024
|
-
f"{possible_query_params}"
|
2025
|
-
|
2075
|
+
f"{possible_query_params}")
|
2076
|
+
body = {
|
2077
|
+
"class": "ClassificationRequestBody",
|
2078
|
+
"effectiveTime": effective_time
|
2079
|
+
}
|
2026
2080
|
|
2027
|
-
await self._async_make_request("POST", url, time_out=time_out)
|
2081
|
+
await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
2028
2082
|
|
2029
2083
|
def clear_confidence_classification(self, element_guid: str, for_lineage: bool = None,
|
2030
|
-
|
2031
|
-
|
2084
|
+
for_duplicate_processing: bool = None, effective_time: str = None,
|
2085
|
+
server_name: str = None,
|
2086
|
+
time_out: int = default_time_out) -> None:
|
2032
2087
|
"""
|
2033
2088
|
Remove the confidence classification from the element. This normally occurs when the organization has lost
|
2034
2089
|
track of the level of confidence to assign to the element.
|
@@ -2043,6 +2098,8 @@ class ClassificationManager(Client):
|
|
2043
2098
|
- determines if elements classified as Memento should be returned - normally false
|
2044
2099
|
for_duplicate_processing: bool, default is set by server
|
2045
2100
|
- Normally false. Set true when the caller is part of a deduplication function
|
2101
|
+
effective_time: str, default = None
|
2102
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
2046
2103
|
server_name: str, default = None
|
2047
2104
|
- name of the server instances for this request.
|
2048
2105
|
time_out: int, default = default_time_out
|
@@ -2068,12 +2125,11 @@ class ClassificationManager(Client):
|
|
2068
2125
|
loop = asyncio.get_event_loop()
|
2069
2126
|
loop.run_until_complete(
|
2070
2127
|
self._async_clear_confidence_classification(element_guid, for_lineage, for_duplicate_processing,
|
2071
|
-
|
2128
|
+
effective_time, server_name, time_out))
|
2072
2129
|
|
2073
|
-
async def _async_set_confidentiality_classification(self, element_guid: str, body: dict,
|
2074
|
-
|
2075
|
-
|
2076
|
-
time_out: int = default_time_out) -> None:
|
2130
|
+
async def _async_set_confidentiality_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
|
2131
|
+
for_duplicate_processing: bool = None, server_name: str = None,
|
2132
|
+
time_out: int = default_time_out) -> None:
|
2077
2133
|
"""
|
2078
2134
|
Classify/reclassify the element (typically a data field, schema attribute or glossary term) to indicate the
|
2079
2135
|
level of confidentiality that any data associated with the element should be given. If the classification is
|
@@ -2140,14 +2196,13 @@ class ClassificationManager(Client):
|
|
2140
2196
|
[("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
|
2141
2197
|
|
2142
2198
|
url = (f"{base_path(self, server_name)}/elements/{element_guid}/confidentiality"
|
2143
|
-
f"{possible_query_params}"
|
2144
|
-
)
|
2199
|
+
f"{possible_query_params}")
|
2145
2200
|
|
2146
2201
|
await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
2147
2202
|
|
2148
2203
|
def set_confidentiality_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
|
2149
|
-
|
2150
|
-
|
2204
|
+
for_duplicate_processing: bool = None, server_name: str = None,
|
2205
|
+
time_out: int = default_time_out) -> None:
|
2151
2206
|
"""
|
2152
2207
|
Classify/reclassify the element (typically a data field, schema attribute or glossary term) to indicate the
|
2153
2208
|
level of confidentiality that any data associated with the element should be given. If the classification is
|
@@ -2211,13 +2266,13 @@ class ClassificationManager(Client):
|
|
2211
2266
|
loop = asyncio.get_event_loop()
|
2212
2267
|
loop.run_until_complete(
|
2213
2268
|
self._async_set_confidentiality_classification(element_guid, body, for_lineage, for_duplicate_processing,
|
2214
|
-
|
2269
|
+
server_name, time_out))
|
2215
2270
|
|
2216
|
-
async def _async_clear_confidentiality_classification(self, element_guid: str,
|
2217
|
-
|
2218
|
-
|
2219
|
-
|
2220
|
-
|
2271
|
+
async def _async_clear_confidentiality_classification(self, element_guid: str, for_lineage: bool = None,
|
2272
|
+
for_duplicate_processing: bool = None,
|
2273
|
+
effective_time: str = None,
|
2274
|
+
server_name: str = None,
|
2275
|
+
time_out: int = default_time_out) -> None:
|
2221
2276
|
"""
|
2222
2277
|
Remove the confidentiality classification from the element. This normally occurs when the organization has lost
|
2223
2278
|
track of the level of confidentiality to assign to the element. Async Version.
|
@@ -2232,6 +2287,8 @@ class ClassificationManager(Client):
|
|
2232
2287
|
- determines if elements classified as Memento should be returned - normally false
|
2233
2288
|
for_duplicate_processing: bool, default is set by server
|
2234
2289
|
- Normally false. Set true when the caller is part of a deduplication function
|
2290
|
+
effective_time: str, default = None
|
2291
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
2235
2292
|
server_name: str, default = None
|
2236
2293
|
- name of the server instances for this request.
|
2237
2294
|
time_out: int, default = default_time_out
|
@@ -2260,14 +2317,19 @@ class ClassificationManager(Client):
|
|
2260
2317
|
[("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
|
2261
2318
|
|
2262
2319
|
url = (f"{base_path(self, server_name)}/elements/{element_guid}/confidentiality/remove"
|
2263
|
-
f"{possible_query_params}"
|
2264
|
-
)
|
2320
|
+
f"{possible_query_params}")
|
2265
2321
|
|
2266
|
-
|
2322
|
+
body = {
|
2323
|
+
"class": "ClassificationRequestBody",
|
2324
|
+
"effectiveTime": effective_time
|
2325
|
+
}
|
2326
|
+
|
2327
|
+
await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
2267
2328
|
|
2268
2329
|
def clear_confidentiality_classification(self, element_guid: str, for_lineage: bool = None,
|
2269
|
-
|
2270
|
-
|
2330
|
+
for_duplicate_processing: bool = None, effective_time: str = None,
|
2331
|
+
server_name: str = None,
|
2332
|
+
time_out: int = default_time_out) -> None:
|
2271
2333
|
"""
|
2272
2334
|
Remove the confidentiality classification from the element. This normally occurs when the organization has lost
|
2273
2335
|
track of the level of confidentiality to assign to the element.
|
@@ -2282,6 +2344,8 @@ class ClassificationManager(Client):
|
|
2282
2344
|
- determines if elements classified as Memento should be returned - normally false
|
2283
2345
|
for_duplicate_processing: bool, default is set by server
|
2284
2346
|
- Normally false. Set true when the caller is part of a deduplication function
|
2347
|
+
effective_time: str, default = None
|
2348
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
2285
2349
|
server_name: str, default = None
|
2286
2350
|
- name of the server instances for this request.
|
2287
2351
|
time_out: int, default = default_time_out
|
@@ -2307,13 +2371,11 @@ class ClassificationManager(Client):
|
|
2307
2371
|
loop = asyncio.get_event_loop()
|
2308
2372
|
loop.run_until_complete(
|
2309
2373
|
self._async_clear_confidentiality_classification(element_guid, for_lineage, for_duplicate_processing,
|
2310
|
-
|
2311
|
-
|
2374
|
+
effective_time, server_name, time_out))
|
2312
2375
|
|
2313
|
-
async def _async_set_criticality_classification(self, element_guid: str, body: dict,
|
2314
|
-
|
2315
|
-
|
2316
|
-
time_out: int = default_time_out) -> None:
|
2376
|
+
async def _async_set_criticality_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
|
2377
|
+
for_duplicate_processing: bool = None, server_name: str = None,
|
2378
|
+
time_out: int = default_time_out) -> None:
|
2317
2379
|
"""
|
2318
2380
|
Classify/reclassify the element (typically an asset) to indicate how critical the element (or
|
2319
2381
|
associated resource) is to the organization. The level of criticality is expressed by the levelIdentifier
|
@@ -2378,14 +2440,13 @@ class ClassificationManager(Client):
|
|
2378
2440
|
[("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
|
2379
2441
|
|
2380
2442
|
url = (f"{base_path(self, server_name)}/elements/{element_guid}/criticality"
|
2381
|
-
f"{possible_query_params}"
|
2382
|
-
)
|
2443
|
+
f"{possible_query_params}")
|
2383
2444
|
|
2384
2445
|
await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
2385
2446
|
|
2386
2447
|
def set_criticality_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
|
2387
|
-
|
2388
|
-
|
2448
|
+
for_duplicate_processing: bool = None, server_name: str = None,
|
2449
|
+
time_out: int = default_time_out) -> None:
|
2389
2450
|
"""
|
2390
2451
|
Classify/reclassify the element (typically an asset) to indicate how critical the element (or
|
2391
2452
|
associated resource) is to the organization. The level of criticality is expressed by the levelIdentifier
|
@@ -2447,13 +2508,12 @@ class ClassificationManager(Client):
|
|
2447
2508
|
loop = asyncio.get_event_loop()
|
2448
2509
|
loop.run_until_complete(
|
2449
2510
|
self._async_set_criticality_classification(element_guid, body, for_lineage, for_duplicate_processing,
|
2450
|
-
|
2511
|
+
server_name, time_out))
|
2451
2512
|
|
2452
|
-
async def _async_clear_criticality_classification(self, element_guid: str,
|
2453
|
-
|
2454
|
-
|
2455
|
-
|
2456
|
-
time_out: int = default_time_out) -> None:
|
2513
|
+
async def _async_clear_criticality_classification(self, element_guid: str, for_lineage: bool = None,
|
2514
|
+
for_duplicate_processing: bool = None, effective_time: str = None,
|
2515
|
+
server_name: str = None,
|
2516
|
+
time_out: int = default_time_out) -> None:
|
2457
2517
|
"""
|
2458
2518
|
Remove the criticality classification from the element. This normally occurs when the organization has lost
|
2459
2519
|
track of the level of criticality to assign to the element. Async Version.
|
@@ -2468,6 +2528,8 @@ class ClassificationManager(Client):
|
|
2468
2528
|
- determines if elements classified as Memento should be returned - normally false
|
2469
2529
|
for_duplicate_processing: bool, default is set by server
|
2470
2530
|
- Normally false. Set true when the caller is part of a deduplication function
|
2531
|
+
effective_time: str, default = None
|
2532
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
2471
2533
|
server_name: str, default = None
|
2472
2534
|
- name of the server instances for this request.
|
2473
2535
|
time_out: int, default = default_time_out
|
@@ -2496,14 +2558,19 @@ class ClassificationManager(Client):
|
|
2496
2558
|
[("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
|
2497
2559
|
|
2498
2560
|
url = (f"{base_path(self, server_name)}/elements/{element_guid}/criticality/remove"
|
2499
|
-
f"{possible_query_params}"
|
2500
|
-
|
2561
|
+
f"{possible_query_params}")
|
2562
|
+
|
2563
|
+
body = {
|
2564
|
+
"class": "ClassificationRequestBody",
|
2565
|
+
"effectiveTime": effective_time
|
2566
|
+
}
|
2501
2567
|
|
2502
|
-
await self._async_make_request("POST", url,
|
2568
|
+
await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
2503
2569
|
|
2504
2570
|
def clear_criticality_classification(self, element_guid: str, for_lineage: bool = None,
|
2505
|
-
|
2506
|
-
|
2571
|
+
for_duplicate_processing: bool = None, effective_time: str = None,
|
2572
|
+
server_name: str = None,
|
2573
|
+
time_out: int = default_time_out) -> None:
|
2507
2574
|
"""
|
2508
2575
|
Remove the criticality classification from the element. This normally occurs when the organization has lost
|
2509
2576
|
track of the level of criticality to assign to the element.
|
@@ -2518,6 +2585,212 @@ class ClassificationManager(Client):
|
|
2518
2585
|
- determines if elements classified as Memento should be returned - normally false
|
2519
2586
|
for_duplicate_processing: bool, default is set by server
|
2520
2587
|
- Normally false. Set true when the caller is part of a deduplication function
|
2588
|
+
effective_time: str, default = None
|
2589
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
2590
|
+
server_name: str, default = None
|
2591
|
+
- name of the server instances for this request.
|
2592
|
+
time_out: int, default = default_time_out
|
2593
|
+
- http request timeout for this request
|
2594
|
+
|
2595
|
+
Returns
|
2596
|
+
-------
|
2597
|
+
[dict] | str
|
2598
|
+
Returns a string if no elements found and a list of dict of elements with the results.
|
2599
|
+
|
2600
|
+
Raises
|
2601
|
+
------
|
2602
|
+
InvalidParameterException
|
2603
|
+
one of the parameters is null or invalid or
|
2604
|
+
PropertyServerException
|
2605
|
+
There is a problem adding the element properties to the metadata repository or
|
2606
|
+
UserNotAuthorizedException
|
2607
|
+
the requesting user is not authorized to issue this request.
|
2608
|
+
|
2609
|
+
|
2610
|
+
"""
|
2611
|
+
|
2612
|
+
loop = asyncio.get_event_loop()
|
2613
|
+
loop.run_until_complete(
|
2614
|
+
self._async_clear_criticality_classification(element_guid, for_lineage, for_duplicate_processing,
|
2615
|
+
effective_time, server_name, time_out))
|
2616
|
+
|
2617
|
+
async def _async_add_gov_definition_to_element(self, definition_guid: str, element_guid: str,
|
2618
|
+
effective_time: str = None, for_lineage: bool = None,
|
2619
|
+
for_duplicate_processing: bool = None, server_name: str = None,
|
2620
|
+
time_out: int = default_time_out) -> None:
|
2621
|
+
"""
|
2622
|
+
Link a governance definition to an element using the GovernedBy relationship. Async version.
|
2623
|
+
|
2624
|
+
Governance Definitions: https://egeria-project.org/types/4/0401-Governance-Definitions/
|
2625
|
+
|
2626
|
+
Parameters
|
2627
|
+
----------
|
2628
|
+
definition_guid: str
|
2629
|
+
- identity of the governance definition to add
|
2630
|
+
element_guid: str
|
2631
|
+
- the identity of the element to update
|
2632
|
+
effective_time: str, default is None
|
2633
|
+
- None means ignore, otherwise the time that the element must be effective
|
2634
|
+
for_lineage: bool, default is set by server
|
2635
|
+
- determines if elements classified as Memento should be returned - normally false
|
2636
|
+
for_duplicate_processing: bool, default is set by server
|
2637
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
2638
|
+
server_name: str, default = None
|
2639
|
+
- name of the server instances for this request.
|
2640
|
+
time_out: int, default = default_time_out
|
2641
|
+
- http request timeout for this request
|
2642
|
+
|
2643
|
+
Returns
|
2644
|
+
-------
|
2645
|
+
None
|
2646
|
+
|
2647
|
+
Raises
|
2648
|
+
------
|
2649
|
+
InvalidParameterException
|
2650
|
+
one of the parameters is null or invalid or
|
2651
|
+
PropertyServerException
|
2652
|
+
There is a problem adding the element properties to the metadata repository or
|
2653
|
+
UserNotAuthorizedException
|
2654
|
+
the requesting user is not authorized to issue this request.
|
2655
|
+
|
2656
|
+
"""
|
2657
|
+
if server_name is None:
|
2658
|
+
server_name = self.server_name
|
2659
|
+
|
2660
|
+
possible_query_params = query_string(
|
2661
|
+
[("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
|
2662
|
+
|
2663
|
+
url = (f"{base_path(self, server_name)}/elements/{element_guid}/governed-by/definition/{definition_guid}"
|
2664
|
+
f"{possible_query_params}")
|
2665
|
+
|
2666
|
+
body = {"class": "RelationshipRequestBody", "effectiveTime": effective_time}
|
2667
|
+
|
2668
|
+
await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
2669
|
+
|
2670
|
+
def add_gov_definition_to_element(self, definition_guid: str, element_guid: str, effective_time: str = None,
|
2671
|
+
for_lineage: bool = None, for_duplicate_processing: bool = None,
|
2672
|
+
server_name: str = None, time_out: int = default_time_out) -> None:
|
2673
|
+
"""
|
2674
|
+
Link a governance definition to an element using the GovernedBy relationship.
|
2675
|
+
|
2676
|
+
Governance Definition: https://egeria-project.org/types/4/0401-Governance-Definitions/
|
2677
|
+
|
2678
|
+
Parameters
|
2679
|
+
----------
|
2680
|
+
definition_guid: str
|
2681
|
+
- identity of the governance definition to add
|
2682
|
+
element_guid: str
|
2683
|
+
- the identity of the element to update
|
2684
|
+
effective_time: str, default is None
|
2685
|
+
- None means ignore, otherwise the time that the element must be effective
|
2686
|
+
for_lineage: bool, default is set by server
|
2687
|
+
- determines if elements classified as Memento should be returned - normally false
|
2688
|
+
for_duplicate_processing: bool, default is set by server
|
2689
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
2690
|
+
server_name: str, default = None
|
2691
|
+
- name of the server instances for this request.
|
2692
|
+
time_out: int, default = default_time_out
|
2693
|
+
- http request timeout for this request
|
2694
|
+
|
2695
|
+
Returns
|
2696
|
+
-------
|
2697
|
+
None
|
2698
|
+
|
2699
|
+
Raises
|
2700
|
+
------
|
2701
|
+
InvalidParameterException
|
2702
|
+
one of the parameters is null or invalid or
|
2703
|
+
PropertyServerException
|
2704
|
+
There is a problem adding the element properties to the metadata repository or
|
2705
|
+
UserNotAuthorizedException
|
2706
|
+
the requesting user is not authorized to issue this request.
|
2707
|
+
|
2708
|
+
"""
|
2709
|
+
|
2710
|
+
loop = asyncio.get_event_loop()
|
2711
|
+
loop.run_until_complete(
|
2712
|
+
self._async_add_gov_definition_to_element(definition_guid, element_guid, effective_time, for_lineage,
|
2713
|
+
for_duplicate_processing, server_name, time_out))
|
2714
|
+
|
2715
|
+
async def _async_clear_gov_definition_from_element(self, definition_guid, element_guid: str,
|
2716
|
+
for_lineage: bool = None, for_duplicate_processing: bool = None,
|
2717
|
+
effective_time: str = None, server_name: str = None,
|
2718
|
+
time_out: int = default_time_out) -> None:
|
2719
|
+
"""
|
2720
|
+
Remove the GovernedBy relationship between a governance definition and an element. Async Version.
|
2721
|
+
|
2722
|
+
Governance Action Classifications: https://egeria-project.org/types/4/0422-Governance-Action-Classifications/
|
2723
|
+
|
2724
|
+
Parameters
|
2725
|
+
----------
|
2726
|
+
definition_guid: str
|
2727
|
+
- identity of the governance definition to add
|
2728
|
+
element_guid: str
|
2729
|
+
- the identity of the element to update
|
2730
|
+
for_lineage: bool, default is set by server
|
2731
|
+
- determines if elements classified as Memento should be returned - normally false
|
2732
|
+
for_duplicate_processing: bool, default is set by server
|
2733
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
2734
|
+
effective_time: str, default = None
|
2735
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
2736
|
+
server_name: str, default = None
|
2737
|
+
- name of the server instances for this request.
|
2738
|
+
time_out: int, default = default_time_out
|
2739
|
+
- http request timeout for this request
|
2740
|
+
|
2741
|
+
Returns
|
2742
|
+
-------
|
2743
|
+
[dict] | str
|
2744
|
+
Returns a string if no elements found and a list of dict of elements with the results.
|
2745
|
+
|
2746
|
+
Raises
|
2747
|
+
------
|
2748
|
+
InvalidParameterException
|
2749
|
+
one of the parameters is null or invalid or
|
2750
|
+
PropertyServerException
|
2751
|
+
There is a problem adding the element properties to the metadata repository or
|
2752
|
+
UserNotAuthorizedException
|
2753
|
+
the requesting user is not authorized to issue this request.
|
2754
|
+
|
2755
|
+
|
2756
|
+
"""
|
2757
|
+
if server_name is None:
|
2758
|
+
server_name = self.server_name
|
2759
|
+
|
2760
|
+
possible_query_params = query_string(
|
2761
|
+
[("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
|
2762
|
+
|
2763
|
+
url = (f"{base_path(self, server_name)}/elements/{element_guid}/governed-by/definition/"
|
2764
|
+
f"{definition_guid}/remove{possible_query_params}")
|
2765
|
+
|
2766
|
+
body = {
|
2767
|
+
"class": "ClassificationRequestBody",
|
2768
|
+
"effectiveTime": effective_time
|
2769
|
+
}
|
2770
|
+
|
2771
|
+
await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
2772
|
+
|
2773
|
+
def clear_gov_definition_from_element(self, definition_guid, element_guid: str, for_lineage: bool = None,
|
2774
|
+
for_duplicate_processing: bool = None, effective_time: str = None,
|
2775
|
+
server_name: str = None,
|
2776
|
+
time_out: int = default_time_out) -> None:
|
2777
|
+
"""
|
2778
|
+
Remove the GovernedBy relationship between a governance definition and an element. Async Version.
|
2779
|
+
|
2780
|
+
Governance Action Classifications: https://egeria-project.org/types/4/0422-Governance-Action-Classifications/
|
2781
|
+
|
2782
|
+
Parameters
|
2783
|
+
----------
|
2784
|
+
definition_guid: str
|
2785
|
+
- identity of the governance definition to add
|
2786
|
+
element_guid: str
|
2787
|
+
- the identity of the element to update
|
2788
|
+
for_lineage: bool, default is set by server
|
2789
|
+
- determines if elements classified as Memento should be returned - normally false
|
2790
|
+
for_duplicate_processing: bool, default is set by server
|
2791
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
2792
|
+
effective_time: str, default = None
|
2793
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
2521
2794
|
server_name: str, default = None
|
2522
2795
|
- name of the server instances for this request.
|
2523
2796
|
time_out: int, default = default_time_out
|
@@ -2543,5 +2816,1171 @@ class ClassificationManager(Client):
|
|
2543
2816
|
loop = asyncio.get_event_loop()
|
2544
2817
|
loop.run_until_complete(
|
2545
2818
|
self._async_clear_criticality_classification(element_guid, for_lineage, for_duplicate_processing,
|
2546
|
-
|
2547
|
-
|
2819
|
+
effective_time, server_name, time_out))
|
2820
|
+
|
2821
|
+
async def _async_add_ownership_to_element(self, element_guid: str, body: dict, for_lineage: bool = None,
|
2822
|
+
for_duplicate_processing: bool = None, server_name: str = None,
|
2823
|
+
time_out: int = default_time_out) -> None:
|
2824
|
+
"""
|
2825
|
+
Add or replace the ownership classification for an element. Async version.
|
2826
|
+
|
2827
|
+
Ownership: https://egeria-project.org/types/4/0445-Governance-Roles/
|
2828
|
+
|
2829
|
+
Parameters
|
2830
|
+
----------
|
2831
|
+
element_guid: str
|
2832
|
+
- the identity of the element to update
|
2833
|
+
body: dict
|
2834
|
+
- structure containing ownership information - see Notes
|
2835
|
+
for_lineage: bool, default is set by server
|
2836
|
+
- determines if elements classified as Memento should be returned - normally false
|
2837
|
+
for_duplicate_processing: bool, default is set by server
|
2838
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
2839
|
+
server_name: str, default = None
|
2840
|
+
- name of the server instances for this request.
|
2841
|
+
time_out: int, default = default_time_out
|
2842
|
+
- http request timeout for this request
|
2843
|
+
|
2844
|
+
Returns
|
2845
|
+
-------
|
2846
|
+
None
|
2847
|
+
|
2848
|
+
Raises
|
2849
|
+
------
|
2850
|
+
InvalidParameterException
|
2851
|
+
one of the parameters is null or invalid or
|
2852
|
+
PropertyServerException
|
2853
|
+
There is a problem adding the element properties to the metadata repository or
|
2854
|
+
UserNotAuthorizedException
|
2855
|
+
the requesting user is not authorized to issue this request.
|
2856
|
+
|
2857
|
+
Notes
|
2858
|
+
-----
|
2859
|
+
|
2860
|
+
{
|
2861
|
+
"class" : "ClassificationRequestBody",
|
2862
|
+
"effectiveTime" : "an isoTimestamp",
|
2863
|
+
"properties" : {
|
2864
|
+
"class" : "OwnerProperties",
|
2865
|
+
"owner" : "Add value here",
|
2866
|
+
"ownerTypeName" : "Add value here",
|
2867
|
+
"ownerPropertyName" : "Add value here"
|
2868
|
+
}
|
2869
|
+
}
|
2870
|
+
|
2871
|
+
"""
|
2872
|
+
if server_name is None:
|
2873
|
+
server_name = self.server_name
|
2874
|
+
|
2875
|
+
possible_query_params = query_string(
|
2876
|
+
[("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
|
2877
|
+
|
2878
|
+
url = (f"{base_path(self, server_name)}/elements/{element_guid}/ownership"
|
2879
|
+
f"{possible_query_params}")
|
2880
|
+
|
2881
|
+
await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
2882
|
+
|
2883
|
+
def add_ownership_to_element(self, element_guid: str, body: dict, for_lineage: bool = None,
|
2884
|
+
for_duplicate_processing: bool = None, server_name: str = None,
|
2885
|
+
time_out: int = default_time_out) -> None:
|
2886
|
+
"""
|
2887
|
+
Add or replace the ownership classification for an element.
|
2888
|
+
|
2889
|
+
Ownership: https://egeria-project.org/types/4/0445-Governance-Roles/
|
2890
|
+
|
2891
|
+
Parameters
|
2892
|
+
----------
|
2893
|
+
element_guid: str
|
2894
|
+
- the identity of the element to update
|
2895
|
+
body: dict
|
2896
|
+
- structure containing ownership information - see Notes
|
2897
|
+
for_lineage: bool, default is set by server
|
2898
|
+
- determines if elements classified as Memento should be returned - normally false
|
2899
|
+
for_duplicate_processing: bool, default is set by server
|
2900
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
2901
|
+
server_name: str, default = None
|
2902
|
+
- name of the server instances for this request.
|
2903
|
+
time_out: int, default = default_time_out
|
2904
|
+
- http request timeout for this request
|
2905
|
+
|
2906
|
+
Returns
|
2907
|
+
-------
|
2908
|
+
None
|
2909
|
+
|
2910
|
+
Raises
|
2911
|
+
------
|
2912
|
+
InvalidParameterException
|
2913
|
+
one of the parameters is null or invalid or
|
2914
|
+
PropertyServerException
|
2915
|
+
There is a problem adding the element properties to the metadata repository or
|
2916
|
+
UserNotAuthorizedException
|
2917
|
+
the requesting user is not authorized to issue this request.
|
2918
|
+
|
2919
|
+
Notes
|
2920
|
+
-----
|
2921
|
+
|
2922
|
+
{
|
2923
|
+
"class" : "ClassificationRequestBody",
|
2924
|
+
"effectiveTime" : "an isoTimestamp",
|
2925
|
+
"properties" : {
|
2926
|
+
"class" : "OwnerProperties",
|
2927
|
+
"owner" : "Add value here",
|
2928
|
+
"ownerTypeName" : "Add value here",
|
2929
|
+
"ownerPropertyName" : "Add value here"
|
2930
|
+
}
|
2931
|
+
}
|
2932
|
+
|
2933
|
+
"""
|
2934
|
+
|
2935
|
+
loop = asyncio.get_event_loop()
|
2936
|
+
loop.run_until_complete(
|
2937
|
+
self._async_add_ownership_to_element(element_guid, body, for_lineage, for_duplicate_processing, server_name,
|
2938
|
+
time_out))
|
2939
|
+
|
2940
|
+
async def _async_clear_ownership_from_element(self, element_guid: str, for_lineage: bool = None,
|
2941
|
+
for_duplicate_processing: bool = None, effective_time: str = None,
|
2942
|
+
server_name: str = None,
|
2943
|
+
time_out: int = default_time_out) -> None:
|
2944
|
+
"""
|
2945
|
+
Remove the ownership classification from an element. Async version.
|
2946
|
+
|
2947
|
+
Ownership: https://egeria-project.org/types/4/0445-Governance-Roles/
|
2948
|
+
|
2949
|
+
Parameters
|
2950
|
+
----------
|
2951
|
+
element_guid: str
|
2952
|
+
- the identity of the element to update
|
2953
|
+
for_lineage: bool, default is set by server
|
2954
|
+
- determines if elements classified as Memento should be returned - normally false
|
2955
|
+
for_duplicate_processing: bool, default is set by server
|
2956
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
2957
|
+
effective_time: str, default = None
|
2958
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
2959
|
+
server_name: str, default = None
|
2960
|
+
- name of the server instances for this request.
|
2961
|
+
time_out: int, default = default_time_out
|
2962
|
+
- http request timeout for this request
|
2963
|
+
|
2964
|
+
Returns
|
2965
|
+
-------
|
2966
|
+
None
|
2967
|
+
|
2968
|
+
Raises
|
2969
|
+
------
|
2970
|
+
InvalidParameterException
|
2971
|
+
one of the parameters is null or invalid or
|
2972
|
+
PropertyServerException
|
2973
|
+
There is a problem adding the element properties to the metadata repository or
|
2974
|
+
UserNotAuthorizedException
|
2975
|
+
the requesting user is not authorized to issue this request.
|
2976
|
+
|
2977
|
+
|
2978
|
+
"""
|
2979
|
+
if server_name is None:
|
2980
|
+
server_name = self.server_name
|
2981
|
+
|
2982
|
+
possible_query_params = query_string(
|
2983
|
+
[("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
|
2984
|
+
|
2985
|
+
url = (f"{base_path(self, server_name)}/elements/{element_guid}/ownership/remove"
|
2986
|
+
f"{possible_query_params}")
|
2987
|
+
|
2988
|
+
body = {
|
2989
|
+
"class": "ClassificationRequestBody",
|
2990
|
+
"effectiveTime": effective_time
|
2991
|
+
}
|
2992
|
+
|
2993
|
+
await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
2994
|
+
|
2995
|
+
def clear_ownership_from_element(self, element_guid: str, for_lineage: bool = None,
|
2996
|
+
for_duplicate_processing: bool = None, effective_time: str = None,
|
2997
|
+
server_name: str = None,
|
2998
|
+
time_out: int = default_time_out) -> None:
|
2999
|
+
"""
|
3000
|
+
Remove the ownership classification from an element.
|
3001
|
+
|
3002
|
+
Ownership: https://egeria-project.org/types/4/0445-Governance-Roles/
|
3003
|
+
|
3004
|
+
Parameters
|
3005
|
+
----------
|
3006
|
+
element_guid: str
|
3007
|
+
- the identity of the element to update
|
3008
|
+
for_lineage: bool, default is set by server
|
3009
|
+
- determines if elements classified as Memento should be returned - normally false
|
3010
|
+
for_duplicate_processing: bool, default is set by server
|
3011
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
3012
|
+
effective_time: str, default = None
|
3013
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
3014
|
+
server_name: str, default = None
|
3015
|
+
- name of the server instances for this request.
|
3016
|
+
time_out: int, default = default_time_out
|
3017
|
+
- http request timeout for this request
|
3018
|
+
|
3019
|
+
Returns
|
3020
|
+
-------
|
3021
|
+
None
|
3022
|
+
|
3023
|
+
Raises
|
3024
|
+
------
|
3025
|
+
InvalidParameterException
|
3026
|
+
one of the parameters is null or invalid or
|
3027
|
+
PropertyServerException
|
3028
|
+
There is a problem adding the element properties to the metadata repository or
|
3029
|
+
UserNotAuthorizedException
|
3030
|
+
the requesting user is not authorized to issue this request.
|
3031
|
+
|
3032
|
+
|
3033
|
+
"""
|
3034
|
+
|
3035
|
+
loop = asyncio.get_event_loop()
|
3036
|
+
loop.run_until_complete(
|
3037
|
+
self._async_clear_ownership_from_element(element_guid, for_lineage, for_duplicate_processing,
|
3038
|
+
effective_time, server_name,
|
3039
|
+
time_out))
|
3040
|
+
|
3041
|
+
async def _async_set_retention_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
|
3042
|
+
for_duplicate_processing: bool = None, server_name: str = None,
|
3043
|
+
time_out: int = default_time_out) -> None:
|
3044
|
+
"""
|
3045
|
+
Classify/reclassify the element (typically an asset) to indicate how long the element (or associated resource)
|
3046
|
+
is to be retained by the organization. The policy to apply to the element/resource is captured by the retentionBasis
|
3047
|
+
property. The dates after which the element/resource is archived and then deleted are specified in the archiveAfter and deleteAfter
|
3048
|
+
properties respectively. Async version
|
3049
|
+
|
3050
|
+
Governance Action Classifications: https://egeria-project.org/types/4/0422-Governance-Action-Classifications/
|
3051
|
+
|
3052
|
+
Parameters
|
3053
|
+
----------
|
3054
|
+
element_guid: str
|
3055
|
+
- the identity of the element to update
|
3056
|
+
body: dict
|
3057
|
+
- a dictionary structure containing the properties to set - see note below
|
3058
|
+
for_lineage: bool, default is set by server
|
3059
|
+
- determines if elements classified as Memento should be returned - normally false
|
3060
|
+
for_duplicate_processing: bool, default is set by server
|
3061
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
3062
|
+
server_name: str, default = None
|
3063
|
+
- name of the server instances for this request.
|
3064
|
+
time_out: int, default = default_time_out
|
3065
|
+
- http request timeout for this request
|
3066
|
+
|
3067
|
+
Returns
|
3068
|
+
-------
|
3069
|
+
[dict] | str
|
3070
|
+
Returns a string if no elements found and a list of dict of elements with the results.
|
3071
|
+
|
3072
|
+
Raises
|
3073
|
+
------
|
3074
|
+
InvalidParameterException
|
3075
|
+
one of the parameters is null or invalid or
|
3076
|
+
PropertyServerException
|
3077
|
+
There is a problem adding the element properties to the metadata repository or
|
3078
|
+
UserNotAuthorizedException
|
3079
|
+
the requesting user is not authorized to issue this request.
|
3080
|
+
|
3081
|
+
Note:
|
3082
|
+
|
3083
|
+
A sample dict structure is:
|
3084
|
+
|
3085
|
+
{
|
3086
|
+
"class" : "ClassificationRequestBody",
|
3087
|
+
"effectiveTime" : "an isoTimestamp",
|
3088
|
+
"properties" : {
|
3089
|
+
"class" : "RetentionClassificationProperties",
|
3090
|
+
"retentionBasis" : 0,
|
3091
|
+
"status" : 0,
|
3092
|
+
"confidence" : 0,
|
3093
|
+
"associatedGUID" : "Add value here",
|
3094
|
+
"archiveAfter" : "{{$isoTimestamp}}",
|
3095
|
+
"deleteAfter" : "{{$isoTimestamp}}",
|
3096
|
+
"steward" : "Add value here",
|
3097
|
+
"stewardTypeName" : "Add value here",
|
3098
|
+
"stewardPropertyName" : "Add value here",
|
3099
|
+
"source" : "Add value here",
|
3100
|
+
"notes" : "Add value here"
|
3101
|
+
}
|
3102
|
+
}
|
3103
|
+
|
3104
|
+
"""
|
3105
|
+
if server_name is None:
|
3106
|
+
server_name = self.server_name
|
3107
|
+
|
3108
|
+
possible_query_params = query_string(
|
3109
|
+
[("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
|
3110
|
+
|
3111
|
+
url = (f"{base_path(self, server_name)}/elements/{element_guid}/retention"
|
3112
|
+
f"{possible_query_params}")
|
3113
|
+
|
3114
|
+
await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
3115
|
+
|
3116
|
+
def set_retention_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
|
3117
|
+
for_duplicate_processing: bool = None, server_name: str = None,
|
3118
|
+
time_out: int = default_time_out) -> None:
|
3119
|
+
"""
|
3120
|
+
Classify/reclassify the element (typically an asset) to indicate how long the element (or associated resource)
|
3121
|
+
is to be retained by the organization. The policy to apply to the element/resource is captured by the retentionBasis
|
3122
|
+
property. The dates after which the element/resource is archived and then deleted are specified in the archiveAfter and deleteAfter
|
3123
|
+
properties respectively. Async version
|
3124
|
+
|
3125
|
+
Governance Action Classifications: https://egeria-project.org/types/4/0422-Governance-Action-Classifications/
|
3126
|
+
|
3127
|
+
Parameters
|
3128
|
+
----------
|
3129
|
+
element_guid: str
|
3130
|
+
- the identity of the element to update
|
3131
|
+
body: dict
|
3132
|
+
- a dictionary structure containing the properties to set - see note below
|
3133
|
+
for_lineage: bool, default is set by server
|
3134
|
+
- determines if elements classified as Memento should be returned - normally false
|
3135
|
+
for_duplicate_processing: bool, default is set by server
|
3136
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
3137
|
+
server_name: str, default = None
|
3138
|
+
- name of the server instances for this request.
|
3139
|
+
time_out: int, default = default_time_out
|
3140
|
+
- http request timeout for this request
|
3141
|
+
|
3142
|
+
Returns
|
3143
|
+
-------
|
3144
|
+
[dict] | str
|
3145
|
+
Returns a string if no elements found and a list of dict of elements with the results.
|
3146
|
+
|
3147
|
+
Raises
|
3148
|
+
------
|
3149
|
+
InvalidParameterException
|
3150
|
+
one of the parameters is null or invalid or
|
3151
|
+
PropertyServerException
|
3152
|
+
There is a problem adding the element properties to the metadata repository or
|
3153
|
+
UserNotAuthorizedException
|
3154
|
+
the requesting user is not authorized to issue this request.
|
3155
|
+
|
3156
|
+
Note:
|
3157
|
+
|
3158
|
+
A sample dict structure is:
|
3159
|
+
|
3160
|
+
{
|
3161
|
+
"class" : "ClassificationRequestBody",
|
3162
|
+
"effectiveTime" : "an isoTimestamp",
|
3163
|
+
"properties" : {
|
3164
|
+
"class" : "RetentionClassificationProperties",
|
3165
|
+
"retentionBasis" : 0,
|
3166
|
+
"status" : 0,
|
3167
|
+
"confidence" : 0,
|
3168
|
+
"associatedGUID" : "Add value here",
|
3169
|
+
"archiveAfter" : "{{$isoTimestamp}}",
|
3170
|
+
"deleteAfter" : "{{$isoTimestamp}}",
|
3171
|
+
"steward" : "Add value here",
|
3172
|
+
"stewardTypeName" : "Add value here",
|
3173
|
+
"stewardPropertyName" : "Add value here",
|
3174
|
+
"source" : "Add value here",
|
3175
|
+
"notes" : "Add value here"
|
3176
|
+
}
|
3177
|
+
}
|
3178
|
+
"""
|
3179
|
+
|
3180
|
+
loop = asyncio.get_event_loop()
|
3181
|
+
loop.run_until_complete(
|
3182
|
+
self._async_set_retention_classification(element_guid, body, for_lineage, for_duplicate_processing,
|
3183
|
+
server_name, time_out))
|
3184
|
+
|
3185
|
+
async def _async_clear_retention_classification(self, element_guid: str, for_lineage: bool = None,
|
3186
|
+
for_duplicate_processing: bool = None, effective_time: str = None,
|
3187
|
+
server_name: str = None,
|
3188
|
+
time_out: int = default_time_out) -> None:
|
3189
|
+
"""
|
3190
|
+
Remove the retention classification from the element. This normally occurs when the organization has lost
|
3191
|
+
track of the level of retention to assign to the element. Async Version.
|
3192
|
+
|
3193
|
+
Governance Action Classifications: https://egeria-project.org/types/4/0422-Governance-Action-Classifications/
|
3194
|
+
|
3195
|
+
Parameters
|
3196
|
+
----------
|
3197
|
+
element_guid: str
|
3198
|
+
- the identity of the element to update
|
3199
|
+
for_lineage: bool, default is set by server
|
3200
|
+
- determines if elements classified as Memento should be returned - normally false
|
3201
|
+
for_duplicate_processing: bool, default is set by server
|
3202
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
3203
|
+
effective_time: str, default = None
|
3204
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
3205
|
+
server_name: str, default = None
|
3206
|
+
- name of the server instances for this request.
|
3207
|
+
time_out: int, default = default_time_out
|
3208
|
+
- http request timeout for this request
|
3209
|
+
|
3210
|
+
Returns
|
3211
|
+
-------
|
3212
|
+
[dict] | str
|
3213
|
+
Returns a string if no elements found and a list of dict of elements with the results.
|
3214
|
+
|
3215
|
+
Raises
|
3216
|
+
------
|
3217
|
+
InvalidParameterException
|
3218
|
+
one of the parameters is null or invalid or
|
3219
|
+
PropertyServerException
|
3220
|
+
There is a problem adding the element properties to the metadata repository or
|
3221
|
+
UserNotAuthorizedException
|
3222
|
+
the requesting user is not authorized to issue this request.
|
3223
|
+
|
3224
|
+
|
3225
|
+
"""
|
3226
|
+
if server_name is None:
|
3227
|
+
server_name = self.server_name
|
3228
|
+
|
3229
|
+
possible_query_params = query_string(
|
3230
|
+
[("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
|
3231
|
+
|
3232
|
+
url = (f"{base_path(self, server_name)}/elements/{element_guid}/retention/remove"
|
3233
|
+
f"{possible_query_params}")
|
3234
|
+
|
3235
|
+
body = {
|
3236
|
+
"class": "ClassificationRequestBody",
|
3237
|
+
"effectiveTime": effective_time
|
3238
|
+
}
|
3239
|
+
|
3240
|
+
await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
3241
|
+
|
3242
|
+
def clear_retention_classification(self, element_guid: str, for_lineage: bool = None,
|
3243
|
+
for_duplicate_processing: bool = None, effective_time: str = None,
|
3244
|
+
server_name: str = None,
|
3245
|
+
time_out: int = default_time_out) -> None:
|
3246
|
+
"""
|
3247
|
+
Remove the retention classification from the element. This normally occurs when the organization has lost
|
3248
|
+
track of the level of retention to assign to the element.
|
3249
|
+
|
3250
|
+
Governance Action Classifications: https://egeria-project.org/types/4/0422-Governance-Action-Classifications/
|
3251
|
+
|
3252
|
+
Parameters
|
3253
|
+
----------
|
3254
|
+
element_guid: str
|
3255
|
+
- the identity of the element to update
|
3256
|
+
for_lineage: bool, default is set by server
|
3257
|
+
- determines if elements classified as Memento should be returned - normally false
|
3258
|
+
for_duplicate_processing: bool, default is set by server
|
3259
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
3260
|
+
effective_time: str, default = None
|
3261
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
3262
|
+
server_name: str, default = None
|
3263
|
+
- name of the server instances for this request.
|
3264
|
+
time_out: int, default = default_time_out
|
3265
|
+
- http request timeout for this request
|
3266
|
+
|
3267
|
+
Returns
|
3268
|
+
-------
|
3269
|
+
[dict] | str
|
3270
|
+
Returns a string if no elements found and a list of dict of elements with the results.
|
3271
|
+
|
3272
|
+
Raises
|
3273
|
+
------
|
3274
|
+
InvalidParameterException
|
3275
|
+
one of the parameters is null or invalid or
|
3276
|
+
PropertyServerException
|
3277
|
+
There is a problem adding the element properties to the metadata repository or
|
3278
|
+
UserNotAuthorizedException
|
3279
|
+
the requesting user is not authorized to issue this request.
|
3280
|
+
|
3281
|
+
|
3282
|
+
"""
|
3283
|
+
|
3284
|
+
loop = asyncio.get_event_loop()
|
3285
|
+
loop.run_until_complete(
|
3286
|
+
self._async_clear_retention_classification(element_guid, for_lineage, for_duplicate_processing,
|
3287
|
+
effective_time, server_name,
|
3288
|
+
time_out))
|
3289
|
+
|
3290
|
+
async def _async_set_security_tags_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
|
3291
|
+
for_duplicate_processing: bool = None, server_name: str = None,
|
3292
|
+
time_out: int = default_time_out) -> None:
|
3293
|
+
"""
|
3294
|
+
Add or replace the security tags for an element. Async versuib,
|
3295
|
+
|
3296
|
+
Security Tags: https://egeria-project.org/types/4/0423-Security-Definitions/
|
3297
|
+
|
3298
|
+
Parameters
|
3299
|
+
----------
|
3300
|
+
element_guid: str
|
3301
|
+
- the identity of the element to update
|
3302
|
+
body: dict
|
3303
|
+
- a dictionary structure containing the properties to set - see note below
|
3304
|
+
for_lineage: bool, default is set by server
|
3305
|
+
- determines if elements classified as Memento should be returned - normally false
|
3306
|
+
for_duplicate_processing: bool, default is set by server
|
3307
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
3308
|
+
server_name: str, default = None
|
3309
|
+
- name of the server instances for this request.
|
3310
|
+
time_out: int, default = default_time_out
|
3311
|
+
- http request timeout for this request
|
3312
|
+
|
3313
|
+
Returns
|
3314
|
+
-------
|
3315
|
+
[dict] | str
|
3316
|
+
Returns a string if no elements found and a list of dict of elements with the results.
|
3317
|
+
|
3318
|
+
Raises
|
3319
|
+
------
|
3320
|
+
InvalidParameterException
|
3321
|
+
one of the parameters is null or invalid or
|
3322
|
+
PropertyServerException
|
3323
|
+
There is a problem adding the element properties to the metadata repository or
|
3324
|
+
UserNotAuthorizedException
|
3325
|
+
the requesting user is not authorized to issue this request.
|
3326
|
+
|
3327
|
+
Note:
|
3328
|
+
|
3329
|
+
A sample dict structure is:
|
3330
|
+
|
3331
|
+
{
|
3332
|
+
"class" : "ClassificationRequestBody",
|
3333
|
+
"effectiveTime" : "an isoTimestamp",
|
3334
|
+
"properties" : {
|
3335
|
+
"class" : "SecurityTagsProperties",
|
3336
|
+
"securityLabels" : [ "Label1", "Label2" ],
|
3337
|
+
"securityProperties" : {
|
3338
|
+
"propertyName1" : "add property value here",
|
3339
|
+
"propertyName2" : "add property value here"
|
3340
|
+
},
|
3341
|
+
"accessGroups" : {
|
3342
|
+
"groupName1" : [ "operation1", "operation2" ],
|
3343
|
+
"groupName2" : [ "operation1", "operation3" ]
|
3344
|
+
}
|
3345
|
+
}
|
3346
|
+
}
|
3347
|
+
|
3348
|
+
|
3349
|
+
"""
|
3350
|
+
if server_name is None:
|
3351
|
+
server_name = self.server_name
|
3352
|
+
|
3353
|
+
possible_query_params = query_string(
|
3354
|
+
[("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
|
3355
|
+
|
3356
|
+
url = (f"{base_path(self, server_name)}/elements/{element_guid}/security-tags"
|
3357
|
+
f"{possible_query_params}")
|
3358
|
+
|
3359
|
+
await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
3360
|
+
|
3361
|
+
def set_security_tags_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
|
3362
|
+
for_duplicate_processing: bool = None, server_name: str = None,
|
3363
|
+
time_out: int = default_time_out) -> None:
|
3364
|
+
"""
|
3365
|
+
Add or replace the security tags for an element. Async versuib,
|
3366
|
+
|
3367
|
+
Security Tags: https://egeria-project.org/types/4/0423-Security-Definitions/
|
3368
|
+
|
3369
|
+
Parameters
|
3370
|
+
----------
|
3371
|
+
element_guid: str
|
3372
|
+
- the identity of the element to update
|
3373
|
+
body: dict
|
3374
|
+
- a dictionary structure containing the properties to set - see note below
|
3375
|
+
for_lineage: bool, default is set by server
|
3376
|
+
- determines if elements classified as Memento should be returned - normally false
|
3377
|
+
for_duplicate_processing: bool, default is set by server
|
3378
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
3379
|
+
server_name: str, default = None
|
3380
|
+
- name of the server instances for this request.
|
3381
|
+
time_out: int, default = default_time_out
|
3382
|
+
- http request timeout for this request
|
3383
|
+
|
3384
|
+
Returns
|
3385
|
+
-------
|
3386
|
+
[dict] | str
|
3387
|
+
Returns a string if no elements found and a list of dict of elements with the results.
|
3388
|
+
|
3389
|
+
Raises
|
3390
|
+
------
|
3391
|
+
InvalidParameterException
|
3392
|
+
one of the parameters is null or invalid or
|
3393
|
+
PropertyServerException
|
3394
|
+
There is a problem adding the element properties to the metadata repository or
|
3395
|
+
UserNotAuthorizedException
|
3396
|
+
the requesting user is not authorized to issue this request.
|
3397
|
+
|
3398
|
+
Note:
|
3399
|
+
|
3400
|
+
A sample dict structure is:
|
3401
|
+
|
3402
|
+
{
|
3403
|
+
"class" : "ClassificationRequestBody",
|
3404
|
+
"effectiveTime" : "an isoTimestamp",
|
3405
|
+
"properties" : {
|
3406
|
+
"class" : "SecurityTagsProperties",
|
3407
|
+
"securityLabels" : [ "Label1", "Label2" ],
|
3408
|
+
"securityProperties" : {
|
3409
|
+
"propertyName1" : "add property value here",
|
3410
|
+
"propertyName2" : "add property value here"
|
3411
|
+
},
|
3412
|
+
"accessGroups" : {
|
3413
|
+
"groupName1" : [ "operation1", "operation2" ],
|
3414
|
+
"groupName2" : [ "operation1", "operation3" ]
|
3415
|
+
}
|
3416
|
+
}
|
3417
|
+
}
|
3418
|
+
|
3419
|
+
|
3420
|
+
"""
|
3421
|
+
|
3422
|
+
loop = asyncio.get_event_loop()
|
3423
|
+
loop.run_until_complete(
|
3424
|
+
self._async_set_security_tags_classification(element_guid, body, for_lineage, for_duplicate_processing,
|
3425
|
+
server_name, time_out))
|
3426
|
+
|
3427
|
+
async def _async_clear_security_tags_classification(self, element_guid: str, for_lineage: bool = None,
|
3428
|
+
for_duplicate_processing: bool = None,
|
3429
|
+
effective_time: str = None, server_name: str = None,
|
3430
|
+
time_out: int = default_time_out) -> None:
|
3431
|
+
"""
|
3432
|
+
Remove the security-tags classification from the element.
|
3433
|
+
|
3434
|
+
Security Tags: https://egeria-project.org/types/4/0423-Security-Definitions/
|
3435
|
+
|
3436
|
+
Parameters
|
3437
|
+
----------
|
3438
|
+
element_guid: str
|
3439
|
+
- the identity of the element to update
|
3440
|
+
for_lineage: bool, default is set by server
|
3441
|
+
- determines if elements classified as Memento should be returned - normally false
|
3442
|
+
for_duplicate_processing: bool, default is set by server
|
3443
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
3444
|
+
server_name: str, default = None
|
3445
|
+
- name of the server instances for this request.
|
3446
|
+
time_out: int, default = default_time_out
|
3447
|
+
- http request timeout for this request
|
3448
|
+
|
3449
|
+
Returns
|
3450
|
+
-------
|
3451
|
+
None
|
3452
|
+
|
3453
|
+
Raises
|
3454
|
+
------
|
3455
|
+
InvalidParameterException
|
3456
|
+
one of the parameters is null or invalid or
|
3457
|
+
PropertyServerException
|
3458
|
+
There is a problem adding the element properties to the metadata repository or
|
3459
|
+
UserNotAuthorizedException
|
3460
|
+
the requesting user is not authorized to issue this request.
|
3461
|
+
|
3462
|
+
|
3463
|
+
"""
|
3464
|
+
if server_name is None:
|
3465
|
+
server_name = self.server_name
|
3466
|
+
|
3467
|
+
possible_query_params = query_string(
|
3468
|
+
[("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
|
3469
|
+
|
3470
|
+
url = (f"{base_path(self, server_name)}/elements/{element_guid}/security-tags/remove"
|
3471
|
+
f"{possible_query_params}")
|
3472
|
+
|
3473
|
+
body = {
|
3474
|
+
"class": "ClassificationRequestBody",
|
3475
|
+
"effectiveTime": effective_time
|
3476
|
+
}
|
3477
|
+
|
3478
|
+
await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
3479
|
+
|
3480
|
+
def clear_security_tags_classification(self, element_guid: str, for_lineage: bool = None,
|
3481
|
+
for_duplicate_processing: bool = None, effective_time: str = None,
|
3482
|
+
server_name: str = None,
|
3483
|
+
time_out: int = default_time_out) -> None:
|
3484
|
+
"""
|
3485
|
+
Remove the security-tags classification from the element.
|
3486
|
+
|
3487
|
+
Security Tags: https://egeria-project.org/types/4/0423-Security-Definitions/
|
3488
|
+
|
3489
|
+
Parameters
|
3490
|
+
----------
|
3491
|
+
element_guid: str
|
3492
|
+
- the identity of the element to update
|
3493
|
+
for_lineage: bool, default is set by server
|
3494
|
+
- determines if elements classified as Memento should be returned - normally false
|
3495
|
+
for_duplicate_processing: bool, default is set by server
|
3496
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
3497
|
+
effective_time: str, default = None
|
3498
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
3499
|
+
server_name: str, default = None
|
3500
|
+
- name of the server instances for this request.
|
3501
|
+
time_out: int, default = default_time_out
|
3502
|
+
- http request timeout for this request
|
3503
|
+
|
3504
|
+
Returns
|
3505
|
+
-------
|
3506
|
+
None
|
3507
|
+
|
3508
|
+
Raises
|
3509
|
+
------
|
3510
|
+
InvalidParameterException
|
3511
|
+
one of the parameters is null or invalid or
|
3512
|
+
PropertyServerException
|
3513
|
+
There is a problem adding the element properties to the metadata repository or
|
3514
|
+
UserNotAuthorizedException
|
3515
|
+
the requesting user is not authorized to issue this request.
|
3516
|
+
|
3517
|
+
|
3518
|
+
"""
|
3519
|
+
|
3520
|
+
loop = asyncio.get_event_loop()
|
3521
|
+
loop.run_until_complete(
|
3522
|
+
self._async_clear_security_tags_classification(element_guid, for_lineage, for_duplicate_processing,
|
3523
|
+
effective_time, server_name, time_out))
|
3524
|
+
|
3525
|
+
async def _async_setup_semantic_assignment(self, glossary_term_guid: str, element_guid: str, body: dict,
|
3526
|
+
for_lineage: bool = None, for_duplicate_processing: bool = None,
|
3527
|
+
server_name: str = None, time_out: int = default_time_out) -> None:
|
3528
|
+
"""
|
3529
|
+
Create a semantic assignment relationship between a glossary term and an element (normally a schema attribute,
|
3530
|
+
data field or asset). This relationship indicates that the data associated with the element meaning matches
|
3531
|
+
the description in the glossary term. Async version
|
3532
|
+
|
3533
|
+
Semantic Assignments: https://egeria-project.org/types/3/0370-Semantic-Assignment/
|
3534
|
+
|
3535
|
+
Parameters
|
3536
|
+
----------
|
3537
|
+
glossary_term_guid: str
|
3538
|
+
- identity of glossary to assign
|
3539
|
+
element_guid: str
|
3540
|
+
- the identity of the element to update
|
3541
|
+
body: dict
|
3542
|
+
- a dictionary structure containing the properties to set - see note below
|
3543
|
+
for_lineage: bool, default is set by server
|
3544
|
+
- determines if elements classified as Memento should be returned - normally false
|
3545
|
+
for_duplicate_processing: bool, default is set by server
|
3546
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
3547
|
+
server_name: str, default = None
|
3548
|
+
- name of the server instances for this request.
|
3549
|
+
time_out: int, default = default_time_out
|
3550
|
+
- http request timeout for this request
|
3551
|
+
|
3552
|
+
Returns
|
3553
|
+
-------
|
3554
|
+
None
|
3555
|
+
|
3556
|
+
Raises
|
3557
|
+
------
|
3558
|
+
InvalidParameterException
|
3559
|
+
one of the parameters is null or invalid or
|
3560
|
+
PropertyServerException
|
3561
|
+
There is a problem adding the element properties to the metadata repository or
|
3562
|
+
UserNotAuthorizedException
|
3563
|
+
the requesting user is not authorized to issue this request.
|
3564
|
+
|
3565
|
+
Note:
|
3566
|
+
|
3567
|
+
A sample dict structure is:
|
3568
|
+
|
3569
|
+
{
|
3570
|
+
"class" : "RelationshipRequestBody",
|
3571
|
+
"effectiveTime" : "an isoTimestamp",
|
3572
|
+
"relationshipProperties" : {
|
3573
|
+
"class": "SemanticAssignmentProperties",
|
3574
|
+
"expression" : "add value here",
|
3575
|
+
"description" : "add value here",
|
3576
|
+
"status" : "VALIDATED",
|
3577
|
+
"confidence" : 100,
|
3578
|
+
"createdBy" : "add value here",
|
3579
|
+
"steward" : "add value here",
|
3580
|
+
"source" : "add value here"
|
3581
|
+
}
|
3582
|
+
}
|
3583
|
+
|
3584
|
+
|
3585
|
+
"""
|
3586
|
+
if server_name is None:
|
3587
|
+
server_name = self.server_name
|
3588
|
+
|
3589
|
+
possible_query_params = query_string(
|
3590
|
+
[("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
|
3591
|
+
|
3592
|
+
url = (f"{base_path(self, server_name)}/elements/{element_guid}/semantic-assignment/terms"
|
3593
|
+
f"/{glossary_term_guid}{possible_query_params}")
|
3594
|
+
|
3595
|
+
await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
3596
|
+
|
3597
|
+
def setup_semantic_assignment(self, glossary_term_guid: str, element_guid: str, body: dict,
|
3598
|
+
for_lineage: bool = None, for_duplicate_processing: bool = None,
|
3599
|
+
server_name: str = None, time_out: int = default_time_out) -> None:
|
3600
|
+
"""
|
3601
|
+
Create a semantic assignment relationship between a glossary term and an element (normally a schema attribute,
|
3602
|
+
data field or asset). This relationship indicates that the data associated with the element meaning matches
|
3603
|
+
the description in the glossary term.
|
3604
|
+
|
3605
|
+
Semantic Assignments: https://egeria-project.org/types/3/0370-Semantic-Assignment/
|
3606
|
+
|
3607
|
+
Parameters
|
3608
|
+
----------
|
3609
|
+
glossary_term_guid: str
|
3610
|
+
- identity of glossary to assign
|
3611
|
+
element_guid: str
|
3612
|
+
- the identity of the element to update
|
3613
|
+
body: dict
|
3614
|
+
- a dictionary structure containing the properties to set - see note below
|
3615
|
+
for_lineage: bool, default is set by server
|
3616
|
+
- determines if elements classified as Memento should be returned - normally false
|
3617
|
+
for_duplicate_processing: bool, default is set by server
|
3618
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
3619
|
+
server_name: str, default = None
|
3620
|
+
- name of the server instances for this request.
|
3621
|
+
time_out: int, default = default_time_out
|
3622
|
+
- http request timeout for this request
|
3623
|
+
|
3624
|
+
Returns
|
3625
|
+
-------
|
3626
|
+
None
|
3627
|
+
|
3628
|
+
Raises
|
3629
|
+
------
|
3630
|
+
InvalidParameterException
|
3631
|
+
one of the parameters is null or invalid or
|
3632
|
+
PropertyServerException
|
3633
|
+
There is a problem adding the element properties to the metadata repository or
|
3634
|
+
UserNotAuthorizedException
|
3635
|
+
the requesting user is not authorized to issue this request.
|
3636
|
+
|
3637
|
+
Note:
|
3638
|
+
|
3639
|
+
A sample dict structure is:
|
3640
|
+
|
3641
|
+
{
|
3642
|
+
"class" : "RelationshipRequestBody",
|
3643
|
+
"effectiveTime" : "an isoTimestamp",
|
3644
|
+
"relationshipProperties" : {
|
3645
|
+
"class": "SemanticAssignmentProperties",
|
3646
|
+
"expression" : "add value here",
|
3647
|
+
"description" : "add value here",
|
3648
|
+
"status" : "VALIDATED",
|
3649
|
+
"confidence" : 100,
|
3650
|
+
"createdBy" : "add value here",
|
3651
|
+
"steward" : "add value here",
|
3652
|
+
"source" : "add value here"
|
3653
|
+
}
|
3654
|
+
}
|
3655
|
+
|
3656
|
+
"""
|
3657
|
+
|
3658
|
+
loop = asyncio.get_event_loop()
|
3659
|
+
loop.run_until_complete(
|
3660
|
+
self._async_setup_semantic_assignment(glossary_term_guid, element_guid, body, for_lineage,
|
3661
|
+
for_duplicate_processing, server_name, time_out))
|
3662
|
+
|
3663
|
+
async def _async_clear_semantic_assignment_classification(self, glossary_term_guid: str, element_guid: str,
|
3664
|
+
for_lineage: bool = None,
|
3665
|
+
for_duplicate_processing: bool = None,
|
3666
|
+
effective_time: str = None,
|
3667
|
+
server_name: str = None,
|
3668
|
+
time_out: int = default_time_out) -> None:
|
3669
|
+
"""
|
3670
|
+
Remove the semantic_assignment classification from the element. Async version.
|
3671
|
+
|
3672
|
+
Security Tags: https://egeria-project.org/types/4/0423-Security-Definitions/
|
3673
|
+
|
3674
|
+
Parameters
|
3675
|
+
----------
|
3676
|
+
glossary_term_guid: str
|
3677
|
+
- identity of glossary to remove
|
3678
|
+
element_guid: str
|
3679
|
+
- the identity of the element to update
|
3680
|
+
for_lineage: bool, default is set by server
|
3681
|
+
- determines if elements classified as Memento should be returned - normally false
|
3682
|
+
for_duplicate_processing: bool, default is set by server
|
3683
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
3684
|
+
effective_time: str, default = None
|
3685
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
3686
|
+
server_name: str, default = None
|
3687
|
+
- name of the server instances for this request.
|
3688
|
+
time_out: int, default = default_time_out
|
3689
|
+
- http request timeout for this request
|
3690
|
+
|
3691
|
+
Returns
|
3692
|
+
-------
|
3693
|
+
None
|
3694
|
+
|
3695
|
+
Raises
|
3696
|
+
------
|
3697
|
+
InvalidParameterException
|
3698
|
+
one of the parameters is null or invalid or
|
3699
|
+
PropertyServerException
|
3700
|
+
There is a problem adding the element properties to the metadata repository or
|
3701
|
+
UserNotAuthorizedException
|
3702
|
+
the requesting user is not authorized to issue this request.
|
3703
|
+
|
3704
|
+
"""
|
3705
|
+
if server_name is None:
|
3706
|
+
server_name = self.server_name
|
3707
|
+
|
3708
|
+
possible_query_params = query_string(
|
3709
|
+
[("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
|
3710
|
+
|
3711
|
+
url = (f"{base_path(self, server_name)}/elements/{element_guid}/semantic-assignment/terms/"
|
3712
|
+
f"{glossary_term_guid}/remove{possible_query_params}")
|
3713
|
+
|
3714
|
+
body = {
|
3715
|
+
"class": "ClassificationRequestBody",
|
3716
|
+
"effectiveTime": effective_time
|
3717
|
+
}
|
3718
|
+
|
3719
|
+
await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
3720
|
+
|
3721
|
+
def clear_semantic_assignment_classification(self, glossary_term_guid: str, element_guid: str,
|
3722
|
+
for_lineage: bool = None, for_duplicate_processing: bool = None,
|
3723
|
+
effective_time: str = None,
|
3724
|
+
server_name: str = None, time_out: int = default_time_out) -> None:
|
3725
|
+
"""
|
3726
|
+
Remove the semantic_assignment classification from the element.
|
3727
|
+
|
3728
|
+
Security Tags: https://egeria-project.org/types/4/0423-Security-Definitions/
|
3729
|
+
|
3730
|
+
Parameters
|
3731
|
+
----------
|
3732
|
+
glossary_term_guid: str
|
3733
|
+
- identity of glossary to remove
|
3734
|
+
element_guid: str
|
3735
|
+
- the identity of the element to update
|
3736
|
+
for_lineage: bool, default is set by server
|
3737
|
+
- determines if elements classified as Memento should be returned - normally false
|
3738
|
+
for_duplicate_processing: bool, default is set by server
|
3739
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
3740
|
+
effective_time: str, default = None
|
3741
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
3742
|
+
server_name: str, default = None
|
3743
|
+
- name of the server instances for this request.
|
3744
|
+
time_out: int, default = default_time_out
|
3745
|
+
- http request timeout for this request
|
3746
|
+
|
3747
|
+
Returns
|
3748
|
+
-------
|
3749
|
+
None
|
3750
|
+
|
3751
|
+
Raises
|
3752
|
+
------
|
3753
|
+
InvalidParameterException
|
3754
|
+
one of the parameters is null or invalid or
|
3755
|
+
PropertyServerException
|
3756
|
+
There is a problem adding the element properties to the metadata repository or
|
3757
|
+
UserNotAuthorizedException
|
3758
|
+
the requesting user is not authorized to issue this request.
|
3759
|
+
|
3760
|
+
|
3761
|
+
"""
|
3762
|
+
|
3763
|
+
loop = asyncio.get_event_loop()
|
3764
|
+
loop.run_until_complete(
|
3765
|
+
self._async_clear_semantic_assignment_classification(glossary_term_guid, element_guid, for_lineage,
|
3766
|
+
for_duplicate_processing, effective_time, server_name,
|
3767
|
+
time_out))
|
3768
|
+
|
3769
|
+
async def _async_add_element_to_subject_area(self, element_guid: str, body: dict, for_lineage: bool = None,
|
3770
|
+
for_duplicate_processing: bool = None, server_name: str = None,
|
3771
|
+
time_out: int = default_time_out) -> None:
|
3772
|
+
"""
|
3773
|
+
Classify the element to assert that the definitions it represents are part of a subject area definition. Async
|
3774
|
+
|
3775
|
+
Subject Areas: https://egeria-project.org/types/4/0425-Subject-Areas/
|
3776
|
+
|
3777
|
+
Parameters
|
3778
|
+
----------
|
3779
|
+
element_guid: str
|
3780
|
+
- the identity of the element to update
|
3781
|
+
body: dict
|
3782
|
+
- a dictionary structure containing the properties to set - see note below
|
3783
|
+
for_lineage: bool, default is set by server
|
3784
|
+
- determines if elements classified as Memento should be returned - normally false
|
3785
|
+
for_duplicate_processing: bool, default is set by server
|
3786
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
3787
|
+
server_name: str, default = None
|
3788
|
+
- name of the server instances for this request.
|
3789
|
+
time_out: int, default = default_time_out
|
3790
|
+
- http request timeout for this request
|
3791
|
+
|
3792
|
+
Returns
|
3793
|
+
-------
|
3794
|
+
None
|
3795
|
+
|
3796
|
+
Raises
|
3797
|
+
------
|
3798
|
+
InvalidParameterException
|
3799
|
+
one of the parameters is null or invalid or
|
3800
|
+
PropertyServerException
|
3801
|
+
There is a problem adding the element properties to the metadata repository or
|
3802
|
+
UserNotAuthorizedException
|
3803
|
+
the requesting user is not authorized to issue this request.
|
3804
|
+
|
3805
|
+
Note:
|
3806
|
+
|
3807
|
+
A sample dict structure is:
|
3808
|
+
|
3809
|
+
{
|
3810
|
+
"class" : "ClassificationRequestBody",
|
3811
|
+
"effectiveTime" : "an isoTimestamp",
|
3812
|
+
"properties" : {
|
3813
|
+
"class" : "SubjectAreaMemberProperties",
|
3814
|
+
"subjectAreaName" : "Add value here"
|
3815
|
+
}
|
3816
|
+
}
|
3817
|
+
|
3818
|
+
|
3819
|
+
"""
|
3820
|
+
if server_name is None:
|
3821
|
+
server_name = self.server_name
|
3822
|
+
|
3823
|
+
possible_query_params = query_string(
|
3824
|
+
[("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
|
3825
|
+
|
3826
|
+
url = (f"{base_path(self, server_name)}/elements/{element_guid}/subject-area-member"
|
3827
|
+
f"{possible_query_params}")
|
3828
|
+
|
3829
|
+
await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
3830
|
+
|
3831
|
+
def add_element_to_subject_area(self, element_guid: str, body: dict, for_lineage: bool = None,
|
3832
|
+
for_duplicate_processing: bool = None, server_name: str = None,
|
3833
|
+
time_out: int = default_time_out) -> None:
|
3834
|
+
"""
|
3835
|
+
Classify the element to assert that the definitions it represents are part of a subject area definition. Async
|
3836
|
+
|
3837
|
+
Subject Areas: https://egeria-project.org/types/4/0425-Subject-Areas/
|
3838
|
+
|
3839
|
+
Parameters
|
3840
|
+
----------
|
3841
|
+
element_guid: str
|
3842
|
+
- the identity of the element to update
|
3843
|
+
body: dict
|
3844
|
+
- a dictionary structure containing the properties to set - see note below
|
3845
|
+
for_lineage: bool, default is set by server
|
3846
|
+
- determines if elements classified as Memento should be returned - normally false
|
3847
|
+
for_duplicate_processing: bool, default is set by server
|
3848
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
3849
|
+
server_name: str, default = None
|
3850
|
+
- name of the server instances for this request.
|
3851
|
+
time_out: int, default = default_time_out
|
3852
|
+
- http request timeout for this request
|
3853
|
+
|
3854
|
+
Returns
|
3855
|
+
-------
|
3856
|
+
None
|
3857
|
+
|
3858
|
+
Raises
|
3859
|
+
------
|
3860
|
+
InvalidParameterException
|
3861
|
+
one of the parameters is null or invalid or
|
3862
|
+
PropertyServerException
|
3863
|
+
There is a problem adding the element properties to the metadata repository or
|
3864
|
+
UserNotAuthorizedException
|
3865
|
+
the requesting user is not authorized to issue this request.
|
3866
|
+
|
3867
|
+
Note:
|
3868
|
+
|
3869
|
+
A sample dict structure is:
|
3870
|
+
|
3871
|
+
{
|
3872
|
+
"class" : "ClassificationRequestBody",
|
3873
|
+
"effectiveTime" : "an isoTimestamp",
|
3874
|
+
"properties" : {
|
3875
|
+
"class" : "SubjectAreaMemberProperties",
|
3876
|
+
"subjectAreaName" : "Add value here"
|
3877
|
+
}
|
3878
|
+
}
|
3879
|
+
|
3880
|
+
|
3881
|
+
"""
|
3882
|
+
|
3883
|
+
loop = asyncio.get_event_loop()
|
3884
|
+
loop.run_until_complete(
|
3885
|
+
self._async_add_element_to_subject_area(element_guid, body, for_lineage, for_duplicate_processing,
|
3886
|
+
server_name, time_out))
|
3887
|
+
|
3888
|
+
async def _async_remove_element_from_subject_area(self, element_guid: str, for_lineage: bool = None,
|
3889
|
+
for_duplicate_processing: bool = None, effective_time: str = None,
|
3890
|
+
server_name: str = None,
|
3891
|
+
time_out: int = default_time_out) -> None:
|
3892
|
+
"""
|
3893
|
+
Remove the subject area designation from the identified element. Async version.
|
3894
|
+
|
3895
|
+
Subject Areas: https://egeria-project.org/types/4/0425-Subject-Areas/
|
3896
|
+
|
3897
|
+
Parameters
|
3898
|
+
----------
|
3899
|
+
element_guid: str
|
3900
|
+
- the identity of the element to update
|
3901
|
+
for_lineage: bool, default is set by server
|
3902
|
+
- determines if elements classified as Memento should be returned - normally false
|
3903
|
+
for_duplicate_processing: bool, default is set by server
|
3904
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
3905
|
+
effective_time: str, default = None
|
3906
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
3907
|
+
server_name: str, default = None
|
3908
|
+
- name of the server instances for this request.
|
3909
|
+
time_out: int, default = default_time_out
|
3910
|
+
- http request timeout for this request
|
3911
|
+
|
3912
|
+
Returns
|
3913
|
+
-------
|
3914
|
+
None
|
3915
|
+
|
3916
|
+
Raises
|
3917
|
+
------
|
3918
|
+
InvalidParameterException
|
3919
|
+
one of the parameters is null or invalid or
|
3920
|
+
PropertyServerException
|
3921
|
+
There is a problem adding the element properties to the metadata repository or
|
3922
|
+
UserNotAuthorizedException
|
3923
|
+
the requesting user is not authorized to issue this request.
|
3924
|
+
|
3925
|
+
|
3926
|
+
"""
|
3927
|
+
if server_name is None:
|
3928
|
+
server_name = self.server_name
|
3929
|
+
|
3930
|
+
possible_query_params = query_string(
|
3931
|
+
[("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
|
3932
|
+
|
3933
|
+
url = (f"{base_path(self, server_name)}/elements/{element_guid}/subject-area-member"
|
3934
|
+
f"/remove{possible_query_params}")
|
3935
|
+
|
3936
|
+
body = {
|
3937
|
+
"class": "ClassificationRequestBody",
|
3938
|
+
"effectiveTime": effective_time
|
3939
|
+
}
|
3940
|
+
|
3941
|
+
await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
|
3942
|
+
|
3943
|
+
def remove_element_from_subject_area(self, element_guid: str, for_lineage: bool = None,
|
3944
|
+
for_duplicate_processing: bool = None, effective_time: str = None,
|
3945
|
+
server_name: str = None,
|
3946
|
+
time_out: int = default_time_out) -> None:
|
3947
|
+
"""
|
3948
|
+
Remove the subject area designation from the identified element.
|
3949
|
+
|
3950
|
+
Subject Areas: https://egeria-project.org/types/4/0425-Subject-Areas/
|
3951
|
+
|
3952
|
+
Parameters
|
3953
|
+
----------
|
3954
|
+
element_guid: str
|
3955
|
+
- the identity of the element to update
|
3956
|
+
for_lineage: bool, default is set by server
|
3957
|
+
- determines if elements classified as Memento should be returned - normally false
|
3958
|
+
for_duplicate_processing: bool, default is set by server
|
3959
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
3960
|
+
effective_time: str, default = None
|
3961
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
3962
|
+
server_name: str, default = None
|
3963
|
+
- name of the server instances for this request.
|
3964
|
+
time_out: int, default = default_time_out
|
3965
|
+
- http request timeout for this request
|
3966
|
+
|
3967
|
+
Returns
|
3968
|
+
-------
|
3969
|
+
None
|
3970
|
+
|
3971
|
+
Raises
|
3972
|
+
------
|
3973
|
+
InvalidParameterException
|
3974
|
+
one of the parameters is null or invalid or
|
3975
|
+
PropertyServerException
|
3976
|
+
There is a problem adding the element properties to the metadata repository or
|
3977
|
+
UserNotAuthorizedException
|
3978
|
+
the requesting user is not authorized to issue this request.
|
3979
|
+
|
3980
|
+
|
3981
|
+
"""
|
3982
|
+
|
3983
|
+
loop = asyncio.get_event_loop()
|
3984
|
+
loop.run_until_complete(
|
3985
|
+
self._async_remove_element_from_subject_area(element_guid, for_lineage, for_duplicate_processing,
|
3986
|
+
effective_time, server_name, time_out))
|