pyegeria 0.7.44__py3-none-any.whl → 0.7.45.1__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.
- examples/widgets/cli/egeria.py +18 -2
- examples/widgets/cli/egeria_tech.py +299 -98
- examples/widgets/ops/monitor_engine_activity_c.py +9 -7
- examples/widgets/ops/monitor_gov_eng_status.py +9 -5
- pyegeria/classification_manager_omvs.py +1921 -863
- pyegeria/mermaid_utilities.py +1 -1
- {pyegeria-0.7.44.dist-info → pyegeria-0.7.45.1.dist-info}/METADATA +1 -1
- {pyegeria-0.7.44.dist-info → pyegeria-0.7.45.1.dist-info}/RECORD +11 -11
- {pyegeria-0.7.44.dist-info → pyegeria-0.7.45.1.dist-info}/LICENSE +0 -0
- {pyegeria-0.7.44.dist-info → pyegeria-0.7.45.1.dist-info}/WHEEL +0 -0
- {pyegeria-0.7.44.dist-info → pyegeria-0.7.45.1.dist-info}/entry_points.txt +0 -0
@@ -7,17 +7,16 @@ module.
|
|
7
7
|
"""
|
8
8
|
|
9
9
|
import asyncio
|
10
|
-
import json
|
11
10
|
|
12
11
|
from httpx import Response
|
13
12
|
|
14
13
|
from pyegeria import body_slimmer
|
14
|
+
|
15
15
|
# import json
|
16
16
|
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
|
-
|
21
20
|
def query_seperator(current_string):
|
22
21
|
if current_string == "":
|
23
22
|
return "?"
|
@@ -107,20 +106,42 @@ class ClassificationManager(Client):
|
|
107
106
|
|
108
107
|
"""
|
109
108
|
|
110
|
-
def __init__(
|
111
|
-
|
109
|
+
def __init__(
|
110
|
+
self,
|
111
|
+
server_name: str,
|
112
|
+
platform_url: str,
|
113
|
+
token: str = None,
|
114
|
+
user_id: str = None,
|
115
|
+
user_pwd: str = None,
|
116
|
+
verify_flag: bool = enable_ssl_check,
|
117
|
+
sync_mode: bool = True,
|
118
|
+
):
|
112
119
|
self.admin_command_root: str
|
113
|
-
Client.__init__(
|
114
|
-
|
120
|
+
Client.__init__(
|
121
|
+
self,
|
122
|
+
server_name,
|
123
|
+
platform_url,
|
124
|
+
user_id=user_id,
|
125
|
+
user_pwd=user_pwd,
|
126
|
+
token=token,
|
127
|
+
async_mode=sync_mode,
|
128
|
+
)
|
115
129
|
|
116
130
|
#
|
117
131
|
# Get elements
|
118
132
|
#
|
119
133
|
|
120
|
-
async def _async_get_elements(
|
121
|
-
|
122
|
-
|
123
|
-
|
134
|
+
async def _async_get_elements(
|
135
|
+
self,
|
136
|
+
open_metadata_type_name: str = None,
|
137
|
+
effective_time: str = None,
|
138
|
+
for_lineage: bool = None,
|
139
|
+
for_duplicate_processing: bool = None,
|
140
|
+
start_from: int = 0,
|
141
|
+
page_size: int = max_paging_size,
|
142
|
+
server_name: str = None,
|
143
|
+
time_out: int = default_time_out,
|
144
|
+
) -> list | str:
|
124
145
|
"""
|
125
146
|
Retrieve elements of the requested type name. If no type name is specified, then any type of element may
|
126
147
|
be returned.
|
@@ -164,23 +185,41 @@ class ClassificationManager(Client):
|
|
164
185
|
server_name = self.server_name
|
165
186
|
|
166
187
|
possible_query_params = query_string(
|
167
|
-
[
|
168
|
-
|
188
|
+
[
|
189
|
+
("startFrom", start_from),
|
190
|
+
("pageSize", page_size),
|
191
|
+
("forLineage", for_lineage),
|
192
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
193
|
+
]
|
194
|
+
)
|
169
195
|
|
170
|
-
body = {
|
171
|
-
|
196
|
+
body = {
|
197
|
+
"class": "FindProperties",
|
198
|
+
"openMetadataTypeName": open_metadata_type_name,
|
199
|
+
"effectiveTime": effective_time,
|
200
|
+
}
|
172
201
|
|
173
202
|
url = f"{base_path(self, server_name)}/elements/by-type{possible_query_params}"
|
174
|
-
response: Response = await self._async_make_request(
|
175
|
-
|
203
|
+
response: Response = await self._async_make_request(
|
204
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
205
|
+
)
|
206
|
+
elements = response.json().get("elements", "No elements found")
|
176
207
|
if type(elements) is list:
|
177
208
|
if len(elements) == 0:
|
178
209
|
return "No elements found"
|
179
210
|
return elements
|
180
211
|
|
181
|
-
def get_elements(
|
182
|
-
|
183
|
-
|
212
|
+
def get_elements(
|
213
|
+
self,
|
214
|
+
open_metadata_type_name: str = None,
|
215
|
+
effective_time: str = None,
|
216
|
+
for_lineage: bool = None,
|
217
|
+
for_duplicate_processing: bool = None,
|
218
|
+
start_from: int = 0,
|
219
|
+
page_size: int = max_paging_size,
|
220
|
+
server_name: str = None,
|
221
|
+
time_out: int = default_time_out,
|
222
|
+
) -> list | str:
|
184
223
|
"""
|
185
224
|
Retrieve elements of the requested type name. If no type name is specified, then any type of element may
|
186
225
|
be returned.
|
@@ -223,16 +262,32 @@ class ClassificationManager(Client):
|
|
223
262
|
|
224
263
|
loop = asyncio.get_event_loop()
|
225
264
|
response = loop.run_until_complete(
|
226
|
-
self._async_get_elements(
|
227
|
-
|
265
|
+
self._async_get_elements(
|
266
|
+
open_metadata_type_name,
|
267
|
+
effective_time,
|
268
|
+
for_lineage,
|
269
|
+
for_duplicate_processing,
|
270
|
+
start_from,
|
271
|
+
page_size,
|
272
|
+
server_name,
|
273
|
+
time_out,
|
274
|
+
)
|
275
|
+
)
|
228
276
|
return response
|
229
277
|
|
230
|
-
async def _async_get_elements_by_property_value(
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
278
|
+
async def _async_get_elements_by_property_value(
|
279
|
+
self,
|
280
|
+
property_value: str,
|
281
|
+
property_names: [str],
|
282
|
+
open_metadata_type_name: str = None,
|
283
|
+
effective_time: str = None,
|
284
|
+
for_lineage: bool = None,
|
285
|
+
for_duplicate_processing: bool = None,
|
286
|
+
start_from: int = 0,
|
287
|
+
page_size: int = max_paging_size,
|
288
|
+
server_name: str = None,
|
289
|
+
time_out: int = default_time_out,
|
290
|
+
) -> list | str:
|
236
291
|
"""
|
237
292
|
Retrieve elements by a value found in one of the properties specified. The value must match exactly.
|
238
293
|
An open metadata type name may be supplied to restrict the results. Async version.
|
@@ -280,27 +335,47 @@ class ClassificationManager(Client):
|
|
280
335
|
server_name = self.server_name
|
281
336
|
|
282
337
|
possible_query_params = query_string(
|
283
|
-
[
|
284
|
-
|
338
|
+
[
|
339
|
+
("startFrom", start_from),
|
340
|
+
("pageSize", page_size),
|
341
|
+
("forLineage", for_lineage),
|
342
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
343
|
+
]
|
344
|
+
)
|
285
345
|
|
286
|
-
body = {
|
287
|
-
|
346
|
+
body = {
|
347
|
+
"class": "FindPropertyNamesProperties",
|
348
|
+
"openMetadataTypeName": open_metadata_type_name,
|
349
|
+
"propertyValue": property_value,
|
350
|
+
"propertyNames": property_names,
|
351
|
+
"effectiveTime": effective_time,
|
352
|
+
}
|
288
353
|
|
289
354
|
url = f"{base_path(self, server_name)}/elements/by-exact-property-value{possible_query_params}"
|
290
355
|
|
291
|
-
response: Response = await self._async_make_request(
|
356
|
+
response: Response = await self._async_make_request(
|
357
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
358
|
+
)
|
292
359
|
|
293
|
-
elements = response.json().get(
|
360
|
+
elements = response.json().get("elements", "No elements found")
|
294
361
|
if type(elements) is list:
|
295
362
|
if len(elements) == 0:
|
296
363
|
return "No elements found"
|
297
364
|
return elements
|
298
365
|
|
299
|
-
def get_elements_by_property_value(
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
366
|
+
def get_elements_by_property_value(
|
367
|
+
self,
|
368
|
+
property_value: str,
|
369
|
+
property_names: [str],
|
370
|
+
open_metadata_type_name: str = None,
|
371
|
+
effective_time: str = None,
|
372
|
+
for_lineage: bool = None,
|
373
|
+
for_duplicate_processing: bool = None,
|
374
|
+
start_from: int = 0,
|
375
|
+
page_size: int = max_paging_size,
|
376
|
+
server_name: str = None,
|
377
|
+
time_out: int = default_time_out,
|
378
|
+
) -> list | str:
|
304
379
|
"""
|
305
380
|
Retrieve elements by a value found in one of the properties specified. The value must match exactly.
|
306
381
|
An open metadata type name may be supplied to restrict the results.
|
@@ -347,17 +422,117 @@ class ClassificationManager(Client):
|
|
347
422
|
|
348
423
|
loop = asyncio.get_event_loop()
|
349
424
|
response = loop.run_until_complete(
|
350
|
-
self._async_get_elements_by_property_value(
|
351
|
-
|
352
|
-
|
425
|
+
self._async_get_elements_by_property_value(
|
426
|
+
property_value,
|
427
|
+
property_names,
|
428
|
+
open_metadata_type_name,
|
429
|
+
effective_time,
|
430
|
+
for_lineage,
|
431
|
+
for_duplicate_processing,
|
432
|
+
start_from,
|
433
|
+
page_size,
|
434
|
+
server_name,
|
435
|
+
time_out,
|
436
|
+
)
|
437
|
+
)
|
353
438
|
return response
|
354
439
|
|
355
|
-
async def
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
440
|
+
async def _async_get_guid_for_name(
|
441
|
+
self, name: str, server_name: str = None, time_out: int = default_time_out
|
442
|
+
) -> list | str:
|
443
|
+
"""
|
444
|
+
Retrieve the guid associated with the supplied element name.
|
445
|
+
If more than one element returned, an exception is thrown. Async version.
|
446
|
+
|
447
|
+
Parameters
|
448
|
+
----------
|
449
|
+
name: str
|
450
|
+
- element name to be searched.
|
451
|
+
server_name: str, default = None
|
452
|
+
- name of the server instances for this request.
|
453
|
+
time_out: int, default = default_time_out
|
454
|
+
- http request timeout for this request
|
455
|
+
|
456
|
+
Returns
|
457
|
+
-------
|
458
|
+
str
|
459
|
+
Returns the guid of the element.
|
460
|
+
|
461
|
+
Raises
|
462
|
+
------
|
463
|
+
InvalidParameterException
|
464
|
+
one of the parameters is null or invalid or
|
465
|
+
PropertyServerException
|
466
|
+
There is a problem adding the element properties to the metadata repository or
|
467
|
+
UserNotAuthorizedException
|
468
|
+
the requesting user is not authorized to issue this request.
|
469
|
+
"""
|
470
|
+
if server_name is None:
|
471
|
+
server_name = self.server_name
|
472
|
+
property_name = ["name", "qualifiedName", "title"]
|
473
|
+
elements = await self._async_get_elements_by_property_value(
|
474
|
+
name, property_name, None
|
475
|
+
)
|
476
|
+
|
477
|
+
if type(elements) is list:
|
478
|
+
if len(elements) == 0:
|
479
|
+
return "No elements found"
|
480
|
+
elif len(elements) > 1:
|
481
|
+
raise Exception("Multiple elements found for supplied name!")
|
482
|
+
elif len(elements) == 1:
|
483
|
+
return elements[0]["elementHeader"]["guid"]
|
484
|
+
return elements
|
485
|
+
|
486
|
+
def get_guid_for_name(
|
487
|
+
self, name: str, server_name: str = None, time_out: int = default_time_out
|
488
|
+
) -> list | str:
|
489
|
+
"""
|
490
|
+
Retrieve the guid associated with the supplied element name.
|
491
|
+
If more than one element returned, an exception is thrown.
|
492
|
+
|
493
|
+
Parameters
|
494
|
+
----------
|
495
|
+
name: str
|
496
|
+
- element name to be searched.
|
497
|
+
server_name: str, default = None
|
498
|
+
- name of the server instances for this request.
|
499
|
+
time_out: int, default = default_time_out
|
500
|
+
- http request timeout for this request
|
501
|
+
|
502
|
+
Returns
|
503
|
+
-------
|
504
|
+
str
|
505
|
+
Returns the guid of the element.
|
506
|
+
|
507
|
+
Raises
|
508
|
+
------
|
509
|
+
InvalidParameterException
|
510
|
+
one of the parameters is null or invalid or
|
511
|
+
PropertyServerException
|
512
|
+
There is a problem adding the element properties to the metadata repository or
|
513
|
+
UserNotAuthorizedException
|
514
|
+
the requesting user is not authorized to issue this request.
|
515
|
+
"""
|
516
|
+
|
517
|
+
loop = asyncio.get_event_loop()
|
518
|
+
response = loop.run_until_complete(
|
519
|
+
self._async_get_guid_for_name(name, server_name, time_out)
|
520
|
+
)
|
521
|
+
return response
|
522
|
+
|
523
|
+
async def _async_find_elements_by_property_value(
|
524
|
+
self,
|
525
|
+
property_value: str,
|
526
|
+
property_names: [str],
|
527
|
+
open_metadata_type_name: str = None,
|
528
|
+
effective_time: str = None,
|
529
|
+
for_lineage: bool = None,
|
530
|
+
for_duplicate_processing: bool = None,
|
531
|
+
start_from: int = 0,
|
532
|
+
page_size: int = max_paging_size,
|
533
|
+
server_name: str = None,
|
534
|
+
time_out: int = default_time_out,
|
535
|
+
) -> list | str:
|
361
536
|
"""
|
362
537
|
Retrieve elements by a value found in one of the properties specified. The value must be contained in the
|
363
538
|
properties rather than needing to be an exact match. An open metadata type name may be supplied to restrict
|
@@ -406,25 +581,45 @@ class ClassificationManager(Client):
|
|
406
581
|
server_name = self.server_name
|
407
582
|
|
408
583
|
possible_query_params = query_string(
|
409
|
-
[
|
410
|
-
|
584
|
+
[
|
585
|
+
("startFrom", start_from),
|
586
|
+
("pageSize", page_size),
|
587
|
+
("forLineage", for_lineage),
|
588
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
589
|
+
]
|
590
|
+
)
|
411
591
|
|
412
|
-
body = {
|
413
|
-
|
592
|
+
body = {
|
593
|
+
"class": "FindPropertyNamesProperties",
|
594
|
+
"openMetadataTypeName": open_metadata_type_name,
|
595
|
+
"propertyValue": property_value,
|
596
|
+
"propertyNames": property_names,
|
597
|
+
"effectiveTime": effective_time,
|
598
|
+
}
|
414
599
|
|
415
600
|
url = f"{base_path(self, server_name)}/elements/by-property-value-search{possible_query_params}"
|
416
|
-
response: Response = await self._async_make_request(
|
417
|
-
|
601
|
+
response: Response = await self._async_make_request(
|
602
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
603
|
+
)
|
604
|
+
elements = response.json().get("elements", "No elements found")
|
418
605
|
if type(elements) is list:
|
419
606
|
if len(elements) == 0:
|
420
607
|
return "No elements found"
|
421
608
|
return elements
|
422
609
|
|
423
|
-
def find_elements_by_property_value(
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
610
|
+
def find_elements_by_property_value(
|
611
|
+
self,
|
612
|
+
property_value: str,
|
613
|
+
property_names: [str],
|
614
|
+
open_metadata_type_name: str = None,
|
615
|
+
effective_time: str = None,
|
616
|
+
for_lineage: bool = None,
|
617
|
+
for_duplicate_processing: bool = None,
|
618
|
+
start_from: int = 0,
|
619
|
+
page_size: int = max_paging_size,
|
620
|
+
server_name: str = None,
|
621
|
+
time_out: int = default_time_out,
|
622
|
+
) -> list | str:
|
428
623
|
"""
|
429
624
|
Retrieve elements by a value found in one of the properties specified. The value must be contained in the
|
430
625
|
properties rather than needing to be an exact match. An open metadata type name may be supplied to restrict
|
@@ -472,19 +667,36 @@ class ClassificationManager(Client):
|
|
472
667
|
|
473
668
|
loop = asyncio.get_event_loop()
|
474
669
|
response = loop.run_until_complete(
|
475
|
-
self._async_find_elements_by_property_value(
|
476
|
-
|
477
|
-
|
670
|
+
self._async_find_elements_by_property_value(
|
671
|
+
property_value,
|
672
|
+
property_names,
|
673
|
+
open_metadata_type_name,
|
674
|
+
effective_time,
|
675
|
+
for_lineage,
|
676
|
+
for_duplicate_processing,
|
677
|
+
start_from,
|
678
|
+
page_size,
|
679
|
+
server_name,
|
680
|
+
time_out,
|
681
|
+
)
|
682
|
+
)
|
478
683
|
return response
|
479
684
|
|
480
685
|
#
|
481
686
|
# Elements by classification
|
482
687
|
#
|
483
|
-
async def _async_get_elements_by_classification(
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
688
|
+
async def _async_get_elements_by_classification(
|
689
|
+
self,
|
690
|
+
classification_name: str,
|
691
|
+
open_metadata_type_name: str = None,
|
692
|
+
effective_time: str = None,
|
693
|
+
for_lineage: bool = None,
|
694
|
+
for_duplicate_processing: bool = None,
|
695
|
+
start_from: int = 0,
|
696
|
+
page_size: int = max_paging_size,
|
697
|
+
server_name: str = None,
|
698
|
+
time_out: int = default_time_out,
|
699
|
+
) -> list | str:
|
488
700
|
"""
|
489
701
|
Retrieve elements with the requested classification name. It is also possible to limit the results
|
490
702
|
by specifying a type name for the elements that should be returned. If no type name is specified then
|
@@ -531,26 +743,45 @@ class ClassificationManager(Client):
|
|
531
743
|
server_name = self.server_name
|
532
744
|
|
533
745
|
possible_query_params = query_string(
|
534
|
-
[
|
535
|
-
|
746
|
+
[
|
747
|
+
("startFrom", start_from),
|
748
|
+
("pageSize", page_size),
|
749
|
+
("forLineage", for_lineage),
|
750
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
751
|
+
]
|
752
|
+
)
|
536
753
|
|
537
|
-
body = {
|
538
|
-
|
754
|
+
body = {
|
755
|
+
"class": "FindProperties",
|
756
|
+
"openMetadataTypeName": open_metadata_type_name,
|
757
|
+
"effectiveTime": effective_time,
|
758
|
+
}
|
539
759
|
|
540
|
-
url = (
|
541
|
-
|
542
|
-
|
543
|
-
|
760
|
+
url = (
|
761
|
+
f"{base_path(self, server_name)}/elements/by-classification/{classification_name}"
|
762
|
+
f"{possible_query_params}"
|
763
|
+
)
|
764
|
+
response = await self._async_make_request(
|
765
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
766
|
+
)
|
767
|
+
elements = response.json().get("elements", "No elements found")
|
544
768
|
if type(elements) is list:
|
545
769
|
if len(elements) == 0:
|
546
770
|
return "No elements found"
|
547
771
|
return elements
|
548
772
|
|
549
|
-
def get_elements_by_classification(
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
773
|
+
def get_elements_by_classification(
|
774
|
+
self,
|
775
|
+
classification_name: str,
|
776
|
+
open_metadata_type_name: str = None,
|
777
|
+
effective_time: str = None,
|
778
|
+
for_lineage: bool = None,
|
779
|
+
for_duplicate_processing: bool = None,
|
780
|
+
start_from: int = 0,
|
781
|
+
page_size: int = max_paging_size,
|
782
|
+
server_name: str = None,
|
783
|
+
time_out: int = default_time_out,
|
784
|
+
) -> list | str:
|
554
785
|
"""
|
555
786
|
Retrieve elements with the requested classification name. It is also possible to limit the results
|
556
787
|
by specifying a type name for the elements that should be returned. If no type name is specified then
|
@@ -596,92 +827,127 @@ class ClassificationManager(Client):
|
|
596
827
|
|
597
828
|
loop = asyncio.get_event_loop()
|
598
829
|
response = loop.run_until_complete(
|
599
|
-
self._async_get_elements_by_classification(
|
600
|
-
|
601
|
-
|
830
|
+
self._async_get_elements_by_classification(
|
831
|
+
classification_name,
|
832
|
+
open_metadata_type_name,
|
833
|
+
effective_time,
|
834
|
+
for_lineage,
|
835
|
+
for_duplicate_processing,
|
836
|
+
start_from,
|
837
|
+
page_size,
|
838
|
+
server_name,
|
839
|
+
time_out,
|
840
|
+
)
|
841
|
+
)
|
602
842
|
return response
|
603
843
|
|
604
|
-
async def _async_get_elements_by_classification_with_property_value(
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
844
|
+
async def _async_get_elements_by_classification_with_property_value(
|
845
|
+
self,
|
846
|
+
classification_name: str,
|
847
|
+
property_value: str,
|
848
|
+
property_names: [str],
|
849
|
+
open_metadata_type_name: str = None,
|
850
|
+
effective_time: str = None,
|
851
|
+
for_lineage: bool = None,
|
852
|
+
for_duplicate_processing: bool = None,
|
853
|
+
start_from: int = 0,
|
854
|
+
page_size: int = max_paging_size,
|
855
|
+
server_name: str = None,
|
856
|
+
time_out: int = default_time_out,
|
857
|
+
) -> list | str:
|
858
|
+
"""
|
859
|
+
Retrieve elements with the requested classification name and with the requested a value found in one of the
|
860
|
+
classification's properties specified. The value must match exactly. An open metadata type name may be supplied
|
861
|
+
to restrict the types of elements returned. Async version.
|
618
862
|
|
619
|
-
|
863
|
+
https://egeria-project.org/types/
|
620
864
|
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
865
|
+
Parameters
|
866
|
+
----------
|
867
|
+
classification_name: str
|
868
|
+
- the classification name to retrieve elements for.
|
869
|
+
property_value: str
|
870
|
+
- property value to be searched.
|
871
|
+
property_names: [str]
|
872
|
+
- property names to search in.
|
873
|
+
open_metadata_type_name : str, default = None
|
874
|
+
- open metadata type to be used to restrict the search
|
875
|
+
effective_time: str, default = None
|
876
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
877
|
+
for_lineage: bool, default is set by server
|
878
|
+
- determines if elements classified as Memento should be returned - normally false
|
879
|
+
for_duplicate_processing: bool, default is set by server
|
880
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
881
|
+
start_from: int, default = 0
|
882
|
+
- index of the list to start from (0 for start).
|
883
|
+
page_size
|
884
|
+
- maximum number of elements to return.
|
885
|
+
server_name: str, default = None
|
886
|
+
- name of the server instances for this request.
|
887
|
+
time_out: int, default = default_time_out
|
888
|
+
- http request timeout for this request
|
645
889
|
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
890
|
+
Returns
|
891
|
+
-------
|
892
|
+
[dict] | str
|
893
|
+
Returns a string if no elements found and a list of dict of elements with the results.
|
650
894
|
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
895
|
+
Raises
|
896
|
+
------
|
897
|
+
InvalidParameterException
|
898
|
+
one of the parameters is null or invalid or
|
899
|
+
PropertyServerException
|
900
|
+
There is a problem adding the element properties to the metadata repository or
|
901
|
+
UserNotAuthorizedException
|
902
|
+
the requesting user is not authorized to issue this request.
|
659
903
|
"""
|
660
904
|
if server_name is None:
|
661
905
|
server_name = self.server_name
|
662
906
|
|
663
907
|
possible_query_params = query_string(
|
664
|
-
[
|
665
|
-
|
908
|
+
[
|
909
|
+
("startFrom", start_from),
|
910
|
+
("pageSize", page_size),
|
911
|
+
("forLineage", for_lineage),
|
912
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
913
|
+
]
|
914
|
+
)
|
666
915
|
|
667
|
-
body = {
|
668
|
-
|
916
|
+
body = {
|
917
|
+
"class": "FindPropertyNamesProperties",
|
918
|
+
"openMetadataTypeName": open_metadata_type_name,
|
919
|
+
"propertyValue": property_value,
|
920
|
+
"propertyNames": property_names,
|
921
|
+
"effectiveTime": effective_time,
|
922
|
+
}
|
669
923
|
|
670
|
-
url = (
|
671
|
-
|
672
|
-
|
673
|
-
|
924
|
+
url = (
|
925
|
+
f"{base_path(self, server_name)}/elements/by-classification/{classification_name}/"
|
926
|
+
f"with-exact-property-value{possible_query_params}"
|
927
|
+
)
|
928
|
+
response = await self._async_make_request(
|
929
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
930
|
+
)
|
931
|
+
elements = response.json().get("elements", "No elements found")
|
674
932
|
if type(elements) is list:
|
675
933
|
if len(elements) == 0:
|
676
934
|
return "No elements found"
|
677
935
|
return elements
|
678
936
|
|
679
|
-
def get_elements_by_classification_with_property_value(
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
937
|
+
def get_elements_by_classification_with_property_value(
|
938
|
+
self,
|
939
|
+
classification_name: str,
|
940
|
+
property_value: str,
|
941
|
+
property_names: [str],
|
942
|
+
open_metadata_type_name: str = None,
|
943
|
+
effective_time: str = None,
|
944
|
+
for_lineage: bool = None,
|
945
|
+
for_duplicate_processing: bool = None,
|
946
|
+
start_from: int = 0,
|
947
|
+
page_size: int = max_paging_size,
|
948
|
+
server_name: str = None,
|
949
|
+
time_out: int = default_time_out,
|
950
|
+
) -> list | str:
|
685
951
|
"""
|
686
952
|
Retrieve elements by a value found in one of the properties specified. The value must match exactly.
|
687
953
|
An open metadata type name may be supplied to restrict the results.
|
@@ -730,23 +996,36 @@ class ClassificationManager(Client):
|
|
730
996
|
|
731
997
|
loop = asyncio.get_event_loop()
|
732
998
|
response = loop.run_until_complete(
|
733
|
-
self._async_get_elements_by_classification_with_property_value(
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
999
|
+
self._async_get_elements_by_classification_with_property_value(
|
1000
|
+
classification_name,
|
1001
|
+
property_value,
|
1002
|
+
property_names,
|
1003
|
+
open_metadata_type_name,
|
1004
|
+
effective_time,
|
1005
|
+
for_lineage,
|
1006
|
+
for_duplicate_processing,
|
1007
|
+
start_from,
|
1008
|
+
page_size,
|
1009
|
+
server_name,
|
1010
|
+
time_out,
|
1011
|
+
)
|
1012
|
+
)
|
738
1013
|
return response
|
739
1014
|
|
740
|
-
async def _async_find_elements_by_classification_with_property_value(
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
1015
|
+
async def _async_find_elements_by_classification_with_property_value(
|
1016
|
+
self,
|
1017
|
+
classification_name: str,
|
1018
|
+
property_value: str,
|
1019
|
+
property_names: [str],
|
1020
|
+
open_metadata_type_name: str = None,
|
1021
|
+
effective_time: str = None,
|
1022
|
+
for_lineage: bool = None,
|
1023
|
+
for_duplicate_processing: bool = None,
|
1024
|
+
start_from: int = 0,
|
1025
|
+
page_size: int = max_paging_size,
|
1026
|
+
server_name: str = None,
|
1027
|
+
time_out: int = default_time_out,
|
1028
|
+
) -> list | str:
|
750
1029
|
"""
|
751
1030
|
Retrieve elements with the requested classification name and with the requested value found in
|
752
1031
|
one of the classification's properties specified. The value must only be contained in the
|
@@ -798,27 +1077,49 @@ class ClassificationManager(Client):
|
|
798
1077
|
server_name = self.server_name
|
799
1078
|
|
800
1079
|
possible_query_params = query_string(
|
801
|
-
[
|
802
|
-
|
1080
|
+
[
|
1081
|
+
("startFrom", start_from),
|
1082
|
+
("pageSize", page_size),
|
1083
|
+
("forLineage", for_lineage),
|
1084
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
1085
|
+
]
|
1086
|
+
)
|
803
1087
|
|
804
|
-
body = {
|
805
|
-
|
1088
|
+
body = {
|
1089
|
+
"class": "FindPropertyNamesProperties",
|
1090
|
+
"openMetadataTypeName": open_metadata_type_name,
|
1091
|
+
"propertyValue": property_value,
|
1092
|
+
"propertyNames": property_names,
|
1093
|
+
"effectiveTime": effective_time,
|
1094
|
+
}
|
806
1095
|
|
807
|
-
url = (
|
808
|
-
|
809
|
-
|
810
|
-
|
1096
|
+
url = (
|
1097
|
+
f"{base_path(self, server_name)}/elements/by-classification/{classification_name}/"
|
1098
|
+
f"with-property-value-search{possible_query_params}"
|
1099
|
+
)
|
1100
|
+
response = await self._async_make_request(
|
1101
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
1102
|
+
)
|
1103
|
+
elements = response.json().get("elements", "No elements found")
|
811
1104
|
if type(elements) is list:
|
812
1105
|
if len(elements) == 0:
|
813
1106
|
return "No elements found"
|
814
1107
|
return elements
|
815
1108
|
|
816
|
-
def find_elements_by_classification_with_property_value(
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
1109
|
+
def find_elements_by_classification_with_property_value(
|
1110
|
+
self,
|
1111
|
+
classification_name: str,
|
1112
|
+
property_value: str,
|
1113
|
+
property_names: [str],
|
1114
|
+
open_metadata_type_name: str = None,
|
1115
|
+
effective_time: str = None,
|
1116
|
+
for_lineage: bool = None,
|
1117
|
+
for_duplicate_processing: bool = None,
|
1118
|
+
start_from: int = 0,
|
1119
|
+
page_size: int = max_paging_size,
|
1120
|
+
server_name: str = None,
|
1121
|
+
time_out: int = default_time_out,
|
1122
|
+
) -> list | str:
|
822
1123
|
"""
|
823
1124
|
Retrieve elements with the requested classification name and with the requested a value found in
|
824
1125
|
one of the classification's properties specified. The value must only be contained in the
|
@@ -869,21 +1170,38 @@ class ClassificationManager(Client):
|
|
869
1170
|
|
870
1171
|
loop = asyncio.get_event_loop()
|
871
1172
|
response = loop.run_until_complete(
|
872
|
-
self._async_find_elements_by_classification_with_property_value(
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
1173
|
+
self._async_find_elements_by_classification_with_property_value(
|
1174
|
+
classification_name,
|
1175
|
+
property_value,
|
1176
|
+
property_names,
|
1177
|
+
open_metadata_type_name,
|
1178
|
+
effective_time,
|
1179
|
+
for_lineage,
|
1180
|
+
for_duplicate_processing,
|
1181
|
+
start_from,
|
1182
|
+
page_size,
|
1183
|
+
server_name,
|
1184
|
+
time_out,
|
1185
|
+
)
|
1186
|
+
)
|
877
1187
|
return response
|
878
1188
|
|
879
1189
|
#
|
880
1190
|
# related elements
|
881
1191
|
#
|
882
|
-
async def _async_get_all_related_elements(
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
1192
|
+
async def _async_get_all_related_elements(
|
1193
|
+
self,
|
1194
|
+
element_guid: str,
|
1195
|
+
open_metadata_type_name: str = None,
|
1196
|
+
start_at_end: int = 1,
|
1197
|
+
effective_time: str = None,
|
1198
|
+
for_lineage: bool = None,
|
1199
|
+
for_duplicate_processing: bool = None,
|
1200
|
+
start_from: int = 0,
|
1201
|
+
page_size: int = max_paging_size,
|
1202
|
+
server_name: str = None,
|
1203
|
+
time_out: int = default_time_out,
|
1204
|
+
) -> list | str:
|
887
1205
|
"""
|
888
1206
|
Retrieve elements linked any relationship type name. It is also possible to limit the results by
|
889
1207
|
specifying a type name for the elements that should be returned. If no type name is specified then any type of
|
@@ -932,26 +1250,47 @@ class ClassificationManager(Client):
|
|
932
1250
|
server_name = self.server_name
|
933
1251
|
|
934
1252
|
possible_query_params = query_string(
|
935
|
-
[
|
936
|
-
|
1253
|
+
[
|
1254
|
+
("startFrom", start_from),
|
1255
|
+
("pageSize", page_size),
|
1256
|
+
("forLineage", for_lineage),
|
1257
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
1258
|
+
("startAtEnd", start_at_end),
|
1259
|
+
]
|
1260
|
+
)
|
937
1261
|
|
938
|
-
body = {
|
939
|
-
|
1262
|
+
body = {
|
1263
|
+
"class": "FindProperties",
|
1264
|
+
"openMetadataTypeName": open_metadata_type_name,
|
1265
|
+
"effectiveTime": effective_time,
|
1266
|
+
}
|
940
1267
|
|
941
|
-
url = (
|
942
|
-
|
943
|
-
|
944
|
-
|
1268
|
+
url = (
|
1269
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/by-relationship"
|
1270
|
+
f"{possible_query_params}"
|
1271
|
+
)
|
1272
|
+
response: Response = await self._async_make_request(
|
1273
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
1274
|
+
)
|
1275
|
+
elements = response.json().get("elements", "No elements found")
|
945
1276
|
if type(elements) is list:
|
946
1277
|
if len(elements) == 0:
|
947
1278
|
return "No elements found"
|
948
1279
|
return elements
|
949
1280
|
|
950
|
-
def get_all_related_elements(
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
1281
|
+
def get_all_related_elements(
|
1282
|
+
self,
|
1283
|
+
element_guid: str,
|
1284
|
+
open_metadata_type_name: str = None,
|
1285
|
+
start_at_end: int = 1,
|
1286
|
+
effective_time: str = None,
|
1287
|
+
for_lineage: bool = None,
|
1288
|
+
for_duplicate_processing: bool = None,
|
1289
|
+
start_from: int = 0,
|
1290
|
+
page_size: int = max_paging_size,
|
1291
|
+
server_name: str = None,
|
1292
|
+
time_out: int = default_time_out,
|
1293
|
+
) -> list | str:
|
955
1294
|
"""
|
956
1295
|
Retrieve elements linked via any relationship type name. It is also possible to limit the results by
|
957
1296
|
specifying a type name for the elements that should be returned. If no type name is specified then any type of
|
@@ -999,17 +1338,35 @@ class ClassificationManager(Client):
|
|
999
1338
|
|
1000
1339
|
loop = asyncio.get_event_loop()
|
1001
1340
|
response = loop.run_until_complete(
|
1002
|
-
self._async_get_all_related_elements(
|
1003
|
-
|
1004
|
-
|
1341
|
+
self._async_get_all_related_elements(
|
1342
|
+
element_guid,
|
1343
|
+
open_metadata_type_name,
|
1344
|
+
start_at_end,
|
1345
|
+
effective_time,
|
1346
|
+
for_lineage,
|
1347
|
+
for_duplicate_processing,
|
1348
|
+
start_from,
|
1349
|
+
page_size,
|
1350
|
+
server_name,
|
1351
|
+
time_out,
|
1352
|
+
)
|
1353
|
+
)
|
1005
1354
|
return response
|
1006
1355
|
|
1007
|
-
async def _async_get_related_elements(
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1356
|
+
async def _async_get_related_elements(
|
1357
|
+
self,
|
1358
|
+
element_guid: str,
|
1359
|
+
relationship_type: str,
|
1360
|
+
open_metadata_type_name: str = None,
|
1361
|
+
start_at_end: int = 1,
|
1362
|
+
effective_time: str = None,
|
1363
|
+
for_lineage: bool = None,
|
1364
|
+
for_duplicate_processing: bool = None,
|
1365
|
+
start_from: int = 0,
|
1366
|
+
page_size: int = max_paging_size,
|
1367
|
+
server_name: str = None,
|
1368
|
+
time_out: int = default_time_out,
|
1369
|
+
) -> list | str:
|
1013
1370
|
"""
|
1014
1371
|
Retrieve elements linked any relationship type name. It is also possible to limit the results by
|
1015
1372
|
specifying a type name for the elements that should be returned. If no type name is specified then any type of
|
@@ -1060,26 +1417,48 @@ class ClassificationManager(Client):
|
|
1060
1417
|
server_name = self.server_name
|
1061
1418
|
|
1062
1419
|
possible_query_params = query_string(
|
1063
|
-
[
|
1064
|
-
|
1420
|
+
[
|
1421
|
+
("startFrom", start_from),
|
1422
|
+
("pageSize", page_size),
|
1423
|
+
("forLineage", for_lineage),
|
1424
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
1425
|
+
("startAtEnd", start_at_end),
|
1426
|
+
]
|
1427
|
+
)
|
1065
1428
|
|
1066
|
-
body = {
|
1067
|
-
|
1429
|
+
body = {
|
1430
|
+
"class": "FindProperties",
|
1431
|
+
"openMetadataTypeName": open_metadata_type_name,
|
1432
|
+
"effectiveTime": effective_time,
|
1433
|
+
}
|
1068
1434
|
|
1069
|
-
url = (
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1435
|
+
url = (
|
1436
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/by-relationship/"
|
1437
|
+
f"{relationship_type}{possible_query_params}"
|
1438
|
+
)
|
1439
|
+
response: Response = await self._async_make_request(
|
1440
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
1441
|
+
)
|
1442
|
+
elements = response.json().get("elements", "No elements found")
|
1073
1443
|
if type(elements) is list:
|
1074
1444
|
if len(elements) == 0:
|
1075
1445
|
return "No elements found"
|
1076
1446
|
return elements
|
1077
1447
|
|
1078
|
-
def get_related_elements(
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1448
|
+
def get_related_elements(
|
1449
|
+
self,
|
1450
|
+
element_guid: str,
|
1451
|
+
relationship_type: str,
|
1452
|
+
open_metadata_type_name: str = None,
|
1453
|
+
start_at_end: int = 1,
|
1454
|
+
effective_time: str = None,
|
1455
|
+
for_lineage: bool = None,
|
1456
|
+
for_duplicate_processing: bool = None,
|
1457
|
+
start_from: int = 0,
|
1458
|
+
page_size: int = max_paging_size,
|
1459
|
+
server_name: str = None,
|
1460
|
+
time_out: int = default_time_out,
|
1461
|
+
) -> list | str:
|
1083
1462
|
"""
|
1084
1463
|
Retrieve elements linked via any relationship type name. It is also possible to limit the results by
|
1085
1464
|
specifying a type name for the elements that should be returned. If no type name is specified then any type of
|
@@ -1129,20 +1508,38 @@ class ClassificationManager(Client):
|
|
1129
1508
|
|
1130
1509
|
loop = asyncio.get_event_loop()
|
1131
1510
|
response = loop.run_until_complete(
|
1132
|
-
self._async_get_related_elements(
|
1133
|
-
|
1134
|
-
|
1511
|
+
self._async_get_related_elements(
|
1512
|
+
element_guid,
|
1513
|
+
relationship_type,
|
1514
|
+
open_metadata_type_name,
|
1515
|
+
start_at_end,
|
1516
|
+
effective_time,
|
1517
|
+
for_lineage,
|
1518
|
+
for_duplicate_processing,
|
1519
|
+
start_from,
|
1520
|
+
page_size,
|
1521
|
+
server_name,
|
1522
|
+
time_out,
|
1523
|
+
)
|
1524
|
+
)
|
1135
1525
|
return response
|
1136
1526
|
|
1137
|
-
async def _async_get_related_elements_with_property_value(
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1527
|
+
async def _async_get_related_elements_with_property_value(
|
1528
|
+
self,
|
1529
|
+
element_guid: str,
|
1530
|
+
relationship_type: str,
|
1531
|
+
property_value: str,
|
1532
|
+
property_names: [str],
|
1533
|
+
open_metadata_type_name: str = None,
|
1534
|
+
start_at_end: int = 1,
|
1535
|
+
effective_time: str = None,
|
1536
|
+
for_lineage: bool = None,
|
1537
|
+
for_duplicate_processing: bool = None,
|
1538
|
+
start_from: int = 0,
|
1539
|
+
page_size: int = max_paging_size,
|
1540
|
+
server_name: str = None,
|
1541
|
+
time_out: int = default_time_out,
|
1542
|
+
) -> list | str:
|
1146
1543
|
"""
|
1147
1544
|
Retrieve elements linked via the requested relationship type name and with the requested a value found in one of
|
1148
1545
|
the classification's properties specified. The value must match exactly. An open metadata type name may be
|
@@ -1198,29 +1595,53 @@ class ClassificationManager(Client):
|
|
1198
1595
|
server_name = self.server_name
|
1199
1596
|
|
1200
1597
|
possible_query_params = query_string(
|
1201
|
-
[
|
1202
|
-
|
1598
|
+
[
|
1599
|
+
("startFrom", start_from),
|
1600
|
+
("pageSize", page_size),
|
1601
|
+
("forLineage", for_lineage),
|
1602
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
1603
|
+
("startAtEnd", start_at_end),
|
1604
|
+
]
|
1605
|
+
)
|
1203
1606
|
|
1204
|
-
body = {
|
1205
|
-
|
1607
|
+
body = {
|
1608
|
+
"class": "FindPropertyNamesProperties",
|
1609
|
+
"openMetadataTypeName": open_metadata_type_name,
|
1610
|
+
"propertyValue": property_value,
|
1611
|
+
"propertyNames": property_names,
|
1612
|
+
"effectiveTime": effective_time,
|
1613
|
+
}
|
1206
1614
|
|
1207
|
-
url = (
|
1208
|
-
|
1615
|
+
url = (
|
1616
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/by-relationship/"
|
1617
|
+
f"{relationship_type}/with-exact-property-value{possible_query_params}"
|
1618
|
+
)
|
1209
1619
|
|
1210
|
-
response: Response = await self._async_make_request(
|
1211
|
-
|
1620
|
+
response: Response = await self._async_make_request(
|
1621
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
1622
|
+
)
|
1623
|
+
elements = response.json().get("elements", "No elements found")
|
1212
1624
|
if type(elements) is list:
|
1213
1625
|
if len(elements) == 0:
|
1214
1626
|
return "No elements found"
|
1215
1627
|
return elements
|
1216
1628
|
|
1217
|
-
def get_related_elements_with_property_value(
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1629
|
+
def get_related_elements_with_property_value(
|
1630
|
+
self,
|
1631
|
+
element_guid: str,
|
1632
|
+
relationship_type: str,
|
1633
|
+
property_value: str,
|
1634
|
+
property_names: [str],
|
1635
|
+
open_metadata_type_name: str = None,
|
1636
|
+
start_at_end: int = 1,
|
1637
|
+
effective_time: str = None,
|
1638
|
+
for_lineage: bool = None,
|
1639
|
+
for_duplicate_processing: bool = None,
|
1640
|
+
start_from: int = 0,
|
1641
|
+
page_size: int = max_paging_size,
|
1642
|
+
server_name: str = None,
|
1643
|
+
time_out: int = default_time_out,
|
1644
|
+
) -> list | str:
|
1224
1645
|
"""
|
1225
1646
|
Retrieve elements linked via the requested relationship type name and with the requested a value found in one of
|
1226
1647
|
the classification's properties specified. The value must match exactly. An open metadata type name may be
|
@@ -1274,21 +1695,40 @@ class ClassificationManager(Client):
|
|
1274
1695
|
|
1275
1696
|
loop = asyncio.get_event_loop()
|
1276
1697
|
response = loop.run_until_complete(
|
1277
|
-
self._async_get_related_elements_with_property_value(
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1698
|
+
self._async_get_related_elements_with_property_value(
|
1699
|
+
element_guid,
|
1700
|
+
relationship_type,
|
1701
|
+
property_value,
|
1702
|
+
property_names,
|
1703
|
+
open_metadata_type_name,
|
1704
|
+
start_at_end,
|
1705
|
+
effective_time,
|
1706
|
+
for_lineage,
|
1707
|
+
for_duplicate_processing,
|
1708
|
+
start_from,
|
1709
|
+
page_size,
|
1710
|
+
server_name,
|
1711
|
+
time_out,
|
1712
|
+
)
|
1713
|
+
)
|
1281
1714
|
return response
|
1282
1715
|
|
1283
|
-
async def _async_find_related_elements_with_property_value(
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1716
|
+
async def _async_find_related_elements_with_property_value(
|
1717
|
+
self,
|
1718
|
+
element_guid: str,
|
1719
|
+
relationship_type: str,
|
1720
|
+
property_value: str,
|
1721
|
+
property_names: [str],
|
1722
|
+
open_metadata_type_name: str = None,
|
1723
|
+
start_at_end: int = 1,
|
1724
|
+
effective_time: str = None,
|
1725
|
+
for_lineage: bool = None,
|
1726
|
+
for_duplicate_processing: bool = None,
|
1727
|
+
start_from: int = 0,
|
1728
|
+
page_size: int = max_paging_size,
|
1729
|
+
server_name: str = None,
|
1730
|
+
time_out: int = default_time_out,
|
1731
|
+
) -> list | str:
|
1292
1732
|
"""
|
1293
1733
|
Retrieve elements linked via the requested relationship type name and with the requested a value found in one of
|
1294
1734
|
the classification's properties specified. The value must only be contained in the properties rather than
|
@@ -1345,30 +1785,54 @@ class ClassificationManager(Client):
|
|
1345
1785
|
server_name = self.server_name
|
1346
1786
|
|
1347
1787
|
possible_query_params = query_string(
|
1348
|
-
[
|
1349
|
-
|
1788
|
+
[
|
1789
|
+
("startFrom", start_from),
|
1790
|
+
("pageSize", page_size),
|
1791
|
+
("forLineage", for_lineage),
|
1792
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
1793
|
+
("startAtEnd", start_at_end),
|
1794
|
+
]
|
1795
|
+
)
|
1350
1796
|
|
1351
|
-
body = {
|
1352
|
-
|
1797
|
+
body = {
|
1798
|
+
"class": "FindPropertyNamesProperties",
|
1799
|
+
"openMetadataTypeName": open_metadata_type_name,
|
1800
|
+
"propertyValue": property_value,
|
1801
|
+
"propertyNames": property_names,
|
1802
|
+
"effectiveTime": effective_time,
|
1803
|
+
}
|
1353
1804
|
|
1354
|
-
url = (
|
1355
|
-
|
1805
|
+
url = (
|
1806
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/by-relationship/"
|
1807
|
+
f"{relationship_type}/with-property-value-search{possible_query_params}"
|
1808
|
+
)
|
1356
1809
|
|
1357
|
-
response: Response = await self._async_make_request(
|
1810
|
+
response: Response = await self._async_make_request(
|
1811
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
1812
|
+
)
|
1358
1813
|
|
1359
|
-
elements = response.json().get(
|
1814
|
+
elements = response.json().get("elements", "No elements found")
|
1360
1815
|
if type(elements) is list:
|
1361
1816
|
if len(elements) == 0:
|
1362
1817
|
return "No elements found"
|
1363
1818
|
return elements
|
1364
1819
|
|
1365
|
-
def find_related_elements_with_property_value(
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1820
|
+
def find_related_elements_with_property_value(
|
1821
|
+
self,
|
1822
|
+
element_guid: str,
|
1823
|
+
relationship_type: str,
|
1824
|
+
property_value: str,
|
1825
|
+
property_names: [str],
|
1826
|
+
open_metadata_type_name: str = None,
|
1827
|
+
start_at_end: int = 1,
|
1828
|
+
effective_time: str = None,
|
1829
|
+
for_lineage: bool = None,
|
1830
|
+
for_duplicate_processing: bool = None,
|
1831
|
+
start_from: int = 0,
|
1832
|
+
page_size: int = max_paging_size,
|
1833
|
+
server_name: str = None,
|
1834
|
+
time_out: int = default_time_out,
|
1835
|
+
) -> list | str:
|
1372
1836
|
"""
|
1373
1837
|
Retrieve elements linked via the requested relationship type name and with the requested a value found in one of
|
1374
1838
|
the classification's properties specified. The value must only be contained in the properties rather than
|
@@ -1423,19 +1887,38 @@ class ClassificationManager(Client):
|
|
1423
1887
|
|
1424
1888
|
loop = asyncio.get_event_loop()
|
1425
1889
|
response = loop.run_until_complete(
|
1426
|
-
self._async_find_related_elements_with_property_value(
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1890
|
+
self._async_find_related_elements_with_property_value(
|
1891
|
+
element_guid,
|
1892
|
+
relationship_type,
|
1893
|
+
property_value,
|
1894
|
+
property_names,
|
1895
|
+
open_metadata_type_name,
|
1896
|
+
start_at_end,
|
1897
|
+
effective_time,
|
1898
|
+
for_lineage,
|
1899
|
+
for_duplicate_processing,
|
1900
|
+
start_from,
|
1901
|
+
page_size,
|
1902
|
+
server_name,
|
1903
|
+
time_out,
|
1904
|
+
)
|
1905
|
+
)
|
1430
1906
|
return response
|
1431
1907
|
|
1432
1908
|
#
|
1433
1909
|
# relationships
|
1434
1910
|
|
1435
|
-
async def _async_get_relationships(
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1911
|
+
async def _async_get_relationships(
|
1912
|
+
self,
|
1913
|
+
relationship_type: str,
|
1914
|
+
effective_time: str = None,
|
1915
|
+
for_lineage: bool = None,
|
1916
|
+
for_duplicate_processing: bool = None,
|
1917
|
+
start_from: int = 0,
|
1918
|
+
page_size: int = max_paging_size,
|
1919
|
+
server_name: str = None,
|
1920
|
+
time_out: int = default_time_out,
|
1921
|
+
) -> list | str:
|
1439
1922
|
"""
|
1440
1923
|
Retrieve relationships of the requested relationship type name. Async version.
|
1441
1924
|
|
@@ -1476,25 +1959,42 @@ class ClassificationManager(Client):
|
|
1476
1959
|
server_name = self.server_name
|
1477
1960
|
|
1478
1961
|
possible_query_params = query_string(
|
1479
|
-
[
|
1480
|
-
|
1962
|
+
[
|
1963
|
+
("startFrom", start_from),
|
1964
|
+
("pageSize", page_size),
|
1965
|
+
("forLineage", for_lineage),
|
1966
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
1967
|
+
]
|
1968
|
+
)
|
1481
1969
|
|
1482
1970
|
body = {"class": "FindProperties", "effectiveTime": effective_time}
|
1483
1971
|
|
1484
|
-
url = (
|
1485
|
-
|
1972
|
+
url = (
|
1973
|
+
f"{base_path(self, server_name)}/relationships/{relationship_type}"
|
1974
|
+
f"{possible_query_params}"
|
1975
|
+
)
|
1486
1976
|
|
1487
|
-
response: Response = await self._async_make_request(
|
1488
|
-
|
1977
|
+
response: Response = await self._async_make_request(
|
1978
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
1979
|
+
)
|
1980
|
+
rels = response.json().get("relationships", "No relationships found")
|
1489
1981
|
|
1490
1982
|
if type(rels) is list:
|
1491
1983
|
if len(rels) == 0:
|
1492
1984
|
return "No elements found"
|
1493
1985
|
return rels
|
1494
1986
|
|
1495
|
-
def get_relationships(
|
1496
|
-
|
1497
|
-
|
1987
|
+
def get_relationships(
|
1988
|
+
self,
|
1989
|
+
relationship_type: str,
|
1990
|
+
effective_time: str = None,
|
1991
|
+
for_lineage: bool = None,
|
1992
|
+
for_duplicate_processing: bool = None,
|
1993
|
+
start_from: int = 0,
|
1994
|
+
page_size: int = max_paging_size,
|
1995
|
+
server_name: str = None,
|
1996
|
+
time_out: int = default_time_out,
|
1997
|
+
) -> list | str:
|
1498
1998
|
"""
|
1499
1999
|
Retrieve relationships of the requested relationship type name.
|
1500
2000
|
|
@@ -1534,16 +2034,32 @@ class ClassificationManager(Client):
|
|
1534
2034
|
|
1535
2035
|
loop = asyncio.get_event_loop()
|
1536
2036
|
response = loop.run_until_complete(
|
1537
|
-
self._async_get_relationships(
|
1538
|
-
|
2037
|
+
self._async_get_relationships(
|
2038
|
+
relationship_type,
|
2039
|
+
effective_time,
|
2040
|
+
for_lineage,
|
2041
|
+
for_duplicate_processing,
|
2042
|
+
start_from,
|
2043
|
+
page_size,
|
2044
|
+
server_name,
|
2045
|
+
time_out,
|
2046
|
+
)
|
2047
|
+
)
|
1539
2048
|
return response
|
1540
2049
|
|
1541
|
-
async def _async_get_relationships_with_property_value(
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
2050
|
+
async def _async_get_relationships_with_property_value(
|
2051
|
+
self,
|
2052
|
+
relationship_type: str,
|
2053
|
+
property_value: str,
|
2054
|
+
property_names: [str],
|
2055
|
+
effective_time: str = None,
|
2056
|
+
for_lineage: bool = None,
|
2057
|
+
for_duplicate_processing: bool = None,
|
2058
|
+
start_from: int = 0,
|
2059
|
+
page_size: int = max_paging_size,
|
2060
|
+
server_name: str = None,
|
2061
|
+
time_out: int = default_time_out,
|
2062
|
+
) -> list | str:
|
1547
2063
|
"""
|
1548
2064
|
Retrieve relationships of the requested relationship type name and with the requested a value found in
|
1549
2065
|
one of the relationship's properties specified. The value must match exactly. Async version.
|
@@ -1591,27 +2107,48 @@ class ClassificationManager(Client):
|
|
1591
2107
|
server_name = self.server_name
|
1592
2108
|
|
1593
2109
|
possible_query_params = query_string(
|
1594
|
-
[
|
1595
|
-
|
2110
|
+
[
|
2111
|
+
("startFrom", start_from),
|
2112
|
+
("pageSize", page_size),
|
2113
|
+
("forLineage", for_lineage),
|
2114
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
2115
|
+
]
|
2116
|
+
)
|
1596
2117
|
|
1597
|
-
body = {
|
1598
|
-
|
2118
|
+
body = {
|
2119
|
+
"class": "FindPropertyNamesProperties",
|
2120
|
+
"propertyValue": property_value,
|
2121
|
+
"propertyNames": property_names,
|
2122
|
+
"effectiveTime": effective_time,
|
2123
|
+
}
|
1599
2124
|
|
1600
|
-
url = (
|
1601
|
-
|
2125
|
+
url = (
|
2126
|
+
f"{base_path(self, server_name)}/relationships/{relationship_type}/"
|
2127
|
+
f"with-exact-property-value{possible_query_params}"
|
2128
|
+
)
|
1602
2129
|
|
1603
|
-
response: Response = await self._async_make_request(
|
1604
|
-
|
2130
|
+
response: Response = await self._async_make_request(
|
2131
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
2132
|
+
)
|
2133
|
+
rels = response.json().get("relationships", "No elements found")
|
1605
2134
|
if type(rels) is list:
|
1606
2135
|
if len(rels) == 0:
|
1607
2136
|
return "No elements found"
|
1608
2137
|
return rels
|
1609
2138
|
|
1610
|
-
def get_relationships_with_property_value(
|
1611
|
-
|
1612
|
-
|
1613
|
-
|
1614
|
-
|
2139
|
+
def get_relationships_with_property_value(
|
2140
|
+
self,
|
2141
|
+
relationship_type: str,
|
2142
|
+
property_value: str,
|
2143
|
+
property_names: [str],
|
2144
|
+
effective_time: str = None,
|
2145
|
+
for_lineage: bool = None,
|
2146
|
+
for_duplicate_processing: bool = None,
|
2147
|
+
start_from: int = 0,
|
2148
|
+
page_size: int = max_paging_size,
|
2149
|
+
server_name: str = None,
|
2150
|
+
time_out: int = default_time_out,
|
2151
|
+
) -> list | str:
|
1615
2152
|
"""
|
1616
2153
|
Retrieve relationships of the requested relationship type name and with the requested a value found in
|
1617
2154
|
one of the relationship's properties specified. The value must match exactly.
|
@@ -1656,17 +2193,34 @@ class ClassificationManager(Client):
|
|
1656
2193
|
|
1657
2194
|
loop = asyncio.get_event_loop()
|
1658
2195
|
response = loop.run_until_complete(
|
1659
|
-
self._async_get_relationships_with_property_value(
|
1660
|
-
|
1661
|
-
|
2196
|
+
self._async_get_relationships_with_property_value(
|
2197
|
+
relationship_type,
|
2198
|
+
property_value,
|
2199
|
+
property_names,
|
2200
|
+
effective_time,
|
2201
|
+
for_lineage,
|
2202
|
+
for_duplicate_processing,
|
2203
|
+
start_from,
|
2204
|
+
page_size,
|
2205
|
+
server_name,
|
2206
|
+
time_out,
|
2207
|
+
)
|
2208
|
+
)
|
1662
2209
|
return response
|
1663
2210
|
|
1664
|
-
async def _async_find_relationships_with_property_value(
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
1668
|
-
|
1669
|
-
|
2211
|
+
async def _async_find_relationships_with_property_value(
|
2212
|
+
self,
|
2213
|
+
relationship_type: str,
|
2214
|
+
property_value: str,
|
2215
|
+
property_names: [str],
|
2216
|
+
effective_time: str = None,
|
2217
|
+
for_lineage: bool = None,
|
2218
|
+
for_duplicate_processing: bool = None,
|
2219
|
+
start_from: int = 0,
|
2220
|
+
page_size: int = max_paging_size,
|
2221
|
+
server_name: str = None,
|
2222
|
+
time_out: int = default_time_out,
|
2223
|
+
) -> list | str:
|
1670
2224
|
"""
|
1671
2225
|
Retrieve relationships of the requested relationship type name and with the requested a value found in one of
|
1672
2226
|
the relationship's properties specified. The value must only be contained in the properties rather than
|
@@ -1713,28 +2267,49 @@ class ClassificationManager(Client):
|
|
1713
2267
|
server_name = self.server_name
|
1714
2268
|
|
1715
2269
|
possible_query_params = query_string(
|
1716
|
-
[
|
1717
|
-
|
2270
|
+
[
|
2271
|
+
("startFrom", start_from),
|
2272
|
+
("pageSize", page_size),
|
2273
|
+
("forLineage", for_lineage),
|
2274
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
2275
|
+
]
|
2276
|
+
)
|
1718
2277
|
|
1719
|
-
body = {
|
1720
|
-
|
2278
|
+
body = {
|
2279
|
+
"class": "FindPropertyNamesProperties",
|
2280
|
+
"propertyValue": property_value,
|
2281
|
+
"propertyNames": property_names,
|
2282
|
+
"effectiveTime": effective_time,
|
2283
|
+
}
|
1721
2284
|
|
1722
|
-
url = (
|
1723
|
-
|
2285
|
+
url = (
|
2286
|
+
f"{base_path(self, server_name)}/relationships/"
|
2287
|
+
f"{relationship_type}/with-property-value-search{possible_query_params}"
|
2288
|
+
)
|
1724
2289
|
|
1725
|
-
response: Response = await self._async_make_request(
|
2290
|
+
response: Response = await self._async_make_request(
|
2291
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
2292
|
+
)
|
1726
2293
|
|
1727
|
-
rels = response.json().get(
|
2294
|
+
rels = response.json().get("relationships", "No elements found")
|
1728
2295
|
if type(rels) is list:
|
1729
2296
|
if len(rels) == 0:
|
1730
2297
|
return "No elements found"
|
1731
2298
|
return rels
|
1732
2299
|
|
1733
|
-
def find_relationships_with_property_value(
|
1734
|
-
|
1735
|
-
|
1736
|
-
|
1737
|
-
|
2300
|
+
def find_relationships_with_property_value(
|
2301
|
+
self,
|
2302
|
+
relationship_type: str,
|
2303
|
+
property_value: str,
|
2304
|
+
property_names: [str],
|
2305
|
+
effective_time: str = None,
|
2306
|
+
for_lineage: bool = None,
|
2307
|
+
for_duplicate_processing: bool = None,
|
2308
|
+
start_from: int = 0,
|
2309
|
+
page_size: int = max_paging_size,
|
2310
|
+
server_name: str = None,
|
2311
|
+
time_out: int = default_time_out,
|
2312
|
+
) -> list | str:
|
1738
2313
|
"""
|
1739
2314
|
Retrieve relationships of the requested relationship type name and with the requested a value found in one of
|
1740
2315
|
the relationship's properties specified. The value must only be contained in the properties rather than
|
@@ -1782,18 +2357,34 @@ class ClassificationManager(Client):
|
|
1782
2357
|
|
1783
2358
|
loop = asyncio.get_event_loop()
|
1784
2359
|
response = loop.run_until_complete(
|
1785
|
-
self._async_find_relationships_with_property_value(
|
1786
|
-
|
1787
|
-
|
2360
|
+
self._async_find_relationships_with_property_value(
|
2361
|
+
relationship_type,
|
2362
|
+
property_value,
|
2363
|
+
property_names,
|
2364
|
+
effective_time,
|
2365
|
+
for_lineage,
|
2366
|
+
for_duplicate_processing,
|
2367
|
+
start_from,
|
2368
|
+
page_size,
|
2369
|
+
server_name,
|
2370
|
+
time_out,
|
2371
|
+
)
|
2372
|
+
)
|
1788
2373
|
return response
|
1789
2374
|
|
1790
2375
|
#
|
1791
2376
|
# guid
|
1792
2377
|
#
|
1793
2378
|
|
1794
|
-
async def _async_retrieve_instance_for_guid(
|
1795
|
-
|
1796
|
-
|
2379
|
+
async def _async_retrieve_instance_for_guid(
|
2380
|
+
self,
|
2381
|
+
guid: str,
|
2382
|
+
effective_time: str = None,
|
2383
|
+
for_lineage: bool = None,
|
2384
|
+
for_duplicate_processing: bool = None,
|
2385
|
+
server_name: str = None,
|
2386
|
+
time_out: int = default_time_out,
|
2387
|
+
) -> list | str:
|
1797
2388
|
"""
|
1798
2389
|
Retrieve the header for the instance identified by the supplied unique identifier.
|
1799
2390
|
It may be an element (entity) or a relationship between elements. Async version.
|
@@ -1831,18 +2422,33 @@ class ClassificationManager(Client):
|
|
1831
2422
|
server_name = self.server_name
|
1832
2423
|
|
1833
2424
|
possible_query_params = query_string(
|
1834
|
-
[
|
2425
|
+
[
|
2426
|
+
("forLineage", for_lineage),
|
2427
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
2428
|
+
]
|
2429
|
+
)
|
1835
2430
|
|
1836
|
-
body = {
|
2431
|
+
body = {
|
2432
|
+
"class": "FindProperties",
|
2433
|
+
"effectiveTime": effective_time,
|
2434
|
+
}
|
1837
2435
|
|
1838
2436
|
url = f"{base_path(self, server_name)}/guids/{guid}{possible_query_params}"
|
1839
|
-
response: Response = await self._async_make_request(
|
1840
|
-
|
2437
|
+
response: Response = await self._async_make_request(
|
2438
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
2439
|
+
)
|
2440
|
+
element = response.json().get("element", "No elements found")
|
1841
2441
|
return element
|
1842
2442
|
|
1843
|
-
def retrieve_instance_for_guid(
|
1844
|
-
|
1845
|
-
|
2443
|
+
def retrieve_instance_for_guid(
|
2444
|
+
self,
|
2445
|
+
guid: str,
|
2446
|
+
effective_time: str = None,
|
2447
|
+
for_lineage: bool = None,
|
2448
|
+
for_duplicate_processing: bool = None,
|
2449
|
+
server_name: str = None,
|
2450
|
+
time_out: int = default_time_out,
|
2451
|
+
) -> list | str:
|
1846
2452
|
"""
|
1847
2453
|
Retrieve the header for the instance identified by the supplied unique identifier.
|
1848
2454
|
It may be an element (entity) or a relationship between elements.
|
@@ -1879,17 +2485,30 @@ class ClassificationManager(Client):
|
|
1879
2485
|
|
1880
2486
|
loop = asyncio.get_event_loop()
|
1881
2487
|
response = loop.run_until_complete(
|
1882
|
-
self._async_retrieve_instance_for_guid(
|
1883
|
-
|
2488
|
+
self._async_retrieve_instance_for_guid(
|
2489
|
+
guid,
|
2490
|
+
effective_time,
|
2491
|
+
for_lineage,
|
2492
|
+
for_duplicate_processing,
|
2493
|
+
server_name,
|
2494
|
+
time_out,
|
2495
|
+
)
|
2496
|
+
)
|
1884
2497
|
return response
|
1885
2498
|
|
1886
2499
|
#
|
1887
2500
|
# Classification CRUD
|
1888
2501
|
#
|
1889
2502
|
|
1890
|
-
async def _async_set_confidence_classification(
|
1891
|
-
|
1892
|
-
|
2503
|
+
async def _async_set_confidence_classification(
|
2504
|
+
self,
|
2505
|
+
element_guid: str,
|
2506
|
+
body: dict,
|
2507
|
+
for_lineage: bool = None,
|
2508
|
+
for_duplicate_processing: bool = None,
|
2509
|
+
server_name: str = None,
|
2510
|
+
time_out: int = default_time_out,
|
2511
|
+
) -> None:
|
1893
2512
|
"""
|
1894
2513
|
Classify/reclassify the element (typically an asset) to indicate the level of confidence that the organization
|
1895
2514
|
has that the data is complete, accurate and up-to-date. The level of confidence is expressed by the
|
@@ -1951,16 +2570,30 @@ class ClassificationManager(Client):
|
|
1951
2570
|
server_name = self.server_name
|
1952
2571
|
|
1953
2572
|
possible_query_params = query_string(
|
1954
|
-
[
|
1955
|
-
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1959
|
-
|
1960
|
-
|
1961
|
-
|
1962
|
-
|
1963
|
-
|
2573
|
+
[
|
2574
|
+
("forLineage", for_lineage),
|
2575
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
2576
|
+
]
|
2577
|
+
)
|
2578
|
+
|
2579
|
+
url = (
|
2580
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/confidence"
|
2581
|
+
f"{possible_query_params}"
|
2582
|
+
)
|
2583
|
+
|
2584
|
+
await self._async_make_request(
|
2585
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
2586
|
+
)
|
2587
|
+
|
2588
|
+
def set_confidence_classification(
|
2589
|
+
self,
|
2590
|
+
element_guid: str,
|
2591
|
+
body: dict,
|
2592
|
+
for_lineage: bool = None,
|
2593
|
+
for_duplicate_processing: bool = None,
|
2594
|
+
server_name: str = None,
|
2595
|
+
time_out: int = default_time_out,
|
2596
|
+
) -> None:
|
1964
2597
|
"""
|
1965
2598
|
Classify/reclassify the element (typically an asset) to indicate the level of confidence that the organization
|
1966
2599
|
has that the data is complete, accurate and up-to-date. The level of confidence is expressed by the
|
@@ -2021,15 +2654,27 @@ class ClassificationManager(Client):
|
|
2021
2654
|
|
2022
2655
|
loop = asyncio.get_event_loop()
|
2023
2656
|
loop.run_until_complete(
|
2024
|
-
self._async_set_confidence_classification(
|
2025
|
-
|
2026
|
-
|
2027
|
-
|
2028
|
-
|
2029
|
-
|
2030
|
-
|
2657
|
+
self._async_set_confidence_classification(
|
2658
|
+
element_guid,
|
2659
|
+
body,
|
2660
|
+
for_lineage,
|
2661
|
+
for_duplicate_processing,
|
2662
|
+
server_name,
|
2663
|
+
time_out,
|
2664
|
+
)
|
2665
|
+
)
|
2666
|
+
|
2667
|
+
async def _async_clear_confidence_classification(
|
2668
|
+
self,
|
2669
|
+
element_guid: str,
|
2670
|
+
for_lineage: bool = None,
|
2671
|
+
for_duplicate_processing: bool = None,
|
2672
|
+
effective_time: str = None,
|
2673
|
+
server_name: str = None,
|
2674
|
+
time_out: int = default_time_out,
|
2675
|
+
) -> None:
|
2031
2676
|
"""
|
2032
|
-
Remove the confidence classification from the element. This normally occurs when the organization has lost
|
2677
|
+
Remove the confidence classification from the element. This normally occurs when the organization has lost
|
2033
2678
|
track of the level of confidence to assign to the element. Async Version.
|
2034
2679
|
|
2035
2680
|
Governance Action Classifications: https://egeria-project.org/types/4/0422-Governance-Action-Classifications/
|
@@ -2069,24 +2714,34 @@ class ClassificationManager(Client):
|
|
2069
2714
|
server_name = self.server_name
|
2070
2715
|
|
2071
2716
|
possible_query_params = query_string(
|
2072
|
-
[
|
2073
|
-
|
2074
|
-
|
2075
|
-
|
2076
|
-
|
2077
|
-
|
2078
|
-
|
2079
|
-
|
2080
|
-
|
2081
|
-
|
2082
|
-
|
2083
|
-
|
2084
|
-
|
2085
|
-
|
2086
|
-
|
2717
|
+
[
|
2718
|
+
("forLineage", for_lineage),
|
2719
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
2720
|
+
]
|
2721
|
+
)
|
2722
|
+
|
2723
|
+
url = (
|
2724
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/confidence/remove"
|
2725
|
+
f"{possible_query_params}"
|
2726
|
+
)
|
2727
|
+
body = {"class": "ClassificationRequestBody", "effectiveTime": effective_time}
|
2728
|
+
|
2729
|
+
await self._async_make_request(
|
2730
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
2731
|
+
)
|
2732
|
+
|
2733
|
+
def clear_confidence_classification(
|
2734
|
+
self,
|
2735
|
+
element_guid: str,
|
2736
|
+
for_lineage: bool = None,
|
2737
|
+
for_duplicate_processing: bool = None,
|
2738
|
+
effective_time: str = None,
|
2739
|
+
server_name: str = None,
|
2740
|
+
time_out: int = default_time_out,
|
2741
|
+
) -> None:
|
2087
2742
|
"""
|
2088
|
-
Remove the confidence classification from the element. This normally occurs when the organization has lost
|
2089
|
-
track of the level of confidence to assign to the element.
|
2743
|
+
Remove the confidence classification from the element. This normally occurs when the organization has lost
|
2744
|
+
track of the level of confidence to assign to the element.
|
2090
2745
|
|
2091
2746
|
Governance Action Classifications: https://egeria-project.org/types/4/0422-Governance-Action-Classifications/
|
2092
2747
|
|
@@ -2124,12 +2779,25 @@ class ClassificationManager(Client):
|
|
2124
2779
|
|
2125
2780
|
loop = asyncio.get_event_loop()
|
2126
2781
|
loop.run_until_complete(
|
2127
|
-
self._async_clear_confidence_classification(
|
2128
|
-
|
2129
|
-
|
2130
|
-
|
2131
|
-
|
2132
|
-
|
2782
|
+
self._async_clear_confidence_classification(
|
2783
|
+
element_guid,
|
2784
|
+
for_lineage,
|
2785
|
+
for_duplicate_processing,
|
2786
|
+
effective_time,
|
2787
|
+
server_name,
|
2788
|
+
time_out,
|
2789
|
+
)
|
2790
|
+
)
|
2791
|
+
|
2792
|
+
async def _async_set_confidentiality_classification(
|
2793
|
+
self,
|
2794
|
+
element_guid: str,
|
2795
|
+
body: dict,
|
2796
|
+
for_lineage: bool = None,
|
2797
|
+
for_duplicate_processing: bool = None,
|
2798
|
+
server_name: str = None,
|
2799
|
+
time_out: int = default_time_out,
|
2800
|
+
) -> None:
|
2133
2801
|
"""
|
2134
2802
|
Classify/reclassify the element (typically a data field, schema attribute or glossary term) to indicate the
|
2135
2803
|
level of confidentiality that any data associated with the element should be given. If the classification is
|
@@ -2193,16 +2861,30 @@ class ClassificationManager(Client):
|
|
2193
2861
|
server_name = self.server_name
|
2194
2862
|
|
2195
2863
|
possible_query_params = query_string(
|
2196
|
-
[
|
2197
|
-
|
2198
|
-
|
2199
|
-
|
2200
|
-
|
2201
|
-
|
2202
|
-
|
2203
|
-
|
2204
|
-
|
2205
|
-
|
2864
|
+
[
|
2865
|
+
("forLineage", for_lineage),
|
2866
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
2867
|
+
]
|
2868
|
+
)
|
2869
|
+
|
2870
|
+
url = (
|
2871
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/confidentiality"
|
2872
|
+
f"{possible_query_params}"
|
2873
|
+
)
|
2874
|
+
|
2875
|
+
await self._async_make_request(
|
2876
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
2877
|
+
)
|
2878
|
+
|
2879
|
+
def set_confidentiality_classification(
|
2880
|
+
self,
|
2881
|
+
element_guid: str,
|
2882
|
+
body: dict,
|
2883
|
+
for_lineage: bool = None,
|
2884
|
+
for_duplicate_processing: bool = None,
|
2885
|
+
server_name: str = None,
|
2886
|
+
time_out: int = default_time_out,
|
2887
|
+
) -> None:
|
2206
2888
|
"""
|
2207
2889
|
Classify/reclassify the element (typically a data field, schema attribute or glossary term) to indicate the
|
2208
2890
|
level of confidentiality that any data associated with the element should be given. If the classification is
|
@@ -2265,16 +2947,27 @@ class ClassificationManager(Client):
|
|
2265
2947
|
|
2266
2948
|
loop = asyncio.get_event_loop()
|
2267
2949
|
loop.run_until_complete(
|
2268
|
-
self._async_set_confidentiality_classification(
|
2269
|
-
|
2270
|
-
|
2271
|
-
|
2272
|
-
|
2273
|
-
|
2274
|
-
|
2275
|
-
|
2950
|
+
self._async_set_confidentiality_classification(
|
2951
|
+
element_guid,
|
2952
|
+
body,
|
2953
|
+
for_lineage,
|
2954
|
+
for_duplicate_processing,
|
2955
|
+
server_name,
|
2956
|
+
time_out,
|
2957
|
+
)
|
2958
|
+
)
|
2959
|
+
|
2960
|
+
async def _async_clear_confidentiality_classification(
|
2961
|
+
self,
|
2962
|
+
element_guid: str,
|
2963
|
+
for_lineage: bool = None,
|
2964
|
+
for_duplicate_processing: bool = None,
|
2965
|
+
effective_time: str = None,
|
2966
|
+
server_name: str = None,
|
2967
|
+
time_out: int = default_time_out,
|
2968
|
+
) -> None:
|
2276
2969
|
"""
|
2277
|
-
Remove the confidentiality classification from the element. This normally occurs when the organization has lost
|
2970
|
+
Remove the confidentiality classification from the element. This normally occurs when the organization has lost
|
2278
2971
|
track of the level of confidentiality to assign to the element. Async Version.
|
2279
2972
|
|
2280
2973
|
Governance Action Classifications: https://egeria-project.org/types/4/0422-Governance-Action-Classifications/
|
@@ -2314,25 +3007,35 @@ class ClassificationManager(Client):
|
|
2314
3007
|
server_name = self.server_name
|
2315
3008
|
|
2316
3009
|
possible_query_params = query_string(
|
2317
|
-
[
|
2318
|
-
|
2319
|
-
|
2320
|
-
|
2321
|
-
|
2322
|
-
|
2323
|
-
|
2324
|
-
"
|
2325
|
-
|
2326
|
-
|
2327
|
-
|
2328
|
-
|
2329
|
-
|
2330
|
-
|
2331
|
-
|
2332
|
-
|
3010
|
+
[
|
3011
|
+
("forLineage", for_lineage),
|
3012
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
3013
|
+
]
|
3014
|
+
)
|
3015
|
+
|
3016
|
+
url = (
|
3017
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/confidentiality/remove"
|
3018
|
+
f"{possible_query_params}"
|
3019
|
+
)
|
3020
|
+
|
3021
|
+
body = {"class": "ClassificationRequestBody", "effectiveTime": effective_time}
|
3022
|
+
|
3023
|
+
await self._async_make_request(
|
3024
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
3025
|
+
)
|
3026
|
+
|
3027
|
+
def clear_confidentiality_classification(
|
3028
|
+
self,
|
3029
|
+
element_guid: str,
|
3030
|
+
for_lineage: bool = None,
|
3031
|
+
for_duplicate_processing: bool = None,
|
3032
|
+
effective_time: str = None,
|
3033
|
+
server_name: str = None,
|
3034
|
+
time_out: int = default_time_out,
|
3035
|
+
) -> None:
|
2333
3036
|
"""
|
2334
|
-
Remove the confidentiality classification from the element. This normally occurs when the organization has lost
|
2335
|
-
track of the level of confidentiality to assign to the element.
|
3037
|
+
Remove the confidentiality classification from the element. This normally occurs when the organization has lost
|
3038
|
+
track of the level of confidentiality to assign to the element.
|
2336
3039
|
|
2337
3040
|
Governance Action Classifications: https://egeria-project.org/types/4/0422-Governance-Action-Classifications/
|
2338
3041
|
|
@@ -2370,12 +3073,25 @@ class ClassificationManager(Client):
|
|
2370
3073
|
|
2371
3074
|
loop = asyncio.get_event_loop()
|
2372
3075
|
loop.run_until_complete(
|
2373
|
-
self._async_clear_confidentiality_classification(
|
2374
|
-
|
2375
|
-
|
2376
|
-
|
2377
|
-
|
2378
|
-
|
3076
|
+
self._async_clear_confidentiality_classification(
|
3077
|
+
element_guid,
|
3078
|
+
for_lineage,
|
3079
|
+
for_duplicate_processing,
|
3080
|
+
effective_time,
|
3081
|
+
server_name,
|
3082
|
+
time_out,
|
3083
|
+
)
|
3084
|
+
)
|
3085
|
+
|
3086
|
+
async def _async_set_criticality_classification(
|
3087
|
+
self,
|
3088
|
+
element_guid: str,
|
3089
|
+
body: dict,
|
3090
|
+
for_lineage: bool = None,
|
3091
|
+
for_duplicate_processing: bool = None,
|
3092
|
+
server_name: str = None,
|
3093
|
+
time_out: int = default_time_out,
|
3094
|
+
) -> None:
|
2379
3095
|
"""
|
2380
3096
|
Classify/reclassify the element (typically an asset) to indicate how critical the element (or
|
2381
3097
|
associated resource) is to the organization. The level of criticality is expressed by the levelIdentifier
|
@@ -2437,16 +3153,30 @@ class ClassificationManager(Client):
|
|
2437
3153
|
server_name = self.server_name
|
2438
3154
|
|
2439
3155
|
possible_query_params = query_string(
|
2440
|
-
[
|
2441
|
-
|
2442
|
-
|
2443
|
-
|
2444
|
-
|
2445
|
-
|
2446
|
-
|
2447
|
-
|
2448
|
-
|
2449
|
-
|
3156
|
+
[
|
3157
|
+
("forLineage", for_lineage),
|
3158
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
3159
|
+
]
|
3160
|
+
)
|
3161
|
+
|
3162
|
+
url = (
|
3163
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/criticality"
|
3164
|
+
f"{possible_query_params}"
|
3165
|
+
)
|
3166
|
+
|
3167
|
+
await self._async_make_request(
|
3168
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
3169
|
+
)
|
3170
|
+
|
3171
|
+
def set_criticality_classification(
|
3172
|
+
self,
|
3173
|
+
element_guid: str,
|
3174
|
+
body: dict,
|
3175
|
+
for_lineage: bool = None,
|
3176
|
+
for_duplicate_processing: bool = None,
|
3177
|
+
server_name: str = None,
|
3178
|
+
time_out: int = default_time_out,
|
3179
|
+
) -> None:
|
2450
3180
|
"""
|
2451
3181
|
Classify/reclassify the element (typically an asset) to indicate how critical the element (or
|
2452
3182
|
associated resource) is to the organization. The level of criticality is expressed by the levelIdentifier
|
@@ -2507,13 +3237,25 @@ class ClassificationManager(Client):
|
|
2507
3237
|
|
2508
3238
|
loop = asyncio.get_event_loop()
|
2509
3239
|
loop.run_until_complete(
|
2510
|
-
self._async_set_criticality_classification(
|
2511
|
-
|
2512
|
-
|
2513
|
-
|
2514
|
-
|
2515
|
-
|
2516
|
-
|
3240
|
+
self._async_set_criticality_classification(
|
3241
|
+
element_guid,
|
3242
|
+
body,
|
3243
|
+
for_lineage,
|
3244
|
+
for_duplicate_processing,
|
3245
|
+
server_name,
|
3246
|
+
time_out,
|
3247
|
+
)
|
3248
|
+
)
|
3249
|
+
|
3250
|
+
async def _async_clear_criticality_classification(
|
3251
|
+
self,
|
3252
|
+
element_guid: str,
|
3253
|
+
for_lineage: bool = None,
|
3254
|
+
for_duplicate_processing: bool = None,
|
3255
|
+
effective_time: str = None,
|
3256
|
+
server_name: str = None,
|
3257
|
+
time_out: int = default_time_out,
|
3258
|
+
) -> None:
|
2517
3259
|
"""
|
2518
3260
|
Remove the criticality classification from the element. This normally occurs when the organization has lost
|
2519
3261
|
track of the level of criticality to assign to the element. Async Version.
|
@@ -2555,22 +3297,32 @@ class ClassificationManager(Client):
|
|
2555
3297
|
server_name = self.server_name
|
2556
3298
|
|
2557
3299
|
possible_query_params = query_string(
|
2558
|
-
[
|
2559
|
-
|
2560
|
-
|
2561
|
-
|
2562
|
-
|
2563
|
-
|
2564
|
-
|
2565
|
-
"
|
2566
|
-
|
2567
|
-
|
2568
|
-
|
2569
|
-
|
2570
|
-
|
2571
|
-
|
2572
|
-
|
2573
|
-
|
3300
|
+
[
|
3301
|
+
("forLineage", for_lineage),
|
3302
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
3303
|
+
]
|
3304
|
+
)
|
3305
|
+
|
3306
|
+
url = (
|
3307
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/criticality/remove"
|
3308
|
+
f"{possible_query_params}"
|
3309
|
+
)
|
3310
|
+
|
3311
|
+
body = {"class": "ClassificationRequestBody", "effectiveTime": effective_time}
|
3312
|
+
|
3313
|
+
await self._async_make_request(
|
3314
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
3315
|
+
)
|
3316
|
+
|
3317
|
+
def clear_criticality_classification(
|
3318
|
+
self,
|
3319
|
+
element_guid: str,
|
3320
|
+
for_lineage: bool = None,
|
3321
|
+
for_duplicate_processing: bool = None,
|
3322
|
+
effective_time: str = None,
|
3323
|
+
server_name: str = None,
|
3324
|
+
time_out: int = default_time_out,
|
3325
|
+
) -> None:
|
2574
3326
|
"""
|
2575
3327
|
Remove the criticality classification from the element. This normally occurs when the organization has lost
|
2576
3328
|
track of the level of criticality to assign to the element.
|
@@ -2611,13 +3363,26 @@ class ClassificationManager(Client):
|
|
2611
3363
|
|
2612
3364
|
loop = asyncio.get_event_loop()
|
2613
3365
|
loop.run_until_complete(
|
2614
|
-
self._async_clear_criticality_classification(
|
2615
|
-
|
2616
|
-
|
2617
|
-
|
2618
|
-
|
2619
|
-
|
2620
|
-
|
3366
|
+
self._async_clear_criticality_classification(
|
3367
|
+
element_guid,
|
3368
|
+
for_lineage,
|
3369
|
+
for_duplicate_processing,
|
3370
|
+
effective_time,
|
3371
|
+
server_name,
|
3372
|
+
time_out,
|
3373
|
+
)
|
3374
|
+
)
|
3375
|
+
|
3376
|
+
async def _async_add_gov_definition_to_element(
|
3377
|
+
self,
|
3378
|
+
definition_guid: str,
|
3379
|
+
element_guid: str,
|
3380
|
+
effective_time: str = None,
|
3381
|
+
for_lineage: bool = None,
|
3382
|
+
for_duplicate_processing: bool = None,
|
3383
|
+
server_name: str = None,
|
3384
|
+
time_out: int = default_time_out,
|
3385
|
+
) -> None:
|
2621
3386
|
"""
|
2622
3387
|
Link a governance definition to an element using the GovernedBy relationship. Async version.
|
2623
3388
|
|
@@ -2658,18 +3423,33 @@ class ClassificationManager(Client):
|
|
2658
3423
|
server_name = self.server_name
|
2659
3424
|
|
2660
3425
|
possible_query_params = query_string(
|
2661
|
-
[
|
3426
|
+
[
|
3427
|
+
("forLineage", for_lineage),
|
3428
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
3429
|
+
]
|
3430
|
+
)
|
2662
3431
|
|
2663
|
-
url = (
|
2664
|
-
|
3432
|
+
url = (
|
3433
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/governed-by/definition/{definition_guid}"
|
3434
|
+
f"{possible_query_params}"
|
3435
|
+
)
|
2665
3436
|
|
2666
3437
|
body = {"class": "RelationshipRequestBody", "effectiveTime": effective_time}
|
2667
3438
|
|
2668
|
-
await self._async_make_request(
|
2669
|
-
|
2670
|
-
|
2671
|
-
|
2672
|
-
|
3439
|
+
await self._async_make_request(
|
3440
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
3441
|
+
)
|
3442
|
+
|
3443
|
+
def add_gov_definition_to_element(
|
3444
|
+
self,
|
3445
|
+
definition_guid: str,
|
3446
|
+
element_guid: str,
|
3447
|
+
effective_time: str = None,
|
3448
|
+
for_lineage: bool = None,
|
3449
|
+
for_duplicate_processing: bool = None,
|
3450
|
+
server_name: str = None,
|
3451
|
+
time_out: int = default_time_out,
|
3452
|
+
) -> None:
|
2673
3453
|
"""
|
2674
3454
|
Link a governance definition to an element using the GovernedBy relationship.
|
2675
3455
|
|
@@ -2709,13 +3489,27 @@ class ClassificationManager(Client):
|
|
2709
3489
|
|
2710
3490
|
loop = asyncio.get_event_loop()
|
2711
3491
|
loop.run_until_complete(
|
2712
|
-
self._async_add_gov_definition_to_element(
|
2713
|
-
|
2714
|
-
|
2715
|
-
|
2716
|
-
|
2717
|
-
|
2718
|
-
|
3492
|
+
self._async_add_gov_definition_to_element(
|
3493
|
+
definition_guid,
|
3494
|
+
element_guid,
|
3495
|
+
effective_time,
|
3496
|
+
for_lineage,
|
3497
|
+
for_duplicate_processing,
|
3498
|
+
server_name,
|
3499
|
+
time_out,
|
3500
|
+
)
|
3501
|
+
)
|
3502
|
+
|
3503
|
+
async def _async_clear_gov_definition_from_element(
|
3504
|
+
self,
|
3505
|
+
definition_guid,
|
3506
|
+
element_guid: str,
|
3507
|
+
for_lineage: bool = None,
|
3508
|
+
for_duplicate_processing: bool = None,
|
3509
|
+
effective_time: str = None,
|
3510
|
+
server_name: str = None,
|
3511
|
+
time_out: int = default_time_out,
|
3512
|
+
) -> None:
|
2719
3513
|
"""
|
2720
3514
|
Remove the GovernedBy relationship between a governance definition and an element. Async Version.
|
2721
3515
|
|
@@ -2758,22 +3552,33 @@ class ClassificationManager(Client):
|
|
2758
3552
|
server_name = self.server_name
|
2759
3553
|
|
2760
3554
|
possible_query_params = query_string(
|
2761
|
-
[
|
2762
|
-
|
2763
|
-
|
2764
|
-
|
2765
|
-
|
2766
|
-
|
2767
|
-
|
2768
|
-
"
|
2769
|
-
|
2770
|
-
|
2771
|
-
|
2772
|
-
|
2773
|
-
|
2774
|
-
|
2775
|
-
|
2776
|
-
|
3555
|
+
[
|
3556
|
+
("forLineage", for_lineage),
|
3557
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
3558
|
+
]
|
3559
|
+
)
|
3560
|
+
|
3561
|
+
url = (
|
3562
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/governed-by/definition/"
|
3563
|
+
f"{definition_guid}/remove{possible_query_params}"
|
3564
|
+
)
|
3565
|
+
|
3566
|
+
body = {"class": "ClassificationRequestBody", "effectiveTime": effective_time}
|
3567
|
+
|
3568
|
+
await self._async_make_request(
|
3569
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
3570
|
+
)
|
3571
|
+
|
3572
|
+
def clear_gov_definition_from_element(
|
3573
|
+
self,
|
3574
|
+
definition_guid,
|
3575
|
+
element_guid: str,
|
3576
|
+
for_lineage: bool = None,
|
3577
|
+
for_duplicate_processing: bool = None,
|
3578
|
+
effective_time: str = None,
|
3579
|
+
server_name: str = None,
|
3580
|
+
time_out: int = default_time_out,
|
3581
|
+
) -> None:
|
2777
3582
|
"""
|
2778
3583
|
Remove the GovernedBy relationship between a governance definition and an element. Async Version.
|
2779
3584
|
|
@@ -2815,12 +3620,25 @@ class ClassificationManager(Client):
|
|
2815
3620
|
|
2816
3621
|
loop = asyncio.get_event_loop()
|
2817
3622
|
loop.run_until_complete(
|
2818
|
-
self._async_clear_criticality_classification(
|
2819
|
-
|
2820
|
-
|
2821
|
-
|
2822
|
-
|
2823
|
-
|
3623
|
+
self._async_clear_criticality_classification(
|
3624
|
+
element_guid,
|
3625
|
+
for_lineage,
|
3626
|
+
for_duplicate_processing,
|
3627
|
+
effective_time,
|
3628
|
+
server_name,
|
3629
|
+
time_out,
|
3630
|
+
)
|
3631
|
+
)
|
3632
|
+
|
3633
|
+
async def _async_add_ownership_to_element(
|
3634
|
+
self,
|
3635
|
+
element_guid: str,
|
3636
|
+
body: dict,
|
3637
|
+
for_lineage: bool = None,
|
3638
|
+
for_duplicate_processing: bool = None,
|
3639
|
+
server_name: str = None,
|
3640
|
+
time_out: int = default_time_out,
|
3641
|
+
) -> None:
|
2824
3642
|
"""
|
2825
3643
|
Add or replace the ownership classification for an element. Async version.
|
2826
3644
|
|
@@ -2873,16 +3691,30 @@ class ClassificationManager(Client):
|
|
2873
3691
|
server_name = self.server_name
|
2874
3692
|
|
2875
3693
|
possible_query_params = query_string(
|
2876
|
-
[
|
2877
|
-
|
2878
|
-
|
2879
|
-
|
2880
|
-
|
2881
|
-
|
2882
|
-
|
2883
|
-
|
2884
|
-
|
2885
|
-
|
3694
|
+
[
|
3695
|
+
("forLineage", for_lineage),
|
3696
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
3697
|
+
]
|
3698
|
+
)
|
3699
|
+
|
3700
|
+
url = (
|
3701
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/ownership"
|
3702
|
+
f"{possible_query_params}"
|
3703
|
+
)
|
3704
|
+
|
3705
|
+
await self._async_make_request(
|
3706
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
3707
|
+
)
|
3708
|
+
|
3709
|
+
def add_ownership_to_element(
|
3710
|
+
self,
|
3711
|
+
element_guid: str,
|
3712
|
+
body: dict,
|
3713
|
+
for_lineage: bool = None,
|
3714
|
+
for_duplicate_processing: bool = None,
|
3715
|
+
server_name: str = None,
|
3716
|
+
time_out: int = default_time_out,
|
3717
|
+
) -> None:
|
2886
3718
|
"""
|
2887
3719
|
Add or replace the ownership classification for an element.
|
2888
3720
|
|
@@ -2934,13 +3766,25 @@ class ClassificationManager(Client):
|
|
2934
3766
|
|
2935
3767
|
loop = asyncio.get_event_loop()
|
2936
3768
|
loop.run_until_complete(
|
2937
|
-
self._async_add_ownership_to_element(
|
2938
|
-
|
2939
|
-
|
2940
|
-
|
2941
|
-
|
2942
|
-
|
2943
|
-
|
3769
|
+
self._async_add_ownership_to_element(
|
3770
|
+
element_guid,
|
3771
|
+
body,
|
3772
|
+
for_lineage,
|
3773
|
+
for_duplicate_processing,
|
3774
|
+
server_name,
|
3775
|
+
time_out,
|
3776
|
+
)
|
3777
|
+
)
|
3778
|
+
|
3779
|
+
async def _async_clear_ownership_from_element(
|
3780
|
+
self,
|
3781
|
+
element_guid: str,
|
3782
|
+
for_lineage: bool = None,
|
3783
|
+
for_duplicate_processing: bool = None,
|
3784
|
+
effective_time: str = None,
|
3785
|
+
server_name: str = None,
|
3786
|
+
time_out: int = default_time_out,
|
3787
|
+
) -> None:
|
2944
3788
|
"""
|
2945
3789
|
Remove the ownership classification from an element. Async version.
|
2946
3790
|
|
@@ -2980,22 +3824,32 @@ class ClassificationManager(Client):
|
|
2980
3824
|
server_name = self.server_name
|
2981
3825
|
|
2982
3826
|
possible_query_params = query_string(
|
2983
|
-
[
|
2984
|
-
|
2985
|
-
|
2986
|
-
|
2987
|
-
|
2988
|
-
|
2989
|
-
|
2990
|
-
"
|
2991
|
-
|
2992
|
-
|
2993
|
-
|
2994
|
-
|
2995
|
-
|
2996
|
-
|
2997
|
-
|
2998
|
-
|
3827
|
+
[
|
3828
|
+
("forLineage", for_lineage),
|
3829
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
3830
|
+
]
|
3831
|
+
)
|
3832
|
+
|
3833
|
+
url = (
|
3834
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/ownership/remove"
|
3835
|
+
f"{possible_query_params}"
|
3836
|
+
)
|
3837
|
+
|
3838
|
+
body = {"class": "ClassificationRequestBody", "effectiveTime": effective_time}
|
3839
|
+
|
3840
|
+
await self._async_make_request(
|
3841
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
3842
|
+
)
|
3843
|
+
|
3844
|
+
def clear_ownership_from_element(
|
3845
|
+
self,
|
3846
|
+
element_guid: str,
|
3847
|
+
for_lineage: bool = None,
|
3848
|
+
for_duplicate_processing: bool = None,
|
3849
|
+
effective_time: str = None,
|
3850
|
+
server_name: str = None,
|
3851
|
+
time_out: int = default_time_out,
|
3852
|
+
) -> None:
|
2999
3853
|
"""
|
3000
3854
|
Remove the ownership classification from an element.
|
3001
3855
|
|
@@ -3034,13 +3888,25 @@ class ClassificationManager(Client):
|
|
3034
3888
|
|
3035
3889
|
loop = asyncio.get_event_loop()
|
3036
3890
|
loop.run_until_complete(
|
3037
|
-
self._async_clear_ownership_from_element(
|
3038
|
-
|
3039
|
-
|
3040
|
-
|
3041
|
-
|
3042
|
-
|
3043
|
-
|
3891
|
+
self._async_clear_ownership_from_element(
|
3892
|
+
element_guid,
|
3893
|
+
for_lineage,
|
3894
|
+
for_duplicate_processing,
|
3895
|
+
effective_time,
|
3896
|
+
server_name,
|
3897
|
+
time_out,
|
3898
|
+
)
|
3899
|
+
)
|
3900
|
+
|
3901
|
+
async def _async_set_retention_classification(
|
3902
|
+
self,
|
3903
|
+
element_guid: str,
|
3904
|
+
body: dict,
|
3905
|
+
for_lineage: bool = None,
|
3906
|
+
for_duplicate_processing: bool = None,
|
3907
|
+
server_name: str = None,
|
3908
|
+
time_out: int = default_time_out,
|
3909
|
+
) -> None:
|
3044
3910
|
"""
|
3045
3911
|
Classify/reclassify the element (typically an asset) to indicate how long the element (or associated resource)
|
3046
3912
|
is to be retained by the organization. The policy to apply to the element/resource is captured by the retentionBasis
|
@@ -3106,16 +3972,30 @@ class ClassificationManager(Client):
|
|
3106
3972
|
server_name = self.server_name
|
3107
3973
|
|
3108
3974
|
possible_query_params = query_string(
|
3109
|
-
[
|
3110
|
-
|
3111
|
-
|
3112
|
-
|
3113
|
-
|
3114
|
-
|
3115
|
-
|
3116
|
-
|
3117
|
-
|
3118
|
-
|
3975
|
+
[
|
3976
|
+
("forLineage", for_lineage),
|
3977
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
3978
|
+
]
|
3979
|
+
)
|
3980
|
+
|
3981
|
+
url = (
|
3982
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/retention"
|
3983
|
+
f"{possible_query_params}"
|
3984
|
+
)
|
3985
|
+
|
3986
|
+
await self._async_make_request(
|
3987
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
3988
|
+
)
|
3989
|
+
|
3990
|
+
def set_retention_classification(
|
3991
|
+
self,
|
3992
|
+
element_guid: str,
|
3993
|
+
body: dict,
|
3994
|
+
for_lineage: bool = None,
|
3995
|
+
for_duplicate_processing: bool = None,
|
3996
|
+
server_name: str = None,
|
3997
|
+
time_out: int = default_time_out,
|
3998
|
+
) -> None:
|
3119
3999
|
"""
|
3120
4000
|
Classify/reclassify the element (typically an asset) to indicate how long the element (or associated resource)
|
3121
4001
|
is to be retained by the organization. The policy to apply to the element/resource is captured by the retentionBasis
|
@@ -3179,76 +4059,98 @@ class ClassificationManager(Client):
|
|
3179
4059
|
|
3180
4060
|
loop = asyncio.get_event_loop()
|
3181
4061
|
loop.run_until_complete(
|
3182
|
-
self._async_set_retention_classification(
|
3183
|
-
|
3184
|
-
|
3185
|
-
|
3186
|
-
|
3187
|
-
|
3188
|
-
|
4062
|
+
self._async_set_retention_classification(
|
4063
|
+
element_guid,
|
4064
|
+
body,
|
4065
|
+
for_lineage,
|
4066
|
+
for_duplicate_processing,
|
4067
|
+
server_name,
|
4068
|
+
time_out,
|
4069
|
+
)
|
4070
|
+
)
|
4071
|
+
|
4072
|
+
async def _async_clear_retention_classification(
|
4073
|
+
self,
|
4074
|
+
element_guid: str,
|
4075
|
+
for_lineage: bool = None,
|
4076
|
+
for_duplicate_processing: bool = None,
|
4077
|
+
effective_time: str = None,
|
4078
|
+
server_name: str = None,
|
4079
|
+
time_out: int = default_time_out,
|
4080
|
+
) -> None:
|
3189
4081
|
"""
|
3190
|
-
|
3191
|
-
|
4082
|
+
Remove the retention classification from the element. This normally occurs when the organization has lost
|
4083
|
+
track of the level of retention to assign to the element. Async Version.
|
3192
4084
|
|
3193
|
-
|
4085
|
+
Governance Action Classifications: https://egeria-project.org/types/4/0422-Governance-Action-Classifications/
|
3194
4086
|
|
3195
|
-
|
3196
|
-
|
3197
|
-
|
3198
|
-
|
3199
|
-
|
3200
|
-
|
3201
|
-
|
3202
|
-
|
3203
|
-
|
3204
|
-
|
3205
|
-
|
3206
|
-
|
3207
|
-
|
3208
|
-
|
4087
|
+
Parameters
|
4088
|
+
----------
|
4089
|
+
element_guid: str
|
4090
|
+
- the identity of the element to update
|
4091
|
+
for_lineage: bool, default is set by server
|
4092
|
+
- determines if elements classified as Memento should be returned - normally false
|
4093
|
+
for_duplicate_processing: bool, default is set by server
|
4094
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
4095
|
+
effective_time: str, default = None
|
4096
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
4097
|
+
server_name: str, default = None
|
4098
|
+
- name of the server instances for this request.
|
4099
|
+
time_out: int, default = default_time_out
|
4100
|
+
- http request timeout for this request
|
3209
4101
|
|
3210
|
-
|
3211
|
-
|
3212
|
-
|
3213
|
-
|
4102
|
+
Returns
|
4103
|
+
-------
|
4104
|
+
[dict] | str
|
4105
|
+
Returns a string if no elements found and a list of dict of elements with the results.
|
3214
4106
|
|
3215
|
-
|
3216
|
-
|
3217
|
-
|
3218
|
-
|
3219
|
-
|
3220
|
-
|
3221
|
-
|
3222
|
-
|
4107
|
+
Raises
|
4108
|
+
------
|
4109
|
+
InvalidParameterException
|
4110
|
+
one of the parameters is null or invalid or
|
4111
|
+
PropertyServerException
|
4112
|
+
There is a problem adding the element properties to the metadata repository or
|
4113
|
+
UserNotAuthorizedException
|
4114
|
+
the requesting user is not authorized to issue this request.
|
3223
4115
|
|
3224
4116
|
|
3225
|
-
|
4117
|
+
"""
|
3226
4118
|
if server_name is None:
|
3227
4119
|
server_name = self.server_name
|
3228
4120
|
|
3229
4121
|
possible_query_params = query_string(
|
3230
|
-
[
|
3231
|
-
|
3232
|
-
|
3233
|
-
|
3234
|
-
|
3235
|
-
|
3236
|
-
|
3237
|
-
"
|
3238
|
-
|
3239
|
-
|
3240
|
-
|
3241
|
-
|
3242
|
-
|
3243
|
-
|
3244
|
-
|
3245
|
-
|
4122
|
+
[
|
4123
|
+
("forLineage", for_lineage),
|
4124
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
4125
|
+
]
|
4126
|
+
)
|
4127
|
+
|
4128
|
+
url = (
|
4129
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/retention/remove"
|
4130
|
+
f"{possible_query_params}"
|
4131
|
+
)
|
4132
|
+
|
4133
|
+
body = {"class": "ClassificationRequestBody", "effectiveTime": effective_time}
|
4134
|
+
|
4135
|
+
await self._async_make_request(
|
4136
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
4137
|
+
)
|
4138
|
+
|
4139
|
+
def clear_retention_classification(
|
4140
|
+
self,
|
4141
|
+
element_guid: str,
|
4142
|
+
for_lineage: bool = None,
|
4143
|
+
for_duplicate_processing: bool = None,
|
4144
|
+
effective_time: str = None,
|
4145
|
+
server_name: str = None,
|
4146
|
+
time_out: int = default_time_out,
|
4147
|
+
) -> None:
|
3246
4148
|
"""
|
3247
4149
|
Remove the retention classification from the element. This normally occurs when the organization has lost
|
3248
4150
|
track of the level of retention to assign to the element.
|
3249
|
-
|
4151
|
+
|
3250
4152
|
Governance Action Classifications: https://egeria-project.org/types/4/0422-Governance-Action-Classifications/
|
3251
|
-
|
4153
|
+
|
3252
4154
|
Parameters
|
3253
4155
|
----------
|
3254
4156
|
element_guid: str
|
@@ -3263,12 +4165,12 @@ class ClassificationManager(Client):
|
|
3263
4165
|
- name of the server instances for this request.
|
3264
4166
|
time_out: int, default = default_time_out
|
3265
4167
|
- http request timeout for this request
|
3266
|
-
|
4168
|
+
|
3267
4169
|
Returns
|
3268
4170
|
-------
|
3269
4171
|
[dict] | str
|
3270
4172
|
Returns a string if no elements found and a list of dict of elements with the results.
|
3271
|
-
|
4173
|
+
|
3272
4174
|
Raises
|
3273
4175
|
------
|
3274
4176
|
InvalidParameterException
|
@@ -3277,19 +4179,31 @@ class ClassificationManager(Client):
|
|
3277
4179
|
There is a problem adding the element properties to the metadata repository or
|
3278
4180
|
UserNotAuthorizedException
|
3279
4181
|
the requesting user is not authorized to issue this request.
|
3280
|
-
|
3281
|
-
|
4182
|
+
|
4183
|
+
|
3282
4184
|
"""
|
3283
4185
|
|
3284
4186
|
loop = asyncio.get_event_loop()
|
3285
4187
|
loop.run_until_complete(
|
3286
|
-
self._async_clear_retention_classification(
|
3287
|
-
|
3288
|
-
|
3289
|
-
|
3290
|
-
|
3291
|
-
|
3292
|
-
|
4188
|
+
self._async_clear_retention_classification(
|
4189
|
+
element_guid,
|
4190
|
+
for_lineage,
|
4191
|
+
for_duplicate_processing,
|
4192
|
+
effective_time,
|
4193
|
+
server_name,
|
4194
|
+
time_out,
|
4195
|
+
)
|
4196
|
+
)
|
4197
|
+
|
4198
|
+
async def _async_set_security_tags_classification(
|
4199
|
+
self,
|
4200
|
+
element_guid: str,
|
4201
|
+
body: dict,
|
4202
|
+
for_lineage: bool = None,
|
4203
|
+
for_duplicate_processing: bool = None,
|
4204
|
+
server_name: str = None,
|
4205
|
+
time_out: int = default_time_out,
|
4206
|
+
) -> None:
|
3293
4207
|
"""
|
3294
4208
|
Add or replace the security tags for an element. Async versuib,
|
3295
4209
|
|
@@ -3351,16 +4265,30 @@ class ClassificationManager(Client):
|
|
3351
4265
|
server_name = self.server_name
|
3352
4266
|
|
3353
4267
|
possible_query_params = query_string(
|
3354
|
-
[
|
3355
|
-
|
3356
|
-
|
3357
|
-
|
3358
|
-
|
3359
|
-
|
3360
|
-
|
3361
|
-
|
3362
|
-
|
3363
|
-
|
4268
|
+
[
|
4269
|
+
("forLineage", for_lineage),
|
4270
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
4271
|
+
]
|
4272
|
+
)
|
4273
|
+
|
4274
|
+
url = (
|
4275
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/security-tags"
|
4276
|
+
f"{possible_query_params}"
|
4277
|
+
)
|
4278
|
+
|
4279
|
+
await self._async_make_request(
|
4280
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
4281
|
+
)
|
4282
|
+
|
4283
|
+
def set_security_tags_classification(
|
4284
|
+
self,
|
4285
|
+
element_guid: str,
|
4286
|
+
body: dict,
|
4287
|
+
for_lineage: bool = None,
|
4288
|
+
for_duplicate_processing: bool = None,
|
4289
|
+
server_name: str = None,
|
4290
|
+
time_out: int = default_time_out,
|
4291
|
+
) -> None:
|
3364
4292
|
"""
|
3365
4293
|
Add or replace the security tags for an element. Async versuib,
|
3366
4294
|
|
@@ -3421,110 +4349,146 @@ class ClassificationManager(Client):
|
|
3421
4349
|
|
3422
4350
|
loop = asyncio.get_event_loop()
|
3423
4351
|
loop.run_until_complete(
|
3424
|
-
self._async_set_security_tags_classification(
|
3425
|
-
|
3426
|
-
|
3427
|
-
|
3428
|
-
|
3429
|
-
|
3430
|
-
|
4352
|
+
self._async_set_security_tags_classification(
|
4353
|
+
element_guid,
|
4354
|
+
body,
|
4355
|
+
for_lineage,
|
4356
|
+
for_duplicate_processing,
|
4357
|
+
server_name,
|
4358
|
+
time_out,
|
4359
|
+
)
|
4360
|
+
)
|
4361
|
+
|
4362
|
+
async def _async_clear_security_tags_classification(
|
4363
|
+
self,
|
4364
|
+
element_guid: str,
|
4365
|
+
for_lineage: bool = None,
|
4366
|
+
for_duplicate_processing: bool = None,
|
4367
|
+
effective_time: str = None,
|
4368
|
+
server_name: str = None,
|
4369
|
+
time_out: int = default_time_out,
|
4370
|
+
) -> None:
|
3431
4371
|
"""
|
3432
|
-
|
4372
|
+
Remove the security-tags classification from the element.
|
3433
4373
|
|
3434
|
-
|
4374
|
+
Security Tags: https://egeria-project.org/types/4/0423-Security-Definitions/
|
3435
4375
|
|
3436
|
-
|
3437
|
-
|
3438
|
-
|
3439
|
-
|
3440
|
-
|
3441
|
-
|
3442
|
-
|
3443
|
-
|
3444
|
-
|
3445
|
-
|
3446
|
-
|
3447
|
-
|
4376
|
+
Parameters
|
4377
|
+
----------
|
4378
|
+
element_guid: str
|
4379
|
+
- the identity of the element to update
|
4380
|
+
for_lineage: bool, default is set by server
|
4381
|
+
- determines if elements classified as Memento should be returned - normally false
|
4382
|
+
for_duplicate_processing: bool, default is set by server
|
4383
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
4384
|
+
server_name: str, default = None
|
4385
|
+
- name of the server instances for this request.
|
4386
|
+
time_out: int, default = default_time_out
|
4387
|
+
- http request timeout for this request
|
3448
4388
|
|
3449
|
-
|
3450
|
-
|
3451
|
-
|
4389
|
+
Returns
|
4390
|
+
-------
|
4391
|
+
None
|
3452
4392
|
|
3453
|
-
|
3454
|
-
|
3455
|
-
|
3456
|
-
|
3457
|
-
|
3458
|
-
|
3459
|
-
|
3460
|
-
|
4393
|
+
Raises
|
4394
|
+
------
|
4395
|
+
InvalidParameterException
|
4396
|
+
one of the parameters is null or invalid or
|
4397
|
+
PropertyServerException
|
4398
|
+
There is a problem adding the element properties to the metadata repository or
|
4399
|
+
UserNotAuthorizedException
|
4400
|
+
the requesting user is not authorized to issue this request.
|
3461
4401
|
|
3462
4402
|
|
3463
|
-
|
4403
|
+
"""
|
3464
4404
|
if server_name is None:
|
3465
4405
|
server_name = self.server_name
|
3466
4406
|
|
3467
4407
|
possible_query_params = query_string(
|
3468
|
-
[
|
3469
|
-
|
3470
|
-
|
3471
|
-
|
3472
|
-
|
3473
|
-
|
3474
|
-
|
3475
|
-
"
|
3476
|
-
|
3477
|
-
|
3478
|
-
|
3479
|
-
|
3480
|
-
|
3481
|
-
|
3482
|
-
|
3483
|
-
|
4408
|
+
[
|
4409
|
+
("forLineage", for_lineage),
|
4410
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
4411
|
+
]
|
4412
|
+
)
|
4413
|
+
|
4414
|
+
url = (
|
4415
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/security-tags/remove"
|
4416
|
+
f"{possible_query_params}"
|
4417
|
+
)
|
4418
|
+
|
4419
|
+
body = {"class": "ClassificationRequestBody", "effectiveTime": effective_time}
|
4420
|
+
|
4421
|
+
await self._async_make_request(
|
4422
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
4423
|
+
)
|
4424
|
+
|
4425
|
+
def clear_security_tags_classification(
|
4426
|
+
self,
|
4427
|
+
element_guid: str,
|
4428
|
+
for_lineage: bool = None,
|
4429
|
+
for_duplicate_processing: bool = None,
|
4430
|
+
effective_time: str = None,
|
4431
|
+
server_name: str = None,
|
4432
|
+
time_out: int = default_time_out,
|
4433
|
+
) -> None:
|
3484
4434
|
"""
|
3485
|
-
|
4435
|
+
Remove the security-tags classification from the element.
|
3486
4436
|
|
3487
|
-
|
4437
|
+
Security Tags: https://egeria-project.org/types/4/0423-Security-Definitions/
|
3488
4438
|
|
3489
|
-
|
3490
|
-
|
3491
|
-
|
3492
|
-
|
3493
|
-
|
3494
|
-
|
3495
|
-
|
3496
|
-
|
3497
|
-
|
3498
|
-
|
3499
|
-
|
3500
|
-
|
3501
|
-
|
3502
|
-
|
4439
|
+
Parameters
|
4440
|
+
----------
|
4441
|
+
element_guid: str
|
4442
|
+
- the identity of the element to update
|
4443
|
+
for_lineage: bool, default is set by server
|
4444
|
+
- determines if elements classified as Memento should be returned - normally false
|
4445
|
+
for_duplicate_processing: bool, default is set by server
|
4446
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
4447
|
+
effective_time: str, default = None
|
4448
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
4449
|
+
server_name: str, default = None
|
4450
|
+
- name of the server instances for this request.
|
4451
|
+
time_out: int, default = default_time_out
|
4452
|
+
- http request timeout for this request
|
3503
4453
|
|
3504
|
-
|
3505
|
-
|
3506
|
-
|
4454
|
+
Returns
|
4455
|
+
-------
|
4456
|
+
None
|
3507
4457
|
|
3508
|
-
|
3509
|
-
|
3510
|
-
|
3511
|
-
|
3512
|
-
|
3513
|
-
|
3514
|
-
|
3515
|
-
|
4458
|
+
Raises
|
4459
|
+
------
|
4460
|
+
InvalidParameterException
|
4461
|
+
one of the parameters is null or invalid or
|
4462
|
+
PropertyServerException
|
4463
|
+
There is a problem adding the element properties to the metadata repository or
|
4464
|
+
UserNotAuthorizedException
|
4465
|
+
the requesting user is not authorized to issue this request.
|
3516
4466
|
|
3517
4467
|
|
3518
|
-
|
4468
|
+
"""
|
3519
4469
|
|
3520
4470
|
loop = asyncio.get_event_loop()
|
3521
4471
|
loop.run_until_complete(
|
3522
|
-
self._async_clear_security_tags_classification(
|
3523
|
-
|
3524
|
-
|
3525
|
-
|
3526
|
-
|
3527
|
-
|
4472
|
+
self._async_clear_security_tags_classification(
|
4473
|
+
element_guid,
|
4474
|
+
for_lineage,
|
4475
|
+
for_duplicate_processing,
|
4476
|
+
effective_time,
|
4477
|
+
server_name,
|
4478
|
+
time_out,
|
4479
|
+
)
|
4480
|
+
)
|
4481
|
+
|
4482
|
+
async def _async_setup_semantic_assignment(
|
4483
|
+
self,
|
4484
|
+
glossary_term_guid: str,
|
4485
|
+
element_guid: str,
|
4486
|
+
body: dict,
|
4487
|
+
for_lineage: bool = None,
|
4488
|
+
for_duplicate_processing: bool = None,
|
4489
|
+
server_name: str = None,
|
4490
|
+
time_out: int = default_time_out,
|
4491
|
+
) -> None:
|
3528
4492
|
"""
|
3529
4493
|
Create a semantic assignment relationship between a glossary term and an element (normally a schema attribute,
|
3530
4494
|
data field or asset). This relationship indicates that the data associated with the element meaning matches
|
@@ -3587,16 +4551,31 @@ class ClassificationManager(Client):
|
|
3587
4551
|
server_name = self.server_name
|
3588
4552
|
|
3589
4553
|
possible_query_params = query_string(
|
3590
|
-
[
|
3591
|
-
|
3592
|
-
|
3593
|
-
|
3594
|
-
|
3595
|
-
|
3596
|
-
|
3597
|
-
|
3598
|
-
|
3599
|
-
|
4554
|
+
[
|
4555
|
+
("forLineage", for_lineage),
|
4556
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
4557
|
+
]
|
4558
|
+
)
|
4559
|
+
|
4560
|
+
url = (
|
4561
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/semantic-assignment/terms"
|
4562
|
+
f"/{glossary_term_guid}{possible_query_params}"
|
4563
|
+
)
|
4564
|
+
|
4565
|
+
await self._async_make_request(
|
4566
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
4567
|
+
)
|
4568
|
+
|
4569
|
+
def setup_semantic_assignment(
|
4570
|
+
self,
|
4571
|
+
glossary_term_guid: str,
|
4572
|
+
element_guid: str,
|
4573
|
+
body: dict,
|
4574
|
+
for_lineage: bool = None,
|
4575
|
+
for_duplicate_processing: bool = None,
|
4576
|
+
server_name: str = None,
|
4577
|
+
time_out: int = default_time_out,
|
4578
|
+
) -> None:
|
3600
4579
|
"""
|
3601
4580
|
Create a semantic assignment relationship between a glossary term and an element (normally a schema attribute,
|
3602
4581
|
data field or asset). This relationship indicates that the data associated with the element meaning matches
|
@@ -3657,118 +4636,154 @@ class ClassificationManager(Client):
|
|
3657
4636
|
|
3658
4637
|
loop = asyncio.get_event_loop()
|
3659
4638
|
loop.run_until_complete(
|
3660
|
-
self._async_setup_semantic_assignment(
|
3661
|
-
|
3662
|
-
|
3663
|
-
|
3664
|
-
|
3665
|
-
|
3666
|
-
|
3667
|
-
|
3668
|
-
|
4639
|
+
self._async_setup_semantic_assignment(
|
4640
|
+
glossary_term_guid,
|
4641
|
+
element_guid,
|
4642
|
+
body,
|
4643
|
+
for_lineage,
|
4644
|
+
for_duplicate_processing,
|
4645
|
+
server_name,
|
4646
|
+
time_out,
|
4647
|
+
)
|
4648
|
+
)
|
4649
|
+
|
4650
|
+
async def _async_clear_semantic_assignment_classification(
|
4651
|
+
self,
|
4652
|
+
glossary_term_guid: str,
|
4653
|
+
element_guid: str,
|
4654
|
+
for_lineage: bool = None,
|
4655
|
+
for_duplicate_processing: bool = None,
|
4656
|
+
effective_time: str = None,
|
4657
|
+
server_name: str = None,
|
4658
|
+
time_out: int = default_time_out,
|
4659
|
+
) -> None:
|
3669
4660
|
"""
|
3670
|
-
|
4661
|
+
Remove the semantic_assignment classification from the element. Async version.
|
3671
4662
|
|
3672
|
-
|
4663
|
+
Security Tags: https://egeria-project.org/types/4/0423-Security-Definitions/
|
3673
4664
|
|
3674
|
-
|
3675
|
-
|
3676
|
-
|
3677
|
-
|
3678
|
-
|
3679
|
-
|
3680
|
-
|
3681
|
-
|
3682
|
-
|
3683
|
-
|
3684
|
-
|
3685
|
-
|
3686
|
-
|
3687
|
-
|
3688
|
-
|
3689
|
-
|
4665
|
+
Parameters
|
4666
|
+
----------
|
4667
|
+
glossary_term_guid: str
|
4668
|
+
- identity of glossary to remove
|
4669
|
+
element_guid: str
|
4670
|
+
- the identity of the element to update
|
4671
|
+
for_lineage: bool, default is set by server
|
4672
|
+
- determines if elements classified as Memento should be returned - normally false
|
4673
|
+
for_duplicate_processing: bool, default is set by server
|
4674
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
4675
|
+
effective_time: str, default = None
|
4676
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
4677
|
+
server_name: str, default = None
|
4678
|
+
- name of the server instances for this request.
|
4679
|
+
time_out: int, default = default_time_out
|
4680
|
+
- http request timeout for this request
|
3690
4681
|
|
3691
|
-
|
3692
|
-
|
3693
|
-
|
4682
|
+
Returns
|
4683
|
+
-------
|
4684
|
+
None
|
3694
4685
|
|
3695
|
-
|
3696
|
-
|
3697
|
-
|
3698
|
-
|
3699
|
-
|
3700
|
-
|
3701
|
-
|
3702
|
-
|
4686
|
+
Raises
|
4687
|
+
------
|
4688
|
+
InvalidParameterException
|
4689
|
+
one of the parameters is null or invalid or
|
4690
|
+
PropertyServerException
|
4691
|
+
There is a problem adding the element properties to the metadata repository or
|
4692
|
+
UserNotAuthorizedException
|
4693
|
+
the requesting user is not authorized to issue this request.
|
3703
4694
|
|
3704
|
-
|
4695
|
+
"""
|
3705
4696
|
if server_name is None:
|
3706
4697
|
server_name = self.server_name
|
3707
4698
|
|
3708
4699
|
possible_query_params = query_string(
|
3709
|
-
[
|
3710
|
-
|
3711
|
-
|
3712
|
-
|
3713
|
-
|
3714
|
-
|
3715
|
-
|
3716
|
-
"
|
3717
|
-
|
3718
|
-
|
3719
|
-
|
3720
|
-
|
3721
|
-
|
3722
|
-
|
3723
|
-
|
3724
|
-
|
4700
|
+
[
|
4701
|
+
("forLineage", for_lineage),
|
4702
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
4703
|
+
]
|
4704
|
+
)
|
4705
|
+
|
4706
|
+
url = (
|
4707
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/semantic-assignment/terms/"
|
4708
|
+
f"{glossary_term_guid}/remove{possible_query_params}"
|
4709
|
+
)
|
4710
|
+
|
4711
|
+
body = {"class": "ClassificationRequestBody", "effectiveTime": effective_time}
|
4712
|
+
|
4713
|
+
await self._async_make_request(
|
4714
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
4715
|
+
)
|
4716
|
+
|
4717
|
+
def clear_semantic_assignment_classification(
|
4718
|
+
self,
|
4719
|
+
glossary_term_guid: str,
|
4720
|
+
element_guid: str,
|
4721
|
+
for_lineage: bool = None,
|
4722
|
+
for_duplicate_processing: bool = None,
|
4723
|
+
effective_time: str = None,
|
4724
|
+
server_name: str = None,
|
4725
|
+
time_out: int = default_time_out,
|
4726
|
+
) -> None:
|
3725
4727
|
"""
|
3726
|
-
|
4728
|
+
Remove the semantic_assignment classification from the element.
|
3727
4729
|
|
3728
|
-
|
4730
|
+
Security Tags: https://egeria-project.org/types/4/0423-Security-Definitions/
|
3729
4731
|
|
3730
|
-
|
3731
|
-
|
3732
|
-
|
3733
|
-
|
3734
|
-
|
3735
|
-
|
3736
|
-
|
3737
|
-
|
3738
|
-
|
3739
|
-
|
3740
|
-
|
3741
|
-
|
3742
|
-
|
3743
|
-
|
3744
|
-
|
3745
|
-
|
4732
|
+
Parameters
|
4733
|
+
----------
|
4734
|
+
glossary_term_guid: str
|
4735
|
+
- identity of glossary to remove
|
4736
|
+
element_guid: str
|
4737
|
+
- the identity of the element to update
|
4738
|
+
for_lineage: bool, default is set by server
|
4739
|
+
- determines if elements classified as Memento should be returned - normally false
|
4740
|
+
for_duplicate_processing: bool, default is set by server
|
4741
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
4742
|
+
effective_time: str, default = None
|
4743
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
4744
|
+
server_name: str, default = None
|
4745
|
+
- name of the server instances for this request.
|
4746
|
+
time_out: int, default = default_time_out
|
4747
|
+
- http request timeout for this request
|
3746
4748
|
|
3747
|
-
|
3748
|
-
|
3749
|
-
|
4749
|
+
Returns
|
4750
|
+
-------
|
4751
|
+
None
|
3750
4752
|
|
3751
|
-
|
3752
|
-
|
3753
|
-
|
3754
|
-
|
3755
|
-
|
3756
|
-
|
3757
|
-
|
3758
|
-
|
4753
|
+
Raises
|
4754
|
+
------
|
4755
|
+
InvalidParameterException
|
4756
|
+
one of the parameters is null or invalid or
|
4757
|
+
PropertyServerException
|
4758
|
+
There is a problem adding the element properties to the metadata repository or
|
4759
|
+
UserNotAuthorizedException
|
4760
|
+
the requesting user is not authorized to issue this request.
|
3759
4761
|
|
3760
4762
|
|
3761
|
-
|
4763
|
+
"""
|
3762
4764
|
|
3763
4765
|
loop = asyncio.get_event_loop()
|
3764
4766
|
loop.run_until_complete(
|
3765
|
-
self._async_clear_semantic_assignment_classification(
|
3766
|
-
|
3767
|
-
|
3768
|
-
|
3769
|
-
|
3770
|
-
|
3771
|
-
|
4767
|
+
self._async_clear_semantic_assignment_classification(
|
4768
|
+
glossary_term_guid,
|
4769
|
+
element_guid,
|
4770
|
+
for_lineage,
|
4771
|
+
for_duplicate_processing,
|
4772
|
+
effective_time,
|
4773
|
+
server_name,
|
4774
|
+
time_out,
|
4775
|
+
)
|
4776
|
+
)
|
4777
|
+
|
4778
|
+
async def _async_add_element_to_subject_area(
|
4779
|
+
self,
|
4780
|
+
element_guid: str,
|
4781
|
+
body: dict,
|
4782
|
+
for_lineage: bool = None,
|
4783
|
+
for_duplicate_processing: bool = None,
|
4784
|
+
server_name: str = None,
|
4785
|
+
time_out: int = default_time_out,
|
4786
|
+
) -> None:
|
3772
4787
|
"""
|
3773
4788
|
Classify the element to assert that the definitions it represents are part of a subject area definition. Async
|
3774
4789
|
|
@@ -3821,16 +4836,30 @@ class ClassificationManager(Client):
|
|
3821
4836
|
server_name = self.server_name
|
3822
4837
|
|
3823
4838
|
possible_query_params = query_string(
|
3824
|
-
[
|
3825
|
-
|
3826
|
-
|
3827
|
-
|
3828
|
-
|
3829
|
-
|
3830
|
-
|
3831
|
-
|
3832
|
-
|
3833
|
-
|
4839
|
+
[
|
4840
|
+
("forLineage", for_lineage),
|
4841
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
4842
|
+
]
|
4843
|
+
)
|
4844
|
+
|
4845
|
+
url = (
|
4846
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/subject-area-member"
|
4847
|
+
f"{possible_query_params}"
|
4848
|
+
)
|
4849
|
+
|
4850
|
+
await self._async_make_request(
|
4851
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
4852
|
+
)
|
4853
|
+
|
4854
|
+
def add_element_to_subject_area(
|
4855
|
+
self,
|
4856
|
+
element_guid: str,
|
4857
|
+
body: dict,
|
4858
|
+
for_lineage: bool = None,
|
4859
|
+
for_duplicate_processing: bool = None,
|
4860
|
+
server_name: str = None,
|
4861
|
+
time_out: int = default_time_out,
|
4862
|
+
) -> None:
|
3834
4863
|
"""
|
3835
4864
|
Classify the element to assert that the definitions it represents are part of a subject area definition. Async
|
3836
4865
|
|
@@ -3882,13 +4911,25 @@ class ClassificationManager(Client):
|
|
3882
4911
|
|
3883
4912
|
loop = asyncio.get_event_loop()
|
3884
4913
|
loop.run_until_complete(
|
3885
|
-
self._async_add_element_to_subject_area(
|
3886
|
-
|
3887
|
-
|
3888
|
-
|
3889
|
-
|
3890
|
-
|
3891
|
-
|
4914
|
+
self._async_add_element_to_subject_area(
|
4915
|
+
element_guid,
|
4916
|
+
body,
|
4917
|
+
for_lineage,
|
4918
|
+
for_duplicate_processing,
|
4919
|
+
server_name,
|
4920
|
+
time_out,
|
4921
|
+
)
|
4922
|
+
)
|
4923
|
+
|
4924
|
+
async def _async_remove_element_from_subject_area(
|
4925
|
+
self,
|
4926
|
+
element_guid: str,
|
4927
|
+
for_lineage: bool = None,
|
4928
|
+
for_duplicate_processing: bool = None,
|
4929
|
+
effective_time: str = None,
|
4930
|
+
server_name: str = None,
|
4931
|
+
time_out: int = default_time_out,
|
4932
|
+
) -> None:
|
3892
4933
|
"""
|
3893
4934
|
Remove the subject area designation from the identified element. Async version.
|
3894
4935
|
|
@@ -3923,27 +4964,37 @@ class ClassificationManager(Client):
|
|
3923
4964
|
the requesting user is not authorized to issue this request.
|
3924
4965
|
|
3925
4966
|
|
3926
|
-
|
4967
|
+
"""
|
3927
4968
|
if server_name is None:
|
3928
4969
|
server_name = self.server_name
|
3929
4970
|
|
3930
4971
|
possible_query_params = query_string(
|
3931
|
-
[
|
3932
|
-
|
3933
|
-
|
3934
|
-
|
3935
|
-
|
3936
|
-
|
3937
|
-
|
3938
|
-
"
|
3939
|
-
|
3940
|
-
|
3941
|
-
|
3942
|
-
|
3943
|
-
|
3944
|
-
|
3945
|
-
|
3946
|
-
|
4972
|
+
[
|
4973
|
+
("forLineage", for_lineage),
|
4974
|
+
("forDuplicateProcessing", for_duplicate_processing),
|
4975
|
+
]
|
4976
|
+
)
|
4977
|
+
|
4978
|
+
url = (
|
4979
|
+
f"{base_path(self, server_name)}/elements/{element_guid}/subject-area-member"
|
4980
|
+
f"/remove{possible_query_params}"
|
4981
|
+
)
|
4982
|
+
|
4983
|
+
body = {"class": "ClassificationRequestBody", "effectiveTime": effective_time}
|
4984
|
+
|
4985
|
+
await self._async_make_request(
|
4986
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
4987
|
+
)
|
4988
|
+
|
4989
|
+
def remove_element_from_subject_area(
|
4990
|
+
self,
|
4991
|
+
element_guid: str,
|
4992
|
+
for_lineage: bool = None,
|
4993
|
+
for_duplicate_processing: bool = None,
|
4994
|
+
effective_time: str = None,
|
4995
|
+
server_name: str = None,
|
4996
|
+
time_out: int = default_time_out,
|
4997
|
+
) -> None:
|
3947
4998
|
"""
|
3948
4999
|
Remove the subject area designation from the identified element.
|
3949
5000
|
|
@@ -3978,9 +5029,16 @@ class ClassificationManager(Client):
|
|
3978
5029
|
the requesting user is not authorized to issue this request.
|
3979
5030
|
|
3980
5031
|
|
3981
|
-
|
5032
|
+
"""
|
3982
5033
|
|
3983
5034
|
loop = asyncio.get_event_loop()
|
3984
5035
|
loop.run_until_complete(
|
3985
|
-
self._async_remove_element_from_subject_area(
|
3986
|
-
|
5036
|
+
self._async_remove_element_from_subject_area(
|
5037
|
+
element_guid,
|
5038
|
+
for_lineage,
|
5039
|
+
for_duplicate_processing,
|
5040
|
+
effective_time,
|
5041
|
+
server_name,
|
5042
|
+
time_out,
|
5043
|
+
)
|
5044
|
+
)
|