pyegeria 0.3.9__py3-none-any.whl → 0.4.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyegeria/Xfeedback_manager_omvs.py +2 -15
- pyegeria/__init__.py +11 -4
- pyegeria/_globals.py +3 -1
- pyegeria/{Xasset_catalog_omvs.py → asset_catalog_omvs.py} +242 -109
- pyegeria/automated_curation_omvs.py +324 -61
- pyegeria/core_guids.py +128 -0
- pyegeria/core_omag_server_config.py +1 -1
- pyegeria/{Xglossary_manager_omvs.py → glossary_manager_omvs.py} +70 -69
- pyegeria/runtime_manager_omvs.py +967 -0
- pyegeria/valid_metadata_omvs.py +193 -20
- pyegeria-0.4.1.data/scripts/get_guid_info.py +86 -0
- {pyegeria-0.3.9.data → pyegeria-0.4.1.data}/scripts/get_tech_details.py +1 -37
- pyegeria-0.4.1.data/scripts/get_tech_type_elements.py +137 -0
- pyegeria-0.4.1.data/scripts/get_tech_type_template.py +137 -0
- pyegeria-0.4.1.data/scripts/list_assets.py +138 -0
- pyegeria-0.3.9.data/scripts/project_list_viewer.py → pyegeria-0.4.1.data/scripts/list_projects.py +1 -1
- pyegeria-0.3.9.data/scripts/get_relationship_types.py → pyegeria-0.4.1.data/scripts/list_relationship_types.py +9 -8
- pyegeria-0.4.1.data/scripts/list_tech_templates.py +134 -0
- pyegeria-0.3.9.data/scripts/find_todos.py → pyegeria-0.4.1.data/scripts/list_todos.py +2 -1
- pyegeria-0.4.1.data/scripts/list_valid_metadata_values.py +144 -0
- pyegeria-0.4.1.data/scripts/view_asset_graph.py +245 -0
- pyegeria-0.3.9.data/scripts/coco_status.py → pyegeria-0.4.1.data/scripts/view_coco_status.py +10 -9
- pyegeria-0.3.9.data/scripts/engine_action_status.py → pyegeria-0.4.1.data/scripts/view_eng_action_status.py +8 -3
- pyegeria-0.4.1.data/scripts/view_integ_daemon_status.py +140 -0
- pyegeria-0.4.1.data/scripts/view_platform_status.py +123 -0
- {pyegeria-0.3.9.dist-info → pyegeria-0.4.1.dist-info}/METADATA +5 -2
- pyegeria-0.4.1.dist-info/RECORD +58 -0
- {pyegeria-0.3.9.dist-info → pyegeria-0.4.1.dist-info}/WHEEL +1 -1
- pyegeria-0.3.9.data/scripts/integration_daemon_status.py +0 -130
- pyegeria-0.3.9.data/scripts/multi-server_status.py +0 -120
- pyegeria-0.3.9.dist-info/RECORD +0 -49
- /pyegeria/{Xaction_author_omvs.py → action_author_omvs.py} +0 -0
- {pyegeria-0.3.9.data → pyegeria-0.4.1.data}/scripts/Create_Collection_Sample.py +0 -0
- {pyegeria-0.3.9.data → pyegeria-0.4.1.data}/scripts/Create_Sustainability_Collection_Sample.py +0 -0
- /pyegeria-0.3.9.data/scripts/view_my_profile.py → /pyegeria-0.4.1.data/scripts/get_my_profile.py +0 -0
- {pyegeria-0.3.9.data → pyegeria-0.4.1.data}/scripts/list_asset_types.py +0 -0
- /pyegeria-0.3.9.data/scripts/get_registered_services.py → /pyegeria-0.4.1.data/scripts/list_registered_services.py +0 -0
- /pyegeria-0.3.9.data/scripts/get_tech_types.py → /pyegeria-0.4.1.data/scripts/list_tech_types.py +0 -0
- /pyegeria-0.3.9.data/scripts/collection_viewer.py → /pyegeria-0.4.1.data/scripts/view_collection.py +0 -0
- /pyegeria-0.3.9.data/scripts/glossary_view.py → /pyegeria-0.4.1.data/scripts/view_glossary.py +0 -0
- /pyegeria-0.3.9.data/scripts/gov_engine_status.py → /pyegeria-0.4.1.data/scripts/view_gov_eng_status.py +0 -0
- /pyegeria-0.3.9.data/scripts/my_todos.py → /pyegeria-0.4.1.data/scripts/view_my_todos.py +0 -0
- /pyegeria-0.3.9.data/scripts/open_todos.py → /pyegeria-0.4.1.data/scripts/view_open_todos.py +0 -0
- /pyegeria-0.3.9.data/scripts/server_status_widget.py → /pyegeria-0.4.1.data/scripts/view_server_list.py +0 -0
- /pyegeria-0.3.9.data/scripts/server_status.py → /pyegeria-0.4.1.data/scripts/view_server_status.py +0 -0
- {pyegeria-0.3.9.dist-info → pyegeria-0.4.1.dist-info}/LICENSE +0 -0
- {pyegeria-0.3.9.dist-info → pyegeria-0.4.1.dist-info}/top_level.txt +0 -0
pyegeria/core_guids.py
ADDED
@@ -0,0 +1,128 @@
|
|
1
|
+
"""
|
2
|
+
SPDX-License-Identifier: Apache-2.0
|
3
|
+
Copyright Contributors to the ODPi Egeria project.
|
4
|
+
|
5
|
+
Useful from core content archive
|
6
|
+
"""
|
7
|
+
|
8
|
+
#
|
9
|
+
# Template guids
|
10
|
+
#
|
11
|
+
|
12
|
+
FILE_FOLDER_TEMPLATE = "553f51cf-3981-480e-acd8-86ed3e25329d"
|
13
|
+
|
14
|
+
KAFKA_SERVER_TEMPLATE = "5e1ff810-5418-43f7-b7c4-e6e062f9aff7"
|
15
|
+
|
16
|
+
POSTGRESQL_SERVER_TEMPLATE = "542134e6-b9ce-4dce-8aef-22e8daf34fdb"
|
17
|
+
|
18
|
+
CSV_Data_File_template_GUID = '1b81010e-8525-43b4-8bd9-40c102f7f7d6'
|
19
|
+
|
20
|
+
Keystore_File_template_GUID = '754def0b-b811-4ea0-b8bf-7414fa8a77b4'
|
21
|
+
|
22
|
+
OSS_Unity_Catalog_Function_template_GUID = '4ae9f6df-4678-4b0a-a492-4a982c8397fd'
|
23
|
+
|
24
|
+
Data_File_template_GUID = 'd7633260-0810-43fe-ba48-f3e3e3e7c95c'
|
25
|
+
|
26
|
+
View_Server_template_GUID = 'fd61ca01-390d-4aa2-a55d-426826aa4e1b'
|
27
|
+
|
28
|
+
Archive_File_template_GUID = '8a4ea587-dd3e-4148-8c01-0d366d19de11'
|
29
|
+
|
30
|
+
PostgreSQL_Relational_Database_template_GUID = '3d398b3f-7ae6-4713-952a-409f3dea8520'
|
31
|
+
|
32
|
+
OSS_Unity_Catalog_Volume_template_GUID = 'bf4dc272-a323-4ca7-8e37-b78a005ac578'
|
33
|
+
|
34
|
+
Program_File_template_GUID = 'd8b8cae5-f4bd-4631-8836-88dc67a55c00'
|
35
|
+
|
36
|
+
FileFolder_template_GUID = '99b0c995-7494-4063-89d1-1e0ec7153abd'
|
37
|
+
|
38
|
+
OSS_Unity_Catalog_Catalog_template_GUID = '8bf8f102-490f-4718-bd27-d018660124b6'
|
39
|
+
|
40
|
+
PostgreSQL_Server_template_GUID = '542134e6-b9ce-4dce-8aef-22e8daf34fdb'
|
41
|
+
|
42
|
+
Audio_Data_File_template_GUID = 'f65ea229-5473-469f-a447-32ba09bf1f14'
|
43
|
+
|
44
|
+
Document_File_template_GUID = '080ca599-095a-499e-ba26-7d58e538c32a'
|
45
|
+
|
46
|
+
Integration_Daemon_template_GUID = '6b3516f0-dd13-4786-9601-07215f995197'
|
47
|
+
|
48
|
+
XML_Data_File_template_GUID = '643a284b-3137-41de-8c37-521dcd3a1441'
|
49
|
+
|
50
|
+
Parquet_Data_File_template_GUID = '2396c38e-54aa-4d04-a95d-ce02fb998c55'
|
51
|
+
|
52
|
+
ThreeD_Image_Data_File_template_GUID = '5648eaa6-4826-4964-9657-78ab9cc387d8'
|
53
|
+
|
54
|
+
YAML_File_template_GUID = '6515915a-c218-4e55-9b2c-d5fbec9dfdb4'
|
55
|
+
|
56
|
+
Metadata_Access_Server_template_GUID = 'bd8de890-fa79-4c24-aab8-20b41b5893dd'
|
57
|
+
|
58
|
+
Properties_File_template_GUID = '1cefcfe3-585d-4d78-a4dd-3f929f5c5a9b'
|
59
|
+
|
60
|
+
Vector_Data_File_template_GUID = 'ea60c096-71e6-4492-ba10-90de63e4fe3a'
|
61
|
+
|
62
|
+
Apache_Kafka_Server_template_GUID = '5e1ff810-5418-43f7-b7c4-e6e062f9aff7'
|
63
|
+
|
64
|
+
OSS_Unity_Catalog_Schema_template_GUID = 'd95e5364-4ebf-42d5-bb39-ff1334143b15'
|
65
|
+
|
66
|
+
Executable_File_template_GUID = '588c89e7-cc16-4ae1-8b81-0cd90250df0c'
|
67
|
+
|
68
|
+
JSON_Data_File_template_GUID = 'c62ff28b-5cd2-4c74-bba3-0a875ddbbdf4'
|
69
|
+
|
70
|
+
File_System_template_GUID = 'd3b548d5-c5bf-42f7-8714-80a034b00424'
|
71
|
+
|
72
|
+
Source_Code_File_template_GUID = '092e6742-7d5a-40cb-b5be-b0440e730c0a'
|
73
|
+
|
74
|
+
OSS_Unity_Catalog_Server_template_GUID = '1077a346-7a50-4cb0-a795-b219bafaabf6'
|
75
|
+
|
76
|
+
Apple_MacBook_Pro_template_GUID = '32a9fd56-85c9-47fe-a211-9da3871bf4da'
|
77
|
+
|
78
|
+
Build_Instruction_File_template_GUID = '7a2b22a1-2198-4ad6-adc0-8a3c2e2faaa7'
|
79
|
+
|
80
|
+
Spreadsheet_Data_File_template_GUID = '33860da2-c467-4192-908c-f8dab837c098'
|
81
|
+
|
82
|
+
UNIX_File_System_template_GUID = '6d82998d-5d6c-4cd2-902e-8baa98e152d4'
|
83
|
+
|
84
|
+
Video_Data_File_template_GUID = '6d7b46f9-c7ea-4d68-b66b-b077ec91bc19'
|
85
|
+
|
86
|
+
PostgreSQL_Relational_Database_Schema_template_GUID = '82a5417c-d882-4271-8444-4c6a996a8bfc'
|
87
|
+
|
88
|
+
Engine_Host_template_GUID = '1764a891-4234-45f1-8cc3-536af40c790d'
|
89
|
+
|
90
|
+
Avro_Data_File_template_GUID = '0c61cfef-a0d3-4130-85fc-d5c39287499c'
|
91
|
+
|
92
|
+
OSS_Unity_Catalog_Table_template_GUID = 'f5b12348-92ac-4a52-b8e0-b06cf215484e'
|
93
|
+
|
94
|
+
File_template_GUID = '9725e90e-ebad-474f-af65-a8aaaca03208'
|
95
|
+
|
96
|
+
Apache_Kafka_Topic_template_GUID = 'ea8f81c9-c59c-47de-9525-7cc59d1251e5'
|
97
|
+
|
98
|
+
Script_File_template_GUID = '4842a347-56a1-4940-b340-2f39cf91dc6d'
|
99
|
+
|
100
|
+
Apache_Atlas_Server_template_GUID = 'fe6dce45-a978-4417-ab55-17f05b8bcea7'
|
101
|
+
|
102
|
+
Raster_Data_File_template_GUID = 'c972afee-0170-446f-893b-f88a373a4a99'
|
103
|
+
|
104
|
+
Data_Folder_template_GUID = 'e854455c-8b5a-4030-8289-2323f7f68841'
|
105
|
+
|
106
|
+
OMAG_Server_Platform_template_GUID = '9b06c4dc-ddc8-47ae-b56b-28775d3a96f0'
|
107
|
+
|
108
|
+
DBC_Relational_Database_Integration_Connector_GUID = '70dcd0b7-9f06-48ad-ad44-ae4d7a7762aa'
|
109
|
+
|
110
|
+
#
|
111
|
+
# Integration Connector GUIDS
|
112
|
+
#
|
113
|
+
|
114
|
+
PostgreSQL_Relational_Database_Integration_Connector_GUID = '70dcd0b7-9f06-48ad-ad44-ae4d7a7762aa'
|
115
|
+
|
116
|
+
Landing_Area_File_Monitor_Integration_Connector_GUID = '1b98cdac-dd0a-4621-93db-99ef5a1098bc'
|
117
|
+
|
118
|
+
FileFolder_Integration_Connector_GUID = 'cd6479e1-2fe7-4426-b358-8a0cf70be117'
|
119
|
+
|
120
|
+
OSS_Unity_Catalog_Catalog_Integration_Connector_GUID = '74dde22f-2249-4ea3-af2b-b39e73f79b81'
|
121
|
+
|
122
|
+
PostgreSQL_Server_Integration_Connector_GUID = '36f69fd0-54ba-4f59-8a44-11ccf2687a34'
|
123
|
+
|
124
|
+
Apache_Kafka_Server_Integration_Connector_GUID = 'fa1f711c-0b34-4b57-8e6e-16162b132b0c'
|
125
|
+
|
126
|
+
Software_Server_Integration_Connector_GUID = 'b89d9a5a-2ea6-49bc-a4fc-e7df9f3ca93e'
|
127
|
+
|
128
|
+
OSS_Unity_Catalog_Server_Integration_Connector_GUID = '06d068d9-9e08-4e67-8c59-073bbf1013af'
|
@@ -1717,7 +1717,7 @@ class CoreServerConfig(Client):
|
|
1717
1717
|
|
1718
1718
|
return response.json().get("services", "No view services found")
|
1719
1719
|
|
1720
|
-
def
|
1720
|
+
def config_all_view_services(self, mdr_server_name: str,
|
1721
1721
|
mdr_server_platform_root_url: str, server_name: str = None) -> None:
|
1722
1722
|
""" Enable all view services that are registered with this OMAG server platform.
|
1723
1723
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
PDX-License-Identifier: Apache-2.0
|
3
3
|
Copyright Contributors to the ODPi Egeria project.
|
4
4
|
|
5
|
-
This module contains an initial version of the
|
5
|
+
This module contains an initial version of the glossary_manager omvs module. There are additional methods that will be
|
6
6
|
added in subsequent versions of the glossary_omvs module.
|
7
7
|
|
8
8
|
"""
|
@@ -13,8 +13,9 @@ from datetime import datetime, time
|
|
13
13
|
from pyegeria._client import Client
|
14
14
|
from pyegeria._globals import enable_ssl_check
|
15
15
|
from pyegeria._validators import (validate_name, validate_guid, validate_search_string, )
|
16
|
-
from pyegeria.utils import body_slimmer
|
17
16
|
from pyegeria.glossary_browser_omvs import GlossaryBrowser
|
17
|
+
from pyegeria.utils import body_slimmer
|
18
|
+
|
18
19
|
|
19
20
|
class GlossaryManager(GlossaryBrowser):
|
20
21
|
"""
|
@@ -39,7 +40,7 @@ class GlossaryManager(GlossaryBrowser):
|
|
39
40
|
"""
|
40
41
|
|
41
42
|
def __init__(self, server_name: str, platform_url: str, token: str = None, user_id: str = None,
|
42
|
-
|
43
|
+
user_pwd: str = None, verify_flag: bool = enable_ssl_check, sync_mode: bool = True):
|
43
44
|
self.admin_command_root: str
|
44
45
|
Client.__init__(self, server_name, platform_url, user_id=user_id, token=token, async_mode=sync_mode)
|
45
46
|
|
@@ -68,10 +69,10 @@ class GlossaryManager(GlossaryBrowser):
|
|
68
69
|
if server_name is None:
|
69
70
|
server_name = self.server_name
|
70
71
|
|
71
|
-
url = f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-
|
72
|
+
url = f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-manager/glossaries/"
|
72
73
|
body = {
|
73
|
-
|
74
|
-
|
74
|
+
"class": "ReferenceableRequestBody",
|
75
|
+
"elementProperties":
|
75
76
|
{
|
76
77
|
"class": "GlossaryProperties",
|
77
78
|
"qualifiedName": f"Glossary-{display_name}-{time.asctime()}",
|
@@ -122,13 +123,13 @@ class GlossaryManager(GlossaryBrowser):
|
|
122
123
|
if server_name is None:
|
123
124
|
server_name = self.server_name
|
124
125
|
|
125
|
-
url = (f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-
|
126
|
-
|
126
|
+
url = (f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-manager/glossaries/"
|
127
|
+
f"{glossary_guid}/remove")
|
127
128
|
|
128
129
|
await self._async_make_request("POST", url)
|
129
130
|
return
|
130
131
|
|
131
|
-
def delete_glossary(self, glossary_guid: str,
|
132
|
+
def delete_glossary(self, glossary_guid: str, server_name: str = None) -> None:
|
132
133
|
""" Create a new glossary.
|
133
134
|
|
134
135
|
Parameters
|
@@ -220,7 +221,7 @@ class GlossaryManager(GlossaryBrowser):
|
|
220
221
|
search_string = None
|
221
222
|
|
222
223
|
body = {"class": "SearchStringRequestBody", "searchString": search_string, "effectiveTime": effective_time,
|
223
|
-
|
224
|
+
"typeName": type_name}
|
224
225
|
body = body_slimmer(body)
|
225
226
|
# print(f"\n\nBody is: \n{body}")
|
226
227
|
|
@@ -331,7 +332,7 @@ class GlossaryManager(GlossaryBrowser):
|
|
331
332
|
f"{glossary_guid}/retrieve")
|
332
333
|
print(url)
|
333
334
|
response = await self._async_make_request("POST", url, payload=body)
|
334
|
-
return response
|
335
|
+
return response.json()
|
335
336
|
|
336
337
|
def get_glossary_by_guid(self, glossary_guid: str, server_name: str = None) -> dict:
|
337
338
|
""" Retrieves information about a glossary
|
@@ -514,7 +515,7 @@ class GlossaryManager(GlossaryBrowser):
|
|
514
515
|
return response.json().get("guid", None)
|
515
516
|
|
516
517
|
def create_category(self, glossary_guid: str, display_name: str, description: str,
|
517
|
-
|
518
|
+
server_name: str = None) -> str:
|
518
519
|
""" Create a new category within the specified glossary.
|
519
520
|
|
520
521
|
Parameters
|
@@ -551,8 +552,6 @@ class GlossaryManager(GlossaryBrowser):
|
|
551
552
|
self._async_create_category(glossary_guid, display_name, description, server_name))
|
552
553
|
return response
|
553
554
|
|
554
|
-
|
555
|
-
|
556
555
|
async def _async_get_glossary_for_category(self, glossary_category_guid: str, effective_time: str = None,
|
557
556
|
server_name: str = None) -> dict | str:
|
558
557
|
""" Retrieve the glossary metadata element for the requested category. The optional request body allows you to
|
@@ -977,7 +976,7 @@ class GlossaryManager(GlossaryBrowser):
|
|
977
976
|
f"by-name?startFrom={start_from}&pageSize={page_size}")
|
978
977
|
|
979
978
|
body = {"class": "GlossaryNameRequestBody", "name": name, "glossaryGUID": glossary_guid,
|
980
|
-
|
979
|
+
"limitResultsByStatus": status}
|
981
980
|
|
982
981
|
response = await self._async_make_request("POST", url)
|
983
982
|
return response.json().get("elementList", "No Categories found")
|
@@ -1201,7 +1200,8 @@ class GlossaryManager(GlossaryBrowser):
|
|
1201
1200
|
#
|
1202
1201
|
# Terms
|
1203
1202
|
#
|
1204
|
-
async def _async_create_controlled_glossary_term(self, glossary_guid: str, body: dict,
|
1203
|
+
async def _async_create_controlled_glossary_term(self, glossary_guid: str, body: dict,
|
1204
|
+
server_name: str = None) -> str:
|
1205
1205
|
""" Create a term for a controlled glossary.
|
1206
1206
|
See also: https://egeria-project.org/types/3/0385-Controlled-Glossary-Development/?h=controlled
|
1207
1207
|
The request body also supports the specification of an effective time for the query.
|
@@ -1332,7 +1332,7 @@ class GlossaryManager(GlossaryBrowser):
|
|
1332
1332
|
|
1333
1333
|
return response
|
1334
1334
|
|
1335
|
-
async def _async_create_term_copy(self, glossary_guid: str, glossary_term_guid: str, new_display_name:str,
|
1335
|
+
async def _async_create_term_copy(self, glossary_guid: str, glossary_term_guid: str, new_display_name: str,
|
1336
1336
|
version_id: str, term_status: str = "PROPOSED", server_name: str = None) -> str:
|
1337
1337
|
""" Create a new term from an existing term.
|
1338
1338
|
|
@@ -1382,23 +1382,23 @@ class GlossaryManager(GlossaryBrowser):
|
|
1382
1382
|
)
|
1383
1383
|
|
1384
1384
|
body = {
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1385
|
+
"class": "GlossaryTemplateRequestBody",
|
1386
|
+
"elementProperties":
|
1387
|
+
{
|
1388
|
+
"class": "TemplateProperties",
|
1389
|
+
"qualifiedName": f"Term-{new_display_name}-{time.asctime()}",
|
1390
|
+
"displayName": new_display_name,
|
1391
|
+
"versionIdentifier": version_id
|
1392
|
+
},
|
1393
|
+
"glossaryTermStatus": term_status
|
1394
|
+
}
|
1395
1395
|
|
1396
1396
|
response = await self._async_make_request("POST", url, body)
|
1397
1397
|
|
1398
1398
|
return response.json().get("guid", "Term not created")
|
1399
1399
|
|
1400
|
-
def create_term_copy(self, glossary_guid: str, glossary_term_guid: str, new_display_name:str,
|
1401
|
-
|
1400
|
+
def create_term_copy(self, glossary_guid: str, glossary_term_guid: str, new_display_name: str,
|
1401
|
+
version_id: str, term_status: str = "PROPOSED", server_name: str = None) -> str:
|
1402
1402
|
""" Create a new term from an existing term.
|
1403
1403
|
|
1404
1404
|
Parameters
|
@@ -1437,7 +1437,7 @@ class GlossaryManager(GlossaryBrowser):
|
|
1437
1437
|
loop = asyncio.get_event_loop()
|
1438
1438
|
response = loop.run_until_complete(
|
1439
1439
|
self._async_create_term_copy(glossary_guid, glossary_term_guid, new_display_name,
|
1440
|
-
version_id, term_status,server_name))
|
1440
|
+
version_id, term_status, server_name))
|
1441
1441
|
|
1442
1442
|
return response
|
1443
1443
|
|
@@ -1542,7 +1542,7 @@ class GlossaryManager(GlossaryBrowser):
|
|
1542
1542
|
"""
|
1543
1543
|
loop = asyncio.get_event_loop()
|
1544
1544
|
loop.run_until_complete(
|
1545
|
-
self._async_add_data_field_to_term(
|
1545
|
+
self._async_add_data_field_to_term(glossary_term_guid, body, server_name))
|
1546
1546
|
|
1547
1547
|
return
|
1548
1548
|
|
@@ -1590,19 +1590,19 @@ class GlossaryManager(GlossaryBrowser):
|
|
1590
1590
|
)
|
1591
1591
|
|
1592
1592
|
body = {
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1598
|
-
}
|
1593
|
+
"class": "ClassificationRequestBody",
|
1594
|
+
"properties":
|
1595
|
+
{
|
1596
|
+
"class": "GovernanceClassificationProperties",
|
1597
|
+
"levelIdentifier": confidentiality_level
|
1599
1598
|
}
|
1599
|
+
}
|
1600
1600
|
|
1601
1601
|
await self._async_make_request("POST", url, body)
|
1602
1602
|
return
|
1603
1603
|
|
1604
1604
|
def add_confidentiality_to_term(self, glossary_term_guid: str,
|
1605
|
-
|
1605
|
+
confidentiality_level: int, server_name: str = None) -> str:
|
1606
1606
|
""" Add the confidentiality classification to a glossary term
|
1607
1607
|
|
1608
1608
|
Parameters
|
@@ -1635,12 +1635,13 @@ class GlossaryManager(GlossaryBrowser):
|
|
1635
1635
|
"""
|
1636
1636
|
loop = asyncio.get_event_loop()
|
1637
1637
|
response = loop.run_until_complete(
|
1638
|
-
self._async_add_confidentiality_to_term(
|
1639
|
-
|
1638
|
+
self._async_add_confidentiality_to_term(glossary_term_guid, confidentiality_level,
|
1639
|
+
server_name))
|
1640
1640
|
|
1641
1641
|
return
|
1642
1642
|
|
1643
|
-
async def _async_add_subject_area_to_term(self, glossary_term_guid: str, subject_area: str,
|
1643
|
+
async def _async_add_subject_area_to_term(self, glossary_term_guid: str, subject_area: str,
|
1644
|
+
server_name: str = None) -> None:
|
1644
1645
|
""" Add the confidentiality classification to a glossary term
|
1645
1646
|
|
1646
1647
|
Async Version.
|
@@ -1727,13 +1728,13 @@ class GlossaryManager(GlossaryBrowser):
|
|
1727
1728
|
"""
|
1728
1729
|
loop = asyncio.get_event_loop()
|
1729
1730
|
response = loop.run_until_complete(
|
1730
|
-
self._async_add_subject_area_to_term(
|
1731
|
-
|
1731
|
+
self._async_add_subject_area_to_term(glossary_term_guid, subject_area,
|
1732
|
+
server_name))
|
1732
1733
|
|
1733
1734
|
return
|
1734
1735
|
|
1735
1736
|
async def _async_update_term(self, glossary_term_guid: str, body: dict, is_merge_update: bool,
|
1736
|
-
|
1737
|
+
server_name: str = None) -> None:
|
1737
1738
|
""" Add the data field values classification to a glossary term
|
1738
1739
|
|
1739
1740
|
Async Version.
|
@@ -1783,15 +1784,16 @@ class GlossaryManager(GlossaryBrowser):
|
|
1783
1784
|
validate_guid(glossary_term_guid)
|
1784
1785
|
is_merge_update_s = str(is_merge_update).lower()
|
1785
1786
|
|
1786
|
-
url = (
|
1787
|
-
|
1788
|
-
|
1787
|
+
url = (
|
1788
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/terms/{glossary_term_guid}/"
|
1789
|
+
f"update?isMergeUpdate={is_merge_update_s}"
|
1790
|
+
)
|
1789
1791
|
|
1790
1792
|
await self._async_make_request("POST", url, body)
|
1791
1793
|
return
|
1792
1794
|
|
1793
1795
|
def update_term(self, glossary_term_guid: str, body: dict, is_merge_update: bool,
|
1794
|
-
|
1796
|
+
server_name: str = None) -> None:
|
1795
1797
|
""" Add the data field values classification to a glossary term
|
1796
1798
|
|
1797
1799
|
Async Version.
|
@@ -1837,7 +1839,7 @@ class GlossaryManager(GlossaryBrowser):
|
|
1837
1839
|
"""
|
1838
1840
|
loop = asyncio.get_event_loop()
|
1839
1841
|
loop.run_until_complete(
|
1840
|
-
self._async_update_term(
|
1842
|
+
self._async_update_term(glossary_term_guid, body, is_merge_update, server_name))
|
1841
1843
|
|
1842
1844
|
return
|
1843
1845
|
|
@@ -1879,23 +1881,24 @@ class GlossaryManager(GlossaryBrowser):
|
|
1879
1881
|
server_name = self.server_name
|
1880
1882
|
validate_guid(glossary_term_guid)
|
1881
1883
|
|
1882
|
-
url = (
|
1883
|
-
|
1884
|
-
|
1884
|
+
url = (
|
1885
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/terms/{glossary_term_guid}/"
|
1886
|
+
f"update?isMergeUpdate=true"
|
1887
|
+
)
|
1885
1888
|
|
1886
1889
|
body = {
|
1887
|
-
|
1888
|
-
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1893
|
-
|
1890
|
+
"class": "ReferenceableRequestBody",
|
1891
|
+
"elementProperties":
|
1892
|
+
{
|
1893
|
+
"class": "GlossaryTermProperties",
|
1894
|
+
"publishVersionIdentifier": new_version_identifier
|
1895
|
+
}
|
1896
|
+
}
|
1894
1897
|
await self._async_make_request("POST", url, body)
|
1895
1898
|
return
|
1896
1899
|
|
1897
1900
|
def update_term_version_id(self, glossary_term_guid: str, new_version_identifier: str,
|
1898
|
-
|
1901
|
+
server_name: str = None) -> None:
|
1899
1902
|
""" Update a glossary term's version identifier
|
1900
1903
|
|
1901
1904
|
Async Version.
|
@@ -1929,12 +1932,10 @@ class GlossaryManager(GlossaryBrowser):
|
|
1929
1932
|
"""
|
1930
1933
|
loop = asyncio.get_event_loop()
|
1931
1934
|
loop.run_until_complete(
|
1932
|
-
self._async_update_term_version_id(
|
1935
|
+
self._async_update_term_version_id(glossary_term_guid, new_version_identifier, server_name))
|
1933
1936
|
|
1934
1937
|
return
|
1935
1938
|
|
1936
|
-
|
1937
|
-
|
1938
1939
|
async def _async_get_terms_for_category(self, glossary_category_guid: str, server_name: str = None,
|
1939
1940
|
effective_time: str = None, start_from: int = 0,
|
1940
1941
|
page_size: int = None) -> list | str:
|
@@ -1993,7 +1994,7 @@ class GlossaryManager(GlossaryBrowser):
|
|
1993
1994
|
return response.json().get("elementList", "No terms found")
|
1994
1995
|
|
1995
1996
|
def get_terms_for_category(self, glossary_category_guid: str, server_name: str = None,
|
1996
|
-
effective_time:str = None, start_from: int = 0,
|
1997
|
+
effective_time: str = None, start_from: int = 0,
|
1997
1998
|
page_size: int = None) -> list | str:
|
1998
1999
|
""" Retrieve ALL the glossary terms in a category.
|
1999
2000
|
The request body also supports the specification of an effective time for the query.
|
@@ -2359,7 +2360,7 @@ class GlossaryManager(GlossaryBrowser):
|
|
2359
2360
|
for_duplicate_processing_s = str(for_duplicate_processing).lower()
|
2360
2361
|
|
2361
2362
|
body = {"class": "GlossaryNameRequestBody", "glossaryGUID": glossary_guid, "name": term,
|
2362
|
-
|
2363
|
+
"effectiveTime": effective_time, "limitResultsByStatus": status_filter}
|
2363
2364
|
# body = body_slimmer(body)
|
2364
2365
|
|
2365
2366
|
url = (f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/"
|
@@ -2803,7 +2804,7 @@ class GlossaryManager(GlossaryBrowser):
|
|
2803
2804
|
# validate_search_string(search_string)
|
2804
2805
|
|
2805
2806
|
body = {"class": "GlossarySearchStringRequestBody", "glossaryGUID": glossary_guid,
|
2806
|
-
|
2807
|
+
"searchString": search_string, "effectiveTime": effective_time, "limitResultsByStatus": status_filter}
|
2807
2808
|
# body = body_slimmer(body)
|
2808
2809
|
|
2809
2810
|
url = (f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/"
|
@@ -2927,7 +2928,7 @@ class GlossaryManager(GlossaryBrowser):
|
|
2927
2928
|
for_duplicate_processing_s = str(for_duplicate_processing).lower()
|
2928
2929
|
|
2929
2930
|
body = {"class": "CommentRequestBody", "commentType": comment_type, "commentText": comment_text,
|
2930
|
-
|
2931
|
+
"isPublic": is_public}
|
2931
2932
|
|
2932
2933
|
url = (f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/comments/"
|
2933
2934
|
f"{commentGUID}/replies?isPublic={is_public_s}&forLineage={for_lineage_s}&"
|
@@ -2953,7 +2954,7 @@ class GlossaryManager(GlossaryBrowser):
|
|
2953
2954
|
for_duplicate_processing_s = str(for_duplicate_processing).lower()
|
2954
2955
|
|
2955
2956
|
body = {"class": "CommentRequestBody", "commentType": comment_type, "commentText": comment_text,
|
2956
|
-
|
2957
|
+
"isPublic": is_public}
|
2957
2958
|
|
2958
2959
|
url = (f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/comments/"
|
2959
2960
|
f"{commentGUID}/replies?isPublic={is_public_s}&forLineage={for_lineage_s}&"
|
@@ -2987,7 +2988,7 @@ class GlossaryManager(GlossaryBrowser):
|
|
2987
2988
|
# validate_search_string(search_string)
|
2988
2989
|
|
2989
2990
|
body = {"class": "GlossarySearchStringRequestBody", "glossaryGUID": glossary_guid,
|
2990
|
-
|
2991
|
+
"searchString": search_string, "effectiveTime": effective_time, "limitResultsByStatus": status_filter}
|
2991
2992
|
# body = body_slimmer(body)
|
2992
2993
|
|
2993
2994
|
url = (f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/"
|