pyegeria 5.3.3.9__py3-none-any.whl → 5.3.3.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.
- pyegeria/.DS_Store +0 -0
- pyegeria/__init__.py +4 -2
- pyegeria/_client.py +3 -1
- pyegeria/classification_manager_omvs.py +2 -0
- pyegeria/commands/.DS_Store +0 -0
- pyegeria/commands/__pycache__/__init__.cpython-312.pyc +0 -0
- pyegeria/commands/__pycache__/server_status_widget.cpython-312-pytest-7.4.4.pyc +0 -0
- pyegeria/commands/cat/__pycache__/__init__.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/get_asset_graph.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/get_collection.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/get_project_dependencies.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/get_project_structure.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/get_tech_type_elements.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/glossary_actions.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/list_assets.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/list_cert_types.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/list_collections.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/list_deployed_catalogs.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/list_deployed_database_schemas.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/list_deployed_databases.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/list_glossaries.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/list_projects.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/list_servers_deployed_imp.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/list_tech_type_elements.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/list_tech_types.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/list_terms.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/list_todos.cpython-312.pyc +0 -0
- pyegeria/commands/cat/__pycache__/list_user_ids.cpython-312.pyc +0 -0
- pyegeria/commands/cat/list_terms.py +9 -8
- pyegeria/commands/cli/__pycache__/__init__.cpython-312.pyc +0 -0
- pyegeria/commands/cli/__pycache__/egeria_login_tui.cpython-312.pyc +0 -0
- pyegeria/commands/cli/__pycache__/egeria_ops.cpython-312.pyc +0 -0
- pyegeria/commands/cli/__pycache__/ops_config.cpython-312.pyc +0 -0
- pyegeria/commands/doc/.DS_Store +0 -0
- pyegeria/commands/doc/Visual Command Reference/.DS_Store +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/.DS_Store +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/.DS_Store +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/.DS_Store +0 -0
- pyegeria/commands/doc/glossary/.DS_Store +0 -0
- pyegeria/commands/doc/glossary/images/.DS_Store +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/.DS_Store +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/.DS_Store +0 -0
- pyegeria/commands/my/__pycache__/__init__.cpython-312.pyc +0 -0
- pyegeria/commands/my/__pycache__/list_my_profile.cpython-312.pyc +0 -0
- pyegeria/commands/my/__pycache__/list_my_roles.cpython-312.pyc +0 -0
- pyegeria/commands/my/__pycache__/monitor_my_todos.cpython-312.pyc +0 -0
- pyegeria/commands/my/__pycache__/monitor_open_todos.cpython-312.pyc +0 -0
- pyegeria/commands/my/__pycache__/todo_actions.cpython-312.pyc +0 -0
- pyegeria/commands/my/monitor_my_todos.py +1 -1
- pyegeria/commands/my/monitor_open_todos.py +1 -1
- pyegeria/commands/ops/__pycache__/__init__.cpython-312.pyc +0 -0
- pyegeria/commands/ops/__pycache__/gov_server_actions.cpython-312.pyc +0 -0
- pyegeria/commands/ops/__pycache__/list_archives.cpython-312.pyc +0 -0
- pyegeria/commands/ops/__pycache__/list_catalog_targets.cpython-312.pyc +0 -0
- pyegeria/commands/ops/__pycache__/load_archive.cpython-312.pyc +0 -0
- pyegeria/commands/ops/__pycache__/monitor_engine_activity.cpython-312.pyc +0 -0
- pyegeria/commands/ops/__pycache__/monitor_engine_activity_c.cpython-312.pyc +0 -0
- pyegeria/commands/ops/__pycache__/monitor_gov_eng_status.cpython-312.pyc +0 -0
- pyegeria/commands/ops/__pycache__/monitor_integ_daemon_status.cpython-312.pyc +0 -0
- pyegeria/commands/ops/__pycache__/monitor_platform_status.cpython-312.pyc +0 -0
- pyegeria/commands/ops/__pycache__/monitor_server_startup.cpython-312.pyc +0 -0
- pyegeria/commands/ops/__pycache__/monitor_server_status.cpython-312.pyc +0 -0
- pyegeria/commands/ops/__pycache__/refresh_integration_daemon.cpython-312.pyc +0 -0
- pyegeria/commands/ops/__pycache__/restart_integration_daemon.cpython-312.pyc +0 -0
- pyegeria/commands/ops/__pycache__/table_integ_daemon_status.cpython-312.pyc +0 -0
- pyegeria/commands/ops/monitor_engine_activity.py +3 -2
- pyegeria/commands/ops/monitor_engine_activity_c.py +3 -3
- pyegeria/commands/ops/monitor_platform_status.py +1 -1
- pyegeria/commands/ops/monitor_server_status.py +6 -3
- pyegeria/commands/tech/__pycache__/__init__.cpython-312.pyc +0 -0
- pyegeria/commands/tech/__pycache__/get_element_info.cpython-312.pyc +0 -0
- pyegeria/commands/tech/__pycache__/get_guid_info.cpython-312.pyc +0 -0
- pyegeria/commands/tech/__pycache__/get_tech_details.cpython-312.pyc +0 -0
- pyegeria/commands/tech/__pycache__/get_tech_type_template.cpython-312.pyc +0 -0
- pyegeria/commands/tech/__pycache__/list_anchored_elements.cpython-312.pyc +0 -0
- pyegeria/commands/tech/__pycache__/list_asset_types.cpython-312.pyc +0 -0
- pyegeria/commands/tech/__pycache__/list_elements_by_property_value.cpython-312.pyc +0 -0
- pyegeria/commands/tech/__pycache__/list_elements_for_classification.cpython-312.pyc +0 -0
- pyegeria/commands/tech/__pycache__/list_gov_action_processes.cpython-312.pyc +0 -0
- pyegeria/commands/tech/__pycache__/list_registered_services.cpython-312.pyc +0 -0
- pyegeria/commands/tech/__pycache__/list_related_specification.cpython-312.pyc +0 -0
- pyegeria/commands/tech/__pycache__/list_relationship_types.cpython-312.pyc +0 -0
- pyegeria/commands/tech/__pycache__/list_relationships.cpython-312.pyc +0 -0
- pyegeria/commands/tech/__pycache__/list_tech_templates.cpython-312.pyc +0 -0
- pyegeria/commands/tech/__pycache__/list_valid_metadata_values.cpython-312.pyc +0 -0
- pyegeria/commands/tech/list_information_blueprints.py +166 -0
- pyegeria/commands/tech/list_information_supply_chains.py +145 -0
- pyegeria/egeria_client.py +5 -0
- pyegeria/egeria_tech_client.py +6 -2
- pyegeria/mermaid_utilities.py +51 -21
- pyegeria/metadata_explorer_omvs.py +0 -43
- pyegeria/solution_architect_omvs.py +642 -0
- {pyegeria-5.3.3.9.dist-info → pyegeria-5.3.3.10.dist-info}/METADATA +1 -1
- {pyegeria-5.3.3.9.dist-info → pyegeria-5.3.3.10.dist-info}/RECORD +97 -19
- {pyegeria-5.3.3.9.dist-info → pyegeria-5.3.3.10.dist-info}/entry_points.txt +1 -0
- {pyegeria-5.3.3.9.dist-info → pyegeria-5.3.3.10.dist-info}/LICENSE +0 -0
- {pyegeria-5.3.3.9.dist-info → pyegeria-5.3.3.10.dist-info}/WHEEL +0 -0
pyegeria/.DS_Store
ADDED
Binary file
|
pyegeria/__init__.py
CHANGED
@@ -68,14 +68,16 @@ from .create_tech_guid_lists import build_global_guid_lists
|
|
68
68
|
from .classification_manager_omvs import ClassificationManager
|
69
69
|
from .feedback_manager_omvs import FeedbackManager
|
70
70
|
from .metadata_explorer_omvs import MetadataExplorer
|
71
|
-
from .mermaid_utilities import load_mermaid, render_mermaid, generate_process_graph
|
71
|
+
from .mermaid_utilities import load_mermaid, render_mermaid, generate_process_graph, save_mermaid_graph
|
72
72
|
from .egeria_my_client import EgeriaMy
|
73
|
+
|
74
|
+
from .solution_architect_omvs import SolutionArchitect
|
75
|
+
|
73
76
|
from .egeria_cat_client import EgeriaCat
|
74
77
|
from .egeria_tech_client import EgeriaTech
|
75
78
|
from .egeria_config_client import EgeriaConfig
|
76
79
|
from .egeria_client import Egeria
|
77
80
|
|
78
|
-
|
79
81
|
#
|
80
82
|
# The following assignments were generated by the `create_tech_guid_lists.py` utility that uses the pyegeria functions
|
81
83
|
# to interrogate Egeria (and the Core Content Pack) for the GUIDS associates with integration connectors and templates.
|
pyegeria/_client.py
CHANGED
@@ -10,6 +10,8 @@ import asyncio
|
|
10
10
|
import inspect
|
11
11
|
import json
|
12
12
|
import os
|
13
|
+
from datetime import datetime
|
14
|
+
|
13
15
|
from pyegeria import body_slimmer
|
14
16
|
import httpx
|
15
17
|
from httpx import AsyncClient, Response
|
@@ -469,7 +471,7 @@ class Client:
|
|
469
471
|
msg = OMAGCommonErrorCode.CLIENT_SIDE_REST_API_ERROR.value[
|
470
472
|
"message_template"
|
471
473
|
].format(
|
472
|
-
str(response.status_code),
|
474
|
+
str(response.status_code) + " " + datetime.now().strftime("%H: %M: %S") ,
|
473
475
|
caller_method,
|
474
476
|
class_name,
|
475
477
|
endpoint,
|
@@ -1547,6 +1547,8 @@ class ClassificationManager(Client):
|
|
1547
1547
|
UserNotAuthorizedException
|
1548
1548
|
the requesting user is not authorized to issue this request.
|
1549
1549
|
"""
|
1550
|
+
if property_value is '*':
|
1551
|
+
property_value = None
|
1550
1552
|
|
1551
1553
|
possible_query_params = query_string(
|
1552
1554
|
[
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -90,16 +90,16 @@ def display_glossary_terms(
|
|
90
90
|
style="bold bright_white on black", width=width, force_terminal=not jupyter
|
91
91
|
)
|
92
92
|
g_client = EgeriaTech(view_server, view_url, user_id, user_pass)
|
93
|
-
token = g_client.create_egeria_bearer_token()
|
93
|
+
token = g_client.create_egeria_bearer_token(user_id, user_pass)
|
94
94
|
if (glossary_name is not None) and (glossary_name != "*"):
|
95
95
|
glossary_guid = g_client.get_guid_for_name(glossary_name)
|
96
|
-
if glossary_guid == "
|
96
|
+
if glossary_guid == "Glossary guid not found":
|
97
97
|
console.print(
|
98
98
|
f"\nThe glossary name {glossary_name} was not found. Please try using the glossary guid"
|
99
99
|
)
|
100
|
-
sys.exit(
|
100
|
+
sys.exit(1)
|
101
101
|
|
102
|
-
def generate_table(search_string: str, glossary_guid: str
|
102
|
+
def generate_table(search_string: str, glossary_guid: str) -> Table:
|
103
103
|
"""Make a new table."""
|
104
104
|
table = Table(
|
105
105
|
title=f"Glossary Definitions for Terms like {search_string} @ {time.asctime()}",
|
@@ -133,7 +133,7 @@ def display_glossary_terms(
|
|
133
133
|
)
|
134
134
|
|
135
135
|
if type(terms) is str:
|
136
|
-
print(f"No terms found!")
|
136
|
+
print(f"No terms found! - {search_string} : {glossary_guid} ")
|
137
137
|
sys.exit(0)
|
138
138
|
sorted_terms = sorted(
|
139
139
|
terms, key=lambda k: k["glossaryTermProperties"]["displayName"]
|
@@ -219,10 +219,10 @@ def main():
|
|
219
219
|
args = parser.parse_args()
|
220
220
|
|
221
221
|
# server = args.server if args.server is not None else EGERIA_VIEW_SERVER
|
222
|
-
server = args.server if args.server is not None else
|
222
|
+
server = args.server if args.server is not None else EGERIA_VIEW_SERVER
|
223
223
|
|
224
224
|
url = args.url if args.url is not None else EGERIA_PLATFORM_URL
|
225
|
-
userid = args.userid if args.userid is not None else
|
225
|
+
userid = args.userid if args.userid is not None else EGERIA_USER
|
226
226
|
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
227
227
|
guid = args.guid if args.guid is not None else EGERIA_HOME_GLOSSARY_GUID
|
228
228
|
|
@@ -233,7 +233,8 @@ def main():
|
|
233
233
|
default="*",
|
234
234
|
)
|
235
235
|
display_glossary_terms(
|
236
|
-
search_string, guid, glossary_name, server, url,
|
236
|
+
search_string, guid, glossary_name, server, url,
|
237
|
+
userid, user_pass
|
237
238
|
)
|
238
239
|
|
239
240
|
except KeyboardInterrupt:
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -82,6 +82,7 @@ def display_engine_activity(
|
|
82
82
|
The width of the console for table printing.
|
83
83
|
"""
|
84
84
|
g_client = AutomatedCuration(view_server, view_url, user, user_pwd=user_pass)
|
85
|
+
token = g_client.create_egeria_bearer_token()
|
85
86
|
|
86
87
|
def generate_table() -> Table:
|
87
88
|
"""Make a new table."""
|
@@ -108,7 +109,7 @@ def display_engine_activity(
|
|
108
109
|
table.add_column("Process Name")
|
109
110
|
table.add_column("Completion Message")
|
110
111
|
|
111
|
-
|
112
|
+
|
112
113
|
action_status = g_client.get_engine_actions()
|
113
114
|
|
114
115
|
if type(action_status) is str:
|
@@ -186,7 +187,7 @@ def display_engine_activity(
|
|
186
187
|
else:
|
187
188
|
print("Egeria integration daemon not running")
|
188
189
|
sys.exit()
|
189
|
-
|
190
|
+
g_client.refresh_egeria_bearer_token()
|
190
191
|
return table
|
191
192
|
|
192
193
|
try:
|
@@ -85,7 +85,7 @@ def display_engine_activity_c(
|
|
85
85
|
The width of the console for table printing.
|
86
86
|
"""
|
87
87
|
g_client = AutomatedCuration(view_server, view_url, user, user_pwd=user_pass)
|
88
|
-
|
88
|
+
token = g_client.create_egeria_bearer_token()
|
89
89
|
def generate_table() -> Table:
|
90
90
|
"""Make a new table."""
|
91
91
|
table = Table(
|
@@ -109,7 +109,7 @@ def display_engine_activity_c(
|
|
109
109
|
table.add_column("Core Results")
|
110
110
|
# table.add_column("Completion Message")
|
111
111
|
|
112
|
-
|
112
|
+
|
113
113
|
action_status = g_client.get_engine_actions()
|
114
114
|
|
115
115
|
if type(action_status) is str:
|
@@ -203,7 +203,7 @@ def display_engine_activity_c(
|
|
203
203
|
else:
|
204
204
|
print("Egeria integration daemon not running")
|
205
205
|
sys.exit()
|
206
|
-
|
206
|
+
g_client.refresh_egeria_bearer_token()
|
207
207
|
return table
|
208
208
|
|
209
209
|
try:
|
@@ -139,13 +139,16 @@ def display_status(
|
|
139
139
|
"[red]Inactive" "" if status == "Inactive" else "[green]Active",
|
140
140
|
# server_status,
|
141
141
|
)
|
142
|
-
|
142
|
+
p_client.refresh_egeria_bearer_token()
|
143
143
|
return table
|
144
144
|
|
145
145
|
try:
|
146
|
-
with Live(generate_table(), refresh_per_second=
|
146
|
+
# with Live(generate_table(), refresh_per_second=1, screen=True) as live:
|
147
|
+
print(f" Started at {time.asctime()} \n")
|
148
|
+
with Live(generate_table(), refresh_per_second=4, screen=True, transient=True) as live:
|
149
|
+
|
147
150
|
while True:
|
148
|
-
time.sleep(
|
151
|
+
time.sleep(5)
|
149
152
|
live.update(generate_table())
|
150
153
|
|
151
154
|
except (
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,166 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
4
|
+
Copyright Contributors to the ODPi Egeria project.
|
5
|
+
|
6
|
+
A simple viewer for Information Supply Chains
|
7
|
+
|
8
|
+
"""
|
9
|
+
|
10
|
+
import argparse
|
11
|
+
import os
|
12
|
+
import time
|
13
|
+
|
14
|
+
from rich import print, box
|
15
|
+
from rich.console import Console
|
16
|
+
from rich.markdown import Markdown
|
17
|
+
from rich.panel import Panel
|
18
|
+
from rich.prompt import Prompt
|
19
|
+
from rich.table import Table
|
20
|
+
from rich.text import Text
|
21
|
+
from rich.tree import Tree
|
22
|
+
from pyegeria.solution_architect_omvs import SolutionArchitect
|
23
|
+
from pyegeria import (
|
24
|
+
ProjectManager,
|
25
|
+
UserNotAuthorizedException,
|
26
|
+
PropertyServerException,
|
27
|
+
InvalidParameterException,
|
28
|
+
)
|
29
|
+
|
30
|
+
from pyegeria._exceptions import (
|
31
|
+
print_exception_response,
|
32
|
+
)
|
33
|
+
|
34
|
+
disable_ssl_warnings = True
|
35
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
36
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
37
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
38
|
+
EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "qs-view-server")
|
39
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
40
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
41
|
+
)
|
42
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
43
|
+
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
44
|
+
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
45
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
46
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
47
|
+
EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
48
|
+
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "150"))
|
49
|
+
|
50
|
+
|
51
|
+
def blueprint_list(
|
52
|
+
search_string: str,
|
53
|
+
server_name: str,
|
54
|
+
platform_url: str,
|
55
|
+
user: str,
|
56
|
+
user_password: str,
|
57
|
+
jupyter: bool = EGERIA_JUPYTER,
|
58
|
+
width: int = EGERIA_WIDTH,
|
59
|
+
timeout: int = 30,
|
60
|
+
):
|
61
|
+
"""A Supply Chain viewer"""
|
62
|
+
client = SolutionArchitect(server_name, platform_url, user, user_password)
|
63
|
+
token = client.create_egeria_bearer_token()
|
64
|
+
|
65
|
+
def generate_table() -> Table | str:
|
66
|
+
table = Table(
|
67
|
+
title=f"Blueprints matching {search_string} @ {time.asctime()}",
|
68
|
+
style="bright_white on black",
|
69
|
+
header_style="bright_white on dark_blue",
|
70
|
+
title_style="bold white on black",
|
71
|
+
caption_style="white on black",
|
72
|
+
show_lines=True,
|
73
|
+
box=box.ROUNDED,
|
74
|
+
caption=f"View Server '{server_name}' @ Platform - {platform_url}",
|
75
|
+
expand=True,
|
76
|
+
)
|
77
|
+
table.add_column("Blueprint Name")
|
78
|
+
table.add_column("Qualified Name \n/\n GUID\n/\nVersion", width=38, no_wrap=False)
|
79
|
+
table.add_column("Description")
|
80
|
+
table.add_column("Solution Components")
|
81
|
+
|
82
|
+
blueprints = client.find_solution_blueprints(search_string)
|
83
|
+
if isinstance(blueprints, list) is False:
|
84
|
+
return "No Blueprints found"
|
85
|
+
|
86
|
+
for bp in blueprints:
|
87
|
+
bp_name = bp["properties"].get("displayName", '---')
|
88
|
+
bp_qname = bp["properties"].get("qualifiedName", '---')
|
89
|
+
bp_guid = bp["elementHeader"]["guid"]
|
90
|
+
bp_desc = bp["properties"].get("description",'---')
|
91
|
+
bp_unique_name = f"{bp_qname}\n\n\t\t/\n\n{bp_guid}"
|
92
|
+
bp_mermaid = bp.get("mermaid",'---')
|
93
|
+
|
94
|
+
bp_components = bp.get("solutionComponents",[])
|
95
|
+
comp_table = Table(title="No Solution Components")
|
96
|
+
for component in bp_components:
|
97
|
+
comp = component.get("solutionComponent","")
|
98
|
+
if isinstance(comp,dict) is False:
|
99
|
+
continue
|
100
|
+
comp_props = comp.get("properties",{})
|
101
|
+
comp_name = comp_props.get("displayName",'---')
|
102
|
+
comp_description = comp_props.get("description",'---')
|
103
|
+
comp_planned = comp_props['extendedProperties'].get("plannedDeployedImplementationType",'---')
|
104
|
+
comp_type = comp_props.get('solutionComponentType','---')
|
105
|
+
comp_actors = comp_props.get('actors', [])
|
106
|
+
comp_actors_list = ""
|
107
|
+
for actor in comp_actors:
|
108
|
+
comp_actor_role = actor['relationshipProperties'].get('role','---')
|
109
|
+
comp_actor_props = actor['relatedElement'].get('properties',{})
|
110
|
+
comp_actor_props_md = f"* Role: {comp_actor_role}\n"
|
111
|
+
for prop in comp_actor_props.keys():
|
112
|
+
comp_actor_props_md += f"* {prop}: {comp_actor_props[prop]}\n"
|
113
|
+
comp_actors_list += comp_actor_props_md
|
114
|
+
|
115
|
+
comp_table = Table(title=f"Solution Component {comp_name}")
|
116
|
+
comp_table.add_column("Comp Type")
|
117
|
+
comp_table.add_column("Description")
|
118
|
+
comp_table.add_column("Planned Deployment")
|
119
|
+
comp_table.add_column("Actors")
|
120
|
+
comp_table.add_row(comp_type, comp_description, comp_planned, comp_actors_list)
|
121
|
+
|
122
|
+
table.add_row(bp_name, bp_unique_name, bp_desc, comp_table)
|
123
|
+
|
124
|
+
return table
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
try:
|
130
|
+
console = Console(width=width, force_terminal=not jupyter)
|
131
|
+
with console.pager():
|
132
|
+
console.print(generate_table())
|
133
|
+
|
134
|
+
except (
|
135
|
+
InvalidParameterException,
|
136
|
+
PropertyServerException,
|
137
|
+
UserNotAuthorizedException,
|
138
|
+
) as e:
|
139
|
+
print_exception_response(e)
|
140
|
+
|
141
|
+
|
142
|
+
def main():
|
143
|
+
parser = argparse.ArgumentParser()
|
144
|
+
|
145
|
+
parser.add_argument("--server", help="Name of the server to display status for")
|
146
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
147
|
+
parser.add_argument("--userid", help="User Id")
|
148
|
+
parser.add_argument("--password", help="User Password")
|
149
|
+
args = parser.parse_args()
|
150
|
+
|
151
|
+
server = args.server if args.server is not None else EGERIA_VIEW_SERVER
|
152
|
+
url = args.url if args.url is not None else EGERIA_PLATFORM_URL
|
153
|
+
userid = args.userid if args.userid is not None else EGERIA_USER
|
154
|
+
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
155
|
+
|
156
|
+
try:
|
157
|
+
search_string = Prompt.ask(
|
158
|
+
"Enter a search string:", default="*"
|
159
|
+
)
|
160
|
+
blueprint_list(search_string, server, url, userid, user_pass)
|
161
|
+
except KeyboardInterrupt:
|
162
|
+
pass
|
163
|
+
|
164
|
+
|
165
|
+
if __name__ == "__main__":
|
166
|
+
main()
|