pyegeria 0.7.42__py3-none-any.whl → 0.7.44__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.
- examples/widgets/cat/list_archives.py +162 -0
- examples/widgets/cli/egeria.py +11 -0
- examples/widgets/cli/egeria_cat.py +364 -132
- examples/widgets/ops/monitor_gov_eng_status.py +3 -5
- {pyegeria-0.7.42.dist-info → pyegeria-0.7.44.dist-info}/METADATA +1 -1
- {pyegeria-0.7.42.dist-info → pyegeria-0.7.44.dist-info}/RECORD +9 -8
- {pyegeria-0.7.42.dist-info → pyegeria-0.7.44.dist-info}/entry_points.txt +1 -0
- {pyegeria-0.7.42.dist-info → pyegeria-0.7.44.dist-info}/LICENSE +0 -0
- {pyegeria-0.7.42.dist-info → pyegeria-0.7.44.dist-info}/WHEEL +0 -0
@@ -0,0 +1,162 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
SPDX-Lic
|
4
|
+
ense-Identifier: Apache-2.0
|
5
|
+
Copyright Contributors to the ODPi Egeria project.
|
6
|
+
|
7
|
+
Unit tests for the Utils helper functions using the Pytest framework.
|
8
|
+
|
9
|
+
|
10
|
+
A simple display for archives
|
11
|
+
"""
|
12
|
+
import argparse
|
13
|
+
import json
|
14
|
+
import os
|
15
|
+
import time, datetime
|
16
|
+
|
17
|
+
from rich import box
|
18
|
+
from rich import print
|
19
|
+
from rich.console import Console
|
20
|
+
from rich.prompt import Prompt
|
21
|
+
from rich.table import Table
|
22
|
+
|
23
|
+
from pyegeria import (
|
24
|
+
InvalidParameterException,
|
25
|
+
PropertyServerException,
|
26
|
+
UserNotAuthorizedException,
|
27
|
+
print_exception_response,
|
28
|
+
)
|
29
|
+
from pyegeria import ProjectManager, ClassificationManager
|
30
|
+
|
31
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
32
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
33
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
34
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
35
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
36
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
37
|
+
)
|
38
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
39
|
+
EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
|
40
|
+
"EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
|
41
|
+
)
|
42
|
+
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
43
|
+
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
44
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
45
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
46
|
+
EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
47
|
+
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
48
|
+
|
49
|
+
|
50
|
+
def display_archive_list(
|
51
|
+
server: str,
|
52
|
+
url: str,
|
53
|
+
username: str,
|
54
|
+
user_pass: str,
|
55
|
+
save_output: bool,
|
56
|
+
jupyter: bool = EGERIA_JUPYTER,
|
57
|
+
width: int = EGERIA_WIDTH,
|
58
|
+
):
|
59
|
+
c_client = ClassificationManager(server, url, user_id=username)
|
60
|
+
token = c_client.create_egeria_bearer_token(username, user_pass)
|
61
|
+
|
62
|
+
def generate_table() -> Table:
|
63
|
+
"""Make a new table."""
|
64
|
+
table = Table(
|
65
|
+
title=f"Project List: Egeria Archvies @ {time.asctime()}",
|
66
|
+
header_style="white on dark_blue",
|
67
|
+
show_lines=True,
|
68
|
+
box=box.ROUNDED,
|
69
|
+
caption=f"Archive list for Server '{server}' @ Platform - {url}",
|
70
|
+
expand=True,
|
71
|
+
)
|
72
|
+
|
73
|
+
table.add_column("Name")
|
74
|
+
table.add_column("Path Name")
|
75
|
+
table.add_column("Creation Date")
|
76
|
+
# table.add_column("Creator")
|
77
|
+
# table.add_column("Description")
|
78
|
+
|
79
|
+
open_metadata_type_name = None
|
80
|
+
property_value = "omarchive"
|
81
|
+
property_names = ["fileExtension"]
|
82
|
+
archives = c_client.get_elements_by_property_value(
|
83
|
+
property_value, property_names, open_metadata_type_name
|
84
|
+
)
|
85
|
+
|
86
|
+
if type(archives) != list:
|
87
|
+
raise ValueError("--> No archives found")
|
88
|
+
else:
|
89
|
+
sorted_archives = sorted(
|
90
|
+
archives, key=lambda k: k["properties"].get("name", "---")
|
91
|
+
)
|
92
|
+
|
93
|
+
for archive in sorted_archives:
|
94
|
+
name = archive["properties"].get("name", "---")
|
95
|
+
path_name = archive["properties"].get("pathName", "---")
|
96
|
+
creation_date_epoch = (
|
97
|
+
int(archive["properties"].get("storeCreateTime", 0)) / 1000
|
98
|
+
)
|
99
|
+
create_date = datetime.datetime.fromtimestamp(creation_date_epoch)
|
100
|
+
creator = "---"
|
101
|
+
description = "---"
|
102
|
+
|
103
|
+
table.add_row(
|
104
|
+
name, path_name, create_date.strftime("%Y-%m-%d %H:%M:%S")
|
105
|
+
)
|
106
|
+
|
107
|
+
return table
|
108
|
+
|
109
|
+
try:
|
110
|
+
# with Live(generate_table(), refresh_per_second=4, screen=True) as live:
|
111
|
+
# while True:
|
112
|
+
# time.sleep(2)
|
113
|
+
# live.update(generate_table())
|
114
|
+
console = Console(
|
115
|
+
record=True, width=width, force_terminal=not jupyter, soft_wrap=True
|
116
|
+
)
|
117
|
+
with console.pager():
|
118
|
+
console.print(generate_table(), soft_wrap=True)
|
119
|
+
if save_output:
|
120
|
+
console.save_html("archives.html")
|
121
|
+
|
122
|
+
except (
|
123
|
+
InvalidParameterException,
|
124
|
+
PropertyServerException,
|
125
|
+
UserNotAuthorizedException,
|
126
|
+
ValueError,
|
127
|
+
) as e:
|
128
|
+
if type(e) is str:
|
129
|
+
print(e)
|
130
|
+
else:
|
131
|
+
print_exception_response(e)
|
132
|
+
except KeyboardInterrupt:
|
133
|
+
pass
|
134
|
+
finally:
|
135
|
+
c_client.close_session()
|
136
|
+
|
137
|
+
|
138
|
+
def main():
|
139
|
+
parser = argparse.ArgumentParser()
|
140
|
+
parser.add_argument("--server", help="Name of the server to display status for")
|
141
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
142
|
+
parser.add_argument("--userid", help="User Id")
|
143
|
+
parser.add_argument("--save-output", help="Save output to file?")
|
144
|
+
parser.add_argument("--password", help="User Password")
|
145
|
+
# parser.add_argument("--sponsor", help="Name of sponsor to search")
|
146
|
+
args = parser.parse_args()
|
147
|
+
|
148
|
+
server = args.server if args.server is not None else EGERIA_VIEW_SERVER
|
149
|
+
url = args.url if args.url is not None else EGERIA_PLATFORM_URL
|
150
|
+
userid = args.userid if args.userid is not None else EGERIA_USER
|
151
|
+
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
152
|
+
|
153
|
+
try:
|
154
|
+
save_output = args.save_output if args.save_output is not None else False
|
155
|
+
display_archive_list(server, url, userid, user_pass, save_output)
|
156
|
+
|
157
|
+
except KeyboardInterrupt:
|
158
|
+
pass
|
159
|
+
|
160
|
+
|
161
|
+
if __name__ == "__main__":
|
162
|
+
main()
|
examples/widgets/cli/egeria.py
CHANGED
@@ -26,6 +26,7 @@ from examples.widgets.cat.list_relationships import list_relationships
|
|
26
26
|
from examples.widgets.cat.list_tech_types import display_tech_types
|
27
27
|
from examples.widgets.cat.list_todos import display_to_dos as list_todos
|
28
28
|
from examples.widgets.cat.list_user_ids import list_user_ids
|
29
|
+
from examples.widgets.cat.list_archives import display_archive_list
|
29
30
|
from examples.widgets.cli.ops_config import Config
|
30
31
|
from examples.widgets.my.list_my_profile import display_my_profile
|
31
32
|
from examples.widgets.my.list_my_roles import display_my_roles
|
@@ -856,6 +857,16 @@ def show_todos(ctx):
|
|
856
857
|
)
|
857
858
|
|
858
859
|
|
860
|
+
@show.command("list-archives")
|
861
|
+
@click.pass_context
|
862
|
+
def list_archives(ctx):
|
863
|
+
"""Display a tree graph of information about an asset"""
|
864
|
+
c = ctx.obj
|
865
|
+
display_archive_list(
|
866
|
+
c.view_server, c.view_server_url, c.userid, c.password, None, c.jupyter, c.width
|
867
|
+
)
|
868
|
+
|
869
|
+
|
859
870
|
#
|
860
871
|
# Catalog User: Tell
|
861
872
|
#
|
@@ -26,6 +26,7 @@ from examples.widgets.cat.get_project_dependencies import project_dependency_vie
|
|
26
26
|
from examples.widgets.cat.list_cert_types import display_certifications
|
27
27
|
from examples.widgets.cat.list_relationships import list_relationships
|
28
28
|
from examples.widgets.cat.list_user_ids import list_user_ids
|
29
|
+
from examples.widgets.cat.list_archives import display_archive_list
|
29
30
|
|
30
31
|
# from pyegeria import ServerOps
|
31
32
|
from examples.widgets.cli.ops_config import Config
|
@@ -44,48 +45,143 @@ from examples.widgets.cli.ops_config import Config
|
|
44
45
|
#
|
45
46
|
# pass_config = click.make_pass_decorator(Config)
|
46
47
|
|
48
|
+
|
47
49
|
# @tui
|
48
50
|
# @tui('menu','menu','A textual command line interface')
|
49
51
|
@tui()
|
50
52
|
@click.version_option("0.0.1", prog_name="egeria_ops")
|
51
53
|
@click.group()
|
52
|
-
@click.option(
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
@click.option(
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
@click.option(
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
@click.option(
|
77
|
-
|
78
|
-
|
79
|
-
|
54
|
+
@click.option(
|
55
|
+
"--server",
|
56
|
+
default="active-metadata-store",
|
57
|
+
envvar="EGERIA_METADATA_STORE",
|
58
|
+
help="Egeria metadata store to work with",
|
59
|
+
)
|
60
|
+
@click.option(
|
61
|
+
"--url",
|
62
|
+
default="https://localhost:9443",
|
63
|
+
envvar="EGERIA_PLATFORM_URL",
|
64
|
+
help="URL of Egeria metadata store platform to connect to",
|
65
|
+
)
|
66
|
+
@click.option(
|
67
|
+
"--integration-daemon",
|
68
|
+
default="integration-daemon",
|
69
|
+
envvar="EGERIA_INTEGRATION_DAEMON",
|
70
|
+
help="Egeria integration daemon to work with",
|
71
|
+
)
|
72
|
+
@click.option(
|
73
|
+
"--integration_daemon_url",
|
74
|
+
default="https://localhost:9443",
|
75
|
+
envvar="EGERIA_INTEGRATION_DAEMON_URL",
|
76
|
+
help="URL of Egeria integration daemon platform to connect to",
|
77
|
+
)
|
78
|
+
@click.option(
|
79
|
+
"--view_server",
|
80
|
+
default="view-server",
|
81
|
+
envvar="EGERIA_VIEW_SERVER",
|
82
|
+
help="Egeria view server to work with",
|
83
|
+
)
|
84
|
+
@click.option(
|
85
|
+
"--view_server_url",
|
86
|
+
default="https://localhost:9443",
|
87
|
+
envvar="EGERIA_VIEW_SERVER_URL",
|
88
|
+
help="URL of Egeria view server platform to connect to",
|
89
|
+
)
|
90
|
+
@click.option(
|
91
|
+
"--engine_host",
|
92
|
+
default="engine-host",
|
93
|
+
envvar="EGERIA_ENGINE_HOST",
|
94
|
+
help="Egeria engine host to work with",
|
95
|
+
)
|
96
|
+
@click.option(
|
97
|
+
"--engine_host_url",
|
98
|
+
default="https://localhost:9443",
|
99
|
+
envvar="EGERIA_ENGINE_HOST_URL",
|
100
|
+
help="URL of Egeria engine host platform to connect to",
|
101
|
+
)
|
102
|
+
@click.option(
|
103
|
+
"--admin_user",
|
104
|
+
default="garygeeke",
|
105
|
+
envvar="EGERIA_ADMIN_USER",
|
106
|
+
help="Egeria admin user",
|
107
|
+
)
|
108
|
+
@click.option(
|
109
|
+
"--admin_user_password",
|
110
|
+
default="secret",
|
111
|
+
envvar="EGERIA_ADMIN_PASSWORD",
|
112
|
+
help="Egeria admin password",
|
113
|
+
)
|
114
|
+
@click.option(
|
115
|
+
"--userid", default="erinoverview", envvar="EGERIA_USER", help="Egeria user"
|
116
|
+
)
|
117
|
+
@click.option(
|
118
|
+
"--password",
|
119
|
+
default="secret",
|
120
|
+
envvar="EGERIA_PASSWORD",
|
121
|
+
help="Egeria user password",
|
122
|
+
)
|
123
|
+
@click.option("--timeout", default=60, help="Number of seconds to wait")
|
124
|
+
@click.option("--verbose", is_flag=True, default=False, help="Enable verbose mode")
|
125
|
+
@click.option(
|
126
|
+
"--paging",
|
127
|
+
is_flag=True,
|
128
|
+
default=False,
|
129
|
+
help="Enable paging snapshots vs live updates",
|
130
|
+
)
|
131
|
+
@click.option(
|
132
|
+
"--jupyter",
|
133
|
+
is_flag=True,
|
134
|
+
default=False,
|
135
|
+
envvar="EGERIA_JUPYTER",
|
136
|
+
help="Enable for rendering in a Jupyter terminal",
|
137
|
+
)
|
138
|
+
@click.option(
|
139
|
+
"--width",
|
140
|
+
default=200,
|
141
|
+
envvar="EGERIA_WIDTH",
|
142
|
+
help="Screen width, in characters, to use",
|
143
|
+
)
|
80
144
|
@click.pass_context
|
81
|
-
def cli(
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
145
|
+
def cli(
|
146
|
+
ctx,
|
147
|
+
server,
|
148
|
+
url,
|
149
|
+
view_server,
|
150
|
+
view_server_url,
|
151
|
+
integration_daemon,
|
152
|
+
integration_daemon_url,
|
153
|
+
engine_host,
|
154
|
+
engine_host_url,
|
155
|
+
admin_user,
|
156
|
+
admin_user_password,
|
157
|
+
userid,
|
158
|
+
password,
|
159
|
+
timeout,
|
160
|
+
paging,
|
161
|
+
verbose,
|
162
|
+
jupyter,
|
163
|
+
width,
|
164
|
+
):
|
165
|
+
"""An Egeria Command Line interface for Operations"""
|
166
|
+
ctx.obj = Config(
|
167
|
+
server,
|
168
|
+
url,
|
169
|
+
view_server,
|
170
|
+
view_server_url,
|
171
|
+
integration_daemon,
|
172
|
+
integration_daemon_url,
|
173
|
+
engine_host,
|
174
|
+
engine_host_url,
|
175
|
+
admin_user,
|
176
|
+
admin_user_password,
|
177
|
+
userid,
|
178
|
+
password,
|
179
|
+
timeout,
|
180
|
+
paging,
|
181
|
+
verbose,
|
182
|
+
jupyter,
|
183
|
+
width,
|
184
|
+
)
|
89
185
|
ctx.max_content_width = 200
|
90
186
|
ctx.ensure_object(Config)
|
91
187
|
if verbose:
|
@@ -99,38 +195,53 @@ def show(ctx):
|
|
99
195
|
pass
|
100
196
|
|
101
197
|
|
102
|
-
@show.command(
|
103
|
-
@click.option(
|
198
|
+
@show.command("tech-types")
|
199
|
+
@click.option("--tech_type", default="*", help="Tech type to search for")
|
104
200
|
@click.pass_context
|
105
201
|
def show_tech_types(ctx, tech_type):
|
106
202
|
"""List deployed technology types"""
|
107
203
|
c = ctx.obj
|
108
|
-
display_tech_types(
|
109
|
-
|
204
|
+
display_tech_types(
|
205
|
+
tech_type, c.view_server, c.view_server_url, c.userid, c.password
|
206
|
+
)
|
110
207
|
|
111
208
|
|
112
|
-
@show.command(
|
113
|
-
@click.option(
|
209
|
+
@show.command("tech-type-elements")
|
210
|
+
@click.option(
|
211
|
+
"--tech_type",
|
212
|
+
default="PostgreSQL Server",
|
213
|
+
help="Specific tech type to get elements for",
|
214
|
+
)
|
114
215
|
@click.pass_context
|
115
216
|
def show_tech_type_elements(ctx, tech_type):
|
116
217
|
"""List technology type elements"""
|
117
218
|
c = ctx.obj
|
118
|
-
tech_viewer(tech_type, c.view_server, c.view_server_url,
|
119
|
-
c.userid, c.password)
|
219
|
+
tech_viewer(tech_type, c.view_server, c.view_server_url, c.userid, c.password)
|
120
220
|
|
121
221
|
|
122
|
-
@show.command(
|
123
|
-
@click.option(
|
222
|
+
@show.command("tech-type-templates")
|
223
|
+
@click.option(
|
224
|
+
"--tech-type",
|
225
|
+
default="PostgreSQL Server",
|
226
|
+
help="Specific tech type to get elements for",
|
227
|
+
)
|
124
228
|
@click.pass_context
|
125
229
|
def show_tech_type_templates(ctx, tech_type):
|
126
230
|
"""List technology type templates"""
|
127
231
|
c = ctx.obj
|
128
|
-
template_viewer(
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
232
|
+
template_viewer(
|
233
|
+
tech_type,
|
234
|
+
c.view_server,
|
235
|
+
c.view_server_url,
|
236
|
+
c.userid,
|
237
|
+
c.password,
|
238
|
+
c.jupyter,
|
239
|
+
c.width,
|
240
|
+
)
|
241
|
+
|
242
|
+
|
243
|
+
@show.command("assets")
|
244
|
+
@click.argument("search-string")
|
134
245
|
@click.pass_context
|
135
246
|
def show_assets(ctx, search_string):
|
136
247
|
"""Find and display assets
|
@@ -140,24 +251,47 @@ def show_assets(ctx, search_string):
|
|
140
251
|
search-string must be greater than four characters.
|
141
252
|
"""
|
142
253
|
c = ctx.obj
|
143
|
-
display_assets(
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
254
|
+
display_assets(
|
255
|
+
search_string,
|
256
|
+
c.view_server,
|
257
|
+
c.view_server_url,
|
258
|
+
c.userid,
|
259
|
+
c.password,
|
260
|
+
60,
|
261
|
+
c.jupyter,
|
262
|
+
c.width,
|
263
|
+
)
|
264
|
+
|
265
|
+
|
266
|
+
@show.command("glossary-terms")
|
267
|
+
@click.option(
|
268
|
+
"--search-string",
|
269
|
+
default="*",
|
270
|
+
help="List glossary terms similar to search string - minimum of 4 characters",
|
271
|
+
)
|
272
|
+
@click.option(
|
273
|
+
"--glossary_guid",
|
274
|
+
default=None,
|
275
|
+
help="Optionally restrict search to glossary with the specified guid",
|
276
|
+
)
|
151
277
|
@click.pass_context
|
152
278
|
def show_terms(ctx, search_string, glossary_guid):
|
153
279
|
"""Find and display glossary terms"""
|
154
280
|
c = ctx.obj
|
155
|
-
display_glossary_terms(
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
281
|
+
display_glossary_terms(
|
282
|
+
search_string,
|
283
|
+
glossary_guid,
|
284
|
+
c.view_server,
|
285
|
+
c.view_server_url,
|
286
|
+
c.userid,
|
287
|
+
c.password,
|
288
|
+
c.jupyter,
|
289
|
+
c.width,
|
290
|
+
)
|
291
|
+
|
292
|
+
|
293
|
+
@show.command("asset-graph")
|
294
|
+
@click.argument("asset_guid", nargs=1)
|
161
295
|
@click.pass_context
|
162
296
|
def show_asset_graph(ctx, asset_guid):
|
163
297
|
"""Display a tree graph of information about an asset
|
@@ -168,108 +302,203 @@ def show_asset_graph(ctx, asset_guid):
|
|
168
302
|
|
169
303
|
"""
|
170
304
|
c = ctx.obj
|
171
|
-
asset_viewer(
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
305
|
+
asset_viewer(
|
306
|
+
asset_guid,
|
307
|
+
c.view_server,
|
308
|
+
c.view_server_url,
|
309
|
+
c.userid,
|
310
|
+
c.password,
|
311
|
+
c.jupyter,
|
312
|
+
c.width,
|
313
|
+
)
|
314
|
+
|
315
|
+
|
316
|
+
@show.command("collection")
|
317
|
+
@click.option(
|
318
|
+
"--root_collection",
|
319
|
+
default="Root Sustainability Collection",
|
320
|
+
help="View of tree of collections from a given root",
|
321
|
+
)
|
178
322
|
@click.pass_context
|
179
323
|
def show_asset_graph(ctx, root_collection):
|
180
|
-
"""Display a tree graph of information about an asset
|
324
|
+
"""Display a tree graph of information about an asset"""
|
181
325
|
c = ctx.obj
|
182
|
-
collection_viewer(
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
326
|
+
collection_viewer(
|
327
|
+
root_collection,
|
328
|
+
c.view_server,
|
329
|
+
c.view_server_url,
|
330
|
+
c.userid,
|
331
|
+
c.password,
|
332
|
+
c.jupyter,
|
333
|
+
c.width,
|
334
|
+
)
|
335
|
+
|
336
|
+
|
337
|
+
@show.command("projects")
|
338
|
+
@click.option("--search-string", default="*", help="List Projects by Search String")
|
189
339
|
@click.pass_context
|
190
340
|
def show_projects(ctx, search_string):
|
191
|
-
"""Display a list of Egeria projects
|
341
|
+
"""Display a list of Egeria projects"""
|
192
342
|
c = ctx.obj
|
193
|
-
display_project_list(
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
343
|
+
display_project_list(
|
344
|
+
search_string,
|
345
|
+
c.view_server,
|
346
|
+
c.view_server_url,
|
347
|
+
c.userid,
|
348
|
+
c.password,
|
349
|
+
False,
|
350
|
+
c.jupyter,
|
351
|
+
c.width,
|
352
|
+
)
|
353
|
+
|
354
|
+
|
355
|
+
@show.command("certification-types")
|
356
|
+
@click.option("--search-string", default="CertificationType", help="")
|
198
357
|
@click.pass_context
|
199
358
|
def show_certification_types(ctx, search_string):
|
200
359
|
"""Show certification types
|
201
|
-
|
360
|
+
- generally stay with the default..
|
202
361
|
"""
|
203
362
|
c = ctx.obj
|
204
|
-
display_certifications(
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
363
|
+
display_certifications(
|
364
|
+
search_string,
|
365
|
+
c.view_server,
|
366
|
+
c.view_server_url,
|
367
|
+
c.userid,
|
368
|
+
c.password,
|
369
|
+
c.timeout,
|
370
|
+
c.jupyter,
|
371
|
+
c.width,
|
372
|
+
)
|
373
|
+
|
374
|
+
|
375
|
+
@show.command("project-structure")
|
376
|
+
@click.option(
|
377
|
+
"--project",
|
378
|
+
default="Clinical Trials Management",
|
379
|
+
help="Enter the root project to start from",
|
380
|
+
)
|
210
381
|
@click.pass_context
|
211
382
|
def show_project_structure(ctx, project):
|
212
383
|
"""Show the organization structure of the project starting from a root project"""
|
213
384
|
c = ctx.obj
|
214
|
-
project_structure_viewer(
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
385
|
+
project_structure_viewer(
|
386
|
+
project,
|
387
|
+
c.view_server,
|
388
|
+
c.view_server_url,
|
389
|
+
c.userid,
|
390
|
+
c.password,
|
391
|
+
c.jupyter,
|
392
|
+
c.width,
|
393
|
+
c.timeout,
|
394
|
+
)
|
395
|
+
|
396
|
+
|
397
|
+
@show.command("project-dependencies")
|
398
|
+
@click.option(
|
399
|
+
"--project",
|
400
|
+
default="Clinical Trials Management",
|
401
|
+
help="Enter the root project to start from",
|
402
|
+
)
|
220
403
|
@click.pass_context
|
221
404
|
def show_project_dependencies(ctx, project):
|
222
405
|
"""Show the dependencies of a project starting from a root project"""
|
223
406
|
c = ctx.obj
|
224
|
-
project_dependency_viewer(
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
407
|
+
project_dependency_viewer(
|
408
|
+
project,
|
409
|
+
c.view_server,
|
410
|
+
c.view_server_url,
|
411
|
+
c.userid,
|
412
|
+
c.password,
|
413
|
+
c.jupyter,
|
414
|
+
c.width,
|
415
|
+
c.timeout,
|
416
|
+
)
|
417
|
+
|
418
|
+
|
419
|
+
@show.command("relationships")
|
420
|
+
@click.option(
|
421
|
+
"--relationship",
|
422
|
+
default="Certification",
|
423
|
+
help="Relationship type name to search for.",
|
424
|
+
)
|
232
425
|
@click.pass_context
|
233
426
|
def show_relationships(ctx, relationship):
|
234
427
|
"""Show the structure of the project starting from a root project"""
|
235
428
|
c = ctx.obj
|
236
|
-
list_relationships(
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
429
|
+
list_relationships(
|
430
|
+
relationship,
|
431
|
+
c.view_server,
|
432
|
+
c.view_server_url,
|
433
|
+
c.userid,
|
434
|
+
c.password,
|
435
|
+
c.timeout,
|
436
|
+
c.jupyter,
|
437
|
+
c.width,
|
438
|
+
)
|
439
|
+
|
440
|
+
|
441
|
+
@show.command("to-dos")
|
442
|
+
@click.option("--search-string", default="*", help="View the list of To-Do items")
|
443
|
+
@click.option(
|
444
|
+
"--status",
|
445
|
+
type=click.Choice(
|
446
|
+
["OPEN", "IN_PROGRESS", "WAITING", "COMPLETE", "ABANDONED", "None"],
|
447
|
+
case_sensitive="False",
|
448
|
+
),
|
449
|
+
help="Enter an optional status filter",
|
450
|
+
required=False,
|
451
|
+
default=None,
|
452
|
+
)
|
246
453
|
@click.pass_context
|
247
454
|
def show_todos(ctx, search_string, status):
|
248
|
-
"""Display a tree graph of information about an asset
|
455
|
+
"""Display a tree graph of information about an asset"""
|
249
456
|
c = ctx.obj
|
250
|
-
list_todos(
|
251
|
-
|
252
|
-
|
253
|
-
|
457
|
+
list_todos(
|
458
|
+
search_string,
|
459
|
+
status,
|
460
|
+
c.view_server,
|
461
|
+
c.view_server_url,
|
462
|
+
c.userid,
|
463
|
+
c.password,
|
464
|
+
c.jupyter,
|
465
|
+
c.width,
|
466
|
+
)
|
467
|
+
|
468
|
+
|
469
|
+
@show.command("user-ids")
|
254
470
|
@click.pass_context
|
255
471
|
def show_todos(ctx):
|
256
|
-
"""Display a tree graph of information about an asset
|
472
|
+
"""Display a tree graph of information about an asset"""
|
257
473
|
c = ctx.obj
|
258
|
-
list_user_ids(
|
259
|
-
|
474
|
+
list_user_ids(
|
475
|
+
c.view_server, c.view_server_url, c.userid, c.password, c.jupyter, c.width
|
476
|
+
)
|
477
|
+
|
478
|
+
|
479
|
+
@show.command("list-archives")
|
480
|
+
@click.pass_context
|
481
|
+
def list_archives(ctx):
|
482
|
+
"""Display a tree graph of information about an asset"""
|
483
|
+
c = ctx.obj
|
484
|
+
display_archive_list(
|
485
|
+
c.view_server, c.view_server_url, c.userid, c.password, None, c.jupyter, c.width
|
486
|
+
)
|
487
|
+
|
260
488
|
|
261
489
|
#
|
262
490
|
# Tell
|
263
491
|
#
|
264
492
|
|
265
|
-
|
493
|
+
|
494
|
+
@cli.group("tell")
|
266
495
|
@click.pass_context
|
267
496
|
def tell(ctx):
|
268
497
|
"""Perform actions an Egeria Objects"""
|
269
498
|
pass
|
270
499
|
|
271
500
|
|
272
|
-
@tell.group(
|
501
|
+
@tell.group("survey")
|
273
502
|
@click.pass_context
|
274
503
|
def survey(ctx):
|
275
504
|
"""Refresh the specified integration connector or ALL connectors if not specified"""
|
@@ -277,10 +506,13 @@ def survey(ctx):
|
|
277
506
|
pass
|
278
507
|
|
279
508
|
|
280
|
-
@survey.command(
|
509
|
+
@survey.command("survey-uc-server")
|
281
510
|
@click.pass_context
|
282
|
-
@click.option(
|
283
|
-
|
511
|
+
@click.option(
|
512
|
+
"--uc_endpoint",
|
513
|
+
default="https://localhost:8080",
|
514
|
+
help="Endpoint of the Unity Catalog Server to Survey",
|
515
|
+
)
|
284
516
|
def survey_uc_server(ctx, uc_endpoint):
|
285
517
|
"""Survey the Unity Catalog server at the given endpoint"""
|
286
518
|
c = ctx.obj
|
@@ -289,5 +521,5 @@ def survey_uc_server(ctx, uc_endpoint):
|
|
289
521
|
# c.userid, c.password)
|
290
522
|
|
291
523
|
|
292
|
-
if __name__ ==
|
524
|
+
if __name__ == "__main__":
|
293
525
|
cli()
|
@@ -35,10 +35,8 @@ EGERIA_VIEW_SERVER_URL = os.environ.get(
|
|
35
35
|
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
36
36
|
)
|
37
37
|
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
38
|
-
EGERIA_ENGINE_HOST = os.environ.get("
|
39
|
-
EGERIA_ENGINE_HOST_URL = os.environ.get(
|
40
|
-
"INTEGRATION_ENGINE_HOST_URL", "https://localhost:9443"
|
41
|
-
)
|
38
|
+
EGERIA_ENGINE_HOST = os.environ.get("ENGINE_HOST", "engine-host")
|
39
|
+
EGERIA_ENGINE_HOST_URL = os.environ.get("ENGINE_HOST_URL", "https://localhost:9443")
|
42
40
|
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
43
41
|
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
44
42
|
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
@@ -173,7 +171,7 @@ def main_paging():
|
|
173
171
|
url = args.url if args.url is not None else EGERIA_ENGINE_HOST_URL
|
174
172
|
userid = args.userid if args.userid is not None else EGERIA_USER
|
175
173
|
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
176
|
-
|
174
|
+
|
177
175
|
display_gov_eng_status(
|
178
176
|
server=server, url=url, username=userid, user_pass=user_pass, paging=True
|
179
177
|
)
|
@@ -8,6 +8,7 @@ examples/widgets/cat/get_project_dependencies.py,sha256=MSI7-W8Cntiv0c264g_Zmoi2
|
|
8
8
|
examples/widgets/cat/get_project_structure.py,sha256=yUG5cbBfjLrHwD8fQmmmUPNlfmAKGXUedYQFMr_MlaI,5876
|
9
9
|
examples/widgets/cat/get_tech_type_elements.py,sha256=-m3Q0BoNqkCtV8h75vMwTcOV-_ymEXmnJcr4Ec7WMAw,6180
|
10
10
|
examples/widgets/cat/get_tech_type_template.py,sha256=gMFVcgCIm09GQu1Vsc5ZUVH9XLhItAG1eVGZJrcnHeQ,6174
|
11
|
+
examples/widgets/cat/list_archives.py,sha256=bQ0Uph35hMvufn15nO1ulYsZ20fyZmvCr57sCDgHMy8,5498
|
11
12
|
examples/widgets/cat/list_assets.py,sha256=bNwSaBDz661hfnc2Rn4j4HPHAugKvz0XwN9L1m4FVQk,6529
|
12
13
|
examples/widgets/cat/list_cert_types.py,sha256=-FEftRK36pOAXYr8OprvL6T_FcRyVtgfqzSKX74XC5o,7004
|
13
14
|
examples/widgets/cat/list_glossary.py,sha256=ybHFl1qebnE48GqtYaM1Gl26Vs9f9YAPAnrrAHHJqHs,5705
|
@@ -17,8 +18,8 @@ examples/widgets/cat/list_tech_types.py,sha256=20T4v6L5qeebSsaL1nGkFMDAIsy2W3A3S
|
|
17
18
|
examples/widgets/cat/list_todos.py,sha256=_Pe3h74doX_cOoe0Z5_FvZtETBk3tkw2evfRpRgai5E,6283
|
18
19
|
examples/widgets/cat/list_user_ids.py,sha256=7JinL7rknPbGusIb8ikXKEaV1vvbuvx_WWtbmlfS_DY,5093
|
19
20
|
examples/widgets/cli/__init__.py,sha256=6d_R0KZBNnJy9EBz9J2xvGFlx-3j_ZPqPCxKgdvYeDQ,291
|
20
|
-
examples/widgets/cli/egeria.py,sha256=
|
21
|
-
examples/widgets/cli/egeria_cat.py,sha256=
|
21
|
+
examples/widgets/cli/egeria.py,sha256=jhejo0UEYnBsNxZzk4QJJs82rG7_Lpv1ScBeVlMFqeI,28387
|
22
|
+
examples/widgets/cli/egeria_cat.py,sha256=fSclOYRPTz_lEH-aVpss3jS-vDm2S9EJ5w-M_Q6qh7k,13085
|
22
23
|
examples/widgets/cli/egeria_my.py,sha256=cGehUFrJKwNQ49CQ-rEX0M-6yjviRSb9KQjAcKD7Mq4,5993
|
23
24
|
examples/widgets/cli/egeria_ops.py,sha256=pCP-0fpKOJ2XQ78lpw-t_VI3pytur3vAR3XykSlc_6U,11179
|
24
25
|
examples/widgets/cli/egeria_tech.py,sha256=AA2PNDKebdDObtrmjF6BHaSuSpNVeQgB61CSX1cBvsg,10255
|
@@ -41,7 +42,7 @@ examples/widgets/ops/monitor_asset_events.py,sha256=cjdlVqE0XYnoRW3aorNbsVkjByDX
|
|
41
42
|
examples/widgets/ops/monitor_coco_status.py,sha256=ERz3OJ0TXImNKHGD4gJvgT3pl2gS23ewAdUuYVLUhEE,3299
|
42
43
|
examples/widgets/ops/monitor_engine_activity.py,sha256=m18OSnRoo5ut0WKKOWNoFGXJW_npjp6hzHK3RUQG8T0,8479
|
43
44
|
examples/widgets/ops/monitor_engine_activity_c.py,sha256=6YAjraLXsRoy-R9vSQlDbgrMMBaxkp8nfIp-ayz3nZs,9340
|
44
|
-
examples/widgets/ops/monitor_gov_eng_status.py,sha256=
|
45
|
+
examples/widgets/ops/monitor_gov_eng_status.py,sha256=gAJ0m4aYnccNL2Io8XaQ-x_l7mWmDBAXIl_RoZxC-4I,6593
|
45
46
|
examples/widgets/ops/monitor_integ_daemon_status.py,sha256=u15-tvGveO7_yV7JJmYkxiEDnq5KBk8J4hkw0id_LFA,9224
|
46
47
|
examples/widgets/ops/monitor_platform_status.py,sha256=hn96QuOjCndSDWl1-DAzk9O8D68YoRP1ALOlVfWVQgo,6400
|
47
48
|
examples/widgets/ops/monitor_server_list.py,sha256=Uhtn8lv7QVXJBi9DSR3Nelmz8TB0vOsat10nFS6Nu20,4637
|
@@ -90,8 +91,8 @@ pyegeria/server_operations.py,sha256=1z2wZLdrNZG6HlswY_Eh8qI1mlcjsQ59zO-AMy9XbUU
|
|
90
91
|
pyegeria/tech_guids_31-08-2024 14:33.py,sha256=B3fytBw9dmjnlEaCKgt6oQoGh-8HUBG0mFQeyDoUEYQ,6229
|
91
92
|
pyegeria/utils.py,sha256=pkVmS3RrbjaS9yz7FtOCwaOfV5FMqz-__Rt5koCnd9c,5374
|
92
93
|
pyegeria/valid_metadata_omvs.py,sha256=aisdRodIwJSkyArAzfm_sEnBELh69xE8k4Nea-vHu8M,36745
|
93
|
-
pyegeria-0.7.
|
94
|
-
pyegeria-0.7.
|
95
|
-
pyegeria-0.7.
|
96
|
-
pyegeria-0.7.
|
97
|
-
pyegeria-0.7.
|
94
|
+
pyegeria-0.7.44.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
95
|
+
pyegeria-0.7.44.dist-info/METADATA,sha256=jbP_LfJ8hVvHGQje7ZWjEpdmNPnBcQjCvLErcfF3trI,2818
|
96
|
+
pyegeria-0.7.44.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
97
|
+
pyegeria-0.7.44.dist-info/entry_points.txt,sha256=5Q9bDxIqPgdhd3lDnzdRSCYy9hZtNm_BL49bcmbBpGQ,3808
|
98
|
+
pyegeria-0.7.44.dist-info/RECORD,,
|
@@ -16,6 +16,7 @@ hey_egeria_cat=examples.widgets.cli.egeria_cat:cli
|
|
16
16
|
hey_egeria_my=examples.widgets.cli.egeria_my:cli
|
17
17
|
hey_egeria_ops=examples.widgets.cli.egeria_ops:cli
|
18
18
|
hey_egeria_tech=examples.widgets.cli.egeria_cat:cli
|
19
|
+
list_archives=examples.widgets.cat.list_archives:main
|
19
20
|
list_asset_types=examples.widgets.tech.list_asset_types:main
|
20
21
|
list_assets=examples.widgets.cat.list_assets:main
|
21
22
|
list_catalog_targets=examples.widgets.ops.list_catalog_targets:main
|
File without changes
|
File without changes
|