pyegeria 0.5.8.17__tar.gz → 0.5.8.20__tar.gz

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 (76) hide show
  1. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/PKG-INFO +1 -1
  2. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/catalog_user/get_asset_graph.py +4 -1
  3. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/catalog_user/get_collection.py +4 -2
  4. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/catalog_user/get_tech_type_elements.py +7 -2
  5. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/catalog_user/get_tech_type_template.py +7 -3
  6. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/catalog_user/list_assets.py +6 -2
  7. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/catalog_user/list_glossary.py +5 -2
  8. {pyegeria-0.5.8.17/examples/widgets/developer → pyegeria-0.5.8.20/examples/widgets/catalog_user}/list_tech_types.py +6 -2
  9. pyegeria-0.5.8.20/examples/widgets/cli/egeria_cat.py +198 -0
  10. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/operational/list_catalog_targets.py +8 -3
  11. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/operational/monitor_engine_activity.py +3 -2
  12. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/operational/monitor_gov_eng_status.py +3 -2
  13. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/operational/monitor_integ_daemon_status.py +2 -2
  14. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyproject.toml +5 -2
  15. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/LICENSE +0 -0
  16. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/README.md +0 -0
  17. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/doc_samples/Create_Collection_Sample.py +0 -0
  18. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/doc_samples/Create_Sustainability_Collection_Sample.py +0 -0
  19. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/catalog_user/README.md +0 -0
  20. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/catalog_user/__init__.py +0 -0
  21. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/cli/__init__.py +0 -0
  22. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/cli/egeria_ops.py +0 -0
  23. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/cli/ops_config.py +0 -0
  24. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/developer/README.md +0 -0
  25. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/developer/__init__.py +0 -0
  26. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/developer/get_guid_info.py +0 -0
  27. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/developer/get_tech_details.py +0 -0
  28. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/developer/list_asset_types.py +0 -0
  29. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/developer/list_registered_services.py +0 -0
  30. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/developer/list_relationship_types.py +0 -0
  31. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/developer/list_tech_templates.py +0 -0
  32. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/developer/list_valid_metadata_values.py +0 -0
  33. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/operational/README.md +0 -0
  34. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/operational/__init__.py +0 -0
  35. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/operational/engine_actions.py +0 -0
  36. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/operational/integration_daemon_actions.py +0 -0
  37. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/operational/load_archive.py +0 -0
  38. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/operational/monitor_asset_events.py +0 -0
  39. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/operational/monitor_coco_status.py +0 -0
  40. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/operational/monitor_platform_status.py +0 -0
  41. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/operational/monitor_server_list.py +0 -0
  42. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/operational/monitor_server_status.py +0 -0
  43. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/operational/refresh_integration_daemon.py +0 -0
  44. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/operational/restart_integration_daemon.py +0 -0
  45. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/personal_organizer/README.md +0 -0
  46. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/personal_organizer/__init__.py +0 -0
  47. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/personal_organizer/list_my_profile.py +0 -0
  48. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/personal_organizer/list_projects.py +0 -0
  49. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/personal_organizer/list_todos.py +0 -0
  50. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/personal_organizer/monitor_my_todos.py +0 -0
  51. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/examples/widgets/personal_organizer/monitor_open_todos.py +0 -0
  52. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/Xfeedback_manager_omvs.py +0 -0
  53. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/Xloaded_resources_omvs.py +0 -0
  54. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/__init__.py +0 -0
  55. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/_client.py +0 -0
  56. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/_deprecated_gov_engine.py +0 -0
  57. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/_exceptions.py +0 -0
  58. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/_globals.py +0 -0
  59. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/_validators.py +0 -0
  60. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/action_author_omvs.py +0 -0
  61. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/asset_catalog_omvs.py +0 -0
  62. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/automated_curation_omvs.py +0 -0
  63. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/collection_manager_omvs.py +0 -0
  64. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/core_omag_server_config.py +0 -0
  65. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/create_tech_guid_lists.py +0 -0
  66. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/full_omag_server_config.py +0 -0
  67. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/glossary_browser_omvs.py +0 -0
  68. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/glossary_manager_omvs.py +0 -0
  69. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/my_profile_omvs.py +0 -0
  70. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/platform_services.py +0 -0
  71. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/project_manager_omvs.py +0 -0
  72. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/registered_info.py +0 -0
  73. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/runtime_manager_omvs.py +0 -0
  74. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/server_operations.py +0 -0
  75. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/utils.py +0 -0
  76. {pyegeria-0.5.8.17 → pyegeria-0.5.8.20}/pyegeria/valid_metadata_omvs.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 0.5.8.17
3
+ Version: 0.5.8.20
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -38,7 +38,8 @@ EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
38
38
 
39
39
  disable_ssl_warnings = True
40
40
 
41
- console = Console(width=EGERIA_WIDTH, force_terminal=(not EGERIA_JUPYTER))
41
+ # console = Console(width=EGERIA_WIDTH, force_terminal=(not EGERIA_JUPYTER))
42
+ console = Console()
42
43
 
43
44
  guid_list = []
44
45
 
@@ -257,6 +258,8 @@ def main():
257
258
  except (KeyboardInterrupt) as e:
258
259
  # console.print_exception()
259
260
  pass
261
+ except Exception as e:
262
+ console.print_exception()
260
263
 
261
264
 
262
265
  if __name__ == "__main__":
@@ -31,9 +31,11 @@ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
31
31
  EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
32
32
  EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
33
33
  EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
34
+ EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
35
+ EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
34
36
 
35
-
36
- def collection_viewer(root: str, server_name: str, platform_url: str, user: str, user_password: str):
37
+ def collection_viewer(root: str, server_name: str, platform_url: str, user: str, user_password: str,
38
+ jupyter:bool=EGERIA_JUPYTER, width:int = EGERIA_WIDTH):
37
39
  """ A simple collection viewer"""
38
40
  def walk_collection_hierarchy(collection_client: CollectionManager, root_collection_name: str, tree: Tree) -> None:
39
41
  """Recursively build a Tree with collection contents."""
@@ -40,13 +40,17 @@ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
40
40
  EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
41
41
  EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
42
42
  EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
43
+ EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
44
+ EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
45
+
43
46
 
44
47
  disable_ssl_warnings = True
45
48
  console = Console(width=200)
46
49
 
47
50
  guid_list = []
48
51
 
49
- def tech_viewer(tech_name: str, server_name:str, platform_url:str, user:str, user_pass:str):
52
+ def tech_viewer(tech_name: str, server_name:str, platform_url:str, user:str, user_pass:str,
53
+ jupyter:bool=EGERIA_JUPYTER, width:int=EGERIA_WIDTH):
50
54
 
51
55
  def build_classifications(classification: dict) -> Markdown:
52
56
 
@@ -69,7 +73,8 @@ def tech_viewer(tech_name: str, server_name:str, platform_url:str, user:str, use
69
73
 
70
74
  try:
71
75
 
72
- console = Console()
76
+ console = Console(width=width, force_terminal=not jupyter)
77
+
73
78
 
74
79
  a_client = AutomatedCuration(server_name, platform_url,
75
80
  user_id=user)
@@ -33,13 +33,17 @@ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
33
33
  EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
34
34
  EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
35
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'))
38
+
36
39
 
37
40
  disable_ssl_warnings = True
38
41
  console = Console(width=200)
39
42
 
40
43
  guid_list = []
41
44
 
42
- def tech_viewer(tech_name: str, server_name:str, platform_url:str, user:str, user_pass:str):
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):
43
47
 
44
48
  def build_classifications(classification: dict) -> Markdown:
45
49
 
@@ -62,7 +66,7 @@ def tech_viewer(tech_name: str, server_name:str, platform_url:str, user:str, use
62
66
 
63
67
  try:
64
68
 
65
- console = Console()
69
+ console = Console(width=width, force_terminal=not jupyter)
66
70
 
67
71
  a_client = AutomatedCuration(server_name, platform_url,
68
72
  user_id=user)
@@ -137,7 +141,7 @@ def main():
137
141
 
138
142
  try:
139
143
  tech_name = Prompt.ask("Enter the Asset Name to view:", default="Apache Kafka Server")
140
- tech_viewer(tech_name,server, url, userid, user_pass)
144
+ template_viewer(tech_name,server, url, userid, user_pass)
141
145
  except(KeyboardInterrupt):
142
146
  pass
143
147
 
@@ -35,10 +35,14 @@ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
35
35
  EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
36
36
  EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
37
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'))
40
+
38
41
 
39
42
  disable_ssl_warnings = True
40
43
 
41
- def display_assets(search_string: str, server: str, url: str, username: str, user_password: str, time_out: int = 60):
44
+ def display_assets(search_string: str, server: str, url: str, username: str, user_password: str, time_out: int = 60,
45
+ jupyter: bool = EGERIA_JUPYTER, width: int = EGERIA_WIDTH):
42
46
 
43
47
  g_client = AssetCatalog(server, url, username)
44
48
  token = g_client.create_egeria_bearer_token(username, user_password)
@@ -114,7 +118,7 @@ def display_assets(search_string: str, server: str, url: str, username: str, use
114
118
  # while True:
115
119
  # time.sleep(2)
116
120
  # live.update(generate_table())
117
- console = Console()
121
+ console = Console(width=width, force_terminal=not jupyter)
118
122
  with console.pager(styles=True):
119
123
  console.print(generate_table(search_string))
120
124
 
@@ -42,9 +42,12 @@ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
42
42
  EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
43
43
  EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
44
44
  EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
45
+ EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
46
+ EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
45
47
 
46
48
 
47
- def display_glossary_terms(search_string: str, guid: str, server: str, url: str, username: str, user_password: str):
49
+ def display_glossary_terms(search_string: str, guid: str, server: str, url: str, username: str, user_password: str,
50
+ jupyter: bool = EGERIA_JUPYTER, width: int = EGERIA_WIDTH ):
48
51
 
49
52
  g_client = GlossaryBrowser(server, url)
50
53
  token = g_client.create_egeria_bearer_token(username, user_password)
@@ -99,7 +102,7 @@ def display_glossary_terms(search_string: str, guid: str, server: str, url: str,
99
102
  # while True:
100
103
  # time.sleep(2)
101
104
  # live.update(generate_table(search_string))
102
- console = Console(style="bold white on black")
105
+ console = Console(style="bold white on black", width=width, force_terminal=not jupyter)
103
106
  with console.pager(styles=True):
104
107
  console.print(generate_table(search_string))
105
108
 
@@ -36,11 +36,15 @@ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
36
36
  EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
37
37
  EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
38
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'))
41
+
39
42
 
40
43
  disable_ssl_warnings = True
41
44
 
42
45
 
43
- def display_tech_types(search_string:str, server: str, url: str, username: str, user_pass: str):
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):
44
48
  a_client = AutomatedCuration(server, url, username)
45
49
  token = a_client.create_egeria_bearer_token(username, user_pass)
46
50
  tech_list = a_client.find_technology_types(search_string, page_size=0)
@@ -88,7 +92,7 @@ def display_tech_types(search_string:str, server: str, url: str, username: str,
88
92
  sys.exit(1)
89
93
 
90
94
  try:
91
- console = Console()
95
+ console = Console(width=width, force_terminal=not jupyter)
92
96
  with console.pager(styles=True):
93
97
  console.print(generate_table())
94
98
 
@@ -0,0 +1,198 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ SPDX-License-Identifier: Apache-2.0
4
+ Copyright Contributors to the ODPi Egeria project.
5
+
6
+
7
+ A command line interface for Egeria Catalog User functions
8
+
9
+ This is an emerging capability based on the **click** package. Feedback welcome!
10
+
11
+ """
12
+ import click
13
+ from trogon import tui
14
+
15
+ from examples.widgets.catalog_user.get_asset_graph import asset_viewer
16
+ from examples.widgets.catalog_user.get_collection import collection_viewer
17
+ from examples.widgets.catalog_user.get_tech_type_elements import tech_viewer
18
+ from examples.widgets.catalog_user.get_tech_type_template import template_viewer
19
+ from examples.widgets.catalog_user.list_assets import display_assets
20
+ from examples.widgets.catalog_user.list_glossary import display_glossary_terms
21
+ from examples.widgets.catalog_user.list_tech_types import display_tech_types
22
+ # from pyegeria import ServerOps
23
+ from examples.widgets.cli.ops_config import Config
24
+
25
+
26
+ # class Config(object):
27
+ # def __init__(self, server: str = None, url: str = None, userid:str = None, password:str = None,
28
+ # timeout:int = 30, paging: bool = False):
29
+ # self.server = server
30
+ # self.url = url
31
+ # self.userid = userid
32
+ # self.password = password
33
+ # self.timeout = timeout
34
+ # self.paging = paging
35
+ #
36
+ #
37
+ # pass_config = click.make_pass_decorator(Config)
38
+
39
+ # @tui
40
+ @tui()
41
+ @click.version_option("0.0.1", prog_name="egeria_ops")
42
+ @click.group()
43
+ @click.option('--server', default='active-metadata-store', envvar='EGERIA_METADATA_STORE',
44
+ help='Egeria metadata store to work with')
45
+ @click.option('--url', default='https://localhost:9443', envvar='EGERIA_PLATFORM_URL',
46
+ help='URL of Egeria metadata store platform to connect to')
47
+ @click.option('--integration-daemon', default='integration-daemon', envvar='EGERIA_INTEGRATION_DAEMON',
48
+ help='Egeria integration daemon to work with')
49
+ @click.option('--integration_daemon_url', default='https://localhost:9443', envvar='EGERIA_INTEGRATION_DAEMON_URL',
50
+ help='URL of Egeria integration daemon platform to connect to')
51
+ @click.option('--view_server', default='view-server', envvar='EGERIA_VIEW_SERVER',
52
+ help='Egeria view server to work with')
53
+ @click.option('--view_server_url', default='https://localhost:9443', envvar='EGERIA_VIEW_SERVER_URL',
54
+ help='URL of Egeria view server platform to connect to')
55
+ @click.option('--engine_host', default='engine-host', envvar='EGERIA_ENGINE_HOST',
56
+ help='Egeria engine host to work with')
57
+ @click.option('--engine_host_url', default='https://localhost:9443', envvar='EGERIA_ENGINE_HOST_URL',
58
+ help='URL of Egeria engine host platform to connect to')
59
+ @click.option('--admin_user', default='garygeeke', envvar='EGERIA_ADMIN_USER', help='Egeria admin user')
60
+ @click.option('--admin_user_password', default='secret', envvar='EGERIA_ADMIN_PASSWORD',
61
+ help='Egeria admin password')
62
+ @click.option('--userid', default='garygeeke', envvar='EGERIA_USER', help='Egeria user')
63
+ @click.option('--password', default='secret', envvar='EGERIA_PASSWORD',
64
+ help='Egeria user password')
65
+ @click.option('--timeout', default=60, help='Number of seconds to wait')
66
+ @click.option('--verbose', is_flag=True, default=False, help='Enable verbose mode')
67
+ @click.option('--paging', is_flag=True, default=False, help='Enable paging snapshots vs live updates')
68
+ @click.option('--jupyter', is_flag=True, default=False, envvar='EGERIA_JUPYTER',
69
+ help='Enable for rendering in a Jupyter terminal')
70
+ @click.option('--width', default=200, envvar='EGERIA_WIDTH', help='Screen width, in characters, to use')
71
+ @click.pass_context
72
+ def cli(ctx, server, url, view_server, view_server_url, integration_daemon, integration_daemon_url,
73
+ engine_host, engine_host_url, admin_user, admin_user_password, userid, password, timeout, paging,
74
+ verbose, jupyter, width):
75
+ """An Egeria Command Line interface for Operations """
76
+ ctx.obj = Config(server, url, view_server, view_server_url, integration_daemon,
77
+ integration_daemon_url, engine_host, engine_host_url,
78
+ admin_user, admin_user_password, userid, password,
79
+ timeout, paging, verbose, jupyter, width)
80
+ ctx.max_content_width = 200
81
+ ctx.ensure_object(Config)
82
+ if verbose:
83
+ click.echo(f"we are in verbose mode - server is {server}")
84
+
85
+
86
+ @cli.group("show")
87
+ @click.pass_context
88
+ def show(ctx):
89
+ """Display an Egeria Object"""
90
+ pass
91
+
92
+
93
+ @show.command('tech_types')
94
+ @click.option('--tech_type', default='*', help='Tech type to search for')
95
+ @click.pass_context
96
+ def show_tech_types(ctx, tech_type):
97
+ """List deployed technology types"""
98
+ c = ctx.obj
99
+ display_tech_types(tech_type, c.view_server, c.view_server_url,
100
+ c.userid, c.password)
101
+
102
+
103
+ @show.command('tech_type_elements')
104
+ @click.option('--tech_type', default='PostgreSQL Server', help='Specific tech type to get elements for')
105
+ @click.pass_context
106
+ def show_tech_type_elements(ctx, tech_type):
107
+ """List technology type elements"""
108
+ c = ctx.obj
109
+ tech_viewer(tech_type, c.view_server, c.view_server_url,
110
+ c.userid, c.password)
111
+
112
+
113
+ @show.command('tech_type_templates')
114
+ @click.option('--tech_type', default='PostgreSQL Server', help='Specific tech type to get elements for')
115
+ @click.pass_context
116
+ def show_tech_type_templates(ctx, tech_type):
117
+ """List technology type templates"""
118
+ c = ctx.obj
119
+ template_viewer(tech_type, c.view_server, c.view_server_url, c.userid,
120
+ c.password, c.jupyter, c.width)
121
+
122
+
123
+ @show.command('assets')
124
+ @click.option('--search_string', help='List assets similar to search string - minimum of 4 characters')
125
+ @click.pass_context
126
+ def show_assets(ctx, search_string):
127
+ """Find and display assets"""
128
+ c = ctx.obj
129
+ display_assets(search_string, c.view_server, c.view_server_url, c.userid,
130
+ c.password, 60,c.jupyter, c.width)
131
+
132
+
133
+ @show.command('glossary_terms')
134
+ @click.option('--search_string', default='*',
135
+ help='List glossary terms similar to search string - minimum of 4 characters')
136
+ @click.option('--glossary_guid', default=None, help='Optionally restrict search to glossary with the specified guid')
137
+ @click.pass_context
138
+ def show_terms(ctx, search_string, glossary_guid):
139
+ """Find and display glossary terms"""
140
+ c = ctx.obj
141
+ display_glossary_terms(search_string, glossary_guid, c.view_server, c.view_server_url, c.userid,
142
+ c.password, c.jupyter, c.width)
143
+
144
+
145
+ @show.command('asset_graph')
146
+ @click.argument('asset_guid', nargs=1)
147
+ @click.pass_context
148
+ def show_asset_graph(ctx, asset_guid):
149
+ """Display a tree graph of information about an asset """
150
+ c = ctx.obj
151
+ asset_viewer(asset_guid, c.view_server, c.view_server_url, c.userid,
152
+ c.password, c.jupyter, c.width)
153
+
154
+
155
+ @show.command('collection')
156
+ @click.option('--root_collection', default='Root Sustainability Collection',
157
+ help='View of tree of collections from a given root')
158
+ @click.pass_context
159
+ def show_asset_graph(ctx, root_collection):
160
+ """Display a tree graph of information about an asset """
161
+ c = ctx.obj
162
+ collection_viewer(root_collection, c.view_server, c.view_server_url, c.userid,
163
+ c.password, c.jupyter, c.width)
164
+
165
+
166
+ #
167
+ # Tell
168
+ #
169
+
170
+ @cli.group('tell')
171
+ @click.pass_context
172
+ def tell(ctx):
173
+ """Perform actions an Egeria Objects"""
174
+ pass
175
+
176
+
177
+ @tell.group('survey')
178
+ @click.pass_context
179
+ def survey(ctx):
180
+ """Refresh the specified integration connector or ALL connectors if not specified"""
181
+ c = ctx.obj
182
+ pass
183
+
184
+
185
+ @survey.command('survey_uc_server')
186
+ @click.pass_context
187
+ @click.option('--uc_endpoint', default='https://localhost:8080',
188
+ help="Endpoint of the Unity Catalog Server to Survey")
189
+ def survey_uc_server(ctx, uc_endpoint):
190
+ """Survey the Unity Catalog server at the given endpoint"""
191
+ c = ctx.obj
192
+ pass
193
+ # restart_connector(connector, c.integration_daemon, c.integration_daemon_url,
194
+ # c.userid, c.password)
195
+
196
+
197
+ if __name__ == '__main__':
198
+ cli()
@@ -84,6 +84,8 @@ def display_catalog_targets(connector: str, server: str, url: str, username: str
84
84
  for prop in config_props:
85
85
  config_props_md += f"* {prop}: {config_props[prop]}\n"
86
86
  config_props_out = Markdown(config_props_md)
87
+ else:
88
+ config_props_out = '---'
87
89
 
88
90
  template_props = target.get('templateProperties', '---')
89
91
  if type(template_props) is dict:
@@ -91,6 +93,8 @@ def display_catalog_targets(connector: str, server: str, url: str, username: str
91
93
  for prop in template_props:
92
94
  template_props_md += f"* {prop}: {template_props[prop]}\n"
93
95
  template_props_out = Markdown(template_props_md)
96
+ else:
97
+ template_props_out = '---'
94
98
 
95
99
  table.add_row(
96
100
  connector_unique, target_name, target_source, target_rel,
@@ -112,8 +116,9 @@ def display_catalog_targets(connector: str, server: str, url: str, username: str
112
116
 
113
117
  except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
114
118
  print_exception_response(e)
115
- except Exception:
119
+ except Exception as e:
116
120
  print(f"\n\n===> Perhaps integration connector {connector} is not known?\n\n")
121
+ console.print_exception()
117
122
  finally:
118
123
  a_client.close_session()
119
124
 
@@ -130,7 +135,7 @@ def main():
130
135
  args = parser.parse_args()
131
136
 
132
137
  server = args.server if args.server is not None else EGERIA_VIEW_SERVER
133
- url = args.url if args.url is not None else EGERIA_PLATFORM_URL
138
+ url = args.url if args.url is not None else EGERIA_VIEW_SERVER_URL
134
139
  userid = args.userid if args.userid is not None else EGERIA_USER
135
140
  user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
136
141
  jupyter = args.jupyter if args.jupyter is not None else EGERIA_JUPYTER
@@ -138,7 +143,7 @@ def main():
138
143
 
139
144
  try:
140
145
  connector = Prompt.ask("Enter the Integration Connector to list catalog targets for")
141
- display_catalog_targets(connector, server, url, userid, user_pass, jupyter)
146
+ display_catalog_targets(connector, server, url, userid, user_pass, jupyter, width=width)
142
147
 
143
148
  except KeyboardInterrupt:
144
149
  pass
@@ -34,6 +34,7 @@ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9
34
34
  EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
35
35
  EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
36
36
  EGERIA_ENGINE_HOST = os.environ.get('INTEGRATION_ENGINE_HOST', 'engine-host')
37
+ EGERIA_ENGINE_HOST_URL = os.environ.get('INTEGRATION_ENGINE_HOST_URL', 'https://localhost:9443')
37
38
  EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
38
39
  EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
39
40
  EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
@@ -150,7 +151,7 @@ def main_live():
150
151
  args = parser.parse_args()
151
152
 
152
153
  server = args.server if args.server is not None else EGERIA_VIEW_SERVER
153
- url = args.url if args.url is not None else EGERIA_PLATFORM_URL
154
+ url = args.url if args.url is not None else EGERIA_VIEW_SERVER_URL
154
155
  userid = args.userid if args.userid is not None else EGERIA_USER
155
156
  user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
156
157
 
@@ -167,7 +168,7 @@ def main_paging():
167
168
  args = parser.parse_args()
168
169
 
169
170
  server = args.server if args.server is not None else EGERIA_VIEW_SERVER
170
- url = args.url if args.url is not None else EGERIA_PLATFORM_URL
171
+ url = args.url if args.url is not None else EGERIA_VIEW_SERVER_URL
171
172
  userid = args.userid if args.userid is not None else EGERIA_USER
172
173
  user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
173
174
 
@@ -33,6 +33,7 @@ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
33
33
  EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
34
34
  EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
35
35
  EGERIA_ENGINE_HOST = os.environ.get('INTEGRATION_ENGINE_HOST', 'engine-host')
36
+ EGERIA_ENGINE_HOST_URL = os.environ.get('INTEGRATION_ENGINE_HOST_URL', 'https://localhost:9443')
36
37
  EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
37
38
  EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
38
39
  EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
@@ -122,7 +123,7 @@ def main_live():
122
123
  args = parser.parse_args()
123
124
 
124
125
  server = args.server if args.server is not None else EGERIA_ENGINE_HOST
125
- url = args.url if args.url is not None else EGERIA_PLATFORM_URL
126
+ url = args.url if args.url is not None else EGERIA_ENGINE_HOST_URL
126
127
  userid = args.userid if args.userid is not None else EGERIA_USER
127
128
  user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
128
129
  display_gov_eng_status(server=server, url=url, username=userid, user_pass=user_pass, paging=False)
@@ -137,7 +138,7 @@ def main_paging():
137
138
  args = parser.parse_args()
138
139
 
139
140
  server = args.server if args.server is not None else EGERIA_ENGINE_HOST
140
- url = args.url if args.url is not None else EGERIA_PLATFORM_URL
141
+ url = args.url if args.url is not None else EGERIA_ENGINE_HOST_URL
141
142
  userid = args.userid if args.userid is not None else EGERIA_USER
142
143
  user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
143
144
  display_gov_eng_status(server=server, url=url, username=userid, user_pass=user_pass, paging=True)
@@ -36,8 +36,8 @@ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
36
36
  EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
37
37
  EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
38
38
  EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
39
- EGERIA_JUPYTER = os.environ.get('EGERIA_JUPYTER', False)
40
- EGERIA_WIDTH = os.environ.get('EGERIA_WIDTH', 200)
39
+ EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
40
+ EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
41
41
 
42
42
  disable_ssl_warnings = True
43
43
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyegeria"
3
- version = "0.5.8.17"
3
+ version = "0.5.8.20"
4
4
  license = 'Apache 2.0'
5
5
  authors = ["Dan Wolfson <dan.wolfson@pdr-associates.com>"]
6
6
  readme = "README.md"
@@ -51,6 +51,7 @@ pytest = "^8.2.2"
51
51
 
52
52
  [tool.poetry.scripts]
53
53
  list_assets = "examples.widgets.catalog_user.list_assets:main"
54
+ list_tech_types = "examples.widgets.catalog_user.list_tech_types:main"
54
55
  get_asset_graph = "examples.widgets.catalog_user.get_asset_graph:main"
55
56
  get_collection = "examples.widgets.catalog_user.get_collection:main"
56
57
  list_glossary = "examples.widgets.catalog_user.list_glossary:main"
@@ -82,6 +83,8 @@ pytest = "^8.2.2"
82
83
 
83
84
  egeria_ops = "examples.widgets.cli.egeria_ops:cli"
84
85
  egeria_ops_tui = "examples.widgets.cli.egeria_ops:tui"
86
+ egeria_cat = "examples.widgets.cli.egeria_cat:cli"
87
+ egeria_cat_tui = "examples.widgets.cli.egeria_cat:tui"
85
88
 
86
89
  get_guid_info = "examples.widgets.developer.get_guid_info:main"
87
90
  get_tech_details = "examples.widgets.developer.get_tech_details:main"
@@ -89,5 +92,5 @@ pytest = "^8.2.2"
89
92
  list_registered_services = "examples.widgets.developer.list_registered_services:main"
90
93
  list_relationship_types = "examples.widgets.developer.list_relationship_types:main"
91
94
  list_tech_templates = "examples.widgets.developer.list_tech_templates:main"
92
- list_tech_types = "examples.widgets.developer.list_tech_types:main"
95
+
93
96
  list_valid_metadata_values = "examples.widgets.developer.list_valid_metadata_values:main"
File without changes
File without changes