pyegeria 1.5.1.0.22__py3-none-any.whl → 1.5.1.0.120__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 +39 -90
- pyegeria/runtime_manager_omvs.py +2 -3
- {pyegeria-1.5.1.0.22.dist-info → pyegeria-1.5.1.0.120.dist-info}/METADATA +1 -1
- {pyegeria-1.5.1.0.22.dist-info → pyegeria-1.5.1.0.120.dist-info}/RECORD +7 -7
- {pyegeria-1.5.1.0.22.dist-info → pyegeria-1.5.1.0.120.dist-info}/entry_points.txt +0 -1
- {pyegeria-1.5.1.0.22.dist-info → pyegeria-1.5.1.0.120.dist-info}/LICENSE +0 -0
- {pyegeria-1.5.1.0.22.dist-info → pyegeria-1.5.1.0.120.dist-info}/WHEEL +0 -0
@@ -1,6 +1,4 @@
|
|
1
1
|
"""This creates a templates guid file from the core metadata archive"""
|
2
|
-
import json
|
3
|
-
|
4
2
|
from rich.markdown import Markdown
|
5
3
|
from rich.prompt import Prompt
|
6
4
|
import os
|
@@ -18,66 +16,30 @@ from pyegeria import (
|
|
18
16
|
PropertyServerException,
|
19
17
|
UserNotAuthorizedException,
|
20
18
|
print_exception_response,
|
21
|
-
RegisteredInfo
|
19
|
+
RegisteredInfo
|
22
20
|
)
|
23
21
|
|
24
22
|
|
25
23
|
console = Console()
|
26
24
|
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
27
|
-
EGERIA_KAFKA_ENDPOINT = os.environ.get(
|
28
|
-
EGERIA_PLATFORM_URL = os.environ.get(
|
29
|
-
EGERIA_VIEW_SERVER = os.environ.get(
|
30
|
-
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
31
|
-
|
32
|
-
)
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
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
|
-
for item in tech_list:
|
53
|
-
if "deployedImplementationType" not in item["qualifiedName"]:
|
54
|
-
continue
|
55
|
-
|
56
|
-
details = a_client.get_technology_type_detail(item["name"])
|
57
|
-
entry = {details["name"]: {}}
|
58
|
-
if type(details) is str:
|
59
|
-
tech_info_list.append(entry)
|
60
|
-
continue
|
61
|
-
templates = details.get("catalogTemplates", "Not Found")
|
62
|
-
if type(templates) is list:
|
63
|
-
t_list = []
|
64
|
-
entry = {details["name"]: {}}
|
65
|
-
for template in templates:
|
66
|
-
t_list.append({"template": template["name"]})
|
67
|
-
entry[details["name"]] = t_list
|
68
|
-
tech_info_list.append(entry)
|
69
|
-
return tech_info_list
|
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,
|
25
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
|
26
|
+
EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
|
27
|
+
EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
|
28
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
|
29
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
|
30
|
+
EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
|
31
|
+
EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
|
32
|
+
EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
|
33
|
+
EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
|
34
|
+
EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
|
35
|
+
EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
def display_templates_spec(search_string:str, server: str,
|
40
|
+
url: str, username: str, password: str, jupyter:bool=EGERIA_JUPYTER, width:int = EGERIA_WIDTH
|
80
41
|
):
|
42
|
+
|
81
43
|
a_client = AutomatedCuration(server, url, username)
|
82
44
|
token = a_client.create_egeria_bearer_token(username, password)
|
83
45
|
tech_list = a_client.find_technology_types(search_string, page_size=0)
|
@@ -100,19 +62,21 @@ def display_templates_spec(
|
|
100
62
|
|
101
63
|
table.add_column("Name", width=20)
|
102
64
|
table.add_column("Template Name", width=20)
|
103
|
-
table.add_column("Template GUID", width=38,
|
65
|
+
table.add_column("Template GUID", width = 38,no_wrap=True)
|
104
66
|
table.add_column("Placeholders")
|
105
67
|
|
68
|
+
|
106
69
|
if type(tech_list) is list:
|
107
70
|
for item in tech_list:
|
108
|
-
if
|
71
|
+
if 'deployedImplementationType' not in item['qualifiedName']:
|
109
72
|
continue
|
110
73
|
placeholder_table = Table(expand=False, show_lines=True)
|
111
|
-
placeholder_table.add_column("Name", width=20,
|
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)
|
74
|
+
placeholder_table.add_column("Name", width = 20,no_wrap=True)
|
75
|
+
placeholder_table.add_column("Type", width = 10)
|
76
|
+
placeholder_table.add_column("Required", width = 10)
|
77
|
+
placeholder_table.add_column("Example", width = 20)
|
78
|
+
placeholder_table.add_column("Description", width = 40)
|
79
|
+
|
116
80
|
|
117
81
|
name = item.get("name", "none")
|
118
82
|
|
@@ -126,11 +90,7 @@ def display_templates_spec(
|
|
126
90
|
for template in templates:
|
127
91
|
template_name = template.get("name", None)
|
128
92
|
|
129
|
-
template_name =
|
130
|
-
f"{name}_Template"
|
131
|
-
if template_name is None
|
132
|
-
else template_name
|
133
|
-
)
|
93
|
+
template_name = f"{name}_Template" if template_name is None else template_name
|
134
94
|
|
135
95
|
specification = template["specification"]["placeholderProperty"]
|
136
96
|
template_guid = template["relatedElement"]["guid"]
|
@@ -141,17 +101,10 @@ def display_templates_spec(
|
|
141
101
|
placeholder_name = placeholder["placeholderPropertyName"]
|
142
102
|
placeholder_required = placeholder["required"]
|
143
103
|
placeholder_example = placeholder.get("example", None)
|
144
|
-
placeholder_table.add_row(
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
placeholder_example,
|
149
|
-
placeholder_description,
|
150
|
-
)
|
151
|
-
|
152
|
-
table.add_row(
|
153
|
-
name, template_name, template_guid, placeholder_table
|
154
|
-
)
|
104
|
+
placeholder_table.add_row(placeholder_name, placeholder_data_type, placeholder_required,
|
105
|
+
placeholder_example, placeholder_description,)
|
106
|
+
|
107
|
+
table.add_row(name, template_name, template_guid, placeholder_table)
|
155
108
|
|
156
109
|
return table
|
157
110
|
else:
|
@@ -164,11 +117,7 @@ def display_templates_spec(
|
|
164
117
|
with console.pager(styles=True):
|
165
118
|
console.print(generate_table())
|
166
119
|
|
167
|
-
except (
|
168
|
-
InvalidParameterException,
|
169
|
-
PropertyServerException,
|
170
|
-
UserNotAuthorizedException,
|
171
|
-
) as e:
|
120
|
+
except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
|
172
121
|
print_exception_response(e)
|
173
122
|
assert e.related_http_code != "200", "Invalid parameters"
|
174
123
|
finally:
|
@@ -191,14 +140,14 @@ def main():
|
|
191
140
|
guid = None
|
192
141
|
|
193
142
|
try:
|
194
|
-
search_string = Prompt.ask(
|
195
|
-
|
196
|
-
|
197
|
-
# display_templates_spec(search_string, server, url, userid, password)
|
198
|
-
list_templates(search_string, server, url, userid, password)
|
199
|
-
except KeyboardInterrupt:
|
143
|
+
search_string = Prompt.ask("Enter the technology you are searching for:", default="*")
|
144
|
+
display_templates_spec(search_string, server, url, userid, password)
|
145
|
+
except(KeyboardInterrupt):
|
200
146
|
pass
|
201
147
|
|
202
148
|
|
203
149
|
if __name__ == "__main__":
|
204
150
|
main()
|
151
|
+
|
152
|
+
|
153
|
+
|
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 = "name"
|
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 = "name"
|
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,7 +1128,6 @@ class RuntimeManager(Client):
|
|
1128
1128
|
UserNotAuthorizedException
|
1129
1129
|
|
1130
1130
|
"""
|
1131
|
-
server_name = f"Metadata Access Server:{server_name}"
|
1132
1131
|
server_guid = self.__get_guid__(server_guid, server_name)
|
1133
1132
|
url = f"{self.runtime_command_root}/metadata-access-stores/{server_guid}/instance/load/open-metadata-archives/file"
|
1134
1133
|
|
@@ -67,7 +67,7 @@ commands/tech/list_registered_services.py,sha256=QzE_ebdopNkHWMxa-xc902GG6ac4Yw-
|
|
67
67
|
commands/tech/list_related_elements.py,sha256=mcOy3RIGpIdshcT1o4Tr7Ck-c1dmAC8yBUOF5GAFYrM,7755
|
68
68
|
commands/tech/list_related_specification.py,sha256=mWrKenXOskL4cl0DHjH2Z8M9-FJzjkzK62W-tsx3WDU,5918
|
69
69
|
commands/tech/list_relationship_types.py,sha256=BlVzrPznZXqMVLN2-2vYEVRGeYsiJrqXxIJEikobyoo,5875
|
70
|
-
commands/tech/list_tech_templates.py,sha256=
|
70
|
+
commands/tech/list_tech_templates.py,sha256=RiyA8a4fIL9BGeGf37Bkk471mK5ECkDJMN9QVNReC1M,6192
|
71
71
|
commands/tech/list_valid_metadata_values.py,sha256=N3D0_BmREPszgde3uvvYdfzq7DJ46uMOv2t1vtncGsw,6333
|
72
72
|
commands/tech/table_tech_templates.py,sha256=xa_mA10P_6Su3zRsvyoZhWoSUQ5LuyLTG1kNCumzxZA,7268
|
73
73
|
commands/tech/x_list_related_elements.py,sha256=qBsf1619cecaMCTzG0MG22fAT32WNH2Z3CXrjo9z-5Y,5853
|
@@ -98,14 +98,14 @@ pyegeria/my_profile_omvs.py,sha256=DyECbUFEcgokrIbzdMMNljC3bqfqKGXAF2wZEpzvRYs,3
|
|
98
98
|
pyegeria/platform_services.py,sha256=CJIOYIFEbcIGwdWlApAQcXxZTsdrhFtpJcm4O3p7dG0,41646
|
99
99
|
pyegeria/project_manager_omvs.py,sha256=Y7Lyqh4jIujJrr_Ub7feo904FN_uz4R10T4hKhqE1Uw,67499
|
100
100
|
pyegeria/registered_info.py,sha256=y0-LgDIQXpph0lEWxIOG3_HsqX_Z2iAIb3xu4Aa4B70,6344
|
101
|
-
pyegeria/runtime_manager_omvs.py,sha256=
|
101
|
+
pyegeria/runtime_manager_omvs.py,sha256=qkMjb4Dp88-tqG47ldGR8oKGuNSIMrYiN43BCqAO4lE,74356
|
102
102
|
pyegeria/server_operations.py,sha256=ciH890hYT85YQ6OpByn4w7s3a7TtvWZpIG5rkRqbcI0,16766
|
103
103
|
pyegeria/template_manager_omvs.py,sha256=heqbKeum5hPCHap4r1RUZU8YB3QaQlxVNbq4GZimJtE,42450
|
104
104
|
pyegeria/utils.py,sha256=1h6bwveadd6GpbnGLTmqPBmBk68QvxdjGTI9RfbrgKY,5415
|
105
105
|
pyegeria/valid_metadata_omvs.py,sha256=tfCGXed5LLt59YA8uZNNtd9UJ-lRZfPU_uZxK31Yux0,65069
|
106
106
|
pyegeria/x_action_author_omvs.py,sha256=xu1IQ0YbhIKi17C5a7Aq9u1Az2czwahNPpX9czmyVxE,6454
|
107
|
-
pyegeria-1.5.1.0.
|
108
|
-
pyegeria-1.5.1.0.
|
109
|
-
pyegeria-1.5.1.0.
|
110
|
-
pyegeria-1.5.1.0.
|
111
|
-
pyegeria-1.5.1.0.
|
107
|
+
pyegeria-1.5.1.0.120.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
108
|
+
pyegeria-1.5.1.0.120.dist-info/METADATA,sha256=mqbcaIc4PuDKIJRHFae0AClAzm7ErFmrFkWa9S2vjuk,2999
|
109
|
+
pyegeria-1.5.1.0.120.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
110
|
+
pyegeria-1.5.1.0.120.dist-info/entry_points.txt,sha256=Pc5kHnxv-vbRpwVMxSSWl66vmf7EZjgzf7nZzz1ow3M,4002
|
111
|
+
pyegeria-1.5.1.0.120.dist-info/RECORD,,
|
@@ -25,7 +25,6 @@ list_assets=commands.cat.list_assets:main
|
|
25
25
|
list_catalog_targets=commands.ops.list_catalog_targets:main
|
26
26
|
list_cert_types=commands.cat.list_cert_types:main
|
27
27
|
list_deployed_catalogs=commands.cat.list_deployed_catalogs:main
|
28
|
-
list_deployed_databases=commands.cat.list_deployed_databases:main
|
29
28
|
list_deployed_schemas=commands.cat.list_deployed_database_schemas:main
|
30
29
|
list_element_graph=commands.tech.get_element_graph:main
|
31
30
|
list_elements=commands.tech.list_elements:main
|
File without changes
|
File without changes
|