pyegeria 5.2__py3-none-any.whl → 5.2.0.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.
Files changed (117) hide show
  1. pyegeria/__init__.py +0 -2
  2. pyegeria/_client.py +2 -7
  3. pyegeria/asset_catalog_omvs.py +0 -34
  4. pyegeria/classification_manager_omvs.py +3 -2
  5. pyegeria/collection_manager_omvs.py +45 -92
  6. pyegeria/commands/README.md +1 -2
  7. pyegeria/commands/cat/__init__.py +5 -1
  8. pyegeria/commands/cat/get_collection.py +14 -23
  9. pyegeria/commands/cat/get_tech_type_elements.py +1 -1
  10. pyegeria/commands/cat/glossary_actions.py +8 -28
  11. pyegeria/commands/cat/list_assets.py +17 -8
  12. pyegeria/commands/cat/list_collections.py +5 -10
  13. pyegeria/commands/cat/list_deployed_catalogs.py +2 -4
  14. pyegeria/commands/cat/list_deployed_database_schemas.py +14 -8
  15. pyegeria/commands/cat/list_deployed_databases.py +3 -2
  16. pyegeria/commands/cat/list_tech_types.py +24 -36
  17. pyegeria/commands/cat/list_terms.py +2 -4
  18. pyegeria/commands/cli/egeria.py +117 -106
  19. pyegeria/commands/cli/egeria_cat.py +54 -53
  20. pyegeria/commands/cli/egeria_my.py +33 -25
  21. pyegeria/commands/cli/egeria_ops.py +40 -38
  22. pyegeria/commands/cli/egeria_tech.py +41 -55
  23. pyegeria/commands/cli/ops_config.py +1 -3
  24. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/CleanShot 2024-11-20 at 16.17.43@2x.png +0 -0
  25. pyegeria/commands/doc/{README.md → command-overview.md} +5 -50
  26. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/{README.md → hey_egeria: overview.md } +1 -1
  27. pyegeria/commands/my/monitor_my_todos.py +5 -17
  28. pyegeria/commands/my/monitor_open_todos.py +1 -1
  29. pyegeria/commands/ops/monitor_asset_events.py +22 -27
  30. pyegeria/commands/ops/monitor_engine_activity_c.py +1 -1
  31. pyegeria/commands/ops/monitor_gov_eng_status.py +4 -31
  32. pyegeria/commands/ops/monitor_integ_daemon_status.py +14 -17
  33. pyegeria/commands/ops/monitor_platform_status.py +1 -1
  34. pyegeria/commands/ops/orig_monitor_server_status.py +21 -36
  35. pyegeria/commands/ops/refresh_integration_daemon.py +1 -1
  36. pyegeria/commands/ops/restart_integration_daemon.py +1 -1
  37. pyegeria/commands/tech/get_tech_details.py +42 -79
  38. pyegeria/commands/tech/get_tech_type_template.py +53 -69
  39. pyegeria/commands/tech/list_anchored_elements.py +15 -18
  40. pyegeria/commands/tech/list_elements_x.py +4 -7
  41. pyegeria/commands/tech/list_registered_services.py +1 -1
  42. pyegeria/commands/tech/list_relationship_types.py +21 -19
  43. pyegeria/commands/tech/list_relationships.py +3 -7
  44. pyegeria/commands/tech/table_tech_templates.py +1 -3
  45. pyegeria/create_tech_guid_lists.py +2 -2
  46. pyegeria/egeria_client.py +0 -2
  47. pyegeria/egeria_tech_client.py +0 -5
  48. pyegeria/glossary_manager_omvs.py +7 -101
  49. pyegeria/server_operations.py +4 -4
  50. pyegeria/template_manager_omvs.py +3 -1
  51. pyegeria/valid_metadata_omvs.py +1 -1
  52. {pyegeria-5.2.dist-info → pyegeria-5.2.0.1.dist-info}/METADATA +5 -3
  53. pyegeria-5.2.0.1.dist-info/RECORD +176 -0
  54. {pyegeria-5.2.dist-info → pyegeria-5.2.0.1.dist-info}/entry_points.txt +0 -2
  55. pyegeria/commands/cat/list_tech_type_elements.py +0 -190
  56. pyegeria/commands/cli/egeria_login_tui.py +0 -313
  57. pyegeria/commands/cli/txt_custom_v2.tcss +0 -19
  58. pyegeria/commands/doc/Visual Command Reference/README.md +0 -511
  59. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs 2024-12-17 at 15.43.27@2x.png +0 -0
  60. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-11-25 at 20.14.50@2x.png +0 -0
  61. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-12-17 at 15.48.38@2x.png +0 -0
  62. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-11-25 at 20.21.25@2x.png +0 -0
  63. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-12-17 at 15.52.16@2x.png +0 -0
  64. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed_databases 2024-12-16 at 16.40.31@2x.png +0 -0
  65. pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-glossaries 2024-11-25 at 20.30.02.png +0 -0
  66. pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-terms 2024-11-25 at 20.32.11.png +0 -0
  67. pyegeria/commands/doc/Visual Command Reference/cat/show/info/asset-types 2024-11-25 at 20.34.19@2x.png +0 -0
  68. pyegeria/commands/doc/Visual Command Reference/cat/show/info/certification-types 2024-11-25 at 20.37.07.png +0 -0
  69. pyegeria/commands/doc/Visual Command Reference/cat/show/info/collection-graph 2024-12-12 at 11.33.18@2x.png +0 -0
  70. pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-collections 2024-12-10 at 14.25.51@2x.png +0 -0
  71. pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-todos 2024-12-12 at 11.46.30@2x.png +0 -0
  72. pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-user-ids 2024-12-12 at 11.51.09@2x.png +0 -0
  73. pyegeria/commands/doc/Visual Command Reference/cat/show/info/tech-types 2024-12-12 at 11.37.20@2x.png +0 -0
  74. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_dependencies 2024-12-14 at 16.24.39@2x.png +0 -0
  75. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_structure 2024-12-14 at 16.21.35@2x.png +0 -0
  76. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/projects 2024-12-14 at 16.18.10@2x.png +0 -0
  77. pyegeria/commands/doc/Visual Command Reference/hey_egeria tui 2024-12-16 at 16.58.22@2x.png +0 -0
  78. pyegeria/commands/doc/Visual Command Reference/my/show/my_profile 2024-12-14 at 16.29.27@2x.png +0 -0
  79. pyegeria/commands/doc/Visual Command Reference/my/show/my_roles 2024-12-14 at 16.32.10@2x.png +0 -0
  80. pyegeria/commands/doc/Visual Command Reference/my/show/my_todos 2024-12-15 at 16.24.13@2x.png +0 -0
  81. pyegeria/commands/doc/Visual Command Reference/my/show/open_todos 2024-12-14 at 16.36.12@2x.png +0 -0
  82. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/list_engine_activity compressed 2024-12-15 at 16.48.48@2x.png +0 -0
  83. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity 2024-12-15 at 16.32.55@2x.png +0 -0
  84. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity compressed 2024-12-15 at 16.38.29@2x.png +0 -0
  85. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_status 2024-12-15 at 16.51.26.jpeg +0 -0
  86. pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_daemon_status 2024-12-15 at 16.57.12@2x.png +0 -0
  87. pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_targets 2024-12-15 at 17.02.19@2x.png +0 -0
  88. pyegeria/commands/doc/Visual Command Reference/ops/show/platforms/monitor_platform_status 2024-12-15 at 19.53.18@2x.png +0 -0
  89. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status 2024-12-15 at 19.59.39@2x.png +0 -0
  90. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status full 2024-12-15 at 20.01.57@2x.png +0 -0
  91. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_startup_servers 2024-12-15 at 19.56.07@2x.png +0 -0
  92. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_anchored_elements 2024-12-15 at 21.25.41@2x.png +0 -0
  93. 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
  94. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/info_for_guid 2024-12-16 at 11.35.29@2x.png +0 -0
  95. 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
  96. 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
  97. 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
  98. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/related_elements 2024-12-16 at 14.55.01@2x.png +0 -0
  99. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/show_related_specifications 2024-12-16 at 15.04.55@2x.png +0 -0
  100. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/asset_types 2024-12-16 at 15.10.16@2x.png +0 -0
  101. 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
  102. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/governance_action_processes 2024-12-16 at 15.13.01@2x.png +0 -0
  103. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/registered_services 2024-12-16 at 16.44.54@2x.png +0 -0
  104. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-16 at 16.20.34@2x.png +0 -0
  105. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-19 at 10.51.54@2x.png +0 -0
  106. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/valid_metadata_values 2024-12-16 at 15.31.56@2x.png +0 -0
  107. 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
  108. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_technology_types 2024-12-16 at 15.39.20@2x.png +0 -0
  109. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_details 2024-12-16 at 15.37.21@2x.png +0 -0
  110. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_templates 2024-12-16 at 16.11.48@2x.png +0 -0
  111. pyegeria/metadata_explorer_omvs.py +0 -2371
  112. pyegeria-5.2.dist-info/RECORD +0 -232
  113. /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
  114. /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
  115. /pyegeria/commands/doc/Visual Command Reference/cat/show/{deployed-data/deployed-data-catalogs-2024-11-20 at 16.17.43@2x.png → assets/deployed-catalogs 2024-11-20 at 16.17.43@2x.png} +0 -0
  116. {pyegeria-5.2.dist-info → pyegeria-5.2.0.1.dist-info}/LICENSE +0 -0
  117. {pyegeria-5.2.dist-info → pyegeria-5.2.0.1.dist-info}/WHEEL +0 -0
@@ -56,7 +56,7 @@ def display_integration_daemon_status(
56
56
  view_url: str = EGERIA_VIEW_SERVER_URL,
57
57
  user: str = EGERIA_USER,
58
58
  user_pass: str = EGERIA_USER_PASSWORD,
59
- paging: bool = False,
59
+ paging: bool = True,
60
60
  jupyter: bool = EGERIA_JUPYTER,
61
61
  width: int = EGERIA_WIDTH,
62
62
  sort: bool = True,
@@ -197,7 +197,7 @@ def display_integration_daemon_status(
197
197
 
198
198
  try:
199
199
  if paging is True:
200
- console = Console(width=width) # main_pagig, force_terminal=not jupyter)
200
+ console = Console(width=width, force_terminal=not jupyter)
201
201
  with console.pager():
202
202
  console.print(generate_table(search_list))
203
203
  else:
@@ -225,7 +225,7 @@ def display_integration_daemon_status(
225
225
  s_client.close_session()
226
226
 
227
227
 
228
- def main_live(paging: bool = False) -> None:
228
+ def main_live():
229
229
  parser = argparse.ArgumentParser()
230
230
  parser.add_argument(
231
231
  "--integ_server", help="Name of the integration server to display status for"
@@ -235,7 +235,6 @@ def main_live(paging: bool = False) -> None:
235
235
  parser.add_argument("--view_url", help="view server URL Platform to connect to")
236
236
  parser.add_argument("--userid", help="User Id")
237
237
  parser.add_argument("--password", help="User Password")
238
-
239
238
  args = parser.parse_args()
240
239
 
241
240
  integ_server = (
@@ -252,24 +251,23 @@ def main_live(paging: bool = False) -> None:
252
251
  view_url = args.view_url if args.view_url is not None else EGERIA_VIEW_SERVER_URL
253
252
  userid = args.userid if args.userid is not None else EGERIA_USER
254
253
  user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
255
-
256
254
  search_list = Prompt.ask(
257
- "Enter the list of connectors you are interested in or '*' for all",
258
- default="*",
255
+ "Enter the list of connectors you are interested in or ['*'] for all",
256
+ default=["*"],
259
257
  )
260
258
  display_integration_daemon_status(
261
- search_list=[search_list],
259
+ search_list=search_list,
262
260
  integ_server=integ_server,
263
261
  integ_url=integ_url,
264
262
  view_server=view_server,
265
263
  view_url=view_url,
266
264
  user=userid,
267
265
  user_pass=user_pass,
268
- paging=paging,
266
+ paging=False,
269
267
  )
270
268
 
271
269
 
272
- def main_paging(paging: bool = True) -> None:
270
+ def main_paging():
273
271
  parser = argparse.ArgumentParser()
274
272
  parser.add_argument(
275
273
  "--integ_server", help="Name of the integration server to display status for"
@@ -279,7 +277,6 @@ def main_paging(paging: bool = True) -> None:
279
277
  parser.add_argument("--view_url", help="view server URL Platform to connect to")
280
278
  parser.add_argument("--userid", help="User Id")
281
279
  parser.add_argument("--password", help="User Password")
282
-
283
280
  args = parser.parse_args()
284
281
 
285
282
  integ_server = (
@@ -297,23 +294,23 @@ def main_paging(paging: bool = True) -> None:
297
294
  userid = args.userid if args.userid is not None else EGERIA_USER
298
295
  user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
299
296
  search_list = Prompt.ask(
300
- "Enter the list of connectors you are interested in or '*' for all",
301
- default="*",
297
+ "Enter the list of connectors you are interested in or ['*'] for all",
298
+ default="[*]",
302
299
  )
303
300
  display_integration_daemon_status(
304
- search_list=[search_list],
301
+ search_list=search_list,
305
302
  integ_server=integ_server,
306
303
  integ_url=integ_url,
307
304
  view_server=view_server,
308
305
  view_url=view_url,
309
306
  user=userid,
310
307
  user_pass=user_pass,
311
- paging=paging,
308
+ paging=True,
312
309
  )
313
310
 
314
311
 
315
312
  if __name__ == "__main__":
316
- main_live(paging=False)
313
+ main_live()
317
314
 
318
315
  if __name__ == "__main_paging__":
319
- main_paging(paging=True)
316
+ main_paging()
@@ -42,7 +42,7 @@ EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
42
42
  EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
43
43
 
44
44
  disable_ssl_warnings = True
45
- console = Console(width=EGERIA_WIDTH)
45
+ console = Console(width=200)
46
46
 
47
47
 
48
48
  def display_status(
@@ -20,36 +20,26 @@ from pyegeria import (
20
20
  PropertyServerException,
21
21
  UserNotAuthorizedException,
22
22
  print_exception_response,
23
- ServerOps,
23
+ ServerOps
24
24
  )
25
25
 
26
26
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
27
- EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
28
- EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
29
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
30
- EGERIA_VIEW_SERVER_URL = os.environ.get(
31
- "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
32
- )
33
- EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
34
- EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
35
- "EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
36
- )
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
- def display_status(
46
- server: str,
47
- url: str,
48
- username: str,
49
- user_pass: str,
50
- jupyter: bool = EGERIA_JUPYTER,
51
- width: int = EGERIA_WIDTH,
52
- ):
27
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
28
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
29
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
30
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
31
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
32
+ EGERIA_INTEGRATION_DAEMON_URL = os.environ.get('EGERIA_INTEGRATION_DAEMON_URL', 'https://localhost:9443')
33
+ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
34
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
35
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
36
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
37
+ EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
38
+ EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
39
+
40
+
41
+ def display_status(server: str, url: str, username: str, user_pass: str, jupyter: bool = EGERIA_JUPYTER,
42
+ width: int = EGERIA_WIDTH):
53
43
  p_client = ServerOps(server, url, username, user_pass)
54
44
 
55
45
  def generate_table() -> Table:
@@ -79,10 +69,9 @@ def display_status(
79
69
  else:
80
70
  status = "Inactive"
81
71
 
82
- table.add_row(
83
- server,
84
- "[red]Inactive" if status == "Inactive" else "[green]Active",
85
- )
72
+ table.add_row(server,
73
+ "[red]Inactive" if status == "Inactive" else "[green]Active",
74
+ )
86
75
  # p_client.close_session()
87
76
  return table
88
77
 
@@ -92,11 +81,7 @@ def display_status(
92
81
  time.sleep(2)
93
82
  live.update(generate_table())
94
83
 
95
- except (
96
- InvalidParameterException,
97
- PropertyServerException,
98
- UserNotAuthorizedException,
99
- ) as e:
84
+ except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
100
85
  print_exception_response(e)
101
86
  except KeyboardInterrupt:
102
87
  pass
@@ -44,7 +44,7 @@ def refresh_connector(
44
44
  statement = "ALL connectors"
45
45
  else:
46
46
  statement = f"the {connector} "
47
- server = "integration_daemon" if server is None else server
47
+ server = "integration-daemon" if server is None else server
48
48
 
49
49
  s_client.refresh_integration_connectors(
50
50
  connector_name=connector, server_guid=None, display_name=server
@@ -45,7 +45,7 @@ def restart_connector(
45
45
  statement = "ALL connectors"
46
46
  else:
47
47
  statement = f"the {connector} "
48
- server = "integration_daemon" if server is None else server
48
+ server = "integration-daemon" if server is None else server
49
49
 
50
50
  s_client.restart_integration_connectors(connector, None, server)
51
51
 
@@ -17,63 +17,47 @@ from rich.prompt import Prompt
17
17
  from rich.text import Text
18
18
  from rich.tree import Tree
19
19
 
20
- from pyegeria import (
21
- UserNotAuthorizedException,
22
- PropertyServerException,
23
- InvalidParameterException,
24
- AutomatedCuration,
25
- )
20
+ from pyegeria import (UserNotAuthorizedException, PropertyServerException,
21
+ InvalidParameterException, AutomatedCuration)
26
22
  from pyegeria._exceptions import (
27
23
  print_exception_response,
28
24
  )
29
25
 
30
26
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
31
- EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
32
- EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
33
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
34
- EGERIA_VIEW_SERVER_URL = os.environ.get(
35
- "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
36
- )
37
- EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
38
- EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
39
- EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
40
- EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
41
- EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
42
- EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
43
- EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
27
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
28
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
29
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
30
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
31
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
32
+ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
33
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
34
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
35
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
36
+ EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
37
+ EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
44
38
 
45
39
  # nest_asyncio.apply()
46
40
 
47
41
  disable_ssl_warnings = True
48
42
 
49
43
 
50
- def tech_details_viewer(
51
- tech: str,
52
- server_name: str,
53
- platform_url: str,
54
- user: str,
55
- user_password: str,
56
- jupyter: bool = EGERIA_JUPYTER,
57
- width: int = EGERIA_WIDTH,
58
- ):
44
+ def tech_details_viewer(tech: str, server_name: str, platform_url: str, user: str, user_password: str,
45
+ jupyter: bool = EGERIA_JUPYTER, width: int = EGERIA_WIDTH):
59
46
  console = Console(width=width, force_terminal=not jupyter)
60
-
61
47
  # print(f"tech is {tech} of type {type(tech)}")
62
48
  # sys.exit(0)
63
- def view_tech_details(
64
- a_client: AutomatedCuration, root_collection_name: str, tree: Tree
65
- ) -> Tree:
49
+ def view_tech_details(a_client: AutomatedCuration, root_collection_name: str, tree: Tree) -> Tree:
66
50
  l2: Tree = None
67
51
  tech_details = a_client.get_technology_type_detail(tech)
68
52
  if (type(tech_details) is dict) and (len(tech_details) > 0):
69
- name = tech_details.get("name", "---")
70
- qualified_name = tech_details.get("qualifiedName", "---")
71
- category = tech_details.get("category", "---")
72
- description = tech_details.get("description", "---")
53
+ name = tech_details.get('name', '---')
54
+ qualified_name = tech_details.get('qualifiedName', "---")
55
+ category = tech_details.get('category', '---')
56
+ description = tech_details.get('description', '---')
73
57
 
74
58
  style = "bold bright_white on black"
75
59
 
76
- bas_md = f"* **Name**: {name}\n"
60
+ bas_md = f"* **Name**: {name}\n"
77
61
  bas_md += f"* **QualifiedName**: {qualified_name}\n"
78
62
  bas_md += f"* **Category**: {category}\n"
79
63
  bas_md += f"* **Technology Description**: {description}\n"
@@ -81,68 +65,49 @@ def tech_details_viewer(
81
65
  bas_out = Markdown(bas_md)
82
66
 
83
67
  l2 = tree.add(Panel(bas_out))
84
- ext_ref = tech_details.get("externalReferences", None)
68
+ ext_ref = tech_details.get('externalReferences', None)
85
69
 
86
70
  if ext_ref is not None:
87
71
  uri = ext_ref[0]["properties"].get("uri", "---")
88
72
  # console.print(f" {type(ext_ref)}, {len(ext_ref)}")
89
- l2 = tree.add(Panel(Markdown(f"* URI: {uri}", style)))
73
+ l2 = tree.add(Panel(Markdown(f'* URI: {uri}', style)))
90
74
 
91
- resource_list = tech_details.get("resourceList", None)
75
+ resource_list = tech_details.get('resourceList', None)
92
76
  if resource_list:
93
77
  t_r = tree.add(Panel("Resource List[bold red]"))
94
78
  for resource in resource_list:
95
- resource_use = Text(
96
- f"[bold bright_white]{resource.get('resourceUse', '---')}"
97
- )
98
- resource_use_description = Text(
99
- f"[bold bright_white]{resource.get('resourceUseDescription', '---')}"
100
- )
101
- type_name = Text(
102
- f"[bold bright_white]{resource['relatedElement']['type'].get('typeName', '---')}"
103
- )
104
- unique_name = Text(
105
- f"[bold bright_white]{resource['relatedElement'].get('uniqueName', '---')}"
106
- )
107
- related_guid = Text(
108
- f"[bold bright_white]{resource['relatedElement'].get('guid', '---')}"
109
- )
110
- resource_text = (
111
- f"[bold red]Resource\n"
112
- f"[white]Resource use: {resource_use}[white]\nDescription: "
113
- f"{resource_use_description}\n[white]Type Name: {type_name}\n"
114
- f"[white]Unique Name: {unique_name}\n[white]Related GUID: {related_guid}\n"
115
- )
79
+ resource_use = Text(f"[bold bright_white]{resource.get('resourceUse', '---')}")
80
+ resource_use_description = Text(f"[bold bright_white]{resource.get('resourceUseDescription', '---')}")
81
+ type_name = Text(f"[bold bright_white]{resource['relatedElement']['type'].get('typeName', '---')}")
82
+ unique_name = Text(f"[bold bright_white]{resource['relatedElement'].get('uniqueName', '---')}")
83
+ related_guid = Text(f"[bold bright_white]{resource['relatedElement'].get('guid', '---')}")
84
+ resource_text = (f"[bold red]Resource\n"
85
+ f"[white]Resource use: {resource_use}[white]\nDescription: "
86
+ f"{resource_use_description}\n[white]Type Name: {type_name}\n"
87
+ f"[white]Unique Name: {unique_name}\n[white]Related GUID: {related_guid}\n")
116
88
  p = Panel.fit(resource_text)
117
89
  tt = t_r.add(p, style=style)
118
90
  else:
119
91
  tt = tree.add(Panel(f"Resource details for {tech} where not found"))
120
92
 
121
93
  else:
122
- tt = tree.add(
123
- Panel(
124
- f"Tech type {tech} was not found - please check the tech type name"
125
- )
126
- )
94
+ tt = tree.add(Panel(f"Tech type {tech} was not found - please check the tech type name"))
127
95
 
128
96
  return tt
129
97
 
130
98
  try:
131
- tree = Tree(
132
- f"{tech}",
133
- style="bold bright_white on black",
134
- guide_style="bold bright_blue",
135
- )
136
- a_client = AutomatedCuration(server_name, platform_url, user_id=user)
99
+ tree = Tree(f"{tech}", style="bold bright_white on black", guide_style="bold bright_blue")
100
+ a_client = AutomatedCuration(server_name, platform_url,
101
+ user_id=user)
137
102
 
138
103
  token = a_client.create_egeria_bearer_token(user, user_password)
139
104
  view_tech_details(a_client, tech, tree)
140
105
  print(tree)
141
106
 
142
107
  except (
143
- InvalidParameterException,
144
- PropertyServerException,
145
- UserNotAuthorizedException,
108
+ InvalidParameterException,
109
+ PropertyServerException,
110
+ UserNotAuthorizedException
146
111
  ) as e:
147
112
  print_exception_response(e)
148
113
 
@@ -161,11 +126,9 @@ def main():
161
126
  userid = args.userid if args.userid is not None else EGERIA_USER
162
127
  user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
163
128
  try:
164
- tech = Prompt.ask(
165
- "Enter the Technology to start from:", default="PostgreSQL Server"
166
- )
129
+ tech = Prompt.ask("Enter the Technology to start from:", default="PostgreSQL Server")
167
130
  tech_details_viewer(tech, server, url, userid, user_pass)
168
- except KeyboardInterrupt:
131
+ except(KeyboardInterrupt):
169
132
  pass
170
133
 
171
134
 
@@ -20,23 +20,21 @@ from pyegeria import (
20
20
  PropertyServerException,
21
21
  UserNotAuthorizedException,
22
22
  print_exception_response,
23
- AutomatedCuration,
23
+ AutomatedCuration
24
24
  )
25
25
 
26
26
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
27
- EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
28
- EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
29
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
30
- EGERIA_VIEW_SERVER_URL = os.environ.get(
31
- "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
32
- )
33
- EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
34
- EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
35
- EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
36
- EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
37
- EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
38
- EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
39
- EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
27
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
28
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
29
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
30
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
31
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
32
+ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
33
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
34
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
35
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
36
+ EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
37
+ EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
40
38
 
41
39
 
42
40
  disable_ssl_warnings = True
@@ -44,18 +42,12 @@ console = Console(width=200)
44
42
 
45
43
  guid_list = []
46
44
 
45
+ def template_viewer(tech_name: str, server_name:str, platform_url:str, user:str, user_pass:str,
46
+ jupyter: bool = EGERIA_JUPYTER, width: int = EGERIA_WIDTH):
47
47
 
48
- def template_viewer(
49
- tech_name: str,
50
- server_name: str,
51
- platform_url: str,
52
- user: str,
53
- user_pass: str,
54
- jupyter: bool = EGERIA_JUPYTER,
55
- width: int = EGERIA_WIDTH,
56
- ):
57
48
  def build_classifications(classification: dict) -> Markdown:
58
- class_md = "\n"
49
+
50
+ class_md = ("\n")
59
51
  for c in classification:
60
52
  c_type = c["classificationName"]
61
53
  if c_type == "Anchors":
@@ -73,59 +65,53 @@ def template_viewer(
73
65
  return output
74
66
 
75
67
  try:
68
+
76
69
  console = Console(width=width, force_terminal=not jupyter)
77
70
 
78
- a_client = AutomatedCuration(server_name, platform_url, user_id=user)
71
+ a_client = AutomatedCuration(server_name, platform_url,
72
+ user_id=user)
79
73
 
80
74
  token = a_client.create_egeria_bearer_token(user, user_pass)
81
- tech_elements = a_client.get_technology_type_elements(
82
- tech_name, get_templates=True
83
- )
75
+ tech_elements = a_client.get_technology_type_elements(tech_name, get_templates=True)
84
76
  if (len(tech_elements) >= 1) and (type(tech_elements) is list):
85
- tree = Tree(
86
- f"Deployed Technology Type: {tech_name}",
87
- style="bold bright_white",
88
- guide_style="bold bright_blue",
89
- )
90
- note: str = " "
77
+ tree = Tree(f"Deployed Technology Type: {tech_name}", style="bold bright_white", guide_style="bold bright_blue")
78
+ note: str =" "
91
79
  for element in tech_elements:
92
- header = element["elementHeader"]
80
+ header = element['elementHeader']
93
81
  tech_type = header["type"]["typeName"]
94
- tech_collection = header["origin"]["homeMetadataCollectionName"]
95
- tech_created_by = header["versions"]["createdBy"]
96
- tech_created_at = header["versions"]["createTime"]
97
- tech_guid = header["guid"]
98
- tech_classifications = header["classifications"]
82
+ tech_collection = header["origin"]['homeMetadataCollectionName']
83
+ tech_created_by = header['versions']['createdBy']
84
+ tech_created_at = header['versions']['createTime']
85
+ tech_guid = header['guid']
86
+ tech_classifications = header['classifications']
99
87
  class_md = build_classifications(tech_classifications)
100
88
 
101
- referenceables = element["referenceableProperties"]
102
- tech_qualified_name = referenceables["qualifiedName"]
103
- extended = referenceables["extendedProperties"]
104
- ex_md: str = ""
89
+ referenceables = element['referenceableProperties']
90
+ tech_qualified_name = referenceables['qualifiedName']
91
+ extended = referenceables['extendedProperties']
92
+ ex_md:str = ""
105
93
  for key, value in extended.items():
106
94
  ex_md += f"* {key}: {value}\n"
107
95
 
108
- note = (
109
- f"* Qualified Name: {tech_qualified_name}\n"
110
- f"* GUID: {tech_guid}\n"
111
- f"* Createdy by: {tech_created_by}\n"
112
- f"* Created at: {tech_created_at}\n"
113
- f"* Home Collection: {tech_collection}\n"
114
- f"{class_md}\n"
115
- f"{ex_md}\n"
116
- )
117
-
118
- interfaces = extended.get("connectorInterfaces", None)
96
+ note = (f"* Qualified Name: {tech_qualified_name}\n"
97
+ f"* GUID: {tech_guid}\n"
98
+ f"* Createdy by: {tech_created_by}\n"
99
+ f"* Created at: {tech_created_at}\n"
100
+ f"* Home Collection: {tech_collection}\n"
101
+ f"{class_md}\n"
102
+ f"{ex_md}\n"
103
+ )
104
+
105
+ interfaces = extended.get('connectorInterfaces', None)
119
106
  if interfaces is not None:
120
- interface_type_name = interfaces["typeName"]
121
- interface_array_cnt = interfaces["arrayCount"]
107
+ interface_type_name = interfaces['typeName']
108
+ interface_array_cnt = interfaces['arrayCount']
122
109
  note += f"* Interface Type: {interface_type_name}\n"
123
110
  for i in range(0, int(interface_array_cnt)):
124
- note += (
125
- f"\t* Type: {interfaces['arrayValues']['propertyValueMap'][str(i)]['typeName']}"
126
- f"\tName: {interfaces['arrayValues']['propertiesAsStrings'][str(i)]}\n"
127
- )
128
- note_md = Panel.fit(Markdown(note), style="bold bright_white on black")
111
+ note += (f"\t* Type: {interfaces['arrayValues']['propertyValueMap'][str(i)]['typeName']}"
112
+ f"\tName: {interfaces['arrayValues']['propertiesAsStrings'][str(i)]}\n"
113
+ )
114
+ note_md = Panel.fit(Markdown(note), style = 'bold bright_white on black')
129
115
  t = tree.add(note_md)
130
116
 
131
117
  else:
@@ -134,7 +120,7 @@ def template_viewer(
134
120
  except (
135
121
  InvalidParameterException,
136
122
  PropertyServerException,
137
- UserNotAuthorizedException,
123
+ UserNotAuthorizedException
138
124
  ) as e:
139
125
  print_exception_response(e)
140
126
 
@@ -154,13 +140,11 @@ def main():
154
140
  user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
155
141
 
156
142
  try:
157
- tech_name = Prompt.ask(
158
- "Enter the Asset Name to view:", default="Apache Kafka Server"
159
- )
160
- template_viewer(tech_name, server, url, userid, user_pass)
161
- except KeyboardInterrupt:
143
+ tech_name = Prompt.ask("Enter the Asset Name to view:", default="Apache Kafka Server")
144
+ template_viewer(tech_name,server, url, userid, user_pass)
145
+ except(KeyboardInterrupt):
162
146
  pass
163
147
 
164
148
 
165
149
  if __name__ == "__main__":
166
- main()
150
+ main()