pyegeria 5.3.3.1__py3-none-any.whl → 5.3.3.2__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/commands/cli/egeria.py +2 -2
- pyegeria/commands/cli/egeria_tech.py +2 -2
- pyegeria/commands/tech/list_anchored_elements.py +12 -12
- {pyegeria-5.3.3.1.dist-info → pyegeria-5.3.3.2.dist-info}/METADATA +1 -1
- {pyegeria-5.3.3.1.dist-info → pyegeria-5.3.3.2.dist-info}/RECORD +8 -8
- {pyegeria-5.3.3.1.dist-info → pyegeria-5.3.3.2.dist-info}/LICENSE +0 -0
- {pyegeria-5.3.3.1.dist-info → pyegeria-5.3.3.2.dist-info}/WHEEL +0 -0
- {pyegeria-5.3.3.1.dist-info → pyegeria-5.3.3.2.dist-info}/entry_points.txt +0 -0
pyegeria/commands/cli/egeria.py
CHANGED
@@ -397,7 +397,7 @@ def show_guid_info(ctx, guid):
|
|
397
397
|
default="anchorTypeName",
|
398
398
|
help="List of properties we are searching",
|
399
399
|
)
|
400
|
-
def list_anchored_elements(ctx,
|
400
|
+
def list_anchored_elements(ctx, property_value: str, prop_list: str):
|
401
401
|
"""List anchored elements with the specified properties"""
|
402
402
|
c = ctx.obj
|
403
403
|
if type(prop_list) is str:
|
@@ -409,7 +409,7 @@ def list_anchored_elements(ctx, search_string: str, prop_list: str):
|
|
409
409
|
print(f"\nError --> Invalid property list - must be a string or list")
|
410
410
|
sys.exit(4)
|
411
411
|
display_anchored_elements(
|
412
|
-
|
412
|
+
property_value,
|
413
413
|
[prop_list],
|
414
414
|
c.view_server,
|
415
415
|
c.view_server_url,
|
@@ -225,7 +225,7 @@ def show_guid_info(ctx, guid):
|
|
225
225
|
default="anchorTypeName",
|
226
226
|
help="List of properties we are searching",
|
227
227
|
)
|
228
|
-
def list_anchored_elements(ctx,
|
228
|
+
def list_anchored_elements(ctx, property_value: str, prop_list: str):
|
229
229
|
"""List anchored elements with the specified properties"""
|
230
230
|
c = ctx.obj
|
231
231
|
if type(prop_list) is str:
|
@@ -237,7 +237,7 @@ def list_anchored_elements(ctx, search_string: str, prop_list: str):
|
|
237
237
|
print(f"\nError --> Invalid property list - must be a string or list")
|
238
238
|
sys.exit(4)
|
239
239
|
display_anchored_elements(
|
240
|
-
|
240
|
+
property_value,
|
241
241
|
[prop_list],
|
242
242
|
c.view_server,
|
243
243
|
c.view_server_url,
|
@@ -4,7 +4,7 @@ SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Copyright Contributors to the ODPi Egeria project.
|
5
5
|
|
6
6
|
|
7
|
-
Retrieve elements based on a search of a specified properties.
|
7
|
+
Retrieve anchored elements based on a search of a specified properties.
|
8
8
|
"""
|
9
9
|
import argparse
|
10
10
|
import os
|
@@ -45,7 +45,7 @@ disable_ssl_warnings = True
|
|
45
45
|
|
46
46
|
|
47
47
|
def display_anchored_elements(
|
48
|
-
|
48
|
+
property_value: str,
|
49
49
|
prop_list: list[str],
|
50
50
|
server: str,
|
51
51
|
url: str,
|
@@ -56,19 +56,19 @@ def display_anchored_elements(
|
|
56
56
|
width: int = EGERIA_WIDTH,
|
57
57
|
):
|
58
58
|
console = Console(width=width, force_terminal=not jupyter, soft_wrap=True)
|
59
|
-
if (
|
59
|
+
if (property_value is None) or (len(property_value) < 3):
|
60
60
|
print(
|
61
61
|
"\nError --> Invalid Search String - must be greater than four characters long"
|
62
62
|
)
|
63
63
|
sys.exit(3)
|
64
64
|
g_client = EgeriaTech(server, url, username, user_password)
|
65
65
|
token = g_client.create_egeria_bearer_token()
|
66
|
-
print(f"search
|
66
|
+
print(f"search value is {property_value} and prop_list is {prop_list}\n")
|
67
67
|
|
68
|
-
def generate_table(
|
68
|
+
def generate_table(property_value: str, prop_list: [str]) -> Table:
|
69
69
|
"""Make a new table."""
|
70
70
|
table = Table(
|
71
|
-
title=f"Elements containing the string {
|
71
|
+
title=f"Elements containing the string {property_value} @ {time.asctime()}",
|
72
72
|
header_style="white on dark_blue",
|
73
73
|
style="bold white on black",
|
74
74
|
row_styles=["bold white on black"],
|
@@ -88,7 +88,7 @@ def display_anchored_elements(
|
|
88
88
|
|
89
89
|
classification = "Anchors"
|
90
90
|
open_type_name = None
|
91
|
-
property_value =
|
91
|
+
property_value = property_value
|
92
92
|
|
93
93
|
property_names = prop_list
|
94
94
|
|
@@ -150,7 +150,7 @@ def display_anchored_elements(
|
|
150
150
|
|
151
151
|
try:
|
152
152
|
with console.pager(styles=True):
|
153
|
-
console.print(generate_table(
|
153
|
+
console.print(generate_table(property_value, prop_list), soft_wrap=True)
|
154
154
|
|
155
155
|
except (
|
156
156
|
InvalidParameterException,
|
@@ -183,19 +183,19 @@ def main():
|
|
183
183
|
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
184
184
|
time_out = args.time_out if args.time_out is not None else 60
|
185
185
|
try:
|
186
|
-
|
186
|
+
property_value = Prompt.ask("Enter an property search string:", default="")
|
187
187
|
prop_list = Prompt.ask(
|
188
188
|
"Enter the list of properties to search", default="anchorTypeName"
|
189
189
|
)
|
190
|
-
if
|
190
|
+
if property_value == "":
|
191
191
|
print("\nError --> Search string can't be empty")
|
192
192
|
sys.exit(1)
|
193
|
-
elif len(
|
193
|
+
elif len(property_value) <= 4:
|
194
194
|
print("\nError --> Search string must be greater than four characters long")
|
195
195
|
sys.exit(2)
|
196
196
|
else:
|
197
197
|
display_anchored_elements(
|
198
|
-
|
198
|
+
property_value, [prop_list], server, url, userid, user_pass, time_out
|
199
199
|
)
|
200
200
|
except KeyboardInterrupt:
|
201
201
|
pass
|
@@ -37,12 +37,12 @@ pyegeria/commands/cat/list_terms.py,sha256=pHNR_5na1tS_6Yj4T0rA4kaT1lOtd1fMw6Z3k
|
|
37
37
|
pyegeria/commands/cat/list_todos.py,sha256=I1b8kJJnekWEm3NpwiLStxr50no7KTUfDrI6pBExzA8,6549
|
38
38
|
pyegeria/commands/cat/list_user_ids.py,sha256=7TmksDy7rV0HTpn2nFKwLKf4Hq3s80GoR3_SmPhL_Hc,5100
|
39
39
|
pyegeria/commands/cli/__init__.py,sha256=hpTVSMP2gnPRhcAZPdeUEsQ-eaDySlXlk239dNWYmng,292
|
40
|
-
pyegeria/commands/cli/egeria.py,sha256=
|
40
|
+
pyegeria/commands/cli/egeria.py,sha256=9_y8TGushL3YkhO2yDMNubCVYo2Jhh8p96yDXlZuQWY,49493
|
41
41
|
pyegeria/commands/cli/egeria_cat.py,sha256=P6pd17KvldSYCWJJAu56_DX90NOBFuQBireZ0gCuPB4,16017
|
42
42
|
pyegeria/commands/cli/egeria_login_tui.py,sha256=Mbdf2IqxMqm_jOeHqsGvrKQAFxerfkYEgdBlA1gX-ks,9487
|
43
43
|
pyegeria/commands/cli/egeria_my.py,sha256=ncLN1DM_P7A0N2J96lET64t4fW21ifpDr8S6yI2lZHQ,6389
|
44
44
|
pyegeria/commands/cli/egeria_ops.py,sha256=ff_935fAuF1I2zfu4Y8hjk9WTmbJXFMddvYqldvUFS0,12828
|
45
|
-
pyegeria/commands/cli/egeria_tech.py,sha256=
|
45
|
+
pyegeria/commands/cli/egeria_tech.py,sha256=ibYJjRuiM4AB4JUoFogcdY9qsvhIksJ1yfZLA5vbZ3c,18983
|
46
46
|
pyegeria/commands/cli/ops_config.py,sha256=4ShMgVl2eJoQLqJTK4npAdeAeJuq3FE6qsqngXYON74,1331
|
47
47
|
pyegeria/commands/cli/txt_custom_v2.tcss,sha256=ixkzpFyTZ5i3byFO9EmEAeJgzbEa7nZb_3iTgxNtVPk,232
|
48
48
|
pyegeria/commands/doc/.DS_Store,sha256=o8grXspPw9gdVWRFjZAhnydbdtkzpNBvsC_UQJ_YGYw,10244
|
@@ -201,7 +201,7 @@ pyegeria/commands/tech/get_tech_type_template.py,sha256=AVogQHaAqLX9wIXmtEAvg4JH
|
|
201
201
|
pyegeria/commands/tech/list_all_om_type_elements.py,sha256=3lrxZ9tRKBBhhVNJDbMcrQPoizWfyVoHFqMXK8FU4d4,5991
|
202
202
|
pyegeria/commands/tech/list_all_om_type_elements_x.py,sha256=pKntFtOiJjH0fqlfIU4oVwzAGmKXXKPtb3GIUuaA2AQ,6571
|
203
203
|
pyegeria/commands/tech/list_all_related_elements.py,sha256=2teagEuuAOuWJMpJBBWStizmBoj5jRyV-OXFHWFjDj0,7773
|
204
|
-
pyegeria/commands/tech/list_anchored_elements.py,sha256=
|
204
|
+
pyegeria/commands/tech/list_anchored_elements.py,sha256=lbrfAJFaJfhgWtf6zTbSM-CzLUJD9L2n1dPy2yXVXJg,7582
|
205
205
|
pyegeria/commands/tech/list_asset_types.py,sha256=SsNDAitUtwq0IF3jvUiaDBK7kcY7v1ACkHsBF-Y5M-U,4169
|
206
206
|
pyegeria/commands/tech/list_elements_by_classification_by_property_value.py,sha256=NK18WJDfkp48gPze60k7-ZBp9N2swCgvBVquG9VnrWs,7137
|
207
207
|
pyegeria/commands/tech/list_elements_by_property_value.py,sha256=3OG8uyPKY3zX-K_QB9r2WUZLY_hBaZQ_VT4OAkCIQdA,6578
|
@@ -240,8 +240,8 @@ pyegeria/template_manager_omvs.py,sha256=Sw5xsQAhy7a48xFCg59mg9_nqyhawoS9v4WyF-P
|
|
240
240
|
pyegeria/utils.py,sha256=1h6bwveadd6GpbnGLTmqPBmBk68QvxdjGTI9RfbrgKY,5415
|
241
241
|
pyegeria/valid_metadata_omvs.py,sha256=cCt5CCLv6BdzCu90n68r_PkG_PEQJjrtwCxio7K6yko,65034
|
242
242
|
pyegeria/x_action_author_omvs.py,sha256=xu1IQ0YbhIKi17C5a7Aq9u1Az2czwahNPpX9czmyVxE,6454
|
243
|
-
pyegeria-5.3.3.
|
244
|
-
pyegeria-5.3.3.
|
245
|
-
pyegeria-5.3.3.
|
246
|
-
pyegeria-5.3.3.
|
247
|
-
pyegeria-5.3.3.
|
243
|
+
pyegeria-5.3.3.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
244
|
+
pyegeria-5.3.3.2.dist-info/METADATA,sha256=0V2X1ZC_OP0zWOjAzIjaEgF9oNmAbxMw1201Y3EXM3I,2672
|
245
|
+
pyegeria-5.3.3.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
246
|
+
pyegeria-5.3.3.2.dist-info/entry_points.txt,sha256=sqVSCsr2oVnXtKTgRs5_F9OjbtexhmaXE330sO8V9bk,5873
|
247
|
+
pyegeria-5.3.3.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|