pyegeria 0.5.9.2__py3-none-any.whl → 0.5.9.3__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/cli/egeria.py +660 -0
- examples/widgets/cli/{egeria_my.py → egeria_per.py} +2 -2
- examples/widgets/personal/list_my_profile.py +1 -1
- {pyegeria-0.5.9.2.dist-info → pyegeria-0.5.9.3.dist-info}/METADATA +1 -1
- {pyegeria-0.5.9.2.dist-info → pyegeria-0.5.9.3.dist-info}/RECORD +8 -7
- {pyegeria-0.5.9.2.dist-info → pyegeria-0.5.9.3.dist-info}/entry_points.txt +2 -1
- {pyegeria-0.5.9.2.dist-info → pyegeria-0.5.9.3.dist-info}/LICENSE +0 -0
- {pyegeria-0.5.9.2.dist-info → pyegeria-0.5.9.3.dist-info}/WHEEL +0 -0
@@ -0,0 +1,660 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
4
|
+
Copyright Contributors to the ODPi Egeria project.
|
5
|
+
|
6
|
+
|
7
|
+
A command line interface for Egeria Users - all commands
|
8
|
+
|
9
|
+
This is an emerging capability based on the **click** package. Feedback welcome!
|
10
|
+
|
11
|
+
"""
|
12
|
+
import click
|
13
|
+
from trogon import tui
|
14
|
+
|
15
|
+
from examples.widgets.cli.ops_config import Config
|
16
|
+
|
17
|
+
from examples.widgets.personal.monitor_open_todos import display_todos
|
18
|
+
from examples.widgets.personal.monitor_my_todos import display_my_todos
|
19
|
+
from examples.widgets.personal.list_my_profile import display_my_profile
|
20
|
+
from examples.widgets.personal.list_my_roles import display_my_roles
|
21
|
+
|
22
|
+
from examples.widgets.catalog_user.list_tech_types import display_tech_types
|
23
|
+
|
24
|
+
from examples.widgets.tech.get_guid_info import display_guid
|
25
|
+
from examples.widgets.tech.get_tech_details import tech_details_viewer
|
26
|
+
from examples.widgets.tech.list_asset_types import display_asset_types
|
27
|
+
from examples.widgets.tech.list_registered_services import display_registered_svcs
|
28
|
+
from examples.widgets.tech.list_relationship_types import display_relationship_types
|
29
|
+
from examples.widgets.tech.list_tech_templates import display_templates_spec
|
30
|
+
from examples.widgets.tech.list_valid_metadata_values import display_metadata_values
|
31
|
+
from examples.widgets.catalog_user.get_tech_type_template import template_viewer
|
32
|
+
|
33
|
+
|
34
|
+
from examples.widgets.catalog_user.get_asset_graph import asset_viewer
|
35
|
+
from examples.widgets.catalog_user.get_collection import collection_viewer
|
36
|
+
from examples.widgets.catalog_user.get_tech_type_elements import tech_viewer
|
37
|
+
from examples.widgets.catalog_user.get_tech_type_template import template_viewer
|
38
|
+
from examples.widgets.catalog_user.list_assets import display_assets
|
39
|
+
from examples.widgets.catalog_user.list_glossary import display_glossary_terms
|
40
|
+
from examples.widgets.catalog_user.list_tech_types import display_tech_types
|
41
|
+
from examples.widgets.catalog_user.list_projects import display_project_list
|
42
|
+
from examples.widgets.catalog_user.list_todos import display_to_dos
|
43
|
+
|
44
|
+
from examples.widgets.operational.engine_actions import start_server as start_engine_host, \
|
45
|
+
stop_server as stop_engine_host
|
46
|
+
from examples.widgets.operational.integration_daemon_actions import (add_catalog_target, remove_catalog_target,
|
47
|
+
update_catalog_target, stop_server, start_server)
|
48
|
+
from examples.widgets.operational.list_catalog_targets import display_catalog_targets
|
49
|
+
from examples.widgets.operational.load_archive import load_archive
|
50
|
+
from examples.widgets.operational.monitor_engine_activity import display_engine_activity
|
51
|
+
from examples.widgets.operational.monitor_gov_eng_status import display_gov_eng_status
|
52
|
+
from examples.widgets.operational.monitor_integ_daemon_status import display_integration_daemon_status
|
53
|
+
from examples.widgets.operational.monitor_platform_status import display_status as p_display_status
|
54
|
+
from examples.widgets.operational.monitor_server_list import display_status as display_list
|
55
|
+
from examples.widgets.operational.monitor_server_status import display_status as s_display_status
|
56
|
+
from examples.widgets.operational.refresh_integration_daemon import refresh_connector
|
57
|
+
from examples.widgets.operational.restart_integration_daemon import restart_connector
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
# class Config(object):
|
62
|
+
# def __init__(self, server: str = None, url: str = None, userid:str = None, password:str = None,
|
63
|
+
# timeout:int = 30, paging: bool = False):
|
64
|
+
# self.server = server
|
65
|
+
# self.url = url
|
66
|
+
# self.userid = userid
|
67
|
+
# self.password = password
|
68
|
+
# self.timeout = timeout
|
69
|
+
# self.paging = paging
|
70
|
+
#
|
71
|
+
#
|
72
|
+
# pass_config = click.make_pass_decorator(Config)
|
73
|
+
|
74
|
+
@tui()
|
75
|
+
# @tui('menu', 'menu', 'A textual command line interface')
|
76
|
+
@click.version_option("0.0.1", prog_name="egeria_ops")
|
77
|
+
|
78
|
+
@click.group()
|
79
|
+
@click.option('--server', default='active-metadata-store', envvar='EGERIA_METADATA_STORE',
|
80
|
+
help='Egeria metadata store to work with')
|
81
|
+
@click.option('--url', default='https://localhost:9443', envvar='EGERIA_PLATFORM_URL',
|
82
|
+
help='URL of Egeria metadata store platform to connect to')
|
83
|
+
@click.option('--integration-daemon', default='integration-daemon', envvar='EGERIA_INTEGRATION_DAEMON',
|
84
|
+
help='Egeria integration daemon to work with')
|
85
|
+
@click.option('--integration_daemon_url', default='https://localhost:9443', envvar='EGERIA_INTEGRATION_DAEMON_URL',
|
86
|
+
help='URL of Egeria integration daemon platform to connect to')
|
87
|
+
@click.option('--view_server', default='view-server', envvar='EGERIA_VIEW_SERVER',
|
88
|
+
help='Egeria view server to work with')
|
89
|
+
@click.option('--view_server_url', default='https://localhost:9443', envvar='EGERIA_VIEW_SERVER_URL',
|
90
|
+
help='URL of Egeria view server platform to connect to')
|
91
|
+
@click.option('--engine_host', default='engine-host', envvar='EGERIA_ENGINE_HOST',
|
92
|
+
help='Egeria engine host to work with')
|
93
|
+
@click.option('--engine_host_url', default='https://localhost:9443', envvar='EGERIA_ENGINE_HOST_URL',
|
94
|
+
help='URL of Egeria engine host platform to connect to')
|
95
|
+
@click.option('--admin_user', default='garygeeke', envvar='EGERIA_ADMIN_USER', help='Egeria admin user')
|
96
|
+
@click.option('--admin_user_password', default='secret', envvar='EGERIA_ADMIN_PASSWORD',
|
97
|
+
help='Egeria admin password')
|
98
|
+
@click.option('--userid', default='garygeeke', envvar='EGERIA_USER', help='Egeria user')
|
99
|
+
@click.option('--password', default='secret', envvar='EGERIA_PASSWORD',
|
100
|
+
help='Egeria user password')
|
101
|
+
@click.option('--timeout', default=60, help='Number of seconds to wait')
|
102
|
+
@click.option('--verbose', is_flag=True, default=False, help='Enable verbose mode')
|
103
|
+
@click.option('--paging', is_flag=True, default=False, help='Enable paging snapshots vs live updates')
|
104
|
+
@click.option('--jupyter', is_flag=True, default=False, envvar='EGERIA_JUPYTER',
|
105
|
+
help='Enable for rendering in a Jupyter terminal')
|
106
|
+
@click.option('--width', default=200, envvar='EGERIA_WIDTH', help='Screen width, in characters, to use')
|
107
|
+
@click.pass_context
|
108
|
+
def cli(ctx, server, url, view_server, view_server_url, integration_daemon, integration_daemon_url,
|
109
|
+
engine_host, engine_host_url, admin_user, admin_user_password, userid, password, timeout, paging,
|
110
|
+
verbose, jupyter, width):
|
111
|
+
"""An Egeria Command Line interface for Operations """
|
112
|
+
ctx.obj = Config(server, url, view_server, view_server_url, integration_daemon,
|
113
|
+
integration_daemon_url, engine_host, engine_host_url,
|
114
|
+
admin_user, admin_user_password, userid, password,
|
115
|
+
timeout, paging, verbose, jupyter, width)
|
116
|
+
ctx.max_content_width = 200
|
117
|
+
ctx.ensure_object(Config)
|
118
|
+
if verbose:
|
119
|
+
click.echo(f"we are in verbose mode - server is {server}")
|
120
|
+
|
121
|
+
#
|
122
|
+
# Personal: Show
|
123
|
+
#
|
124
|
+
@cli.group('personal')
|
125
|
+
@click.pass_context
|
126
|
+
def personal(ctx):
|
127
|
+
"Work with my information"
|
128
|
+
pass
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
@personal.group("show")
|
133
|
+
@click.pass_context
|
134
|
+
def show(ctx):
|
135
|
+
"""Display an Egeria Object"""
|
136
|
+
pass
|
137
|
+
|
138
|
+
|
139
|
+
@show.command('my-profile')
|
140
|
+
@click.pass_context
|
141
|
+
def show_my_profile(ctx):
|
142
|
+
"""Display my profiles
|
143
|
+
|
144
|
+
Usage: show my-profile
|
145
|
+
|
146
|
+
"""
|
147
|
+
c = ctx.obj
|
148
|
+
display_my_profile( c.view_server, c.view_server_url,
|
149
|
+
c.userid, c.password, c.jupyter, c.width)
|
150
|
+
|
151
|
+
@show.command('my-roles')
|
152
|
+
@click.pass_context
|
153
|
+
def show_my_roles(ctx):
|
154
|
+
"""Display my profiles
|
155
|
+
|
156
|
+
Usage: show my-profile
|
157
|
+
|
158
|
+
"""
|
159
|
+
c = ctx.obj
|
160
|
+
display_my_roles( c.view_server, c.view_server_url,
|
161
|
+
c.userid, c.password, c.jupyter, c.width)
|
162
|
+
|
163
|
+
|
164
|
+
@show.command('my-to-dos')
|
165
|
+
@click.pass_context
|
166
|
+
def show_my_todos(ctx):
|
167
|
+
"""Show my To-Dos
|
168
|
+
|
169
|
+
Usage: show my-to-dos
|
170
|
+
|
171
|
+
"""
|
172
|
+
c = ctx.obj
|
173
|
+
display_my_todos(c.view_server, c.view_server_url,
|
174
|
+
c.userid, c.password, c.jupyter, c.width)
|
175
|
+
|
176
|
+
|
177
|
+
@show.command('open-to-dos')
|
178
|
+
@click.pass_context
|
179
|
+
def show_open_todos(ctx):
|
180
|
+
"""Display a live status view of Egeria servers for the specified Egeria platform
|
181
|
+
|
182
|
+
Usage: show tech-details <tech-name>
|
183
|
+
|
184
|
+
tech-name is a valid technology name (see 'show tech-types')
|
185
|
+
"""
|
186
|
+
c = ctx.obj
|
187
|
+
display_todos( c.view_server, c.view_server_url, c.userid, c.password, c.jupyter, c.width)
|
188
|
+
|
189
|
+
#
|
190
|
+
# Personal: Tell
|
191
|
+
#
|
192
|
+
|
193
|
+
@personal.group('tell')
|
194
|
+
@click.pass_context
|
195
|
+
def tell(ctx):
|
196
|
+
"""Perform actions an Egeria Objects"""
|
197
|
+
pass
|
198
|
+
|
199
|
+
#
|
200
|
+
# Technical User: Show
|
201
|
+
#
|
202
|
+
@cli.group("technical")
|
203
|
+
@click.pass_context
|
204
|
+
def technical(ctx):
|
205
|
+
"""Commands for Technical Users"""
|
206
|
+
pass
|
207
|
+
|
208
|
+
|
209
|
+
@technical.group("show")
|
210
|
+
@click.pass_context
|
211
|
+
def show(ctx):
|
212
|
+
"""Display an Egeria Object"""
|
213
|
+
pass
|
214
|
+
|
215
|
+
|
216
|
+
@show.command('guid-info')
|
217
|
+
@click.argument('guid', nargs=1)
|
218
|
+
@click.pass_context
|
219
|
+
def show_guid_infos(ctx, guid):
|
220
|
+
"""Display a live status view of known platforms
|
221
|
+
|
222
|
+
Usage: show guid-info <a guid>
|
223
|
+
|
224
|
+
"""
|
225
|
+
c = ctx.obj
|
226
|
+
display_guid(guid, c.server, c.url,
|
227
|
+
c.user_id, c.password, c.jupyter, c.width)
|
228
|
+
|
229
|
+
|
230
|
+
@show.command('tech-types')
|
231
|
+
@click.option('--search-string', default='*', help='Tech type to search for')
|
232
|
+
@click.pass_context
|
233
|
+
def show_tech_types(ctx, search_string):
|
234
|
+
"""List deployed technology types
|
235
|
+
|
236
|
+
Usage: show tech-types <optional search-string>
|
237
|
+
|
238
|
+
All tech-types will be returned if no search-string is specified.
|
239
|
+
|
240
|
+
"""
|
241
|
+
|
242
|
+
|
243
|
+
c = ctx.obj
|
244
|
+
display_tech_types(search_string, c.view_server, c.view_server_url,
|
245
|
+
c.userid, c.password)
|
246
|
+
|
247
|
+
|
248
|
+
@show.command('tech-details')
|
249
|
+
@click.argument('tech-name')
|
250
|
+
@click.pass_context
|
251
|
+
def show_tech_details(ctx, tech_name):
|
252
|
+
"""Display a live status view of Egeria servers for the specified Egeria platform
|
253
|
+
|
254
|
+
Usage: show tech-details <tech-name>
|
255
|
+
|
256
|
+
tech-name is a valid technology name (see 'show tech-types')
|
257
|
+
"""
|
258
|
+
c = ctx.obj
|
259
|
+
tech_details_viewer(tech_name, c.view_server, c.view_server_url, c.userid, c.password, c.jupyter, c.width)
|
260
|
+
|
261
|
+
|
262
|
+
@show.command("asset-types")
|
263
|
+
@click.pass_context
|
264
|
+
def show_asset_types(ctx):
|
265
|
+
"""Display engine-host status information"""
|
266
|
+
c = ctx.obj
|
267
|
+
display_asset_types(c.view_server, c.view_server_url,
|
268
|
+
c.userid, c.password,
|
269
|
+
c.jupyter, c.width)
|
270
|
+
|
271
|
+
|
272
|
+
@show.command('registered-services')
|
273
|
+
@click.option('--services',
|
274
|
+
type=click.Choice(['all', 'access-services', 'common-services', 'engine-services',
|
275
|
+
'governance-services', 'integration-services', 'view-services'],
|
276
|
+
case_sensitive=False), default='all', help='Which service group to display')
|
277
|
+
@click.pass_context
|
278
|
+
def show_registered_services(ctx, services):
|
279
|
+
"""Show information about a registered services"""
|
280
|
+
c = ctx.obj
|
281
|
+
display_registered_svcs(services, c.view_server, c.view_server_url,
|
282
|
+
c.userid, c.password, c.jupyter, c.width)
|
283
|
+
|
284
|
+
|
285
|
+
@show.command('relationship-types')
|
286
|
+
@click.option('--rel-type', default='AssetOwner', help='Relationship type to get information about')
|
287
|
+
@click.pass_context
|
288
|
+
def show_relationship_types(ctx, rel_type):
|
289
|
+
"""Show information about the specified relationship type"""
|
290
|
+
c = ctx.obj
|
291
|
+
display_relationship_types(rel_type, c.view_server, c.view_server_url,
|
292
|
+
|
293
|
+
c.userid, c.password, False, c.jupyter, c.width)
|
294
|
+
|
295
|
+
|
296
|
+
@show.command("tech-templates")
|
297
|
+
@click.pass_context
|
298
|
+
@click.option('--search-string', default='*', help='Technology type to get information about')
|
299
|
+
def tech_templates(ctx, search_string):
|
300
|
+
"""Display template information about the specified technology."""
|
301
|
+
c = ctx.obj
|
302
|
+
template_viewer(search_string, c.view_server, c.view_server_url,
|
303
|
+
c.userid, c.password, c.jupyter, c.width)
|
304
|
+
|
305
|
+
@show.command("tech-template-spec")
|
306
|
+
@click.pass_context
|
307
|
+
@click.option('--search-string', default='*', help='Technology type to get information about')
|
308
|
+
def tech_template_spec(ctx, search_string):
|
309
|
+
"""Display template specification information about the specified technology."""
|
310
|
+
c = ctx.obj
|
311
|
+
display_templates_spec(search_string, c.view_server, c.view_server_url,
|
312
|
+
c.userid, c.password, c.jupyter, c.width)
|
313
|
+
|
314
|
+
|
315
|
+
@show.command("valid-metadata-values")
|
316
|
+
@click.pass_context
|
317
|
+
@click.option('--property', default='projectHealth', help='Metadata property to query')
|
318
|
+
@click.option('--type-name', default='Project', help='Metadata type to query')
|
319
|
+
def valid_metadata_values(ctx, property, type_name):
|
320
|
+
"""Display the valid metadata values for a property and type"""
|
321
|
+
c = ctx.obj
|
322
|
+
display_metadata_values(property, type_name, c.view_server, c.view_server_url,
|
323
|
+
c.userid, c.password, False, c.jupyter, c.width)
|
324
|
+
|
325
|
+
|
326
|
+
#
|
327
|
+
# Technical Users: Tell
|
328
|
+
#
|
329
|
+
|
330
|
+
@technical.group('tell')
|
331
|
+
@click.pass_context
|
332
|
+
def tell(ctx):
|
333
|
+
"""Perform actions an Egeria Objects"""
|
334
|
+
pass
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
#
|
339
|
+
# Catalog User: Show
|
340
|
+
#
|
341
|
+
|
342
|
+
@cli.group('catalog_user')
|
343
|
+
@click.pass_context
|
344
|
+
def catalog_user(ctx):
|
345
|
+
"""Commands for the more technical user"""
|
346
|
+
pass
|
347
|
+
@catalog_user.group("show")
|
348
|
+
@click.pass_context
|
349
|
+
def show(ctx):
|
350
|
+
"""Display an Egeria Object"""
|
351
|
+
pass
|
352
|
+
|
353
|
+
|
354
|
+
@show.command('tech-types')
|
355
|
+
@click.option('--tech_type', default='*', help='Tech type to search for')
|
356
|
+
@click.pass_context
|
357
|
+
def show_tech_types(ctx, tech_type):
|
358
|
+
"""List deployed technology types"""
|
359
|
+
c = ctx.obj
|
360
|
+
display_tech_types(tech_type, c.view_server, c.view_server_url,
|
361
|
+
c.userid, c.password)
|
362
|
+
|
363
|
+
|
364
|
+
@show.command('tech-type-elements')
|
365
|
+
@click.option('--tech_type', default='PostgreSQL Server', help='Specific tech type to get elements for')
|
366
|
+
@click.pass_context
|
367
|
+
def show_tech_type_elements(ctx, tech_type):
|
368
|
+
"""List technology type elements"""
|
369
|
+
c = ctx.obj
|
370
|
+
tech_viewer(tech_type, c.view_server, c.view_server_url,
|
371
|
+
c.userid, c.password)
|
372
|
+
|
373
|
+
|
374
|
+
@show.command('tech-type-templates')
|
375
|
+
@click.option('--tech-type', default='PostgreSQL Server', help='Specific tech type to get elements for')
|
376
|
+
@click.pass_context
|
377
|
+
def show_tech_type_templates(ctx, tech_type):
|
378
|
+
"""List technology type templates"""
|
379
|
+
c = ctx.obj
|
380
|
+
template_viewer(tech_type, c.view_server, c.view_server_url, c.userid,
|
381
|
+
c.password, c.jupyter, c.width)
|
382
|
+
|
383
|
+
|
384
|
+
@show.command('assets')
|
385
|
+
@click.argument('search-string')
|
386
|
+
@click.pass_context
|
387
|
+
def show_assets(ctx, search_string):
|
388
|
+
"""Find and display assets
|
389
|
+
|
390
|
+
Usage: show assets <search-string>
|
391
|
+
|
392
|
+
search-string must be greater than four characters.
|
393
|
+
"""
|
394
|
+
c = ctx.obj
|
395
|
+
display_assets(search_string, c.view_server, c.view_server_url, c.userid,
|
396
|
+
c.password, 60,c.jupyter, c.width)
|
397
|
+
|
398
|
+
|
399
|
+
@show.command('glossary-terms')
|
400
|
+
@click.option('--search-string', default='*',
|
401
|
+
help='List glossary terms similar to search string - minimum of 4 characters')
|
402
|
+
@click.option('--glossary_guid', default=None, help='Optionally restrict search to glossary with the specified guid')
|
403
|
+
@click.pass_context
|
404
|
+
def show_terms(ctx, search_string, glossary_guid):
|
405
|
+
"""Find and display glossary terms"""
|
406
|
+
c = ctx.obj
|
407
|
+
display_glossary_terms(search_string, glossary_guid, c.view_server, c.view_server_url, c.userid,
|
408
|
+
c.password, c.jupyter, c.width)
|
409
|
+
|
410
|
+
|
411
|
+
@show.command('asset-graph')
|
412
|
+
@click.argument('asset_guid', nargs=1)
|
413
|
+
@click.pass_context
|
414
|
+
def show_asset_graph(ctx, asset_guid):
|
415
|
+
"""Display a tree graph of information about an asset
|
416
|
+
|
417
|
+
Usage: show asset-graph <asset-guid>
|
418
|
+
|
419
|
+
asset-guid must be a valid asset guid. These can be found through other commands such as 'show tech-type-elements'
|
420
|
+
|
421
|
+
"""
|
422
|
+
c = ctx.obj
|
423
|
+
asset_viewer(asset_guid, c.view_server, c.view_server_url, c.userid,
|
424
|
+
c.password, c.jupyter, c.width)
|
425
|
+
|
426
|
+
|
427
|
+
@show.command('collection')
|
428
|
+
@click.option('--root_collection', default='Root Sustainability Collection',
|
429
|
+
help='View of tree of collections from a given root')
|
430
|
+
@click.pass_context
|
431
|
+
def show_asset_graph(ctx, root_collection):
|
432
|
+
"""Display a tree graph of information about an asset """
|
433
|
+
c = ctx.obj
|
434
|
+
collection_viewer(root_collection, c.view_server, c.view_server_url, c.userid,
|
435
|
+
c.password, c.jupyter, c.width)
|
436
|
+
|
437
|
+
|
438
|
+
@show.command('projects')
|
439
|
+
@click.option('--search-string', default='*',
|
440
|
+
help='List Projects by Search String')
|
441
|
+
@click.pass_context
|
442
|
+
def show_projects(ctx, search_string):
|
443
|
+
"""Display a list of Egeria projects """
|
444
|
+
c = ctx.obj
|
445
|
+
display_project_list(search_string, c.view_server, c.view_server_url, c.userid,
|
446
|
+
c.password, False,c.jupyter, c.width)
|
447
|
+
|
448
|
+
|
449
|
+
@show.command('to-dos')
|
450
|
+
@click.option('--search-string', default='*',
|
451
|
+
help='View the list of To-Do items')
|
452
|
+
@click.pass_context
|
453
|
+
def show_todos(ctx, search_string):
|
454
|
+
"""Display a tree graph of information about an asset """
|
455
|
+
c = ctx.obj
|
456
|
+
display_to_dos(search_string, c.view_server, c.view_server_url, c.userid,
|
457
|
+
c.password, c.jupyter, c.width)
|
458
|
+
|
459
|
+
#
|
460
|
+
# Catalog User: Tell
|
461
|
+
#
|
462
|
+
|
463
|
+
@catalog_user.group('tell')
|
464
|
+
@click.pass_context
|
465
|
+
def tell(ctx):
|
466
|
+
"""Perform actions an Egeria Objects"""
|
467
|
+
pass
|
468
|
+
|
469
|
+
|
470
|
+
@tell.group('survey')
|
471
|
+
@click.pass_context
|
472
|
+
def survey(ctx):
|
473
|
+
"""Refresh the specified integration connector or ALL connectors if not specified"""
|
474
|
+
c = ctx.obj
|
475
|
+
pass
|
476
|
+
|
477
|
+
|
478
|
+
@survey.command('survey_uc_server')
|
479
|
+
@click.pass_context
|
480
|
+
@click.option('--uc_endpoint', default='https://localhost:8080',
|
481
|
+
help="Endpoint of the Unity Catalog Server to Survey")
|
482
|
+
def survey_uc_server(ctx, uc_endpoint):
|
483
|
+
"""Survey the Unity Catalog server at the given endpoint"""
|
484
|
+
c = ctx.obj
|
485
|
+
pass
|
486
|
+
# restart_connector(connector, c.integration_daemon, c.integration_daemon_url,
|
487
|
+
# c.userid, c.password)
|
488
|
+
|
489
|
+
#
|
490
|
+
# Operations: Show
|
491
|
+
#
|
492
|
+
|
493
|
+
@cli.group('operations')
|
494
|
+
@click.pass_context
|
495
|
+
def operations(ctx):
|
496
|
+
""" Commands to understand and manage operations"""
|
497
|
+
pass
|
498
|
+
|
499
|
+
@operations.group("show")
|
500
|
+
@click.pass_context
|
501
|
+
def show(ctx):
|
502
|
+
"""Display an Egeria Object"""
|
503
|
+
pass
|
504
|
+
|
505
|
+
|
506
|
+
@show.group('platforms')
|
507
|
+
@click.pass_context
|
508
|
+
def show_platform(ctx):
|
509
|
+
"""Group of commands to show information about Egeria platforms"""
|
510
|
+
pass
|
511
|
+
|
512
|
+
|
513
|
+
@show_platform.command('status')
|
514
|
+
@click.pass_context
|
515
|
+
def show_platform_status(ctx):
|
516
|
+
"""Display a live status view of known platforms"""
|
517
|
+
c = ctx.obj
|
518
|
+
p_display_status(c.view_server, c.view_server_url,
|
519
|
+
c.admin_user, c.admin_user_password)
|
520
|
+
|
521
|
+
|
522
|
+
@show.group("servers")
|
523
|
+
@click.pass_context
|
524
|
+
def show_server(ctx):
|
525
|
+
"""Group of commands to show information about Egeria servers"""
|
526
|
+
pass
|
527
|
+
|
528
|
+
|
529
|
+
@show_server.command('status')
|
530
|
+
@click.option('--full', is_flag=True, default=False, help='If True, full server descriptions will be shown')
|
531
|
+
@click.pass_context
|
532
|
+
def show_server_status(ctx, full):
|
533
|
+
"""Display a live status view of Egeria servers for the specified Egeria platform"""
|
534
|
+
c = ctx.obj
|
535
|
+
if full:
|
536
|
+
display_list(c.metadata_store, c.metadata_store_url, c.admin_user, c.admin_user_password, c.jupyter, c.width)
|
537
|
+
else:
|
538
|
+
s_display_status(c.metadata_store, c.metadata_store_url, c.admin_user, c.admin_user_password, c.jupyter,
|
539
|
+
c.width)
|
540
|
+
|
541
|
+
|
542
|
+
@show.group("engines")
|
543
|
+
@click.pass_context
|
544
|
+
def engine_host(ctx):
|
545
|
+
"""Group of commands to show information about Egeria engines"""
|
546
|
+
pass
|
547
|
+
|
548
|
+
|
549
|
+
@engine_host.command("status")
|
550
|
+
@click.option('--list', is_flag=True, default=False, help='If True, a paged list will be shown')
|
551
|
+
@click.pass_context
|
552
|
+
def gov_eng_status(ctx, list):
|
553
|
+
"""Display engine-host status information"""
|
554
|
+
c = ctx.obj
|
555
|
+
display_gov_eng_status(c.engine_host, c.engine_host_url,
|
556
|
+
c.userid, c.password,
|
557
|
+
list, c.jupyter, c.width)
|
558
|
+
|
559
|
+
|
560
|
+
@engine_host.command('activity')
|
561
|
+
@click.option('--list', is_flag=True, default=False, help='If True, a paged list will be shown')
|
562
|
+
@click.pass_context
|
563
|
+
def eng_activity_status(ctx, list):
|
564
|
+
"""Show Governance Activity in engine-host"""
|
565
|
+
c = ctx.obj
|
566
|
+
display_engine_activity(c.view_server, c.view_server_url,
|
567
|
+
c.admin_user, c.admin_user_password,
|
568
|
+
list, c.jupyter, c.width)
|
569
|
+
|
570
|
+
|
571
|
+
@show.group('integrations')
|
572
|
+
@click.pass_context
|
573
|
+
def integrations(ctx):
|
574
|
+
"""Group of commands to show information about Egeria integrations"""
|
575
|
+
pass
|
576
|
+
|
577
|
+
|
578
|
+
@integrations.command("status")
|
579
|
+
@click.option('--list', is_flag=True, default=False, help='If True, a paged list will be shown')
|
580
|
+
@click.pass_context
|
581
|
+
def integrations_status(ctx, list):
|
582
|
+
"""Display integration-daemon status information"""
|
583
|
+
c = ctx.obj
|
584
|
+
display_integration_daemon_status(c.integration_daemon, c.integration_daemon_url,
|
585
|
+
c.view_server, c.view_server_url,
|
586
|
+
c.userid, c.password, list, c.jupyter, c.width)
|
587
|
+
|
588
|
+
|
589
|
+
@integrations.command("targets")
|
590
|
+
@click.pass_context
|
591
|
+
@click.argument('connector', nargs=1)
|
592
|
+
def integrations_status(ctx, connector):
|
593
|
+
"""Display Catalog Targets for a connector"""
|
594
|
+
c = ctx.obj
|
595
|
+
display_catalog_targets(connector, c.view_server, c.view_server_url,
|
596
|
+
c.userid, c.password, c.jupyter, c.width)
|
597
|
+
|
598
|
+
|
599
|
+
#
|
600
|
+
# Operations: Tell
|
601
|
+
#
|
602
|
+
|
603
|
+
@operations.group('tell')
|
604
|
+
@click.pass_context
|
605
|
+
def tell(ctx):
|
606
|
+
"""Perform actions an Egeria Objects"""
|
607
|
+
pass
|
608
|
+
|
609
|
+
|
610
|
+
@tell.group('integration-daemon')
|
611
|
+
@click.pass_context
|
612
|
+
def integration_daemon(ctx):
|
613
|
+
"""Group of commands to an integration-daemon"""
|
614
|
+
pass
|
615
|
+
|
616
|
+
|
617
|
+
@integration_daemon.command('refresh')
|
618
|
+
@click.pass_context
|
619
|
+
@click.option('--connector', default='all', help="Name of connector to refresh or 'all' to refresh all")
|
620
|
+
def refresh_connectors(ctx, connector):
|
621
|
+
"""Refresh the specified integration connector or ALL connectors if not specified"""
|
622
|
+
c = ctx.obj
|
623
|
+
refresh_connector(connector, c.integration_daemon, c.integration_daemon_url,
|
624
|
+
c.userid, c.password)
|
625
|
+
|
626
|
+
|
627
|
+
@integration_daemon.command('restart')
|
628
|
+
@click.pass_context
|
629
|
+
@click.option('--connector', default='all', help="Name of connector to restart or 'all' to restart all")
|
630
|
+
def restart_connectors(ctx, connector):
|
631
|
+
"""Restart the specified integration connector or ALL connectors if not specified"""
|
632
|
+
c = ctx.obj
|
633
|
+
restart_connector(connector, c.integration_daemon, c.integration_daemon_url,
|
634
|
+
c.userid, c.password)
|
635
|
+
|
636
|
+
|
637
|
+
integration_daemon.add_command(add_catalog_target)
|
638
|
+
integration_daemon.add_command(remove_catalog_target)
|
639
|
+
integration_daemon.add_command(update_catalog_target)
|
640
|
+
integration_daemon.add_command(stop_server)
|
641
|
+
integration_daemon.add_command(start_server)
|
642
|
+
|
643
|
+
|
644
|
+
@tell.group('engine-host')
|
645
|
+
@click.pass_context
|
646
|
+
def engine_host(ctx):
|
647
|
+
"""Group of commands to an engine-host"""
|
648
|
+
pass
|
649
|
+
|
650
|
+
|
651
|
+
engine_host.add_command(start_engine_host)
|
652
|
+
engine_host.add_command(stop_engine_host)
|
653
|
+
|
654
|
+
tell.add_command(load_archive)
|
655
|
+
|
656
|
+
|
657
|
+
|
658
|
+
|
659
|
+
if __name__ == '__main__':
|
660
|
+
cli()
|
@@ -16,7 +16,7 @@ from examples.widgets.cli.ops_config import Config
|
|
16
16
|
|
17
17
|
from examples.widgets.personal.monitor_open_todos import display_todos
|
18
18
|
from examples.widgets.personal.monitor_my_todos import display_my_todos
|
19
|
-
from examples.widgets.personal.list_my_profile import
|
19
|
+
from examples.widgets.personal.list_my_profile import display_my_profile
|
20
20
|
from examples.widgets.personal.list_my_roles import display_my_roles
|
21
21
|
|
22
22
|
|
@@ -98,7 +98,7 @@ def show_my_profile(ctx):
|
|
98
98
|
|
99
99
|
"""
|
100
100
|
c = ctx.obj
|
101
|
-
|
101
|
+
display_my_profile( c.view_server, c.view_server_url,
|
102
102
|
c.userid, c.password, c.jupyter, c.width)
|
103
103
|
|
104
104
|
@show.command('my-roles')
|
@@ -41,7 +41,7 @@ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
|
|
41
41
|
EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
|
42
42
|
EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
|
43
43
|
EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
|
44
|
-
EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '
|
44
|
+
EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
|
45
45
|
|
46
46
|
def display_my_profile(server: str, url: str, username: str, user_pass:str,
|
47
47
|
jupyter:bool=EGERIA_JUPYTER, width:int = EGERIA_WIDTH):
|
@@ -12,9 +12,10 @@ examples/widgets/catalog_user/list_projects.py,sha256=RpxPj68X7yPl046xTuGRhl8EwU
|
|
12
12
|
examples/widgets/catalog_user/list_tech_types.py,sha256=20T4v6L5qeebSsaL1nGkFMDAIsy2W3A3SMm1RcgFoh0,4609
|
13
13
|
examples/widgets/catalog_user/list_todos.py,sha256=iiHvw0zM2khHDNKnrzNe2i0tqD_3xzrB5Z2Z0tP7N4k,5521
|
14
14
|
examples/widgets/cli/__init__.py,sha256=ReG7mIcm5c512S_z1UZIpMtE67zlO_zj-1HhHWYS4fI,30
|
15
|
+
examples/widgets/cli/egeria.py,sha256=rU7hLRhd5uyfBp9QSS8XlaPzDEXQQ1nN0SXQdF8ISFw,22758
|
15
16
|
examples/widgets/cli/egeria_cat.py,sha256=xEzI4Lbl3vyQlJLxMSmDVphhyjTUL1whSfbZi4I2Hwk,9324
|
16
|
-
examples/widgets/cli/egeria_my.py,sha256=sbnUe8Wis2FHGEGlYlg5syH8_LGymzTUMeNjVT4Serk,5676
|
17
17
|
examples/widgets/cli/egeria_ops.py,sha256=ZxfijlBuDdOKdDgflKdJ0npGp5bB35qCzy-SHUGAk0k,10112
|
18
|
+
examples/widgets/cli/egeria_per.py,sha256=L52fIIYOP_KXGXM3c2EX_H5OfmeD7X6TzS0x4vLBtOg,5674
|
18
19
|
examples/widgets/cli/egeria_tech.py,sha256=_DjPR5rslrZKk0NshpE_VNQf4YVxBGaVpNqT8YMgt9I,8917
|
19
20
|
examples/widgets/cli/ops_config.py,sha256=BPfiU2mZA61aA1p1DHRA5eLWH8qaAwgWNoRmazzAlM4,1398
|
20
21
|
examples/widgets/operational/README.md,sha256=PJsSDcvMv6E6og6y-cwvxFX5lhCII0UCwgKiM1T17MQ,1595
|
@@ -35,7 +36,7 @@ examples/widgets/operational/refresh_integration_daemon.py,sha256=QDB3dpAlLY8Phr
|
|
35
36
|
examples/widgets/operational/restart_integration_daemon.py,sha256=fID7qGFL5RD6rfn9PgXf5kwI4MU0Ho_IGXnDVbKT5nU,2710
|
36
37
|
examples/widgets/personal/README.md,sha256=ZheFhj_VoPMhcWjW3pGchHB0vH_A9PklSmrSkzKdrcQ,844
|
37
38
|
examples/widgets/personal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
38
|
-
examples/widgets/personal/list_my_profile.py,sha256=
|
39
|
+
examples/widgets/personal/list_my_profile.py,sha256=q_vMXqO2P7gHCx1ScnKS1ZEvraS6l0qVLJ3WCNe-r4Y,5423
|
39
40
|
examples/widgets/personal/list_my_roles.py,sha256=DCiNdnoHXQueUE5g73D3oRXfJ6LaUQGbibNtDRdicR8,5078
|
40
41
|
examples/widgets/personal/monitor_my_todos.py,sha256=uc3WO-IiFdfjJ3gE2MgHBo18A8M6C5QHbCfRVI6qR28,6399
|
41
42
|
examples/widgets/personal/monitor_open_todos.py,sha256=DIeWC-2tN1EtmgC2rWJfsGMVQhtNcngobJ8paBiXXBI,5396
|
@@ -73,8 +74,8 @@ pyegeria/runtime_manager_omvs.py,sha256=oSVFeG_yBGXIvQR0EClLZqTZ6C5z5ReZzwm8cce8
|
|
73
74
|
pyegeria/server_operations.py,sha256=ZX7FlJRrAC7RK4bq4wHWepEsYbbWlqkUZdsJrTplVVU,16534
|
74
75
|
pyegeria/utils.py,sha256=pkVmS3RrbjaS9yz7FtOCwaOfV5FMqz-__Rt5koCnd9c,5374
|
75
76
|
pyegeria/valid_metadata_omvs.py,sha256=aisdRodIwJSkyArAzfm_sEnBELh69xE8k4Nea-vHu8M,36745
|
76
|
-
pyegeria-0.5.9.
|
77
|
-
pyegeria-0.5.9.
|
78
|
-
pyegeria-0.5.9.
|
79
|
-
pyegeria-0.5.9.
|
80
|
-
pyegeria-0.5.9.
|
77
|
+
pyegeria-0.5.9.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
78
|
+
pyegeria-0.5.9.3.dist-info/METADATA,sha256=yB_JpvMfVjI7EELzoOtoQyKfMvG3iY4eQYtFAKD2Kf0,2688
|
79
|
+
pyegeria-0.5.9.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
80
|
+
pyegeria-0.5.9.3.dist-info/entry_points.txt,sha256=j1oliLpkHsBWthLvi5-yhbvvWWzQXp-P9Cq5LVcIGBM,2822
|
81
|
+
pyegeria-0.5.9.3.dist-info/RECORD,,
|
@@ -1,7 +1,8 @@
|
|
1
1
|
[console_scripts]
|
2
|
+
egeria=examples.widgets.cli.egeria:cli
|
2
3
|
egeria_cat=examples.widgets.cli.egeria_cat:cli
|
3
|
-
egeria_my=examples.widgets.cli.egeria_my:cli
|
4
4
|
egeria_ops=examples.widgets.cli.egeria_ops:cli
|
5
|
+
egeria_per=examples.widgets.cli.egeria_per:cli
|
5
6
|
egeria_tech=examples.widgets.cli.egeria_cat:cli
|
6
7
|
get_asset_graph=examples.widgets.catalog_user.get_asset_graph:main
|
7
8
|
get_collection=examples.widgets.catalog_user.get_collection:main
|
File without changes
|
File without changes
|