pyegeria 0.8.4.25__tar.gz → 0.8.4.26__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 (99) hide show
  1. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/PKG-INFO +1 -1
  2. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cli/egeria_ops.py +1 -8
  3. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cli/egeria_tech.py +1 -1
  4. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/ops/gov_server_actions.py +2 -4
  5. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/ops/monitor_platform_status.py +1 -1
  6. pyegeria-0.8.4.26/commands/ops/monitor_server_status.py +165 -0
  7. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/runtime_manager_omvs.py +1 -1
  8. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyproject.toml +1 -1
  9. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/LICENSE +0 -0
  10. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/README.md +0 -0
  11. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cat/README.md +0 -0
  12. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cat/__init__.py +0 -0
  13. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cat/get_asset_graph.py +0 -0
  14. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cat/get_collection.py +0 -0
  15. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cat/get_project_dependencies.py +0 -0
  16. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cat/get_project_structure.py +0 -0
  17. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cat/get_tech_type_elements.py +0 -0
  18. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cat/get_tech_type_template.py +0 -0
  19. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cat/list_archives.py +0 -0
  20. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cat/list_assets.py +0 -0
  21. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cat/list_cert_types.py +0 -0
  22. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cat/list_glossary.py +0 -0
  23. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cat/list_projects.py +0 -0
  24. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cat/list_relationships.py +0 -0
  25. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cat/list_tech_types.py +0 -0
  26. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cat/list_todos.py +0 -0
  27. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cat/list_user_ids.py +0 -0
  28. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cli/__init__.py +0 -0
  29. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cli/egeria.py +0 -0
  30. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cli/egeria_cat.py +0 -0
  31. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cli/egeria_my.py +0 -0
  32. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/cli/ops_config.py +0 -0
  33. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/my/README.md +0 -0
  34. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/my/__init__.py +0 -0
  35. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/my/list_my_profile.py +0 -0
  36. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/my/list_my_roles.py +0 -0
  37. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/my/monitor_my_todos.py +0 -0
  38. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/my/monitor_open_todos.py +0 -0
  39. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/my/my_profile_actions.py +0 -0
  40. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/my/todo_actions.py +0 -0
  41. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/ops/README.md +0 -0
  42. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/ops/__init__.py +0 -0
  43. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/ops/engine_actions.py +0 -0
  44. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/ops/list_catalog_targets.py +0 -0
  45. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/ops/load_archive.py +0 -0
  46. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/ops/monitor_asset_events.py +0 -0
  47. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/ops/monitor_coco_status.py +0 -0
  48. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/ops/monitor_engine_activity.py +0 -0
  49. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/ops/monitor_engine_activity_c.py +0 -0
  50. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/ops/monitor_gov_eng_status.py +0 -0
  51. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/ops/monitor_integ_daemon_status.py +0 -0
  52. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/ops/monitor_server_list.py +0 -0
  53. /pyegeria-0.8.4.25/commands/ops/monitor_server_status.py → /pyegeria-0.8.4.26/commands/ops/orig_monitor_server_status.py +0 -0
  54. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/ops/refresh_integration_daemon.py +0 -0
  55. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/ops/restart_integration_daemon.py +0 -0
  56. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/tech/README.md +0 -0
  57. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/tech/__init__.py +0 -0
  58. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/tech/get_element_info.py +0 -0
  59. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/tech/get_guid_info.py +0 -0
  60. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/tech/get_tech_details.py +0 -0
  61. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/tech/list_asset_types.py +0 -0
  62. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/tech/list_elements.py +0 -0
  63. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/tech/list_elements_x.py +0 -0
  64. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/tech/list_registered_services.py +0 -0
  65. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/tech/list_related_specification.py +0 -0
  66. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/tech/list_relationship_types.py +0 -0
  67. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/tech/list_tech_templates.py +0 -0
  68. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/tech/list_valid_metadata_values.py +0 -0
  69. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/commands/tech/x_list_related_elements.py +0 -0
  70. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/__init__.py +0 -0
  71. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/_client.py +0 -0
  72. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/_deprecated_gov_engine.py +0 -0
  73. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/_exceptions.py +0 -0
  74. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/_globals.py +0 -0
  75. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/_validators.py +0 -0
  76. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/asset_catalog_omvs.py +0 -0
  77. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/automated_curation_omvs.py +0 -0
  78. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/classification_manager_omvs.py +0 -0
  79. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/collection_manager_omvs.py +0 -0
  80. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/core_omag_server_config.py +0 -0
  81. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/create_tech_guid_lists.py +0 -0
  82. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/egeria_cat_client.py +0 -0
  83. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/egeria_client.py +0 -0
  84. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/egeria_config_client.py +0 -0
  85. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/egeria_my_client.py +0 -0
  86. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/egeria_tech_client.py +0 -0
  87. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/feedback_manager_omvs.py +0 -0
  88. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/full_omag_server_config.py +0 -0
  89. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/glossary_browser_omvs.py +0 -0
  90. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/glossary_manager_omvs.py +0 -0
  91. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/mermaid_utilities.py +0 -0
  92. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/my_profile_omvs.py +0 -0
  93. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/platform_services.py +0 -0
  94. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/project_manager_omvs.py +0 -0
  95. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/registered_info.py +0 -0
  96. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/server_operations.py +0 -0
  97. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/utils.py +0 -0
  98. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/valid_metadata_omvs.py +0 -0
  99. {pyegeria-0.8.4.25 → pyegeria-0.8.4.26}/pyegeria/x_action_author_omvs.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 0.8.4.25
3
+ Version: 0.8.4.26
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -120,9 +120,7 @@ from commands.ops.restart_integration_daemon import restart_connector
120
120
  envvar="EGERIA_ADMIN_PASSWORD",
121
121
  help="Egeria admin password",
122
122
  )
123
- @click.option(
124
- "--userid", default="erinoverview", envvar="EGERIA_USER", help="Egeria user"
125
- )
123
+ @click.option("--userid", default="garygeeke", envvar="EGERIA_USER", help="Egeria user")
126
124
  @click.option(
127
125
  "--password",
128
126
  default="secret",
@@ -386,9 +384,6 @@ def servers(ctx):
386
384
 
387
385
  servers.add_command(start_server)
388
386
  servers.add_command(stop_server)
389
- servers.add_command(refresh_gov_eng_config)
390
-
391
- CONTEXT_SETTINGS = dict(default_map={"runserver": {"port": 5000}})
392
387
 
393
388
 
394
389
  @tell.group("integration-daemon")
@@ -431,8 +426,6 @@ def restart_connectors(ctx, connector):
431
426
  integration_daemon.add_command(add_catalog_target)
432
427
  integration_daemon.add_command(remove_catalog_target)
433
428
  integration_daemon.add_command(update_catalog_target)
434
- integration_daemon.add_command(start_server)
435
- integration_daemon.add_command(stop_server)
436
429
 
437
430
 
438
431
  @tell.group("engine-host")
@@ -112,7 +112,7 @@ from commands.tech.list_related_specification import (
112
112
  help="Egeria admin password",
113
113
  )
114
114
  @click.option(
115
- "--userid", default="erinoverview", envvar="EGERIA_USER", help="Egeria user"
115
+ "--userid", default="peterprofile", envvar="EGERIA_USER", help="Egeria user"
116
116
  )
117
117
  @click.option(
118
118
  "--password",
@@ -125,13 +125,11 @@ def refresh_gov_eng_config(ctx):
125
125
 
126
126
  @click.command("start")
127
127
  @click.pass_context
128
- @click.option("--server", default=None, help="OMAG Server to start")
128
+ @click.option("--server", default="simple-metadata-store", help="OMAG Server to start")
129
129
  def start_server(ctx, server):
130
130
  """Start or restart an engine-host from its known configuration"""
131
131
  c = ctx.obj
132
- if server is None:
133
- click.echo(c.parent.info_name)
134
- server = "simple-metadata-store"
132
+
135
133
  p_client = EgeriaTech(c.view_server, c.view_server_url, c.userid, c.password)
136
134
  token = p_client.create_egeria_bearer_token()
137
135
  try:
@@ -114,7 +114,7 @@ def display_status(
114
114
  server_status = "UNKNOWN"
115
115
  status_flag = "[bright yellow]"
116
116
 
117
- server_list = (
117
+ server_list += (
118
118
  f"{status_flag}{server_types[server_type]}: {server_name}\n"
119
119
  )
120
120
  # server_list = server_list + serv
@@ -0,0 +1,165 @@
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 server status of all registered servers across all platforms.
7
+
8
+ Note: This implementation is using the platform-report. A more complex platform environment may require
9
+ reimplementing from a server only perspective using get_servers_by_dep_impl_type() to find the guids and
10
+ then get_server_by_guid() to get the status. Less efficient but may be more robust for some environments.
11
+
12
+
13
+
14
+ A simple server status display
15
+ """
16
+ import argparse
17
+ import os
18
+ import sys
19
+ import time
20
+
21
+ from rich.live import Live
22
+ from rich.table import Table
23
+
24
+ from examples.doc_samples.Create_Sustainability_Collection_Sample import description
25
+ from pyegeria import (
26
+ InvalidParameterException,
27
+ PropertyServerException,
28
+ UserNotAuthorizedException,
29
+ print_exception_response,
30
+ RuntimeManager,
31
+ )
32
+
33
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
34
+ EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
35
+ EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
36
+ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
37
+ EGERIA_VIEW_SERVER_URL = os.environ.get(
38
+ "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
39
+ )
40
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
41
+ EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
42
+ "EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
43
+ )
44
+ EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
45
+ EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
46
+ EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
47
+ EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
48
+ EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
49
+ EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
50
+
51
+
52
+ def display_status(
53
+ extended: bool,
54
+ view_server: str,
55
+ url: str,
56
+ username: str,
57
+ user_pass: str,
58
+ jupyter: bool = EGERIA_JUPYTER,
59
+ width: int = EGERIA_WIDTH,
60
+ ):
61
+ p_client = RuntimeManager(view_server, url, username, user_pass)
62
+ token = p_client.create_egeria_bearer_token()
63
+
64
+ def generate_table() -> Table:
65
+ """Make a new table."""
66
+ table = Table(
67
+ title=f"Server Status for Platform - {time.asctime()}",
68
+ style="bold white on black",
69
+ row_styles=["bold white on black"],
70
+ header_style="white on dark_blue",
71
+ title_style="bold white on black",
72
+ caption_style="white on black",
73
+ caption=f"Server Status from Platform - '{url}'",
74
+ # show_lines=True,
75
+ )
76
+
77
+ table.add_column("Known Server")
78
+ table.add_column("Status")
79
+ if extended:
80
+ table.add_column("Description")
81
+ table.add_column("Server Type")
82
+ table.add_column("Last Started")
83
+
84
+ platform_list = p_client.get_platforms_by_type()
85
+ if type(platform_list) is str:
86
+ print("No OMAG Server Platforms found?")
87
+ sys.exit(1)
88
+
89
+ for platform in platform_list:
90
+ platform_name = platform["properties"].get("displayName", "---")
91
+ platform_guid = platform["elementHeader"]["guid"]
92
+ platform_desc = platform["properties"].get("resourceDescription", "---")
93
+ p_server_list = ""
94
+
95
+ platform_report = p_client.get_platform_report(platform_guid)
96
+ servers = platform_report.get("omagservers", None)
97
+ for p_server in servers:
98
+ server_name = p_server.get("serverName", "--- ")
99
+ server_type = p_server.get("serverType", "--- ")
100
+ server_desc = p_server.get("description", "--- ")
101
+ last_start_time = p_server.get("lastStartTime", "--- ")
102
+
103
+ server_status = p_server.get("serverActiveStatus", "UNKNOWN")
104
+ if server_status in ("RUNNING", "STARTING"):
105
+ status = "Active"
106
+ elif server_status in ("INACTIVE", "STOPPING"):
107
+ status = "Inactive"
108
+ else:
109
+ status = "UNKNOWN"
110
+
111
+ if extended:
112
+ table.add_row(
113
+ server_name,
114
+ "[red]Inactive" if status == "Inactive" else "[green]Active",
115
+ server_desc,
116
+ server_type,
117
+ last_start_time,
118
+ )
119
+ else:
120
+ table.add_row(
121
+ server_name,
122
+ "[red]Inactive" "" if status == "Inactive" else "[green]Active",
123
+ # server_status,
124
+ )
125
+ # p_client.close_session()
126
+ return table
127
+
128
+ try:
129
+ with Live(generate_table(), refresh_per_second=4, screen=True) as live:
130
+ while True:
131
+ time.sleep(2)
132
+ live.update(generate_table())
133
+
134
+ except (
135
+ InvalidParameterException,
136
+ PropertyServerException,
137
+ UserNotAuthorizedException,
138
+ ) as e:
139
+ print_exception_response(e)
140
+ except KeyboardInterrupt:
141
+ pass
142
+ finally:
143
+ p_client.close_session()
144
+
145
+
146
+ def main():
147
+ parser = argparse.ArgumentParser()
148
+ parser.add_argument("--extended", help="Extended Information?")
149
+ parser.add_argument("--server", help="Name of the server to display status for")
150
+ parser.add_argument("--url", help="URL Platform to connect to")
151
+ parser.add_argument("--userid", help="User Id")
152
+ parser.add_argument("--password", help="User Password")
153
+ args = parser.parse_args()
154
+
155
+ extended = args.extended if args.extended is not None else True
156
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
157
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
158
+ userid = args.userid if args.userid is not None else EGERIA_ADMIN_USER
159
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
160
+
161
+ display_status(extended, server, url, userid, user_pass)
162
+
163
+
164
+ if __name__ == "__main__":
165
+ main()
@@ -1763,7 +1763,7 @@ class RuntimeManager(Client):
1763
1763
 
1764
1764
  response = await self._async_make_request("POST", url, body)
1765
1765
 
1766
- return response.json().get("elements", "No platforms found")
1766
+ return response.json().get("elements", "No servers found")
1767
1767
 
1768
1768
  def get_servers_by_dep_impl_type(
1769
1769
  self,
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyegeria"
3
- version = "0.8.4.25"
3
+ version = "0.8.4.26"
4
4
  license = 'Apache 2.0'
5
5
  authors = ["Dan Wolfson <dan.wolfson@pdr-associates.com>"]
6
6
  readme = "README.md"
File without changes
File without changes