pyegeria 0.8.4.36__py3-none-any.whl → 0.8.4.37__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyegeria/asset_catalog_omvs.py +9 -9
- pyegeria/automated_curation_omvs.py +5 -5
- pyegeria/classification_manager_omvs.py +193 -407
- pyegeria/collection_manager_omvs.py +160 -280
- pyegeria/core_omag_server_config.py +77 -72
- pyegeria/egeria_cat_client.py +11 -6
- pyegeria/egeria_client.py +3 -2
- pyegeria/egeria_config_client.py +5 -0
- pyegeria/egeria_my_client.py +9 -4
- pyegeria/egeria_tech_client.py +1 -1
- pyegeria/feedback_manager_omvs.py +92 -333
- pyegeria/full_omag_server_config.py +54 -50
- pyegeria/glossary_browser_omvs.py +128 -284
- pyegeria/glossary_manager_omvs.py +132 -451
- pyegeria/my_profile_omvs.py +57 -153
- pyegeria/platform_services.py +1 -1
- pyegeria/project_manager_omvs.py +110 -197
- pyegeria/registered_info.py +13 -13
- pyegeria/valid_metadata_omvs.py +75 -227
- pyegeria/x_action_author_omvs.py +1 -1
- {pyegeria-0.8.4.36.dist-info → pyegeria-0.8.4.37.dist-info}/METADATA +1 -1
- {pyegeria-0.8.4.36.dist-info → pyegeria-0.8.4.37.dist-info}/RECORD +25 -25
- {pyegeria-0.8.4.36.dist-info → pyegeria-0.8.4.37.dist-info}/LICENSE +0 -0
- {pyegeria-0.8.4.36.dist-info → pyegeria-0.8.4.37.dist-info}/WHEEL +0 -0
- {pyegeria-0.8.4.36.dist-info → pyegeria-0.8.4.37.dist-info}/entry_points.txt +0 -0
pyegeria/valid_metadata_omvs.py
CHANGED
@@ -18,7 +18,7 @@ class ValidMetadataManager(Client):
|
|
18
18
|
|
19
19
|
Attributes:
|
20
20
|
|
21
|
-
|
21
|
+
view_server: str
|
22
22
|
The name of the View Server to connect to.
|
23
23
|
platform_url : str
|
24
24
|
URL of the server platform to connect to
|
@@ -32,18 +32,23 @@ class ValidMetadataManager(Client):
|
|
32
32
|
|
33
33
|
def __init__(
|
34
34
|
self,
|
35
|
-
|
35
|
+
view_server: str,
|
36
36
|
platform_url: str,
|
37
37
|
user_id: str = None,
|
38
38
|
user_pwd: str = None,
|
39
39
|
token: str = None,
|
40
40
|
):
|
41
|
-
self.
|
41
|
+
self.view_server = view_server
|
42
|
+
self.platform_url = platform_url
|
43
|
+
self.user_id = user_id
|
44
|
+
self.user_pwd = user_pwd
|
45
|
+
|
46
|
+
self.valid_m_command_base: str = f"/api/open-metadata/valid-metadata"
|
42
47
|
self.page_size = max_paging_size
|
43
|
-
Client.__init__(self,
|
48
|
+
Client.__init__(self, view_server, platform_url, user_id, user_pwd, token=token)
|
44
49
|
|
45
50
|
async def _async_setup_valid_metadata_value(
|
46
|
-
self, property_name: str, type_name: str, body: dict
|
51
|
+
self, property_name: str, type_name: str, body: dict
|
47
52
|
):
|
48
53
|
"""Create or update the valid value for a particular open metadata property name. If the typeName is null,
|
49
54
|
this valid value applies to properties of this name from all types. The valid value is stored in the
|
@@ -58,9 +63,7 @@ class ValidMetadataManager(Client):
|
|
58
63
|
The name of the type for the valid metadata value.
|
59
64
|
body : dict
|
60
65
|
The body of the request containing the details of the valid metadata value.
|
61
|
-
|
62
|
-
The name of the server where the valid metadata value is being set up.
|
63
|
-
If not provided, the default server name will be used.
|
66
|
+
|
64
67
|
|
65
68
|
Returns
|
66
69
|
-------
|
@@ -78,10 +81,9 @@ class ValidMetadataManager(Client):
|
|
78
81
|
"isDeprecated" : false
|
79
82
|
}
|
80
83
|
"""
|
81
|
-
server = self.server_name if server is None else server
|
82
84
|
|
83
85
|
url = (
|
84
|
-
f"{self.platform_url}/servers/{
|
86
|
+
f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/setup-value/{property_name}?"
|
85
87
|
f"typeName={type_name}"
|
86
88
|
)
|
87
89
|
|
@@ -89,7 +91,7 @@ class ValidMetadataManager(Client):
|
|
89
91
|
return
|
90
92
|
|
91
93
|
def setup_valid_metadata_value(
|
92
|
-
self, property_name: str, type_name: str, body: dict
|
94
|
+
self, property_name: str, type_name: str, body: dict
|
93
95
|
):
|
94
96
|
"""Create or update the valid value for a particular open metadata property name. If the typeName is null,
|
95
97
|
this valid value applies to properties of this name from all types. The valid value is stored in the
|
@@ -104,9 +106,7 @@ class ValidMetadataManager(Client):
|
|
104
106
|
The name of the type for the valid metadata value.
|
105
107
|
body : dict
|
106
108
|
The body of the request containing the details of the valid metadata value.
|
107
|
-
|
108
|
-
The name of the server where the valid metadata value is being set up.
|
109
|
-
If not provided, the default server name will be used.
|
109
|
+
|
110
110
|
|
111
111
|
Returns
|
112
112
|
-------
|
@@ -132,14 +132,12 @@ class ValidMetadataManager(Client):
|
|
132
132
|
"""
|
133
133
|
loop = asyncio.get_event_loop()
|
134
134
|
loop.run_until_complete(
|
135
|
-
self._async_setup_valid_metadata_value(
|
136
|
-
property_name, type_name, body, server
|
137
|
-
)
|
135
|
+
self._async_setup_valid_metadata_value(property_name, type_name, body)
|
138
136
|
)
|
139
137
|
return
|
140
138
|
|
141
139
|
async def _async_setup_valid_metadata_map_name(
|
142
|
-
self, property_name: str, type_name: str, body: dict
|
140
|
+
self, property_name: str, type_name: str, body: dict
|
143
141
|
):
|
144
142
|
"""Create or update the valid value for a name that can be stored in a particular open metadata property name.
|
145
143
|
This property is of type map from name to string. The mapName is stored in the preferredValue property of
|
@@ -155,8 +153,7 @@ class ValidMetadataManager(Client):
|
|
155
153
|
The type name of the property.
|
156
154
|
body : dict
|
157
155
|
The metadata map setup data.
|
158
|
-
|
159
|
-
The name of the server to setup the metadata map. If not provided, the default server name will be used.
|
156
|
+
|
160
157
|
|
161
158
|
Returns
|
162
159
|
-------
|
@@ -178,10 +175,9 @@ class ValidMetadataManager(Client):
|
|
178
175
|
}
|
179
176
|
|
180
177
|
"""
|
181
|
-
server = self.server_name if server is None else server
|
182
178
|
|
183
179
|
url = (
|
184
|
-
f"{self.platform_url}/servers/{
|
180
|
+
f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/setup-map-name/{property_name}?"
|
185
181
|
f"typeName={type_name}"
|
186
182
|
)
|
187
183
|
|
@@ -189,12 +185,12 @@ class ValidMetadataManager(Client):
|
|
189
185
|
return
|
190
186
|
|
191
187
|
async def _async_setup_valid_metadata_type_value(
|
192
|
-
self, property_name: str, type_name: str, map_name: str
|
188
|
+
self, property_name: str, type_name: str, map_name: str
|
193
189
|
):
|
194
190
|
pass
|
195
191
|
|
196
192
|
async def _async_clear_valid_metadata_value(
|
197
|
-
self, property_name: str, type_name: str, map_name: str
|
193
|
+
self, property_name: str, type_name: str, map_name: str
|
198
194
|
):
|
199
195
|
pass
|
200
196
|
|
@@ -209,22 +205,12 @@ class ValidMetadataManager(Client):
|
|
209
205
|
pass
|
210
206
|
|
211
207
|
async def _async_validate_metadata_value(
|
212
|
-
self, property_name: str, type_name: str, actual_value: str
|
213
|
-
):
|
214
|
-
pass
|
215
|
-
|
216
|
-
async def _async_validate_metadata_map_name(
|
217
|
-
self, property_name: str, type_name: str, map_name: str, server: str = None
|
218
|
-
):
|
219
|
-
pass
|
220
|
-
|
221
|
-
async def _async_validate_metadata_map_value(
|
222
|
-
self, property_name: str, type_name: str, actual_value: str, server: str = None
|
208
|
+
self, property_name: str, type_name: str, actual_value: str
|
223
209
|
):
|
224
210
|
pass
|
225
211
|
|
226
212
|
async def _async_validate_metadata_map_name(
|
227
|
-
self, property_name: str, type_name: str, map_name: str
|
213
|
+
self, property_name: str, type_name: str, map_name: str
|
228
214
|
):
|
229
215
|
pass
|
230
216
|
|
@@ -238,7 +224,7 @@ class ValidMetadataManager(Client):
|
|
238
224
|
pass
|
239
225
|
|
240
226
|
async def _async_get_valid_metadata_map_name(
|
241
|
-
self, property_name: str, type_name: str, map_name: str
|
227
|
+
self, property_name: str, type_name: str, map_name: str
|
242
228
|
):
|
243
229
|
pass
|
244
230
|
|
@@ -256,7 +242,6 @@ class ValidMetadataManager(Client):
|
|
256
242
|
self,
|
257
243
|
property_name: str,
|
258
244
|
type_name: str = None,
|
259
|
-
server_name: str = None,
|
260
245
|
start_value: int = 0,
|
261
246
|
page_size: int = None,
|
262
247
|
) -> list | str:
|
@@ -269,9 +254,7 @@ class ValidMetadataManager(Client):
|
|
269
254
|
type_name: str, opt
|
270
255
|
The Open Metadata type to get the property values for. If not specified then all property values
|
271
256
|
will be returned.
|
272
|
-
|
273
|
-
The name of the server to configure.
|
274
|
-
If not provided, the server name associated with the instance is used.
|
257
|
+
|
275
258
|
|
276
259
|
Returns
|
277
260
|
-------
|
@@ -290,13 +273,12 @@ class ValidMetadataManager(Client):
|
|
290
273
|
The principle specified by the user_id does not have authorization for the requested action
|
291
274
|
|
292
275
|
"""
|
293
|
-
|
294
|
-
server_name = self.server_name
|
276
|
+
|
295
277
|
if page_size is None:
|
296
278
|
page_size = self.page_size
|
297
279
|
|
298
280
|
url = (
|
299
|
-
f"{self.platform_url}/servers/{
|
281
|
+
f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/get-valid-metadata-values/{property_name}"
|
300
282
|
f"?typeName={type_name}&startFrom={start_value}&pageSize={page_size}"
|
301
283
|
)
|
302
284
|
|
@@ -304,7 +286,7 @@ class ValidMetadataManager(Client):
|
|
304
286
|
return resp.json().get("elementList", "No elements found")
|
305
287
|
|
306
288
|
def get_valid_metadata_values(
|
307
|
-
self, property_name: str, type_name: str = None
|
289
|
+
self, property_name: str, type_name: str = None
|
308
290
|
) -> list | str:
|
309
291
|
"""Retrieve list of values for the property.
|
310
292
|
|
@@ -315,71 +297,7 @@ class ValidMetadataManager(Client):
|
|
315
297
|
type_name: str, opt
|
316
298
|
The Open Metadata type to get the property values for. If not specified then all property values
|
317
299
|
will be returned.
|
318
|
-
server_name : str, optional
|
319
|
-
The name of the server to configure.
|
320
|
-
If not provided, the server name associated with the instance is used.
|
321
300
|
|
322
|
-
Returns
|
323
|
-
-------
|
324
|
-
List | str
|
325
|
-
|
326
|
-
A list of collections linked off of the supplied element.
|
327
|
-
|
328
|
-
Raises
|
329
|
-
------
|
330
|
-
|
331
|
-
InvalidParameterException
|
332
|
-
If the client passes incorrect parameters on the request - such as bad URLs or invalid values
|
333
|
-
PropertyServerException
|
334
|
-
Raised by the server when an issue arises in processing a valid request
|
335
|
-
NotAuthorizedException
|
336
|
-
The principle specified by the user_id does not have authorization for the requested action
|
337
|
-
|
338
|
-
"""
|
339
|
-
loop = asyncio.get_event_loop()
|
340
|
-
resp = loop.run_until_complete(
|
341
|
-
self._async_get_valid_metadata_values(property_name, type_name, server_name)
|
342
|
-
)
|
343
|
-
return resp
|
344
|
-
|
345
|
-
async def _async_get_valid_metadata_value(
|
346
|
-
self,
|
347
|
-
property_name: str,
|
348
|
-
type_name: str,
|
349
|
-
preferred_value: str,
|
350
|
-
server_name: str = None,
|
351
|
-
) -> list | str:
|
352
|
-
if server_name is None:
|
353
|
-
server_name = self.server_name
|
354
|
-
|
355
|
-
url = (
|
356
|
-
f"{self.platform_url}/servers/{server_name}{self.command_base}/get-value/{property_name}"
|
357
|
-
f"?typeName={type_name}&preferredValue={preferred_value}"
|
358
|
-
)
|
359
|
-
|
360
|
-
resp = await self._async_make_request("GET", url)
|
361
|
-
return resp.json()
|
362
|
-
|
363
|
-
def get_valid_metadata_value(
|
364
|
-
self,
|
365
|
-
property_name: str,
|
366
|
-
type_name: str,
|
367
|
-
preferred_value: str,
|
368
|
-
server_name: str = None,
|
369
|
-
) -> list | str:
|
370
|
-
"""Retrieve details of a specific valid value for a property.
|
371
|
-
|
372
|
-
Parameters
|
373
|
-
----------
|
374
|
-
property_name: str
|
375
|
-
The property name of the valid metadata value to retrieve
|
376
|
-
type_name: str
|
377
|
-
Type of the metadata value to retrieve
|
378
|
-
preferred_value: str
|
379
|
-
The preferred value of the valid metadata value to retrieve
|
380
|
-
server_name : str, opt
|
381
|
-
The name of the server to configure.
|
382
|
-
If not provided, the server name associated with the instance is used.
|
383
301
|
|
384
302
|
Returns
|
385
303
|
-------
|
@@ -399,12 +317,8 @@ class ValidMetadataManager(Client):
|
|
399
317
|
|
400
318
|
"""
|
401
319
|
loop = asyncio.get_event_loop()
|
402
|
-
resp = (
|
403
|
-
|
404
|
-
self._async_get_valid_metadata_value(
|
405
|
-
property_name, type_name, preferred_value, server_name
|
406
|
-
)
|
407
|
-
),
|
320
|
+
resp = loop.run_until_complete(
|
321
|
+
self._async_get_valid_metadata_values(property_name, type_name)
|
408
322
|
)
|
409
323
|
return resp
|
410
324
|
|
@@ -414,7 +328,6 @@ class ValidMetadataManager(Client):
|
|
414
328
|
type_name: str,
|
415
329
|
map_name: str,
|
416
330
|
preferred_value: str,
|
417
|
-
server_name: str = None,
|
418
331
|
start_from: int = 0,
|
419
332
|
page_size: int = None,
|
420
333
|
) -> list | str:
|
@@ -430,9 +343,7 @@ class ValidMetadataManager(Client):
|
|
430
343
|
A valid map name that associates a property with a value.
|
431
344
|
preferred_value : str
|
432
345
|
|
433
|
-
|
434
|
-
The name of the server to configure.
|
435
|
-
If not provided, the server name associated with the instance is used.
|
346
|
+
|
436
347
|
start_from: int, [default=0], optional
|
437
348
|
When multiple pages of results are available, the page number to start from.
|
438
349
|
page_size: int, [default=None]
|
@@ -455,13 +366,12 @@ class ValidMetadataManager(Client):
|
|
455
366
|
The principle specified by the user_id does not have authorization for the requested action
|
456
367
|
|
457
368
|
"""
|
458
|
-
|
459
|
-
server_name = self.server_name
|
369
|
+
|
460
370
|
if page_size is None:
|
461
371
|
page_size = self.page_size
|
462
372
|
|
463
373
|
url = (
|
464
|
-
f"{self.platform_url}/servers/{
|
374
|
+
f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/{property_name}/"
|
465
375
|
f"consistent-metadata-values?typeName={type_name}&mapName={map_name}&preferredValue={preferred_value}"
|
466
376
|
f"&startFrom={start_from}&pageSize={page_size}"
|
467
377
|
)
|
@@ -475,7 +385,6 @@ class ValidMetadataManager(Client):
|
|
475
385
|
type_name: str,
|
476
386
|
map_name: str,
|
477
387
|
preferred_value: str,
|
478
|
-
server_name: str = None,
|
479
388
|
start_from: int = 0,
|
480
389
|
page_size: int = None,
|
481
390
|
) -> list | str:
|
@@ -491,9 +400,7 @@ class ValidMetadataManager(Client):
|
|
491
400
|
A valid map name that associates a property with a value.
|
492
401
|
preferred_value : str
|
493
402
|
|
494
|
-
|
495
|
-
The name of the server to configure.
|
496
|
-
If not provided, the server name associated with the instance is used.
|
403
|
+
|
497
404
|
start_from: int, [default=0], optional
|
498
405
|
When multiple pages of results are available, the page number to start from.
|
499
406
|
page_size: int, [default=None]
|
@@ -523,7 +430,6 @@ class ValidMetadataManager(Client):
|
|
523
430
|
type_name,
|
524
431
|
map_name,
|
525
432
|
preferred_value,
|
526
|
-
server_name,
|
527
433
|
start_from,
|
528
434
|
page_size,
|
529
435
|
)
|
@@ -533,7 +439,7 @@ class ValidMetadataManager(Client):
|
|
533
439
|
#
|
534
440
|
# Get all ...
|
535
441
|
#
|
536
|
-
async def _async_get_all_entity_types(self
|
442
|
+
async def _async_get_all_entity_types(self) -> list | str:
|
537
443
|
"""Returns the list of different types of metadata organized into two groups. The first are the
|
538
444
|
attribute type definitions (AttributeTypeDefs). These provide types for attributes in full
|
539
445
|
type definitions. Full type definitions (TypeDefs) describe types for entities, relationships
|
@@ -541,9 +447,7 @@ class ValidMetadataManager(Client):
|
|
541
447
|
|
542
448
|
Parameters
|
543
449
|
----------
|
544
|
-
|
545
|
-
The name of the server to configure.
|
546
|
-
If not provided, the server name associated with the instance is used.
|
450
|
+
|
547
451
|
|
548
452
|
Returns
|
549
453
|
-------
|
@@ -562,15 +466,13 @@ class ValidMetadataManager(Client):
|
|
562
466
|
The principle specified by the user_id does not have authorization for the requested action
|
563
467
|
|
564
468
|
"""
|
565
|
-
if server_name is None:
|
566
|
-
server_name = self.server_name
|
567
469
|
|
568
|
-
url = f"{self.platform_url}/servers/{
|
470
|
+
url = f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types"
|
569
471
|
|
570
472
|
resp = await self._async_make_request("GET", url)
|
571
473
|
return resp.json().get("typeDefs", "No TypeDefs Found")
|
572
474
|
|
573
|
-
def get_all_entity_types(self
|
475
|
+
def get_all_entity_types(self) -> list | str:
|
574
476
|
"""Returns the list of different types of metadata organized into two groups. The first are the
|
575
477
|
attribute type definitions (AttributeTypeDefs). These provide types for attributes in full
|
576
478
|
type definitions. Full type definitions (TypeDefs) describe types for entities, relationships
|
@@ -578,9 +480,7 @@ class ValidMetadataManager(Client):
|
|
578
480
|
|
579
481
|
Parameters
|
580
482
|
----------
|
581
|
-
|
582
|
-
The name of the server to configure.
|
583
|
-
If not provided, the server name associated with the instance is used.
|
483
|
+
|
584
484
|
|
585
485
|
Returns
|
586
486
|
-------
|
@@ -600,17 +500,15 @@ class ValidMetadataManager(Client):
|
|
600
500
|
|
601
501
|
"""
|
602
502
|
loop = asyncio.get_event_loop()
|
603
|
-
resp = loop.run_until_complete(self._async_get_all_entity_types(
|
503
|
+
resp = loop.run_until_complete(self._async_get_all_entity_types())
|
604
504
|
return resp
|
605
505
|
|
606
|
-
async def _async_get_all_entity_defs(self
|
506
|
+
async def _async_get_all_entity_defs(self) -> list | str:
|
607
507
|
"""GReturns all the entity type definitions. Async version.
|
608
508
|
|
609
509
|
Parameters
|
610
510
|
----------
|
611
|
-
|
612
|
-
The name of the server to configure.
|
613
|
-
If not provided, the server name associated with the instance is used.
|
511
|
+
|
614
512
|
|
615
513
|
Returns
|
616
514
|
-------
|
@@ -629,22 +527,18 @@ class ValidMetadataManager(Client):
|
|
629
527
|
The principle specified by the user_id does not have authorization for the requested action
|
630
528
|
|
631
529
|
"""
|
632
|
-
if server_name is None:
|
633
|
-
server_name = self.server_name
|
634
530
|
|
635
|
-
url = f"{self.platform_url}/servers/{
|
531
|
+
url = f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/entity-defs"
|
636
532
|
|
637
533
|
resp = await self._async_make_request("GET", url)
|
638
534
|
return resp.json().get("typeDefs", "No TypeDefs Found")
|
639
535
|
|
640
|
-
def get_all_entity_defs(self
|
536
|
+
def get_all_entity_defs(self) -> list | str:
|
641
537
|
"""Returns all the entity type definitions.
|
642
538
|
|
643
539
|
Parameters
|
644
540
|
----------
|
645
|
-
|
646
|
-
The name of the server to configure.
|
647
|
-
If not provided, the server name associated with the instance is used.
|
541
|
+
|
648
542
|
|
649
543
|
Returns
|
650
544
|
-------
|
@@ -664,19 +558,15 @@ class ValidMetadataManager(Client):
|
|
664
558
|
|
665
559
|
"""
|
666
560
|
loop = asyncio.get_event_loop()
|
667
|
-
resp = loop.run_until_complete(self._async_get_all_entity_defs(
|
561
|
+
resp = loop.run_until_complete(self._async_get_all_entity_defs())
|
668
562
|
return resp
|
669
563
|
|
670
|
-
async def _async_get_all_relationship_defs(
|
671
|
-
self, server_name: str = None
|
672
|
-
) -> list | str:
|
564
|
+
async def _async_get_all_relationship_defs(self) -> list | str:
|
673
565
|
"""Returns all the relationship type definitions. Async version.
|
674
566
|
|
675
567
|
Parameters
|
676
568
|
----------
|
677
|
-
|
678
|
-
The name of the server to configure.
|
679
|
-
If not provided, the server name associated with the instance is used.
|
569
|
+
|
680
570
|
|
681
571
|
Returns
|
682
572
|
-------
|
@@ -695,22 +585,18 @@ class ValidMetadataManager(Client):
|
|
695
585
|
The principle specified by the user_id does not have authorization for the requested action
|
696
586
|
|
697
587
|
"""
|
698
|
-
if server_name is None:
|
699
|
-
server_name = self.server_name
|
700
588
|
|
701
|
-
url = f"{self.platform_url}/servers/{
|
589
|
+
url = f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/relationship-defs"
|
702
590
|
|
703
591
|
resp = await self._async_make_request("GET", url)
|
704
592
|
return resp.json().get("typeDefs", "No TypeDefs Found")
|
705
593
|
|
706
|
-
def get_all_relationship_defs(self
|
594
|
+
def get_all_relationship_defs(self) -> list | str:
|
707
595
|
"""Returns all the relationship type definitions.
|
708
596
|
|
709
597
|
Parameters
|
710
598
|
----------
|
711
|
-
|
712
|
-
The name of the server to configure.
|
713
|
-
If not provided, the server name associated with the instance is used.
|
599
|
+
|
714
600
|
|
715
601
|
Returns
|
716
602
|
-------
|
@@ -730,21 +616,15 @@ class ValidMetadataManager(Client):
|
|
730
616
|
|
731
617
|
"""
|
732
618
|
loop = asyncio.get_event_loop()
|
733
|
-
resp = loop.run_until_complete(
|
734
|
-
self._async_get_all_relationship_defs(server_name)
|
735
|
-
)
|
619
|
+
resp = loop.run_until_complete(self._async_get_all_relationship_defs())
|
736
620
|
return resp
|
737
621
|
|
738
|
-
async def _async_get_all_classification_defs(
|
739
|
-
self, server_name: str = None
|
740
|
-
) -> list | str:
|
622
|
+
async def _async_get_all_classification_defs(self) -> list | str:
|
741
623
|
"""Returns all the classification type definitions. Async version.
|
742
624
|
|
743
625
|
Parameters
|
744
626
|
----------
|
745
|
-
|
746
|
-
The name of the server to configure.
|
747
|
-
If not provided, the server name associated with the instance is used.
|
627
|
+
|
748
628
|
|
749
629
|
Returns
|
750
630
|
-------
|
@@ -763,22 +643,18 @@ class ValidMetadataManager(Client):
|
|
763
643
|
The principle specified by the user_id does not have authorization for the requested action
|
764
644
|
|
765
645
|
"""
|
766
|
-
if server_name is None:
|
767
|
-
server_name = self.server_name
|
768
646
|
|
769
|
-
url = f"{self.platform_url}/servers/{
|
647
|
+
url = f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/classification-defs"
|
770
648
|
|
771
649
|
resp = await self._async_make_request("GET", url)
|
772
650
|
return resp.json().get("typeDefs", "No TypeDefs Found")
|
773
651
|
|
774
|
-
def get_all_classification_defs(self
|
652
|
+
def get_all_classification_defs(self) -> list | str:
|
775
653
|
"""Returns all the classification type definitions.
|
776
654
|
|
777
655
|
Parameters
|
778
656
|
----------
|
779
|
-
|
780
|
-
The name of the server to configure.
|
781
|
-
If not provided, the server name associated with the instance is used.
|
657
|
+
|
782
658
|
|
783
659
|
Returns
|
784
660
|
-------
|
@@ -798,17 +674,13 @@ class ValidMetadataManager(Client):
|
|
798
674
|
|
799
675
|
"""
|
800
676
|
loop = asyncio.get_event_loop()
|
801
|
-
resp = loop.run_until_complete(
|
802
|
-
self._async_get_all_classification_defs(server_name)
|
803
|
-
)
|
677
|
+
resp = loop.run_until_complete(self._async_get_all_classification_defs())
|
804
678
|
return resp
|
805
679
|
|
806
680
|
#
|
807
681
|
# Get valid ...
|
808
682
|
#
|
809
|
-
async def _async_get_valid_relationship_types(
|
810
|
-
self, entity_type: str, server_name: str = None
|
811
|
-
) -> list | str:
|
683
|
+
async def _async_get_valid_relationship_types(self, entity_type: str) -> list | str:
|
812
684
|
"""Returns all the TypeDefs for relationships that can be attached to the requested entity type.
|
813
685
|
Async version.
|
814
686
|
|
@@ -816,9 +688,7 @@ class ValidMetadataManager(Client):
|
|
816
688
|
----------
|
817
689
|
entity_type : str
|
818
690
|
The name of the entity type to retrieve the valid relationships for.
|
819
|
-
|
820
|
-
The name of the server to configure.
|
821
|
-
If not provided, the server name associated with the instance is used.
|
691
|
+
|
822
692
|
|
823
693
|
Returns
|
824
694
|
-------
|
@@ -837,20 +707,16 @@ class ValidMetadataManager(Client):
|
|
837
707
|
The principle specified by the user_id does not have authorization for the requested action
|
838
708
|
|
839
709
|
"""
|
840
|
-
if server_name is None:
|
841
|
-
server_name = self.server_name
|
842
710
|
|
843
711
|
url = (
|
844
|
-
f"{self.platform_url}/servers/{
|
712
|
+
f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/{entity_type}/"
|
845
713
|
f"attached-relationships"
|
846
714
|
)
|
847
715
|
|
848
716
|
resp = await self._async_make_request("GET", url)
|
849
717
|
return resp.json().get("typeDefs", "No TypeDefs Found")
|
850
718
|
|
851
|
-
def get_valid_relationship_types(
|
852
|
-
self, entity_type: str, server_name: str = None
|
853
|
-
) -> list | str:
|
719
|
+
def get_valid_relationship_types(self, entity_type: str) -> list | str:
|
854
720
|
"""Returns all the TypeDefs for relationships that can be attached to the requested entity type.
|
855
721
|
Async version.
|
856
722
|
|
@@ -858,7 +724,7 @@ class ValidMetadataManager(Client):
|
|
858
724
|
----------
|
859
725
|
entity_type : str
|
860
726
|
The name of the entity type to retrieve the valid relationships for.
|
861
|
-
|
727
|
+
: str, optional
|
862
728
|
The name of the server to configure.
|
863
729
|
If not provided, the server name associated with the instance is used.
|
864
730
|
|
@@ -881,12 +747,12 @@ class ValidMetadataManager(Client):
|
|
881
747
|
"""
|
882
748
|
loop = asyncio.get_event_loop()
|
883
749
|
resp = loop.run_until_complete(
|
884
|
-
self._async_get_valid_relationship_types(entity_type
|
750
|
+
self._async_get_valid_relationship_types(entity_type)
|
885
751
|
)
|
886
752
|
return resp
|
887
753
|
|
888
754
|
async def _async_get_valid_classification_types(
|
889
|
-
self, entity_type: str
|
755
|
+
self, entity_type: str
|
890
756
|
) -> list | str:
|
891
757
|
"""Returns all the TypeDefs for classifications that can be attached to the requested entity type.
|
892
758
|
Async version.
|
@@ -895,9 +761,7 @@ class ValidMetadataManager(Client):
|
|
895
761
|
----------
|
896
762
|
entity_type : str
|
897
763
|
The name of the entity type to retrieve the classifications for.
|
898
|
-
|
899
|
-
The name of the server to configure.
|
900
|
-
If not provided, the server name associated with the instance is used.
|
764
|
+
|
901
765
|
|
902
766
|
Returns
|
903
767
|
-------
|
@@ -916,20 +780,16 @@ class ValidMetadataManager(Client):
|
|
916
780
|
The principle specified by the user_id does not have authorization for the requested action
|
917
781
|
|
918
782
|
"""
|
919
|
-
if server_name is None:
|
920
|
-
server_name = self.server_name
|
921
783
|
|
922
784
|
url = (
|
923
|
-
f"{self.platform_url}/servers/{
|
785
|
+
f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/{entity_type}/"
|
924
786
|
f"attached-classifications"
|
925
787
|
)
|
926
788
|
|
927
789
|
resp = await self._async_make_request("GET", url)
|
928
790
|
return resp.json().get("typeDefs", "No TypeDefs Found")
|
929
791
|
|
930
|
-
def get_valid_classification_types(
|
931
|
-
self, entity_type: str, server_name: str = None
|
932
|
-
) -> list | str:
|
792
|
+
def get_valid_classification_types(self, entity_type: str) -> list | str:
|
933
793
|
"""Returns all the TypeDefs for relationships that can be attached to the requested entity type.
|
934
794
|
Async version.
|
935
795
|
|
@@ -937,7 +797,7 @@ class ValidMetadataManager(Client):
|
|
937
797
|
----------
|
938
798
|
entity_type : str
|
939
799
|
The name of the entity type to retrieve the classifications for.
|
940
|
-
|
800
|
+
: str, optional
|
941
801
|
The name of the server to configure.
|
942
802
|
If not provided, the server name associated with the instance is used.
|
943
803
|
|
@@ -960,13 +820,11 @@ class ValidMetadataManager(Client):
|
|
960
820
|
"""
|
961
821
|
loop = asyncio.get_event_loop()
|
962
822
|
resp = loop.run_until_complete(
|
963
|
-
self._async_get_valid_classification_types(entity_type
|
823
|
+
self._async_get_valid_classification_types(entity_type)
|
964
824
|
)
|
965
825
|
return resp
|
966
826
|
|
967
|
-
async def _async_get_typedef_by_name(
|
968
|
-
self, entity_type: str, server_name: str = None
|
969
|
-
) -> dict | str:
|
827
|
+
async def _async_get_typedef_by_name(self, entity_type: str) -> dict | str:
|
970
828
|
"""Return the TypeDef identified by the unique name.
|
971
829
|
Async version.
|
972
830
|
|
@@ -974,9 +832,7 @@ class ValidMetadataManager(Client):
|
|
974
832
|
----------
|
975
833
|
entity_type : str
|
976
834
|
The name of the entity type to retrieve the typedef for.
|
977
|
-
|
978
|
-
The name of the server to configure.
|
979
|
-
If not provided, the server name associated with the instance is used.
|
835
|
+
|
980
836
|
|
981
837
|
Returns
|
982
838
|
-------
|
@@ -995,26 +851,20 @@ class ValidMetadataManager(Client):
|
|
995
851
|
The principle specified by the user_id does not have authorization for the requested action
|
996
852
|
|
997
853
|
"""
|
998
|
-
if server_name is None:
|
999
|
-
server_name = self.server_name
|
1000
854
|
|
1001
|
-
url = f"{self.platform_url}/servers/{
|
855
|
+
url = f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/name/{entity_type}"
|
1002
856
|
|
1003
857
|
resp = await self._async_make_request("GET", url)
|
1004
858
|
return resp.json().get("typeDef", "No TypeDefs Found")
|
1005
859
|
|
1006
|
-
def get_typedef_by_name(
|
1007
|
-
self, entity_type: str, server_name: str = None
|
1008
|
-
) -> dict | str:
|
860
|
+
def get_typedef_by_name(self, entity_type: str) -> dict | str:
|
1009
861
|
"""Return the TypeDef identified by the unique name.
|
1010
862
|
|
1011
863
|
Parameters
|
1012
864
|
----------
|
1013
865
|
entity_type : str
|
1014
866
|
The name of the entity type to retrieve the typedef for.
|
1015
|
-
|
1016
|
-
The name of the server to configure.
|
1017
|
-
If not provided, the server name associated with the instance is used.
|
867
|
+
|
1018
868
|
|
1019
869
|
Returns
|
1020
870
|
-------
|
@@ -1034,9 +884,7 @@ class ValidMetadataManager(Client):
|
|
1034
884
|
|
1035
885
|
"""
|
1036
886
|
loop = asyncio.get_event_loop()
|
1037
|
-
resp = loop.run_until_complete(
|
1038
|
-
self._async_get_typedef_by_name(entity_type, server_name)
|
1039
|
-
)
|
887
|
+
resp = loop.run_until_complete(self._async_get_typedef_by_name(entity_type))
|
1040
888
|
return resp
|
1041
889
|
|
1042
890
|
|