pyegeria 0.7.45__py3-none-any.whl → 0.7.45.1__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 +18 -2
- examples/widgets/cli/egeria_tech.py +299 -98
- pyegeria/classification_manager_omvs.py +1921 -863
- pyegeria/mermaid_utilities.py +1 -1
- {pyegeria-0.7.45.dist-info → pyegeria-0.7.45.1.dist-info}/METADATA +1 -1
- {pyegeria-0.7.45.dist-info → pyegeria-0.7.45.1.dist-info}/RECORD +9 -10
- examples/widgets/tech/list_gov_processes.py +0 -162
- {pyegeria-0.7.45.dist-info → pyegeria-0.7.45.1.dist-info}/LICENSE +0 -0
- {pyegeria-0.7.45.dist-info → pyegeria-0.7.45.1.dist-info}/WHEEL +0 -0
- {pyegeria-0.7.45.dist-info → pyegeria-0.7.45.1.dist-info}/entry_points.txt +0 -0
examples/widgets/cli/egeria.py
CHANGED
@@ -352,6 +352,22 @@ def list_element_info(ctx, om_type):
|
|
352
352
|
)
|
353
353
|
|
354
354
|
|
355
|
+
@show.command("list-processes")
|
356
|
+
@click.pass_context
|
357
|
+
def list_element_info(ctx):
|
358
|
+
"""Display the valid metadata values for a property and type"""
|
359
|
+
c = ctx.obj
|
360
|
+
list_elements(
|
361
|
+
"GovernanceActionProcess",
|
362
|
+
c.view_server,
|
363
|
+
c.view_server_url,
|
364
|
+
c.userid,
|
365
|
+
c.password,
|
366
|
+
c.jupyter,
|
367
|
+
c.width,
|
368
|
+
)
|
369
|
+
|
370
|
+
|
355
371
|
@show.command("guid-info")
|
356
372
|
@click.argument("guid", nargs=1)
|
357
373
|
@click.pass_context
|
@@ -827,9 +843,9 @@ def show_projects(ctx, search_string):
|
|
827
843
|
["OPEN", "IN_PROGRESS", "WAITING", "COMPLETE", "ABANDONED", "None"],
|
828
844
|
case_sensitive="False",
|
829
845
|
),
|
830
|
-
help="Enter an optional status filter",
|
846
|
+
help="Enter an optional status filter, default='OPEN'",
|
831
847
|
required=False,
|
832
|
-
default=
|
848
|
+
default="OPEN",
|
833
849
|
)
|
834
850
|
@click.pass_context
|
835
851
|
def show_todos(ctx, search_string, status):
|
@@ -24,8 +24,9 @@ from examples.widgets.tech.list_valid_metadata_values import display_metadata_va
|
|
24
24
|
from examples.widgets.cat.get_tech_type_template import template_viewer
|
25
25
|
from examples.widgets.tech.list_elements import list_elements
|
26
26
|
from examples.widgets.tech.get_element_info import display_elements
|
27
|
-
from examples.widgets.tech.list_related_specification import
|
28
|
-
|
27
|
+
from examples.widgets.tech.list_related_specification import (
|
28
|
+
display_related_specification,
|
29
|
+
)
|
29
30
|
|
30
31
|
|
31
32
|
# from pyegeria import ServerOps
|
@@ -44,48 +45,143 @@ from examples.widgets.tech.list_related_specification import display_related_spe
|
|
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
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
""
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
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
|
+
)
|
144
|
+
@click.pass_context
|
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,8 +195,8 @@ def show(ctx):
|
|
99
195
|
pass
|
100
196
|
|
101
197
|
|
102
|
-
@show.command(
|
103
|
-
@click.argument(
|
198
|
+
@show.command("guid-info")
|
199
|
+
@click.argument("guid", nargs=1)
|
104
200
|
@click.pass_context
|
105
201
|
def show_guid_infos(ctx, guid):
|
106
202
|
"""Display a live status view of known platforms
|
@@ -109,22 +205,28 @@ def show_guid_infos(ctx, guid):
|
|
109
205
|
|
110
206
|
"""
|
111
207
|
c = ctx.obj
|
112
|
-
display_guid(guid, c.server, c.url,
|
113
|
-
c.userid, c.password, c.jupyter, c.width)
|
208
|
+
display_guid(guid, c.server, c.url, c.userid, c.password, c.jupyter, c.width)
|
114
209
|
|
115
|
-
|
210
|
+
|
211
|
+
@show.command("related-specifications")
|
116
212
|
@click.pass_context
|
117
|
-
@click.argument(
|
213
|
+
@click.argument("element-guid")
|
118
214
|
def show_related_specifications(ctx, element_guid):
|
119
215
|
"""List specifications related to the given Element"""
|
120
216
|
c = ctx.obj
|
121
|
-
display_related_specification(
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
217
|
+
display_related_specification(
|
218
|
+
element_guid,
|
219
|
+
c.view_server,
|
220
|
+
c.view_server_url,
|
221
|
+
c.userid,
|
222
|
+
c.password,
|
223
|
+
c.jupyter,
|
224
|
+
c.width,
|
225
|
+
)
|
226
|
+
|
227
|
+
|
228
|
+
@show.command("tech-types")
|
229
|
+
@click.option("--search-string", default="*", help="Tech type to search for")
|
128
230
|
@click.pass_context
|
129
231
|
def show_tech_types(ctx, search_string):
|
130
232
|
"""List deployed technology types
|
@@ -135,14 +237,14 @@ def show_tech_types(ctx, search_string):
|
|
135
237
|
|
136
238
|
"""
|
137
239
|
|
138
|
-
|
139
240
|
c = ctx.obj
|
140
|
-
display_tech_types(
|
141
|
-
|
241
|
+
display_tech_types(
|
242
|
+
search_string, c.view_server, c.view_server_url, c.userid, c.password
|
243
|
+
)
|
142
244
|
|
143
245
|
|
144
|
-
@show.command(
|
145
|
-
@click.argument(
|
246
|
+
@show.command("tech-details")
|
247
|
+
@click.argument("tech-name")
|
146
248
|
@click.pass_context
|
147
249
|
def show_tech_details(ctx, tech_name):
|
148
250
|
"""Display a live status view of Egeria servers for the specified Egeria platform
|
@@ -152,7 +254,15 @@ def show_tech_details(ctx, tech_name):
|
|
152
254
|
tech-name is a valid technology name (see 'show tech-types')
|
153
255
|
"""
|
154
256
|
c = ctx.obj
|
155
|
-
tech_details_viewer(
|
257
|
+
tech_details_viewer(
|
258
|
+
tech_name,
|
259
|
+
c.view_server,
|
260
|
+
c.view_server_url,
|
261
|
+
c.userid,
|
262
|
+
c.password,
|
263
|
+
c.jupyter,
|
264
|
+
c.width,
|
265
|
+
)
|
156
266
|
|
157
267
|
|
158
268
|
@show.command("asset-types")
|
@@ -160,94 +270,185 @@ def show_tech_details(ctx, tech_name):
|
|
160
270
|
def show_asset_types(ctx):
|
161
271
|
"""Display engine-host status information"""
|
162
272
|
c = ctx.obj
|
163
|
-
display_asset_types(
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
@show.command(
|
169
|
-
@click.option(
|
170
|
-
|
171
|
-
|
172
|
-
|
273
|
+
display_asset_types(
|
274
|
+
c.view_server, c.view_server_url, c.userid, c.password, c.jupyter, c.width
|
275
|
+
)
|
276
|
+
|
277
|
+
|
278
|
+
@show.command("registered-services")
|
279
|
+
@click.option(
|
280
|
+
"--services",
|
281
|
+
type=click.Choice(
|
282
|
+
[
|
283
|
+
"all",
|
284
|
+
"access-services",
|
285
|
+
"common-services",
|
286
|
+
"engine-services",
|
287
|
+
"governance-services",
|
288
|
+
"integration-services",
|
289
|
+
"view-services",
|
290
|
+
],
|
291
|
+
case_sensitive=False,
|
292
|
+
),
|
293
|
+
default="all",
|
294
|
+
help="Which service group to display",
|
295
|
+
)
|
173
296
|
@click.pass_context
|
174
297
|
def show_registered_services(ctx, services):
|
175
298
|
"""Show information about a registered services"""
|
176
299
|
c = ctx.obj
|
177
|
-
display_registered_svcs(
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
300
|
+
display_registered_svcs(
|
301
|
+
services,
|
302
|
+
c.view_server,
|
303
|
+
c.view_server_url,
|
304
|
+
c.userid,
|
305
|
+
c.password,
|
306
|
+
c.jupyter,
|
307
|
+
c.width,
|
308
|
+
)
|
309
|
+
|
310
|
+
|
311
|
+
@show.command("relationship-types")
|
312
|
+
@click.option(
|
313
|
+
"--rel-type",
|
314
|
+
default="AssetOwner",
|
315
|
+
help="Relationship type to get information about",
|
316
|
+
)
|
183
317
|
@click.pass_context
|
184
318
|
def show_relationship_types(ctx, rel_type):
|
185
319
|
"""Show information about the specified relationship type"""
|
186
320
|
c = ctx.obj
|
187
|
-
display_relationship_types(
|
188
|
-
|
189
|
-
|
321
|
+
display_relationship_types(
|
322
|
+
rel_type,
|
323
|
+
c.view_server,
|
324
|
+
c.view_server_url,
|
325
|
+
c.userid,
|
326
|
+
c.password,
|
327
|
+
False,
|
328
|
+
c.jupyter,
|
329
|
+
c.width,
|
330
|
+
)
|
190
331
|
|
191
332
|
|
192
333
|
@show.command("tech-templates")
|
193
334
|
@click.pass_context
|
194
|
-
@click.option(
|
335
|
+
@click.option(
|
336
|
+
"--search-string", default="*", help="Technology type to get information about"
|
337
|
+
)
|
195
338
|
def tech_templates(ctx, search_string):
|
196
339
|
"""Display template information about the specified technology."""
|
197
340
|
c = ctx.obj
|
198
|
-
template_viewer(
|
199
|
-
|
341
|
+
template_viewer(
|
342
|
+
search_string,
|
343
|
+
c.view_server,
|
344
|
+
c.view_server_url,
|
345
|
+
c.userid,
|
346
|
+
c.password,
|
347
|
+
c.jupyter,
|
348
|
+
c.width,
|
349
|
+
)
|
350
|
+
|
200
351
|
|
201
352
|
@show.command("tech-template-spec")
|
202
353
|
@click.pass_context
|
203
|
-
@click.option(
|
354
|
+
@click.option(
|
355
|
+
"--search-string", default="*", help="Technology type to get information about"
|
356
|
+
)
|
204
357
|
def tech_template_spec(ctx, search_string):
|
205
358
|
"""Display template specification information about the specified technology."""
|
206
359
|
c = ctx.obj
|
207
|
-
display_templates_spec(
|
208
|
-
|
360
|
+
display_templates_spec(
|
361
|
+
search_string,
|
362
|
+
c.view_server,
|
363
|
+
c.view_server_url,
|
364
|
+
c.userid,
|
365
|
+
c.password,
|
366
|
+
c.jupyter,
|
367
|
+
c.width,
|
368
|
+
)
|
209
369
|
|
210
370
|
|
211
371
|
@show.command("valid-metadata-values")
|
212
372
|
@click.pass_context
|
213
|
-
@click.option(
|
214
|
-
@click.option(
|
373
|
+
@click.option("--property", default="projectHealth", help="Metadata property to query")
|
374
|
+
@click.option("--type-name", default="Project", help="Metadata type to query")
|
215
375
|
def valid_metadata_values(ctx, property, type_name):
|
216
376
|
"""Display the valid metadata values for a property and type"""
|
217
377
|
c = ctx.obj
|
218
|
-
display_metadata_values(
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
378
|
+
display_metadata_values(
|
379
|
+
property,
|
380
|
+
type_name,
|
381
|
+
c.view_server,
|
382
|
+
c.view_server_url,
|
383
|
+
c.userid,
|
384
|
+
c.password,
|
385
|
+
False,
|
386
|
+
c.jupyter,
|
387
|
+
c.width,
|
388
|
+
)
|
389
|
+
|
390
|
+
|
391
|
+
@show.command("list-elements")
|
223
392
|
@click.pass_context
|
224
|
-
@click.option(
|
393
|
+
@click.option("--om_type", default="Organization", help="Metadata type to query")
|
225
394
|
def list_element_info(ctx, om_type):
|
226
395
|
"""Display the valid metadata values for a property and type"""
|
227
396
|
c = ctx.obj
|
228
|
-
list_elements(
|
229
|
-
|
397
|
+
list_elements(
|
398
|
+
om_type,
|
399
|
+
c.view_server,
|
400
|
+
c.view_server_url,
|
401
|
+
c.userid,
|
402
|
+
c.password,
|
403
|
+
c.jupyter,
|
404
|
+
c.width,
|
405
|
+
)
|
406
|
+
|
407
|
+
|
408
|
+
@show.command("list-processes")
|
409
|
+
@click.pass_context
|
410
|
+
def list_element_info(ctx):
|
411
|
+
"""Display the valid metadata values for a property and type"""
|
412
|
+
c = ctx.obj
|
413
|
+
list_elements(
|
414
|
+
"GovernanceActionProcess",
|
415
|
+
c.view_server,
|
416
|
+
c.view_server_url,
|
417
|
+
c.userid,
|
418
|
+
c.password,
|
419
|
+
c.jupyter,
|
420
|
+
c.width,
|
421
|
+
)
|
422
|
+
|
230
423
|
|
231
424
|
@show.command("get-elements")
|
232
425
|
@click.pass_context
|
233
|
-
@click.option(
|
426
|
+
@click.option("--om_type", default="Project", help="Metadata type to query")
|
234
427
|
def get_element_info(ctx, om_type):
|
235
428
|
"""Display the elements for an Open Metadata Type"""
|
236
429
|
c = ctx.obj
|
237
|
-
display_elements(
|
238
|
-
|
430
|
+
display_elements(
|
431
|
+
om_type,
|
432
|
+
c.view_server,
|
433
|
+
c.view_server_url,
|
434
|
+
c.userid,
|
435
|
+
c.password,
|
436
|
+
c.jupyter,
|
437
|
+
c.width,
|
438
|
+
)
|
239
439
|
|
240
440
|
|
241
441
|
#
|
242
442
|
# Tell
|
243
443
|
#
|
244
444
|
|
245
|
-
|
445
|
+
|
446
|
+
@cli.group("tell")
|
246
447
|
@click.pass_context
|
247
448
|
def tell(ctx):
|
248
449
|
"""Perform actions an Egeria Objects"""
|
249
450
|
pass
|
250
451
|
|
251
452
|
|
252
|
-
if __name__ ==
|
453
|
+
if __name__ == "__main__":
|
253
454
|
cli()
|