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