pyegeria 5.2.0.20__py3-none-any.whl → 5.2.0.42.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.
Files changed (88) hide show
  1. pyegeria/commands/README.md +2 -1
  2. pyegeria/commands/cat/__init__.py +1 -5
  3. pyegeria/commands/cat/get_tech_type_elements.py +1 -1
  4. pyegeria/commands/cat/glossary_actions.py +8 -2
  5. pyegeria/commands/cat/list_deployed_catalogs.py +4 -2
  6. pyegeria/commands/cat/list_deployed_databases.py +2 -3
  7. pyegeria/commands/cat/list_tech_type_elements.py +190 -0
  8. pyegeria/commands/cat/list_tech_types.py +36 -24
  9. pyegeria/commands/cat/list_terms.py +4 -2
  10. pyegeria/commands/cli/egeria.py +71 -63
  11. pyegeria/commands/cli/egeria_cat.py +44 -44
  12. pyegeria/commands/cli/egeria_my.py +24 -28
  13. pyegeria/commands/cli/egeria_ops.py +37 -39
  14. pyegeria/commands/cli/egeria_tech.py +49 -35
  15. pyegeria/commands/cli/ops_config.py +3 -1
  16. pyegeria/commands/doc/{command-overview.md → README.md} +50 -5
  17. pyegeria/commands/doc/Visual Command Reference/README.md +511 -0
  18. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs 2024-12-17 at 15.43.27@2x.png +0 -0
  19. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-12-17 at 15.48.38@2x.png +0 -0
  20. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-12-17 at 15.52.16@2x.png +0 -0
  21. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed_databases 2024-12-16 at 16.40.31@2x.png +0 -0
  22. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_dependencies 2024-12-14 at 16.24.39@2x.png +0 -0
  23. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_structure 2024-12-14 at 16.21.35@2x.png +0 -0
  24. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/projects 2024-12-14 at 16.18.10@2x.png +0 -0
  25. pyegeria/commands/doc/Visual Command Reference/hey_egeria tui 2024-12-16 at 16.58.22@2x.png +0 -0
  26. pyegeria/commands/doc/Visual Command Reference/my/show/my_profile 2024-12-14 at 16.29.27@2x.png +0 -0
  27. pyegeria/commands/doc/Visual Command Reference/my/show/my_roles 2024-12-14 at 16.32.10@2x.png +0 -0
  28. pyegeria/commands/doc/Visual Command Reference/my/show/my_todos 2024-12-15 at 16.24.13@2x.png +0 -0
  29. pyegeria/commands/doc/Visual Command Reference/my/show/open_todos 2024-12-14 at 16.36.12@2x.png +0 -0
  30. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/list_engine_activity compressed 2024-12-15 at 16.48.48@2x.png +0 -0
  31. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity 2024-12-15 at 16.32.55@2x.png +0 -0
  32. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity compressed 2024-12-15 at 16.38.29@2x.png +0 -0
  33. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_status 2024-12-15 at 16.51.26.jpeg +0 -0
  34. pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_daemon_status 2024-12-15 at 16.57.12@2x.png +0 -0
  35. pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_targets 2024-12-15 at 17.02.19@2x.png +0 -0
  36. pyegeria/commands/doc/Visual Command Reference/ops/show/platforms/monitor_platform_status 2024-12-15 at 19.53.18@2x.png +0 -0
  37. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status 2024-12-15 at 19.59.39@2x.png +0 -0
  38. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status full 2024-12-15 at 20.01.57@2x.png +0 -0
  39. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_startup_servers 2024-12-15 at 19.56.07@2x.png +0 -0
  40. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_anchored_elements 2024-12-15 at 21.25.41@2x.png +0 -0
  41. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_elements_of_om_type 2024-12-16 at 14.39.59@2x.png +0 -0
  42. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/info_for_guid 2024-12-16 at 11.35.29@2x.png +0 -0
  43. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type 2024-12-16 at 14.24.18@2x.png +0 -0
  44. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type extended 2024-12-16 at 14.28.46@2x.png +0 -0
  45. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_of_om_type_by_classification 2024-12-16 at 14.35.26@2x.png +0 -0
  46. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/related_elements 2024-12-16 at 14.55.01@2x.png +0 -0
  47. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/show_related_specifications 2024-12-16 at 15.04.55@2x.png +0 -0
  48. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/asset_types 2024-12-16 at 15.10.16@2x.png +0 -0
  49. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/detailed_governance_action_processes 2024-12-16 at 15.16.26@2x.png +0 -0
  50. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/governance_action_processes 2024-12-16 at 15.13.01@2x.png +0 -0
  51. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/registered_services 2024-12-16 at 16.44.54@2x.png +0 -0
  52. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-16 at 16.20.34@2x.png +0 -0
  53. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-19 at 10.51.54@2x.png +0 -0
  54. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/valid_metadata_values 2024-12-16 at 15.31.56@2x.png +0 -0
  55. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_tech_type_template_specs 2024-12-16 at 16.03.22@2x.png +0 -0
  56. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_technology_types 2024-12-16 at 15.39.20@2x.png +0 -0
  57. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_details 2024-12-16 at 15.37.21@2x.png +0 -0
  58. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_templates 2024-12-16 at 16.11.48@2x.png +0 -0
  59. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/{hey_egeria: overview.md → README.md } +1 -1
  60. pyegeria/commands/my/monitor_my_todos.py +17 -5
  61. pyegeria/commands/my/monitor_open_todos.py +1 -1
  62. pyegeria/commands/ops/monitor_asset_events.py +27 -22
  63. pyegeria/commands/ops/monitor_engine_activity_c.py +1 -1
  64. pyegeria/commands/ops/monitor_gov_eng_status.py +31 -4
  65. pyegeria/commands/ops/monitor_integ_daemon_status.py +16 -13
  66. pyegeria/commands/ops/monitor_platform_status.py +1 -1
  67. pyegeria/commands/ops/orig_monitor_server_status.py +36 -21
  68. pyegeria/commands/ops/refresh_integration_daemon.py +1 -1
  69. pyegeria/commands/ops/restart_integration_daemon.py +1 -1
  70. pyegeria/commands/tech/get_tech_details.py +79 -42
  71. pyegeria/commands/tech/get_tech_type_template.py +69 -53
  72. pyegeria/commands/tech/list_anchored_elements.py +18 -15
  73. pyegeria/commands/tech/list_elements_x.py +7 -4
  74. pyegeria/commands/tech/list_registered_services.py +1 -1
  75. pyegeria/commands/tech/list_relationship_types.py +19 -21
  76. pyegeria/commands/tech/list_relationships.py +7 -3
  77. pyegeria/create_tech_guid_lists.py +2 -2
  78. pyegeria/glossary_manager_omvs.py +64 -1
  79. pyegeria/metadata_explorer_omvs.py +94 -45
  80. pyegeria/server_operations.py +4 -4
  81. {pyegeria-5.2.0.20.dist-info → pyegeria-5.2.0.42.3.dist-info}/METADATA +1 -1
  82. {pyegeria-5.2.0.20.dist-info → pyegeria-5.2.0.42.3.dist-info}/RECORD +87 -45
  83. {pyegeria-5.2.0.20.dist-info → pyegeria-5.2.0.42.3.dist-info}/entry_points.txt +1 -0
  84. pyegeria/commands/doc/Visual Command Reference/cat/show/info/get-Collection 2024-12-12 at 09.29.25.png +0 -0
  85. /pyegeria/commands/doc/Visual Command Reference/cat/show/assets/{Asset-graph 2024-11-20 at 15.56.42.png → asset-graph 2024-11-20 at 15.56.42.png} +0 -0
  86. /pyegeria/commands/doc/Visual Command Reference/cat/show/assets/{Assets-in-domain 2024-11-20 at 15.49.55@2x.png → assets-in-domain 2024-11-20 at 15.49.55@2x.png} +0 -0
  87. {pyegeria-5.2.0.20.dist-info → pyegeria-5.2.0.42.3.dist-info}/LICENSE +0 -0
  88. {pyegeria-5.2.0.20.dist-info → pyegeria-5.2.0.42.3.dist-info}/WHEEL +0 -0
@@ -2,7 +2,8 @@
2
2
  <!-- Copyright Contributors to the Egeria project. -->
3
3
 
4
4
  The Commands in this directory provide a simple but useful command line interface for the Egeria environment. They
5
- are built with the **Rich** python package and demonstrate the use of **pyegeria** .
5
+ are built with the **Rich** python package and demonstrate the use of **pyegeria**. More detailed documentation can be
6
+ found in the `doc` folder.
6
7
 
7
8
  The commands can either be invoked from one of the command line interfaces or executed directly as python scripts.
8
9
  To invoke the commands directly, install them with pipx by invoking:
@@ -1,5 +1 @@
1
- # from .list_glossaries import display_glossaries
2
- # from .list_terms import display_glossary_terms
3
- # from .list_deployed_catalogs import list_deployed_catalogs
4
- # from .list_deployed_database_schemas import list_deployed_database_schemas
5
- # from .list_deployed_databases import list_deployed_databases
1
+ """ Placeholder """
@@ -163,7 +163,7 @@ def main():
163
163
  user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
164
164
  try:
165
165
  tech_name = Prompt.ask(
166
- "Enter the Asset Name to view:", default="Apache Kafka Server"
166
+ "Enter the Asset Name to view:", default="PostgreSQL Server"
167
167
  )
168
168
  tech_viewer(tech_name, server, url, userid, user_pass)
169
169
  except KeyboardInterrupt:
@@ -47,6 +47,7 @@ EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
47
47
  EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
48
48
  EGERIA_WIDTH = os.environ.get("EGERIA_WIDTH", 200)
49
49
  EGERIA_JUPYTER = os.environ.get("EGERIA_JUPYTER", False)
50
+ EGERIA_HOME_GLOSSARY_GUID = os.environ.get("EGERIA_HOME_GLOSSARY_GUID", None)
50
51
 
51
52
 
52
53
  @click.command("create-glossary")
@@ -125,7 +126,7 @@ def create_glossary(
125
126
  @click.option("--userid", default=EGERIA_USER, help="Egeria user")
126
127
  @click.option("--password", default=EGERIA_USER_PASSWORD, help="Egeria user password")
127
128
  @click.option("--timeout", default=60, help="Number of seconds to wait")
128
- @click.argument("glossary-guid")
129
+ @click.argument("glossary-guid", default=EGERIA_HOME_GLOSSARY_GUID)
129
130
  def delete_glossary(server, url, userid, password, timeout, glossary_guid):
130
131
  """Delete the glossary specified"""
131
132
  m_client = EgeriaTech(server, url, user_id=userid, user_pwd=password)
@@ -317,7 +318,12 @@ def import_terms(
317
318
 
318
319
 
319
320
  @click.command("export-terms")
320
- @click.option("--glossary-guid", help="GUID of Glossary to export", required=True)
321
+ @click.option(
322
+ "--glossary-guid",
323
+ default=EGERIA_HOME_GLOSSARY_GUID,
324
+ help="GUID of Glossary to export",
325
+ required=True,
326
+ )
321
327
  @click.option("--file-name", help="Path of CSV file", required=True)
322
328
  @click.option("--server", default=EGERIA_VIEW_SERVER, help="Egeria view server to use")
323
329
  @click.option(
@@ -101,11 +101,13 @@ def list_deployed_catalogs(
101
101
  table.add_column("Catalog Schemas")
102
102
 
103
103
  if catalog_server in [None, "*"]:
104
- cats = c_client.get_elements_by_classification("Anchors", "DataManager")
104
+ cats = c_client.get_elements_by_classification(
105
+ "Anchors", "DataAccessManager"
106
+ )
105
107
  else:
106
108
  server_guid = c_client.get_guid_for_name(catalog_server)
107
109
  cats = c_client.get_elements_by_classification_with_property_value(
108
- "Anchors", server_guid, ["anchorGUID"], "DataManager"
110
+ "Anchors", server_guid, ["anchorGUID"], "DataAccessManager"
109
111
  )
110
112
  if type(cats) is list:
111
113
  for cat in cats:
@@ -93,7 +93,6 @@ def list_deployed_databases(
93
93
  table.add_column("Qualified Name")
94
94
  table.add_column("Type")
95
95
  table.add_column("Created", width=23)
96
- table.add_column("Home Store")
97
96
  table.add_column("GUID", width=38, no_wrap=True)
98
97
  table.add_column("Properties")
99
98
  table.add_column("Schemas")
@@ -114,7 +113,8 @@ def list_deployed_databases(
114
113
  el_created_by = header["versions"]["createdBy"]
115
114
  el_created_md = (
116
115
  f"* **Created By**: {el_created_by}\n"
117
- f"* **Created Time**: {el_create_time}"
116
+ f"* **Created Time**: {el_create_time}\n"
117
+ f"* **Home Store**: {el_home}"
118
118
  )
119
119
  el_created_out = Markdown(el_created_md)
120
120
 
@@ -151,7 +151,6 @@ def list_deployed_databases(
151
151
  el_q_name,
152
152
  el_type,
153
153
  el_created_out,
154
- el_home,
155
154
  el_guid,
156
155
  el_props_out,
157
156
  rel_el_out,
@@ -0,0 +1,190 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ SPDX-License-Identifier: Apache-2.0
4
+ Copyright Contributors to the ODPi Egeria project.
5
+
6
+ Display the status of cataloged platforms and servers.
7
+ """
8
+ import argparse
9
+ import os
10
+ import sys
11
+ import time
12
+
13
+ import rich.box as box
14
+ from rich import print
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
+
21
+ from pyegeria import (
22
+ InvalidParameterException,
23
+ PropertyServerException,
24
+ UserNotAuthorizedException,
25
+ print_exception_response,
26
+ AutomatedCuration,
27
+ )
28
+
29
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
30
+ EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
31
+ EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
32
+ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
33
+ EGERIA_VIEW_SERVER_URL = os.environ.get(
34
+ "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
35
+ )
36
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
37
+ EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
38
+ EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
39
+ EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
40
+ EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
41
+ EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
42
+ EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
43
+
44
+
45
+ disable_ssl_warnings = True
46
+ console = Console(width=200)
47
+
48
+ guid_list = []
49
+
50
+
51
+ def list_tech_elements(
52
+ tech_name: str,
53
+ server_name: str,
54
+ platform_url: str,
55
+ user: str,
56
+ user_pass: str,
57
+ jupyter: bool = EGERIA_JUPYTER,
58
+ width: int = EGERIA_WIDTH,
59
+ ):
60
+ console = Console(width=width, force_terminal=not jupyter)
61
+
62
+ a_client = AutomatedCuration(server_name, platform_url, user_id=user)
63
+ token = a_client.create_egeria_bearer_token(user, user_pass)
64
+
65
+ def build_classifications(classification: dict) -> Markdown:
66
+ class_md = "\n"
67
+ for c in classification:
68
+ c_type = c["classificationName"]
69
+ if c_type == "Anchors":
70
+ continue
71
+ class_md += f"* Classification: {c_type}\n"
72
+ class_props = c.get("classificationProperties", None)
73
+ if class_props is None:
74
+ continue
75
+ for prop in class_props.keys():
76
+ class_md += f"\t* {prop}: {class_props[prop]}\n"
77
+ if class_md == "-":
78
+ output = None
79
+ else:
80
+ output = class_md
81
+ return output
82
+
83
+ def generate_table() -> Table:
84
+ """Make a new table."""
85
+ table = Table(
86
+ title=f"Tech Type Elements for {tech_name} @ {time.asctime()}",
87
+ caption=f"{platform_url} - {server_name} @ {time.asctime()}",
88
+ style="bold bright_white on black",
89
+ row_styles=["bold bright_white on black"],
90
+ header_style="white on dark_blue",
91
+ title_style="bold bright_white on black",
92
+ caption_style="white on black",
93
+ show_lines=True,
94
+ box=box.ROUNDED,
95
+ expand=True,
96
+ )
97
+
98
+ table.add_column("Qualified Name/GUID", width=38, no_wrap=True)
99
+ table.add_column("Properties", width=40)
100
+ table.add_column("Classifications", width=50)
101
+
102
+ tech_elements = a_client.get_technology_type_elements(
103
+ tech_name, get_templates=False
104
+ )
105
+ if type(tech_elements) is str:
106
+ console.print(f"No elements found for {tech_name}")
107
+ sys.exit(1)
108
+
109
+ note: str = " "
110
+ for element in tech_elements:
111
+ header = element["elementHeader"]
112
+ tech_type = header["type"]["typeName"]
113
+ tech_collection = header["origin"]["homeMetadataCollectionName"]
114
+ tech_created_by = header["versions"]["createdBy"]
115
+ tech_created_at = header["versions"]["createTime"]
116
+ tech_guid = header["guid"]
117
+ tech_classifications = header["classifications"]
118
+ class_md = build_classifications(tech_classifications)
119
+
120
+ referenceables = element["referenceableProperties"]
121
+ tech_qualified_name = referenceables["qualifiedName"]
122
+ extended = referenceables["extendedProperties"]
123
+ ex_md: str = ""
124
+ for key, value in extended.items():
125
+ ex_md += f"* {key}: {value}\n"
126
+
127
+ note = (
128
+ f"{ex_md}\n"
129
+ f"* Created by: {tech_created_by}\n"
130
+ f"* Created at: {tech_created_at}\n"
131
+ f"* Home Collection: {tech_collection}\n"
132
+ )
133
+
134
+ interfaces = extended.get("connectorInterfaces", None)
135
+ if interfaces is not None:
136
+ interface_type_name = interfaces["typeName"]
137
+ interface_array_cnt = interfaces["arrayCount"]
138
+ note += f"* Interface Type: {interface_type_name}\n"
139
+ for i in range(0, int(interface_array_cnt)):
140
+ note += (
141
+ f"\t* Type: {interfaces['arrayValues']['propertyValueMap'][str(i)]['typeName']}"
142
+ f"\tName: {interfaces['arrayValues']['propertiesAsStrings'][str(i)]}\n"
143
+ )
144
+ note_md = Markdown(note)
145
+ qn = Markdown(f"\n{tech_qualified_name}\n \n--- \n\n\n{tech_guid}")
146
+ cm = Markdown(class_md)
147
+ table.add_row(qn, note_md, cm)
148
+ return table
149
+
150
+ try:
151
+ console = Console(width=width, force_terminal=not jupyter)
152
+
153
+ with console.pager(styles=True):
154
+ console.print(generate_table())
155
+
156
+ except (
157
+ InvalidParameterException,
158
+ PropertyServerException,
159
+ UserNotAuthorizedException,
160
+ ) as e:
161
+ print_exception_response(e)
162
+ print("\n\nPerhaps the type name isn't known")
163
+ finally:
164
+ a_client.close_session()
165
+
166
+
167
+ def main():
168
+ parser = argparse.ArgumentParser()
169
+
170
+ parser.add_argument("--server", help="Name of the server to display status for")
171
+ parser.add_argument("--url", help="URL Platform to connect to")
172
+ parser.add_argument("--userid", help="User Id")
173
+ parser.add_argument("--password", help="User Password")
174
+ args = parser.parse_args()
175
+
176
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
177
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
178
+ userid = args.userid if args.userid is not None else EGERIA_USER
179
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
180
+ try:
181
+ tech_name = Prompt.ask(
182
+ "Enter the tech type to view:", default="PostgreSQL Server"
183
+ )
184
+ list_tech_elements(tech_name, server, url, userid, user_pass)
185
+ except KeyboardInterrupt:
186
+ pass
187
+
188
+
189
+ if __name__ == "__main__":
190
+ main()
@@ -23,28 +23,37 @@ from pyegeria import (
23
23
  PropertyServerException,
24
24
  UserNotAuthorizedException,
25
25
  print_exception_response,
26
- AutomatedCuration
26
+ AutomatedCuration,
27
27
  )
28
28
 
29
29
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
30
- EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
31
- EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
32
- EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
33
- EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
34
- EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
35
- EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
36
- EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
37
- EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
38
- EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
39
- EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
40
- EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
30
+ EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
31
+ EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
32
+ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
33
+ EGERIA_VIEW_SERVER_URL = os.environ.get(
34
+ "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
35
+ )
36
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
37
+ EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
38
+ EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
39
+ EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
40
+ EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
41
+ EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
42
+ EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
41
43
 
42
44
 
43
45
  disable_ssl_warnings = True
44
46
 
45
47
 
46
- def display_tech_types(search_string:str, server: str, url: str, username: str, user_pass: str,
47
- jupyter: bool = EGERIA_JUPYTER, width: int = EGERIA_WIDTH):
48
+ def display_tech_types(
49
+ search_string: str,
50
+ server: str,
51
+ url: str,
52
+ username: str,
53
+ user_pass: str,
54
+ jupyter: bool = EGERIA_JUPYTER,
55
+ width: int = EGERIA_WIDTH,
56
+ ):
48
57
  a_client = AutomatedCuration(server, url, username)
49
58
  token = a_client.create_egeria_bearer_token(username, user_pass)
50
59
  tech_list = a_client.find_technology_types(search_string, page_size=0)
@@ -61,7 +70,7 @@ def display_tech_types(search_string:str, server: str, url: str, username: str,
61
70
  show_lines=True,
62
71
  box=box.ROUNDED,
63
72
  caption=f"Technology Types from Server '{server}' @ Platform - {url}",
64
- expand=True
73
+ expand=True,
65
74
  )
66
75
 
67
76
  table.add_column("Name")
@@ -69,23 +78,20 @@ def display_tech_types(search_string:str, server: str, url: str, username: str,
69
78
  table.add_column("Category")
70
79
  table.add_column("Description")
71
80
 
72
-
73
81
  name = " "
74
82
  description = " "
75
83
  version = " "
76
84
  super_type = " "
77
85
  if type(tech_list) is list:
78
86
  for item in tech_list:
79
- if 'deployedImplementationType' not in item['qualifiedName']:
87
+ if "deployedImplementationType" not in item["qualifiedName"]:
80
88
  continue
81
89
  qualified_name = item.get("qualifiedName", " ")
82
90
  name = item.get("name", "none")
83
91
  category = item.get("category", "none")
84
92
  description = item.get("description", "none")
85
93
 
86
- table.add_row(
87
- name, qualified_name, category, description
88
- )
94
+ table.add_row(name, qualified_name, category, description)
89
95
  return table
90
96
  else:
91
97
  print("Unknown technology type")
@@ -96,7 +102,11 @@ def display_tech_types(search_string:str, server: str, url: str, username: str,
96
102
  with console.pager(styles=True):
97
103
  console.print(generate_table())
98
104
 
99
- except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
105
+ except (
106
+ InvalidParameterException,
107
+ PropertyServerException,
108
+ UserNotAuthorizedException,
109
+ ) as e:
100
110
  print_exception_response(e)
101
111
  assert e.related_http_code != "200", "Invalid parameters"
102
112
  finally:
@@ -118,11 +128,13 @@ def main():
118
128
  user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
119
129
 
120
130
  try:
121
- search_string = Prompt.ask("Enter the technology you are searching for:", default="*")
131
+ search_string = Prompt.ask(
132
+ "Enter the technology you are searching for:", default="*"
133
+ )
122
134
  display_tech_types(search_string, server, url, userid, user_pass)
123
- except (KeyboardInterrupt):
135
+ except KeyboardInterrupt:
124
136
  pass
125
137
 
126
138
 
127
139
  if __name__ == "__main__":
128
- main()
140
+ main()
@@ -25,6 +25,7 @@ from pyegeria import (
25
25
  UserNotAuthorizedException,
26
26
  EgeriaTech,
27
27
  )
28
+ from pyegeria.commands.cat.glossary_actions import EGERIA_HOME_GLOSSARY_GUID
28
29
 
29
30
  disable_ssl_warnings = True
30
31
 
@@ -42,11 +43,12 @@ EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
42
43
  EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
43
44
  EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
44
45
  EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
46
+ EGERIA_HOME_GLOSSARY_GUID = os.environ.get("EGERIA_HOME_GLOSSARY_GUID", None)
45
47
 
46
48
 
47
49
  def display_glossary_terms(
48
50
  search_string: str = "*",
49
- glossary_guid: str = None,
51
+ glossary_guid: str = EGERIA_HOME_GLOSSARY_GUID,
50
52
  glossary_name: str = None,
51
53
  view_server: str = EGERIA_VIEW_SERVER,
52
54
  view_url: str = EGERIA_VIEW_SERVER_URL,
@@ -220,7 +222,7 @@ def main():
220
222
  url = args.url if args.url is not None else EGERIA_PLATFORM_URL
221
223
  userid = args.userid if args.userid is not None else EGERIA_USER
222
224
  user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
223
- guid = args.guid if args.guid is not None else None
225
+ guid = args.guid if args.guid is not None else EGERIA_HOME_GLOSSARY_GUID
224
226
 
225
227
  try:
226
228
  search_string = Prompt.ask("Enter the term you are searching for:", default="*")