pyegeria 1.5.1.0.16__py3-none-any.whl → 1.5.1.0.19__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 1.5.1.0.16
3
+ Version: 1.5.1.0.19
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -11,7 +11,7 @@ commands/cat/list_archives.py,sha256=FEZ2XYnQIWo2PztWqnj6unn0pbblPU0-bMbTyI3csv4
11
11
  commands/cat/list_assets.py,sha256=bNwSaBDz661hfnc2Rn4j4HPHAugKvz0XwN9L1m4FVQk,6529
12
12
  commands/cat/list_cert_types.py,sha256=mbCls_EqC5JKG5rvS4o69k7KgZ6aNXlcqoJ3DtHsTFA,7127
13
13
  commands/cat/list_deployed_catalogs.py,sha256=eG8K-d7BijD34el_yVx9yfnLJdfwTUiJVxd-gcGwo7k,7157
14
- commands/cat/list_deployed_database_schemas.py,sha256=cYT1tDObfcwo-fTYGiaGVqYnd9liPGvIvhmkPcmb4Q0,9463
14
+ commands/cat/list_deployed_database_schemas.py,sha256=HNAR8qXU7FWUxPJw6yBxmlsJ_eVXqsD_DrswKmY1iv0,8824
15
15
  commands/cat/list_deployed_databases.py,sha256=HE8nG-mIlxa9iSUEH-n71o-G2a4ss1Zzalq7YJQIix0,6668
16
16
  commands/cat/list_glossary.py,sha256=tUtQQoTGTlDLU-yFbfO3zjiJC9QyEJfg8NxnGCo2mnI,5811
17
17
  commands/cat/list_projects.py,sha256=Jzs-DtIpPhCH-gY4PYT6mnRBWnEf4m18TFfcw8UymNU,8011
@@ -19,9 +19,8 @@ commands/cat/list_relationships.py,sha256=U9f78cOi4HyaacqNaFSMq_7rRxVcEczvwPv468
19
19
  commands/cat/list_tech_types.py,sha256=20T4v6L5qeebSsaL1nGkFMDAIsy2W3A3SMm1RcgFoh0,4609
20
20
  commands/cat/list_todos.py,sha256=iPxHRyW3X5tiREio4TUOwRPvNPjU0gxm3pVnUI79ir4,6542
21
21
  commands/cat/list_user_ids.py,sha256=7JinL7rknPbGusIb8ikXKEaV1vvbuvx_WWtbmlfS_DY,5093
22
- commands/cat/old_list_deployed_database_schemas.py,sha256=56n81Ks7g_g90begVVeqObQJxvnDjMRc1_ORJfkXbd4,7913
23
22
  commands/cli/__init__.py,sha256=hpTVSMP2gnPRhcAZPdeUEsQ-eaDySlXlk239dNWYmng,292
24
- commands/cli/egeria.py,sha256=HwEYm8TkRQ7b0kFG88Tl-_UI0Fm4U5Jq_s63xOBOHEc,31269
23
+ commands/cli/egeria.py,sha256=5ktUIbf5PIuHUQbcx_-HpI3Xolx38euvLT25AQhBWvE,31265
25
24
  commands/cli/egeria_cat.py,sha256=NwPCRTIjwQtna5vvjInT6L0krwp2c6k-Fm-oxN6qrnw,14800
26
25
  commands/cli/egeria_my.py,sha256=9zIpUDLeA_R-0rgCSQfEZTtVmkxPcEAsYcCTn1wQFrE,6181
27
26
  commands/cli/egeria_ops.py,sha256=fxDXYWXRhexx06PdSLCp2FhgUtS13NdDpyg7ea775fc,11531
@@ -44,7 +43,7 @@ commands/ops/monitor_asset_events.py,sha256=cjdlVqE0XYnoRW3aorNbsVkjByDXefPBnlla
44
43
  commands/ops/monitor_engine_activity.py,sha256=m18OSnRoo5ut0WKKOWNoFGXJW_npjp6hzHK3RUQG8T0,8479
45
44
  commands/ops/monitor_engine_activity_c.py,sha256=rSEUD3elhsiYdUhQRn613OM_R4VecFb0uq39MhYhltQ,9371
46
45
  commands/ops/monitor_gov_eng_status.py,sha256=HOcPLqOqceVjxbYqAtYK0fjlJBJxsR9SxbfKzwwUz8c,7237
47
- commands/ops/monitor_integ_daemon_status.py,sha256=BtQojoyJcEkZ69Kp8_inWedsoUKuv7x6iUjgEs8sWws,9225
46
+ commands/ops/monitor_integ_daemon_status.py,sha256=JCKQdyK4u60nXyuZlXY1GL1X1EJOvgHPZ3xp_uQUObQ,9309
48
47
  commands/ops/monitor_platform_status.py,sha256=xmngiuQK9X6X4-stGSITzfMSAdqpswVk-DY7kh8M0P0,6401
49
48
  commands/ops/monitor_server_startup.py,sha256=0pwnhv761uuFHGJXVANa5RhQQPPTXFldJ45TfeT7qfk,3901
50
49
  commands/ops/monitor_server_status.py,sha256=eeZY4o_HwrH-csrhHPi95LLGu00j6AYl48A7fDYTG34,6061
@@ -52,6 +51,7 @@ commands/ops/orig_monitor_server_list.py,sha256=Uhtn8lv7QVXJBi9DSR3Nelmz8TB0vOsa
52
51
  commands/ops/orig_monitor_server_status.py,sha256=A-8hMDfbscdcq-b1OD4wKn0tphumX8WIK-Hz8uPoFkc,3974
53
52
  commands/ops/refresh_integration_daemon.py,sha256=aEaN3RAqlu2Fu9TgbJqnsfyXZ__WBml2EgRKaC48Pig,2961
54
53
  commands/ops/restart_integration_daemon.py,sha256=dqsQ6nOBw-EJgf7NvwTcR__h317dq_cxUWYRTGxvWaM,2901
54
+ commands/ops/table_integ_daemon_status.py,sha256=6K_r8OeU42z2EqRwupHKk2S_YirvVrYQwSWGaLc3UjU,10238
55
55
  commands/tech/README.md,sha256=nxDnfr3BCiGgW5G1VxWxiwUWJXIe5wreNuUeRyIt_hY,1343
56
56
  commands/tech/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
57
57
  commands/tech/get_element_graph.py,sha256=YhpvHPNuSd-Ft-dBRLswGfqGYv2AlByyV0IyjhV4SSk,7367
@@ -69,6 +69,7 @@ commands/tech/list_related_specification.py,sha256=mWrKenXOskL4cl0DHjH2Z8M9-FJzj
69
69
  commands/tech/list_relationship_types.py,sha256=BlVzrPznZXqMVLN2-2vYEVRGeYsiJrqXxIJEikobyoo,5875
70
70
  commands/tech/list_tech_templates.py,sha256=RiyA8a4fIL9BGeGf37Bkk471mK5ECkDJMN9QVNReC1M,6192
71
71
  commands/tech/list_valid_metadata_values.py,sha256=N3D0_BmREPszgde3uvvYdfzq7DJ46uMOv2t1vtncGsw,6333
72
+ commands/tech/table_tech_templates.py,sha256=xa_mA10P_6Su3zRsvyoZhWoSUQ5LuyLTG1kNCumzxZA,7268
72
73
  commands/tech/x_list_related_elements.py,sha256=qBsf1619cecaMCTzG0MG22fAT32WNH2Z3CXrjo9z-5Y,5853
73
74
  pyegeria/README.md,sha256=PwX5OC7-YSZUCIsoyHh1O-WBM2hE84sm3Bd4O353NOk,1464
74
75
  pyegeria/__init__.py,sha256=mZOa16y_LUUZevlHVQY-X_q0ZE2mEcgAE-eoe16DLls,21893
@@ -99,11 +100,12 @@ pyegeria/project_manager_omvs.py,sha256=Y7Lyqh4jIujJrr_Ub7feo904FN_uz4R10T4hKhqE
99
100
  pyegeria/registered_info.py,sha256=y0-LgDIQXpph0lEWxIOG3_HsqX_Z2iAIb3xu4Aa4B70,6344
100
101
  pyegeria/runtime_manager_omvs.py,sha256=qkMjb4Dp88-tqG47ldGR8oKGuNSIMrYiN43BCqAO4lE,74356
101
102
  pyegeria/server_operations.py,sha256=ciH890hYT85YQ6OpByn4w7s3a7TtvWZpIG5rkRqbcI0,16766
103
+ pyegeria/template_manager_omvs.py,sha256=heqbKeum5hPCHap4r1RUZU8YB3QaQlxVNbq4GZimJtE,42450
102
104
  pyegeria/utils.py,sha256=1h6bwveadd6GpbnGLTmqPBmBk68QvxdjGTI9RfbrgKY,5415
103
105
  pyegeria/valid_metadata_omvs.py,sha256=tfCGXed5LLt59YA8uZNNtd9UJ-lRZfPU_uZxK31Yux0,65069
104
106
  pyegeria/x_action_author_omvs.py,sha256=xu1IQ0YbhIKi17C5a7Aq9u1Az2czwahNPpX9czmyVxE,6454
105
- pyegeria-1.5.1.0.16.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
106
- pyegeria-1.5.1.0.16.dist-info/METADATA,sha256=XicdAKbnM5ynI5BxsOAM7z_cnN6WDeXa5_gaw6jb58g,2998
107
- pyegeria-1.5.1.0.16.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
108
- pyegeria-1.5.1.0.16.dist-info/entry_points.txt,sha256=Pc5kHnxv-vbRpwVMxSSWl66vmf7EZjgzf7nZzz1ow3M,4002
109
- pyegeria-1.5.1.0.16.dist-info/RECORD,,
107
+ pyegeria-1.5.1.0.19.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
108
+ pyegeria-1.5.1.0.19.dist-info/METADATA,sha256=gPFklzgv3467yHx-n2NBC7Qck746h1J_5MGz4hKMjm8,2998
109
+ pyegeria-1.5.1.0.19.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
110
+ pyegeria-1.5.1.0.19.dist-info/entry_points.txt,sha256=Pc5kHnxv-vbRpwVMxSSWl66vmf7EZjgzf7nZzz1ow3M,4002
111
+ pyegeria-1.5.1.0.19.dist-info/RECORD,,
@@ -1,218 +0,0 @@
1
- """This creates a templates guid file from the core metadata archive"""
2
- from rich.markdown import Markdown
3
- from rich.prompt import Prompt
4
- import os
5
- import argparse
6
- import time
7
- import sys
8
- from rich import box
9
- from rich.console import Console
10
- from rich.table import Table
11
-
12
- from pyegeria import (
13
- InvalidParameterException,
14
- PropertyServerException,
15
- UserNotAuthorizedException,
16
- print_exception_response,
17
- EgeriaTech,
18
- )
19
-
20
-
21
- console = Console()
22
- EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
23
- EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
24
- EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
25
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
26
- EGERIA_VIEW_SERVER_URL = os.environ.get(
27
- "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
28
- )
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
- def check_if_template(header: dict) -> bool:
39
- """Check if the the template classification is set"""
40
- classifications = header.get("classifications", None)
41
- if classifications is None:
42
- return False
43
- for c in classifications:
44
- if c["type"]["typeName"] == "Template":
45
- return True
46
- return False
47
-
48
-
49
- def list_deployed_database_schemas(
50
- db_name: str,
51
- server: str,
52
- url: str,
53
- username: str,
54
- password: str,
55
- jupyter: bool = EGERIA_JUPYTER,
56
- width: int = EGERIA_WIDTH,
57
- ):
58
- c_client = EgeriaTech(server, url, user_id=username, user_pwd=password)
59
- token = c_client.create_egeria_bearer_token()
60
-
61
- def generate_table() -> Table:
62
- """Make a new table."""
63
- table = Table(
64
- caption=f"Databases found: {url} - {server} @ {time.asctime()}",
65
- style="bold bright_white on black",
66
- row_styles=["bold bright_white on black"],
67
- header_style="white on dark_blue",
68
- title_style="bold bright_white on black",
69
- caption_style="white on black",
70
- show_lines=True,
71
- box=box.ROUNDED,
72
- # title=f"Elements for Open Metadata Type: '{om_type}' ",
73
- expand=True,
74
- # width=500
75
- )
76
-
77
- table.add_column("Schema in Catalog")
78
- table.add_column("Schema Properties")
79
-
80
- table.add_column("Cataloged Resource")
81
-
82
- om_type = "DeployedDatabaseSchema"
83
-
84
- # get the guid for the database or catalog
85
-
86
- if db_name in (None, "*"):
87
- dbs = c_client.get_elements(om_type)
88
- else:
89
- db_guid = c_client.get_guid_for_name(db_name)
90
- dbs = c_client.get_elements_by_classification_with_property_value(
91
- "Anchors", db_guid, ["anchorGUID"], om_type
92
- )
93
-
94
- if type(dbs) is not list:
95
- print("No instances found")
96
- sys.exit(1)
97
-
98
- for element in dbs:
99
- header = element["elementHeader"]
100
-
101
- if check_if_template(header):
102
- continue
103
-
104
- el_name = element["properties"].get("name", "---")
105
- el_type = header["type"]["typeName"]
106
- el_home = header["origin"]["homeMetadataCollectionName"]
107
- el_create_time = header["versions"]["createTime"][:-10]
108
- el_created_by = header["versions"]["createdBy"]
109
- el_created_md = (
110
- f"* **Created By**: {el_created_by}\n"
111
- f"* **Created Time**: {el_create_time}"
112
- )
113
- el_created_out = Markdown(el_created_md)
114
-
115
- el_guid = header["guid"]
116
-
117
- el_classification = header["classifications"]
118
- for c in el_classification:
119
- if c["type"]["typeName"] == "Anchors":
120
- el_anchor_guid = c["classificationProperties"]["anchorGUID"]
121
- el_anchor_type_name = c["classificationProperties"][
122
- "anchorTypeName"
123
- ]
124
- if el_anchor_type_name == "Catalog":
125
- el_cat = c_client.get_element_by_guid(el_anchor_guid)
126
- el_cat_name = el_cat["properties"].get("name", None)
127
- if el_cat_name is None:
128
- el_cat_name = el_cat["properties"].get(
129
- "qualifiedName", "---"
130
- )
131
- el_cat_guid = el_cat["elementHeader"]["guid"]
132
- el_schema_id = (
133
- f"{el_name}\n{el_guid}\n\n\t\tin\n\n{el_cat_name}\n{el_cat_guid}"
134
- )
135
- el_props_md = ""
136
- for prop in element["properties"].keys():
137
- el_props_md += f"* **{prop}**: {element['properties'][prop]}\n"
138
- el_props_out = Markdown(el_props_md)
139
-
140
- rel_elements = c_client.get_elements_by_property_value(
141
- el_guid, ["anchorGUID"]
142
- )
143
- schema_md = ""
144
- count = 0
145
- rel_el_out = ""
146
- if type(rel_elements) is list:
147
- len_els = len(rel_elements)
148
- rel_el_md = ""
149
- spacer = "---\n"
150
- for rel_element in rel_elements:
151
- count += 1
152
- rel_type = rel_element["elementHeader"]["type"]["typeName"]
153
- rel_guid = rel_element["elementHeader"]["guid"]
154
- rel_props = rel_element["properties"]
155
- props_md = ""
156
- for key in rel_props.keys():
157
- props_md += f"\t* **{key}**: {rel_props[key]}\n"
158
- rel_el_md = f"{rel_el_md}\n* **{rel_type}**:\n\t{rel_guid}\n{props_md}{spacer}"
159
-
160
- # rel_el_md = f"{rel_el_md}\n* **{rel_type}**:\n\t{rel_guid}\n{props_md}{spacer}"
161
- if count == len_els:
162
- rel_el_md = rel_el_md[:-4]
163
- rel_el_out = Markdown(rel_el_md)
164
-
165
- table.add_row(
166
- el_schema_id,
167
- # el_type,
168
- # el_created_out,
169
- # el_home,
170
- # el_guid,
171
- el_props_out,
172
- rel_el_out,
173
- )
174
-
175
- return table
176
-
177
- try:
178
- console = Console(width=width, force_terminal=not jupyter)
179
-
180
- with console.pager(styles=True):
181
- console.print(generate_table())
182
-
183
- except (
184
- InvalidParameterException,
185
- PropertyServerException,
186
- UserNotAuthorizedException,
187
- ) as e:
188
- print_exception_response(e)
189
- print("\n\nPerhaps the type name isn't known")
190
- finally:
191
- c_client.close_session()
192
-
193
-
194
- def main():
195
- parser = argparse.ArgumentParser()
196
- parser.add_argument("--server", help="Name of the server to display status for")
197
- parser.add_argument("--url", help="URL Platform to connect to")
198
- parser.add_argument("--userid", help="User Id")
199
- parser.add_argument("--password", help="Password")
200
-
201
- args = parser.parse_args()
202
-
203
- server = args.server if args.server is not None else EGERIA_VIEW_SERVER
204
- url = args.url if args.url is not None else EGERIA_PLATFORM_URL
205
- userid = args.userid if args.userid is not None else EGERIA_USER
206
- password = args.password if args.password is not None else EGERIA_USER_PASSWORD
207
-
208
- try:
209
- db_name = Prompt.ask(
210
- "Enter the name of a database/catalog to retrieve schemas for", default="*"
211
- )
212
- list_deployed_database_schemas(db_name, server, url, userid, password)
213
- except KeyboardInterrupt:
214
- pass
215
-
216
-
217
- if __name__ == "__main__":
218
- main()