pyegeria 1.5.1.0.18__py3-none-any.whl → 1.5.1.0.21__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.
- commands/tech/list_tech_templates.py +89 -38
- pyegeria/automated_curation_omvs.py +41 -198
- pyegeria/runtime_manager_omvs.py +3 -2
- pyegeria/template_manager_omvs.py +1416 -0
- {pyegeria-1.5.1.0.18.dist-info → pyegeria-1.5.1.0.21.dist-info}/METADATA +1 -1
- {pyegeria-1.5.1.0.18.dist-info → pyegeria-1.5.1.0.21.dist-info}/RECORD +9 -8
- {pyegeria-1.5.1.0.18.dist-info → pyegeria-1.5.1.0.21.dist-info}/entry_points.txt +1 -0
- {pyegeria-1.5.1.0.18.dist-info → pyegeria-1.5.1.0.21.dist-info}/LICENSE +0 -0
- {pyegeria-1.5.1.0.18.dist-info → pyegeria-1.5.1.0.21.dist-info}/WHEEL +0 -0
@@ -1,4 +1,6 @@
|
|
1
1
|
"""This creates a templates guid file from the core metadata archive"""
|
2
|
+
import json
|
3
|
+
|
2
4
|
from rich.markdown import Markdown
|
3
5
|
from rich.prompt import Prompt
|
4
6
|
import os
|
@@ -16,30 +18,66 @@ from pyegeria import (
|
|
16
18
|
PropertyServerException,
|
17
19
|
UserNotAuthorizedException,
|
18
20
|
print_exception_response,
|
19
|
-
RegisteredInfo
|
21
|
+
RegisteredInfo,
|
20
22
|
)
|
21
23
|
|
22
24
|
|
23
25
|
console = Console()
|
24
26
|
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
25
|
-
EGERIA_KAFKA_ENDPOINT = os.environ.get(
|
26
|
-
EGERIA_PLATFORM_URL = os.environ.get(
|
27
|
-
EGERIA_VIEW_SERVER = os.environ.get(
|
28
|
-
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
27
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
28
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
29
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
30
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
31
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
32
|
+
)
|
33
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
34
|
+
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
35
|
+
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
36
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
37
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
38
|
+
EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
39
|
+
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
40
|
+
|
41
|
+
|
42
|
+
def list_templates(
|
43
|
+
search_string: str, server: str, url: str, username: str, password: str
|
44
|
+
) -> []:
|
45
|
+
"""Return a list of templates for one or more technology type"""
|
46
|
+
a_client = AutomatedCuration(server, url, username)
|
47
|
+
token = a_client.create_egeria_bearer_token(username, password)
|
48
|
+
tech_list = a_client.find_technology_types(search_string, page_size=0)
|
49
|
+
tech_info_list: dict = []
|
50
|
+
|
51
|
+
if type(tech_list) is list:
|
52
|
+
entry = {}
|
53
|
+
for item in tech_list:
|
54
|
+
if "deployedImplementationType" not in item["qualifiedName"]:
|
55
|
+
continue
|
56
|
+
|
57
|
+
details = a_client.get_technology_type_detail(item["name"])
|
58
|
+
entry = {details["name"]: {}}
|
59
|
+
if type(details) is str:
|
60
|
+
tech_info_list.append(entry)
|
61
|
+
continue
|
62
|
+
templates = details.get("catalogTemplates", "Not Found")
|
63
|
+
if type(templates) is list:
|
64
|
+
t_list = []
|
65
|
+
entry = {details["name"]: {}}
|
66
|
+
for template in templates:
|
67
|
+
t_list.append({"template": template["name"]})
|
68
|
+
entry[details["name"]] = t_list
|
69
|
+
print(json.dumps(entry, indent=2))
|
70
|
+
|
71
|
+
|
72
|
+
def display_templates_spec(
|
73
|
+
search_string: str,
|
74
|
+
server: str,
|
75
|
+
url: str,
|
76
|
+
username: str,
|
77
|
+
password: str,
|
78
|
+
jupyter: bool = EGERIA_JUPYTER,
|
79
|
+
width: int = EGERIA_WIDTH,
|
41
80
|
):
|
42
|
-
|
43
81
|
a_client = AutomatedCuration(server, url, username)
|
44
82
|
token = a_client.create_egeria_bearer_token(username, password)
|
45
83
|
tech_list = a_client.find_technology_types(search_string, page_size=0)
|
@@ -62,21 +100,19 @@ def display_templates_spec(search_string:str, server: str,
|
|
62
100
|
|
63
101
|
table.add_column("Name", width=20)
|
64
102
|
table.add_column("Template Name", width=20)
|
65
|
-
table.add_column("Template GUID", width
|
103
|
+
table.add_column("Template GUID", width=38, no_wrap=True)
|
66
104
|
table.add_column("Placeholders")
|
67
105
|
|
68
|
-
|
69
106
|
if type(tech_list) is list:
|
70
107
|
for item in tech_list:
|
71
|
-
if
|
108
|
+
if "deployedImplementationType" not in item["qualifiedName"]:
|
72
109
|
continue
|
73
110
|
placeholder_table = Table(expand=False, show_lines=True)
|
74
|
-
placeholder_table.add_column("Name", width
|
75
|
-
placeholder_table.add_column("Type", width
|
76
|
-
placeholder_table.add_column("Required", width
|
77
|
-
placeholder_table.add_column("Example", width
|
78
|
-
placeholder_table.add_column("Description", width
|
79
|
-
|
111
|
+
placeholder_table.add_column("Name", width=20, no_wrap=True)
|
112
|
+
placeholder_table.add_column("Type", width=10)
|
113
|
+
placeholder_table.add_column("Required", width=10)
|
114
|
+
placeholder_table.add_column("Example", width=20)
|
115
|
+
placeholder_table.add_column("Description", width=40)
|
80
116
|
|
81
117
|
name = item.get("name", "none")
|
82
118
|
|
@@ -90,7 +126,11 @@ def display_templates_spec(search_string:str, server: str,
|
|
90
126
|
for template in templates:
|
91
127
|
template_name = template.get("name", None)
|
92
128
|
|
93
|
-
template_name =
|
129
|
+
template_name = (
|
130
|
+
f"{name}_Template"
|
131
|
+
if template_name is None
|
132
|
+
else template_name
|
133
|
+
)
|
94
134
|
|
95
135
|
specification = template["specification"]["placeholderProperty"]
|
96
136
|
template_guid = template["relatedElement"]["guid"]
|
@@ -101,10 +141,17 @@ def display_templates_spec(search_string:str, server: str,
|
|
101
141
|
placeholder_name = placeholder["placeholderPropertyName"]
|
102
142
|
placeholder_required = placeholder["required"]
|
103
143
|
placeholder_example = placeholder.get("example", None)
|
104
|
-
placeholder_table.add_row(
|
105
|
-
|
106
|
-
|
107
|
-
|
144
|
+
placeholder_table.add_row(
|
145
|
+
placeholder_name,
|
146
|
+
placeholder_data_type,
|
147
|
+
placeholder_required,
|
148
|
+
placeholder_example,
|
149
|
+
placeholder_description,
|
150
|
+
)
|
151
|
+
|
152
|
+
table.add_row(
|
153
|
+
name, template_name, template_guid, placeholder_table
|
154
|
+
)
|
108
155
|
|
109
156
|
return table
|
110
157
|
else:
|
@@ -117,7 +164,11 @@ def display_templates_spec(search_string:str, server: str,
|
|
117
164
|
with console.pager(styles=True):
|
118
165
|
console.print(generate_table())
|
119
166
|
|
120
|
-
except (
|
167
|
+
except (
|
168
|
+
InvalidParameterException,
|
169
|
+
PropertyServerException,
|
170
|
+
UserNotAuthorizedException,
|
171
|
+
) as e:
|
121
172
|
print_exception_response(e)
|
122
173
|
assert e.related_http_code != "200", "Invalid parameters"
|
123
174
|
finally:
|
@@ -140,14 +191,14 @@ def main():
|
|
140
191
|
guid = None
|
141
192
|
|
142
193
|
try:
|
143
|
-
search_string = Prompt.ask(
|
194
|
+
search_string = Prompt.ask(
|
195
|
+
"Enter the technology you are searching for:", default="*"
|
196
|
+
)
|
144
197
|
display_templates_spec(search_string, server, url, userid, password)
|
145
|
-
|
198
|
+
# list_templates(search_string, server, url, userid, password)
|
199
|
+
except KeyboardInterrupt:
|
146
200
|
pass
|
147
201
|
|
148
202
|
|
149
203
|
if __name__ == "__main__":
|
150
204
|
main()
|
151
|
-
|
152
|
-
|
153
|
-
|
@@ -2430,21 +2430,33 @@ class AutomatedCuration(Client):
|
|
2430
2430
|
# Initiate surveys
|
2431
2431
|
#
|
2432
2432
|
|
2433
|
-
async def
|
2434
|
-
|
2435
|
-
|
2436
|
-
|
2433
|
+
async def _async_initiate_survey(self, survey_name: str, resource_guid: str) -> str:
|
2434
|
+
"""Initiate a survey of the survey_name on the target resource. Async Version.
|
2435
|
+
|
2436
|
+
Parameters
|
2437
|
+
----------
|
2438
|
+
survey_name: str
|
2439
|
+
The name of the survey to initiate.
|
2440
|
+
resource_guid : str
|
2441
|
+
The GUID of the resource to be surveyed.
|
2442
|
+
|
2443
|
+
Returns
|
2444
|
+
-------
|
2445
|
+
str
|
2446
|
+
The GUID of the initiated action or "Action not initiated" if the action was not initiated.
|
2447
|
+
|
2448
|
+
"""
|
2437
2449
|
|
2438
2450
|
url = f"{self.curation_command_root}/governance-action-types/initiate"
|
2439
2451
|
|
2440
2452
|
body = {
|
2441
2453
|
"class": "InitiateGovernanceActionTypeRequestBody",
|
2442
|
-
"governanceActionTypeQualifiedName":
|
2454
|
+
"governanceActionTypeQualifiedName": survey_name,
|
2443
2455
|
"actionTargets": [
|
2444
2456
|
{
|
2445
2457
|
"class": "NewActionTarget",
|
2446
|
-
"actionTargetName": "
|
2447
|
-
"actionTargetGUID":
|
2458
|
+
"actionTargetName": "serverToSurvey",
|
2459
|
+
"actionTargetGUID": resource_guid,
|
2448
2460
|
}
|
2449
2461
|
],
|
2450
2462
|
}
|
@@ -2455,92 +2467,22 @@ class AutomatedCuration(Client):
|
|
2455
2467
|
"""Initiate a postgres database survey"""
|
2456
2468
|
loop = asyncio.get_event_loop()
|
2457
2469
|
response = loop.run_until_complete(
|
2458
|
-
self.
|
2470
|
+
self._async_initiate_survey(
|
2471
|
+
"PostgreSQLSurveys:survey-postgres-database", postgres_database_guid
|
2472
|
+
)
|
2459
2473
|
)
|
2460
2474
|
return response
|
2461
2475
|
|
2462
|
-
async def _async_initiate_postgres_server_survey(
|
2463
|
-
self, postgres_server_guid: str
|
2464
|
-
) -> str:
|
2465
|
-
"""Initiate a postgres server survey - Async version"""
|
2466
|
-
|
2467
|
-
url = f"{self.curation_command_root}/governance-action-types/initiate"
|
2468
|
-
|
2469
|
-
body = {
|
2470
|
-
"class": "InitiateGovernanceActionTypeRequestBody",
|
2471
|
-
"governanceActionTypeQualifiedName": "PostgreSQLSurveys:survey-postgres-server",
|
2472
|
-
"actionTargets": [
|
2473
|
-
{
|
2474
|
-
"class": "NewActionTarget",
|
2475
|
-
"actionTargetName": "serverToSurvey",
|
2476
|
-
"actionTargetGUID": postgres_server_guid,
|
2477
|
-
}
|
2478
|
-
],
|
2479
|
-
}
|
2480
|
-
response = await self._async_make_request("POST", url, body)
|
2481
|
-
return response.json().get("guid", "Action not initiated")
|
2482
|
-
|
2483
2476
|
def initiate_postgres_server_survey(self, postgres_server_guid: str) -> str:
|
2484
2477
|
"""Initiate a postgres server survey"""
|
2485
2478
|
loop = asyncio.get_event_loop()
|
2486
2479
|
response = loop.run_until_complete(
|
2487
|
-
self.
|
2480
|
+
self._async_initiate_survey(
|
2481
|
+
"PostgreSQLSurveys:survey-postgres-server", postgres_server_guid
|
2482
|
+
)
|
2488
2483
|
)
|
2489
2484
|
return response
|
2490
2485
|
|
2491
|
-
async def _async_initiate_file_folder_survey(
|
2492
|
-
self,
|
2493
|
-
file_folder_guid: str,
|
2494
|
-
survey_name: str = "FileSurveys:survey-folder",
|
2495
|
-
) -> str:
|
2496
|
-
"""Initiate a file folder survey - async version
|
2497
|
-
|
2498
|
-
Parameters:
|
2499
|
-
----------
|
2500
|
-
file_folder_guid: str
|
2501
|
-
The GUID of the File Folder that we wish to survey.
|
2502
|
-
survey_name: str, optional
|
2503
|
-
The unique name of the survey routine to execute. Default surveys all folders.
|
2504
|
-
|
2505
|
-
Returns:
|
2506
|
-
-------
|
2507
|
-
str:
|
2508
|
-
The guid of the survey being run.
|
2509
|
-
|
2510
|
-
Raises:
|
2511
|
-
------
|
2512
|
-
InvalidParameterException: If the API response indicates an error (non-200 status code),
|
2513
|
-
this exception is raised with details from the response content.
|
2514
|
-
PropertyServerException: If the API response indicates a server side error.
|
2515
|
-
UserNotAuthorizedException:
|
2516
|
-
|
2517
|
-
Notes:
|
2518
|
-
There are multiple kinds of file folder surveys available, each with their own purpose. They are described
|
2519
|
-
in the Core Content Brain.
|
2520
|
-
|
2521
|
-
File Folder Survey Names currently include::
|
2522
|
-
- AssetSurvey:survey-folders
|
2523
|
-
- AssetSurvey:survey-folder-and-files
|
2524
|
-
- AssetSurvey:survey-all-folders
|
2525
|
-
- AssetSurvey:survey-all-folders-and-files
|
2526
|
-
"""
|
2527
|
-
|
2528
|
-
url = f"{self.curation_command_root}/governance-action-types/initiate"
|
2529
|
-
|
2530
|
-
body = {
|
2531
|
-
"class": "InitiateGovernanceActionTypeRequestBody",
|
2532
|
-
"governanceActionTypeQualifiedName": survey_name,
|
2533
|
-
"actionTargets": [
|
2534
|
-
{
|
2535
|
-
"class": "NewActionTarget",
|
2536
|
-
"actionTargetName": "folderToSurvey",
|
2537
|
-
"actionTargetGUID": file_folder_guid,
|
2538
|
-
}
|
2539
|
-
],
|
2540
|
-
}
|
2541
|
-
response = await self._async_make_request("POST", url, body)
|
2542
|
-
return response.json().get("guid", "Action not initiated")
|
2543
|
-
|
2544
2486
|
def initiate_file_folder_survey(
|
2545
2487
|
self,
|
2546
2488
|
file_folder_guid: str,
|
@@ -2581,65 +2523,21 @@ class AutomatedCuration(Client):
|
|
2581
2523
|
"""
|
2582
2524
|
loop = asyncio.get_event_loop()
|
2583
2525
|
response = loop.run_until_complete(
|
2584
|
-
self.
|
2526
|
+
self._async_initiate_survey(
|
2527
|
+
survey_name,
|
2528
|
+
file_folder_guid,
|
2529
|
+
)
|
2585
2530
|
)
|
2586
2531
|
return response
|
2587
2532
|
|
2588
|
-
async def _async_initiate_file_survey(self, file_guid: str) -> str:
|
2589
|
-
"""Initiate a file survey - async version"""
|
2590
|
-
|
2591
|
-
url = f"{self.curation_command_root}/governance-action-types/initiate"
|
2592
|
-
|
2593
|
-
body = {
|
2594
|
-
"class": "InitiateGovernanceActionTypeRequestBody",
|
2595
|
-
"governanceActionTypeQualifiedName": "FileSurveys:survey-data-file",
|
2596
|
-
"actionTargets": [
|
2597
|
-
{
|
2598
|
-
"class": "NewActionTarget",
|
2599
|
-
"actionTargetName": "fileToSurvey",
|
2600
|
-
"actionTargetGUID": file_guid,
|
2601
|
-
}
|
2602
|
-
],
|
2603
|
-
}
|
2604
|
-
response = await self._async_make_request("POST", url, body)
|
2605
|
-
return response.json().get("guid", "Action not initiated")
|
2606
|
-
|
2607
2533
|
def initiate_file_survey(self, file_guid: str) -> str:
|
2608
2534
|
"""Initiate a file survey"""
|
2609
2535
|
loop = asyncio.get_event_loop()
|
2610
|
-
response = loop.run_until_complete(
|
2536
|
+
response = loop.run_until_complete(
|
2537
|
+
self._async_initiate_survey("FileSurveys:survey-data-file", file_guid)
|
2538
|
+
)
|
2611
2539
|
return response
|
2612
2540
|
|
2613
|
-
async def _async_initiate_kafka_server_survey(self, kafka_server_guid: str) -> str:
|
2614
|
-
"""Initiate survey of a kafka server. Async Version.
|
2615
|
-
Parameters
|
2616
|
-
----------
|
2617
|
-
kafka_server_guid : str
|
2618
|
-
The GUID of the Kafka server to be surveyed.
|
2619
|
-
|
2620
|
-
Returns
|
2621
|
-
-------
|
2622
|
-
str
|
2623
|
-
The GUID of the initiated action or "Action not initiated" if the action was not initiated.
|
2624
|
-
|
2625
|
-
"""
|
2626
|
-
|
2627
|
-
url = f"{self.curation_command_root}/governance-action-types/initiate"
|
2628
|
-
|
2629
|
-
body = {
|
2630
|
-
"class": "InitiateGovernanceActionTypeRequestBody",
|
2631
|
-
"governanceActionTypeQualifiedName": "ApacheKafkaSurveys:survey-kafka-server",
|
2632
|
-
"actionTargets": [
|
2633
|
-
{
|
2634
|
-
"class": "NewActionTarget",
|
2635
|
-
"actionTargetName": "serverToSurvey",
|
2636
|
-
"actionTargetGUID": kafka_server_guid,
|
2637
|
-
}
|
2638
|
-
],
|
2639
|
-
}
|
2640
|
-
response = await self._async_make_request("POST", url, body)
|
2641
|
-
return response.json().get("guid", "Action not initiated")
|
2642
|
-
|
2643
2541
|
def initiate_kafka_server_survey(self, kafka_server_guid: str) -> str:
|
2644
2542
|
"""Initiate survey of a kafka server.
|
2645
2543
|
Parameters
|
@@ -2656,41 +2554,12 @@ class AutomatedCuration(Client):
|
|
2656
2554
|
"""
|
2657
2555
|
loop = asyncio.get_event_loop()
|
2658
2556
|
response = loop.run_until_complete(
|
2659
|
-
self.
|
2557
|
+
self._async_initiate_survey(
|
2558
|
+
"ApacheKafkaSurveys:survey-kafka-server", kafka_server_guid
|
2559
|
+
)
|
2660
2560
|
)
|
2661
2561
|
return response
|
2662
2562
|
|
2663
|
-
async def _async_initiate_uc_server_survey(self, uc_server_guid: str) -> str:
|
2664
|
-
"""Initiate survey of a Unity Catalog server. Async Version.
|
2665
|
-
Parameters
|
2666
|
-
----------
|
2667
|
-
uc_server_guid : str
|
2668
|
-
The GUID of the Kafka server to be surveyed.
|
2669
|
-
|
2670
|
-
|
2671
|
-
Returns
|
2672
|
-
-------
|
2673
|
-
str
|
2674
|
-
The GUID of the initiated action or "Action not initiated" if the action was not initiated.
|
2675
|
-
|
2676
|
-
"""
|
2677
|
-
|
2678
|
-
url = f"{self.curation_command_root}/governance-action-types/initiate"
|
2679
|
-
|
2680
|
-
body = {
|
2681
|
-
"class": "InitiateGovernanceActionTypeRequestBody",
|
2682
|
-
"governanceActionTypeQualifiedName": "UnityCatalogSurveys:survey-unity-catalog-server",
|
2683
|
-
"actionTargets": [
|
2684
|
-
{
|
2685
|
-
"class": "NewActionTarget",
|
2686
|
-
"actionTargetName": "serverToSurvey",
|
2687
|
-
"actionTargetGUID": uc_server_guid,
|
2688
|
-
}
|
2689
|
-
],
|
2690
|
-
}
|
2691
|
-
response = await self._async_make_request("POST", url, body)
|
2692
|
-
return response.json().get("guid", "Action not initiated")
|
2693
|
-
|
2694
2563
|
def initiate_uc_server_survey(self, uc_server_guid: str) -> str:
|
2695
2564
|
"""Initiate survey of a Unity Catalog server. Async Version.
|
2696
2565
|
Parameters
|
@@ -2707,40 +2576,12 @@ class AutomatedCuration(Client):
|
|
2707
2576
|
"""
|
2708
2577
|
loop = asyncio.get_event_loop()
|
2709
2578
|
response = loop.run_until_complete(
|
2710
|
-
self.
|
2579
|
+
self._async_initiate_survey(
|
2580
|
+
"UnityCatalogSurveys:survey-unity-catalog-server", uc_server_guid
|
2581
|
+
)
|
2711
2582
|
)
|
2712
2583
|
return response
|
2713
2584
|
|
2714
|
-
async def _async_initiate_uc_schema_survey(self, uc_schema_guid: str) -> str:
|
2715
|
-
"""Initiate survey of a Unity Catalog schema. Async Version.
|
2716
|
-
Parameters
|
2717
|
-
----------
|
2718
|
-
uc_schema_guid : str
|
2719
|
-
The GUID of the Kafka server to be surveyed.
|
2720
|
-
|
2721
|
-
Returns
|
2722
|
-
-------
|
2723
|
-
str
|
2724
|
-
The GUID of the initiated action or "Action not initiated" if the action was not initiated.
|
2725
|
-
|
2726
|
-
"""
|
2727
|
-
|
2728
|
-
url = f"{self.curation_command_root}/governance-action-types/initiate"
|
2729
|
-
|
2730
|
-
body = {
|
2731
|
-
"class": "InitiateGovernanceActionTypeRequestBody",
|
2732
|
-
"governanceActionTypeQualifiedName": "UnityCatalogSurveys:survey-unity-catalog-schema",
|
2733
|
-
"actionTargets": [
|
2734
|
-
{
|
2735
|
-
"class": "NewActionTarget",
|
2736
|
-
"actionTargetName": "serverToSurvey",
|
2737
|
-
"actionTargetGUID": uc_schema_guid,
|
2738
|
-
}
|
2739
|
-
],
|
2740
|
-
}
|
2741
|
-
response = await self._async_make_request("POST", url, body)
|
2742
|
-
return response.json().get("guid", "Action not initiated")
|
2743
|
-
|
2744
2585
|
def initiate_uc_schema_survey(self, uc_schema_guid: str) -> str:
|
2745
2586
|
"""Initiate survey of a Unity Catalog schema. Async Version.
|
2746
2587
|
Parameters
|
@@ -2758,7 +2599,9 @@ class AutomatedCuration(Client):
|
|
2758
2599
|
"""
|
2759
2600
|
loop = asyncio.get_event_loop()
|
2760
2601
|
response = loop.run_until_complete(
|
2761
|
-
self.
|
2602
|
+
self._async_initiate_survey(
|
2603
|
+
"UnityCatalogSurveys:survey-unity-catalog-schema", uc_schema_guid
|
2604
|
+
)
|
2762
2605
|
)
|
2763
2606
|
return response
|
2764
2607
|
|
pyegeria/runtime_manager_omvs.py
CHANGED
@@ -59,7 +59,7 @@ class RuntimeManager(Client):
|
|
59
59
|
)
|
60
60
|
|
61
61
|
async def __async__get_guid__(
|
62
|
-
self, guid: str = None, name: str = None, property_name: str = "
|
62
|
+
self, guid: str = None, name: str = None, property_name: str = "qualifiedName"
|
63
63
|
) -> str:
|
64
64
|
"""Helper function to return a server_guid - one of server_guid or server_name should
|
65
65
|
contain information. If both are None, an exception will be thrown. If both contain
|
@@ -92,7 +92,7 @@ class RuntimeManager(Client):
|
|
92
92
|
)
|
93
93
|
|
94
94
|
def __get_guid__(
|
95
|
-
self, guid: str = None, name: str = None, property_name: str = "
|
95
|
+
self, guid: str = None, name: str = None, property_name: str = "qualifiedName"
|
96
96
|
) -> str:
|
97
97
|
"""Helper function to return a server_guid - one of server_guid or server_name should
|
98
98
|
contain information. If both are None, an exception will be thrown. If both contain
|
@@ -1128,6 +1128,7 @@ class RuntimeManager(Client):
|
|
1128
1128
|
UserNotAuthorizedException
|
1129
1129
|
|
1130
1130
|
"""
|
1131
|
+
server_name = f"Metadata Access Server:{server_name}"
|
1131
1132
|
server_guid = self.__get_guid__(server_guid, server_name)
|
1132
1133
|
url = f"{self.runtime_command_root}/metadata-access-stores/{server_guid}/instance/load/open-metadata-archives/file"
|
1133
1134
|
|