pyegeria 1.5.1.0.8__py3-none-any.whl → 1.5.1.0.10__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/cat/list_deployed_catalogs.py +12 -9
- commands/cat/list_deployed_database_schemas.py +9 -6
- commands/cat/list_deployed_databases.py +4 -3
- commands/cli/egeria.py +14 -5
- commands/cli/egeria_cat.py +19 -8
- {pyegeria-1.5.1.0.8.dist-info → pyegeria-1.5.1.0.10.dist-info}/METADATA +1 -1
- {pyegeria-1.5.1.0.8.dist-info → pyegeria-1.5.1.0.10.dist-info}/RECORD +10 -10
- {pyegeria-1.5.1.0.8.dist-info → pyegeria-1.5.1.0.10.dist-info}/LICENSE +0 -0
- {pyegeria-1.5.1.0.8.dist-info → pyegeria-1.5.1.0.10.dist-info}/WHEEL +0 -0
- {pyegeria-1.5.1.0.8.dist-info → pyegeria-1.5.1.0.10.dist-info}/entry_points.txt +0 -0
@@ -47,7 +47,7 @@ def check_if_template(header: dict) -> bool:
|
|
47
47
|
|
48
48
|
|
49
49
|
def list_deployed_catalogs(
|
50
|
-
|
50
|
+
catalog_server: str,
|
51
51
|
server: str,
|
52
52
|
url: str,
|
53
53
|
username: str,
|
@@ -79,9 +79,13 @@ def list_deployed_catalogs(
|
|
79
79
|
table.add_column("Properties")
|
80
80
|
table.add_column("Catalog Schemas")
|
81
81
|
|
82
|
-
|
83
|
-
|
84
|
-
|
82
|
+
if catalog_server in [None, "*"]:
|
83
|
+
cats = c_client.get_elements_by_classification("Anchors", "Catalog")
|
84
|
+
else:
|
85
|
+
server_guid = c_client.get_guid_for_name(catalog_server)
|
86
|
+
cats = c_client.get_elements_by_classification_with_property_value(
|
87
|
+
"Anchors", server_guid, ["anchorGUID"], "Catalog"
|
88
|
+
)
|
85
89
|
if type(cats) is list:
|
86
90
|
for cat in cats:
|
87
91
|
header = cat["elementHeader"]
|
@@ -165,7 +169,7 @@ def list_deployed_catalogs(
|
|
165
169
|
|
166
170
|
def main():
|
167
171
|
parser = argparse.ArgumentParser()
|
168
|
-
parser.add_argument("--server", help="Name of the server to
|
172
|
+
parser.add_argument("--server", help="Name of the view server to use")
|
169
173
|
parser.add_argument("--url", help="URL Platform to connect to")
|
170
174
|
parser.add_argument("--userid", help="User Id")
|
171
175
|
parser.add_argument("--password", help="Password")
|
@@ -178,10 +182,9 @@ def main():
|
|
178
182
|
password = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
179
183
|
|
180
184
|
try:
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
uc_server_name = None
|
185
|
+
uc_server_name = Prompt.ask(
|
186
|
+
"Enter the name of a server to retrieve catalogs for", default="*"
|
187
|
+
)
|
185
188
|
list_deployed_catalogs(uc_server_name, server, url, userid, password)
|
186
189
|
except KeyboardInterrupt:
|
187
190
|
pass
|
@@ -146,7 +146,7 @@ def list_deployed_database_schemas(
|
|
146
146
|
if type(rel_elements) is list:
|
147
147
|
len_els = len(rel_elements)
|
148
148
|
rel_el_md = ""
|
149
|
-
spacer = ""
|
149
|
+
spacer = "---\n"
|
150
150
|
for rel_element in rel_elements:
|
151
151
|
count += 1
|
152
152
|
rel_type = rel_element["elementHeader"]["type"]["typeName"]
|
@@ -156,10 +156,13 @@ def list_deployed_database_schemas(
|
|
156
156
|
for key in rel_props.keys():
|
157
157
|
props_md += f"\t* **{key}**: {rel_props[key]}\n"
|
158
158
|
rel_el_md = f"{rel_el_md}\n* **{rel_type}**:\n\t{rel_guid}\n{props_md}{spacer}"
|
159
|
-
if count > 1 and count < len_els:
|
160
|
-
|
161
|
-
elif count > len_els:
|
162
|
-
|
159
|
+
# if count > 1 and count < len_els:
|
160
|
+
# spacer = "---\n"
|
161
|
+
# elif count > len_els:
|
162
|
+
# spacer = ""
|
163
|
+
rel_el_md = f"{rel_el_md}\n* **{rel_type}**:\n\t{rel_guid}\n{props_md}{spacer}"
|
164
|
+
if count == len_els:
|
165
|
+
rel_el_md = rel_el_md[:-4]
|
163
166
|
rel_el_out = Markdown(rel_el_md)
|
164
167
|
|
165
168
|
table.add_row(
|
@@ -210,7 +213,7 @@ def main():
|
|
210
213
|
|
211
214
|
try:
|
212
215
|
db_name = Prompt.ask(
|
213
|
-
"Enter the name of a database to retrieve schemas for", default="*"
|
216
|
+
"Enter the name of a database/catalog to retrieve schemas for", default="*"
|
214
217
|
)
|
215
218
|
list_deployed_database_schemas(db_name, server, url, userid, password)
|
216
219
|
except KeyboardInterrupt:
|
@@ -111,6 +111,7 @@ def list_deployed_databases(
|
|
111
111
|
rel_elements = c_client.get_related_elements(el_guid)
|
112
112
|
schema_md = ""
|
113
113
|
count = 0
|
114
|
+
rel_cnt = len(rel_elements)
|
114
115
|
if type(rel_elements) is list:
|
115
116
|
for rel_element in rel_elements:
|
116
117
|
count += 1
|
@@ -124,9 +125,9 @@ def list_deployed_databases(
|
|
124
125
|
props_md = ""
|
125
126
|
for key in rel_props.keys():
|
126
127
|
props_md += f"* **{key}**: {rel_props[key]}\n"
|
127
|
-
rel_el_md = f"* **{rel_type}**: {rel_guid}\n{props_md}"
|
128
|
-
if count
|
129
|
-
rel_el_md
|
128
|
+
rel_el_md = f"* **{rel_type}**: {rel_guid}\n{props_md}\n---\n"
|
129
|
+
if count == rel_cnt:
|
130
|
+
rel_el_md = rel_el_md[:-4]
|
130
131
|
rel_el_out = Markdown(rel_el_md)
|
131
132
|
|
132
133
|
table.add_row(
|
commands/cli/egeria.py
CHANGED
@@ -34,6 +34,7 @@ from commands.my.monitor_my_todos import display_my_todos
|
|
34
34
|
from commands.my.monitor_open_todos import display_todos
|
35
35
|
from commands.cat.list_deployed_database_schemas import list_deployed_database_schemas
|
36
36
|
from commands.cat.list_deployed_catalogs import list_deployed_catalogs
|
37
|
+
from commands.cat.list_deployed_databases import list_deployed_databases
|
37
38
|
from commands.cat.glossary_actions import create_glossary, delete_glossary, create_term
|
38
39
|
from commands.my.todo_actions import (
|
39
40
|
mark_todo_complete,
|
@@ -928,30 +929,38 @@ def list_deployed_schemas(search_string, ctx):
|
|
928
929
|
c.view_server_url,
|
929
930
|
c.userid,
|
930
931
|
c.password,
|
931
|
-
None,
|
932
932
|
c.jupyter,
|
933
933
|
c.width,
|
934
934
|
)
|
935
935
|
|
936
936
|
|
937
937
|
@show.command("list-catalogs")
|
938
|
-
|
938
|
+
@click.option("--search-string", default="*", help="Server to search for catalogs")
|
939
939
|
@click.pass_context
|
940
|
-
def list_catalogs(ctx):
|
940
|
+
def list_catalogs(search_string, ctx):
|
941
941
|
"""Display a tree graph of information about an asset"""
|
942
942
|
c = ctx.obj
|
943
943
|
list_deployed_catalogs(
|
944
|
-
|
944
|
+
search_string,
|
945
945
|
c.view_server,
|
946
946
|
c.view_server_url,
|
947
947
|
c.userid,
|
948
948
|
c.password,
|
949
|
-
None,
|
950
949
|
c.jupyter,
|
951
950
|
c.width,
|
952
951
|
)
|
953
952
|
|
954
953
|
|
954
|
+
@show.command("list-databases")
|
955
|
+
@click.pass_context
|
956
|
+
def list_databases(ctx):
|
957
|
+
"""Display a tree graph of information about an asset"""
|
958
|
+
c = ctx.obj
|
959
|
+
list_deployed_databases(
|
960
|
+
c.view_server, c.view_server_url, c.userid, c.password, c.jupyter, c.width
|
961
|
+
)
|
962
|
+
|
963
|
+
|
955
964
|
#
|
956
965
|
# Catalog User: Tell
|
957
966
|
#
|
commands/cli/egeria_cat.py
CHANGED
@@ -30,6 +30,7 @@ from commands.cat.list_archives import display_archive_list
|
|
30
30
|
from commands.cat.list_deployed_database_schemas import list_deployed_database_schemas
|
31
31
|
from commands.cat.list_deployed_catalogs import list_deployed_catalogs
|
32
32
|
from commands.cat.glossary_actions import create_glossary, delete_glossary, create_term
|
33
|
+
from commands.cat.list_deployed_databases import list_deployed_databases
|
33
34
|
|
34
35
|
# from pyegeria import ServerOps
|
35
36
|
from commands.cli.ops_config import Config
|
@@ -496,41 +497,51 @@ def list_archives(ctx):
|
|
496
497
|
|
497
498
|
|
498
499
|
@show.command("list-deployed-schemas")
|
499
|
-
@click.option(
|
500
|
+
@click.option(
|
501
|
+
"--search-catalog", default="*", help="What database or catalog to search"
|
502
|
+
)
|
500
503
|
@click.pass_context
|
501
|
-
def list_deployed_schemas(
|
504
|
+
def list_deployed_schemas(search_catalog, ctx):
|
502
505
|
"""Display a tree graph of information about an asset"""
|
503
506
|
c = ctx.obj
|
504
507
|
list_deployed_database_schemas(
|
505
|
-
|
508
|
+
search_catalog,
|
506
509
|
c.view_server,
|
507
510
|
c.view_server_url,
|
508
511
|
c.userid,
|
509
512
|
c.password,
|
510
|
-
None,
|
511
513
|
c.jupyter,
|
512
514
|
c.width,
|
513
515
|
)
|
514
516
|
|
515
517
|
|
516
518
|
@show.command("list-catalogs")
|
517
|
-
|
519
|
+
@click.option("--search-server", default="*", help="Server to search for catalogs")
|
518
520
|
@click.pass_context
|
519
|
-
def list_catalogs(ctx):
|
521
|
+
def list_catalogs(search_server, ctx):
|
520
522
|
"""Display a tree graph of information about an asset"""
|
521
523
|
c = ctx.obj
|
522
524
|
list_deployed_catalogs(
|
523
|
-
|
525
|
+
search_server,
|
524
526
|
c.view_server,
|
525
527
|
c.view_server_url,
|
526
528
|
c.userid,
|
527
529
|
c.password,
|
528
|
-
None,
|
529
530
|
c.jupyter,
|
530
531
|
c.width,
|
531
532
|
)
|
532
533
|
|
533
534
|
|
535
|
+
@show.command("list-databases")
|
536
|
+
@click.pass_context
|
537
|
+
def list_databases(ctx):
|
538
|
+
"""Display a tree graph of information about an asset"""
|
539
|
+
c = ctx.obj
|
540
|
+
list_deployed_databases(
|
541
|
+
c.view_server, c.view_server_url, c.userid, c.password, c.jupyter, c.width
|
542
|
+
)
|
543
|
+
|
544
|
+
|
534
545
|
#
|
535
546
|
# Tell
|
536
547
|
#
|
@@ -10,9 +10,9 @@ commands/cat/glossary_actions.py,sha256=F5-NNiLvfHLbQKZ_RxS6XJ9HOAuXc75GMIAC5Xo0
|
|
10
10
|
commands/cat/list_archives.py,sha256=83LhNeZWhzRiE-oU6veuIk9ob4XDtDWUoXdGGXaYeE8,5454
|
11
11
|
commands/cat/list_assets.py,sha256=bNwSaBDz661hfnc2Rn4j4HPHAugKvz0XwN9L1m4FVQk,6529
|
12
12
|
commands/cat/list_cert_types.py,sha256=mbCls_EqC5JKG5rvS4o69k7KgZ6aNXlcqoJ3DtHsTFA,7127
|
13
|
-
commands/cat/list_deployed_catalogs.py,sha256=
|
14
|
-
commands/cat/list_deployed_database_schemas.py,sha256=
|
15
|
-
commands/cat/list_deployed_databases.py,sha256=
|
13
|
+
commands/cat/list_deployed_catalogs.py,sha256=eG8K-d7BijD34el_yVx9yfnLJdfwTUiJVxd-gcGwo7k,7157
|
14
|
+
commands/cat/list_deployed_database_schemas.py,sha256=oq0jT77KmYLByxBlgpv2k9LscJKOEJqVBj_np5ZVXB0,8537
|
15
|
+
commands/cat/list_deployed_databases.py,sha256=TJWqpj3PhvEmTsXhVRk_SODZNjTA5OiyhEzWwQkD-zk,6668
|
16
16
|
commands/cat/list_glossary.py,sha256=tUtQQoTGTlDLU-yFbfO3zjiJC9QyEJfg8NxnGCo2mnI,5811
|
17
17
|
commands/cat/list_projects.py,sha256=Jzs-DtIpPhCH-gY4PYT6mnRBWnEf4m18TFfcw8UymNU,8011
|
18
18
|
commands/cat/list_relationships.py,sha256=U9f78cOi4HyaacqNaFSMq_7rRxVcEczvwPv468GYw3Q,5869
|
@@ -20,8 +20,8 @@ commands/cat/list_tech_types.py,sha256=20T4v6L5qeebSsaL1nGkFMDAIsy2W3A3SMm1RcgFo
|
|
20
20
|
commands/cat/list_todos.py,sha256=iPxHRyW3X5tiREio4TUOwRPvNPjU0gxm3pVnUI79ir4,6542
|
21
21
|
commands/cat/list_user_ids.py,sha256=7JinL7rknPbGusIb8ikXKEaV1vvbuvx_WWtbmlfS_DY,5093
|
22
22
|
commands/cli/__init__.py,sha256=hpTVSMP2gnPRhcAZPdeUEsQ-eaDySlXlk239dNWYmng,292
|
23
|
-
commands/cli/egeria.py,sha256=
|
24
|
-
commands/cli/egeria_cat.py,sha256=
|
23
|
+
commands/cli/egeria.py,sha256=TkoHu46FS8m9Dzv62jdf2XSmz9JLoDaMkE4RRtV1eG8,31247
|
24
|
+
commands/cli/egeria_cat.py,sha256=KSFHqwgSiaa1x88ksbSDqkAgcMqE5birmudjnGuBA_A,14803
|
25
25
|
commands/cli/egeria_my.py,sha256=9zIpUDLeA_R-0rgCSQfEZTtVmkxPcEAsYcCTn1wQFrE,6181
|
26
26
|
commands/cli/egeria_ops.py,sha256=fxDXYWXRhexx06PdSLCp2FhgUtS13NdDpyg7ea775fc,11531
|
27
27
|
commands/cli/egeria_tech.py,sha256=eTDHTHDVEYmr6gUPGfido_Uf7Fec0Nuyxlkhg4KAMAw,13160
|
@@ -101,8 +101,8 @@ pyegeria/server_operations.py,sha256=ciH890hYT85YQ6OpByn4w7s3a7TtvWZpIG5rkRqbcI0
|
|
101
101
|
pyegeria/utils.py,sha256=1h6bwveadd6GpbnGLTmqPBmBk68QvxdjGTI9RfbrgKY,5415
|
102
102
|
pyegeria/valid_metadata_omvs.py,sha256=tfCGXed5LLt59YA8uZNNtd9UJ-lRZfPU_uZxK31Yux0,65069
|
103
103
|
pyegeria/x_action_author_omvs.py,sha256=xu1IQ0YbhIKi17C5a7Aq9u1Az2czwahNPpX9czmyVxE,6454
|
104
|
-
pyegeria-1.5.1.0.
|
105
|
-
pyegeria-1.5.1.0.
|
106
|
-
pyegeria-1.5.1.0.
|
107
|
-
pyegeria-1.5.1.0.
|
108
|
-
pyegeria-1.5.1.0.
|
104
|
+
pyegeria-1.5.1.0.10.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
105
|
+
pyegeria-1.5.1.0.10.dist-info/METADATA,sha256=GCo6HPbrA52D7WRa4F0d30lOFCRwPJt7Dg7GI_JGopc,2998
|
106
|
+
pyegeria-1.5.1.0.10.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
107
|
+
pyegeria-1.5.1.0.10.dist-info/entry_points.txt,sha256=Pc5kHnxv-vbRpwVMxSSWl66vmf7EZjgzf7nZzz1ow3M,4002
|
108
|
+
pyegeria-1.5.1.0.10.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|