pyegeria 0.8.4.24__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.
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/PKG-INFO +1 -1
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cli/egeria.py +5 -7
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cli/egeria_ops.py +6 -9
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cli/egeria_tech.py +1 -1
- pyegeria-0.8.4.24/commands/ops/integration_daemon_actions.py → pyegeria-0.8.4.26/commands/ops/gov_server_actions.py +2 -63
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/ops/monitor_platform_status.py +1 -1
- pyegeria-0.8.4.26/commands/ops/monitor_server_status.py +165 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/runtime_manager_omvs.py +1 -1
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyproject.toml +1 -1
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/LICENSE +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/README.md +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cat/README.md +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cat/__init__.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cat/get_asset_graph.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cat/get_collection.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cat/get_project_dependencies.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cat/get_project_structure.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cat/get_tech_type_elements.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cat/get_tech_type_template.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cat/list_archives.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cat/list_assets.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cat/list_cert_types.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cat/list_glossary.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cat/list_projects.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cat/list_relationships.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cat/list_tech_types.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cat/list_todos.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cat/list_user_ids.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cli/__init__.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cli/egeria_cat.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cli/egeria_my.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/cli/ops_config.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/my/README.md +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/my/__init__.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/my/list_my_profile.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/my/list_my_roles.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/my/monitor_my_todos.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/my/monitor_open_todos.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/my/my_profile_actions.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/my/todo_actions.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/ops/README.md +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/ops/__init__.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/ops/engine_actions.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/ops/list_catalog_targets.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/ops/load_archive.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/ops/monitor_asset_events.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/ops/monitor_coco_status.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/ops/monitor_engine_activity.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/ops/monitor_engine_activity_c.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/ops/monitor_gov_eng_status.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/ops/monitor_integ_daemon_status.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/ops/monitor_server_list.py +0 -0
- /pyegeria-0.8.4.24/commands/ops/monitor_server_status.py → /pyegeria-0.8.4.26/commands/ops/orig_monitor_server_status.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/ops/refresh_integration_daemon.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/ops/restart_integration_daemon.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/tech/README.md +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/tech/__init__.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/tech/get_element_info.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/tech/get_guid_info.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/tech/get_tech_details.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/tech/list_asset_types.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/tech/list_elements.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/tech/list_elements_x.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/tech/list_registered_services.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/tech/list_related_specification.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/tech/list_relationship_types.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/tech/list_tech_templates.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/tech/list_valid_metadata_values.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/commands/tech/x_list_related_elements.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/__init__.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/_client.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/_deprecated_gov_engine.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/_exceptions.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/_globals.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/_validators.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/asset_catalog_omvs.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/automated_curation_omvs.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/classification_manager_omvs.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/collection_manager_omvs.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/core_omag_server_config.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/create_tech_guid_lists.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/egeria_cat_client.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/egeria_client.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/egeria_config_client.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/egeria_my_client.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/egeria_tech_client.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/feedback_manager_omvs.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/full_omag_server_config.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/glossary_browser_omvs.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/glossary_manager_omvs.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/mermaid_utilities.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/my_profile_omvs.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/platform_services.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/project_manager_omvs.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/registered_info.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/server_operations.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/utils.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/valid_metadata_omvs.py +0 -0
- {pyegeria-0.8.4.24 → pyegeria-0.8.4.26}/pyegeria/x_action_author_omvs.py +0 -0
@@ -32,14 +32,12 @@ from commands.my.list_my_profile import display_my_profile
|
|
32
32
|
from commands.my.list_my_roles import display_my_roles
|
33
33
|
from commands.my.monitor_my_todos import display_my_todos
|
34
34
|
from commands.my.monitor_open_todos import display_todos
|
35
|
-
|
36
|
-
|
37
|
-
stop_daemon as stop_engine_host,
|
38
|
-
)
|
39
|
-
from commands.ops.integration_daemon_actions import (
|
35
|
+
|
36
|
+
from commands.ops.gov_server_actions import (
|
40
37
|
add_catalog_target,
|
41
38
|
remove_catalog_target,
|
42
39
|
update_catalog_target,
|
40
|
+
refresh_gov_eng_config,
|
43
41
|
stop_server,
|
44
42
|
start_server,
|
45
43
|
)
|
@@ -1161,8 +1159,8 @@ def engine_host(ctx):
|
|
1161
1159
|
pass
|
1162
1160
|
|
1163
1161
|
|
1164
|
-
engine_host.add_command(
|
1165
|
-
engine_host.add_command(
|
1162
|
+
engine_host.add_command(start_server)
|
1163
|
+
engine_host.add_command(stop_server)
|
1166
1164
|
|
1167
1165
|
|
1168
1166
|
@tell.group("repository")
|
@@ -14,15 +14,14 @@ from trogon import tui
|
|
14
14
|
|
15
15
|
# from pyegeria import ServerOps
|
16
16
|
from commands.cli.ops_config import Config
|
17
|
-
|
18
|
-
|
19
|
-
stop_server,
|
20
|
-
refresh_gov_eng_config,
|
21
|
-
)
|
22
|
-
from commands.ops.integration_daemon_actions import (
|
17
|
+
|
18
|
+
from commands.ops.gov_server_actions import (
|
23
19
|
add_catalog_target,
|
24
20
|
remove_catalog_target,
|
25
21
|
update_catalog_target,
|
22
|
+
refresh_gov_eng_config,
|
23
|
+
start_server,
|
24
|
+
stop_server,
|
26
25
|
)
|
27
26
|
from commands.ops.list_catalog_targets import display_catalog_targets
|
28
27
|
from commands.ops.load_archive import load_archive
|
@@ -121,9 +120,7 @@ from commands.ops.restart_integration_daemon import restart_connector
|
|
121
120
|
envvar="EGERIA_ADMIN_PASSWORD",
|
122
121
|
help="Egeria admin password",
|
123
122
|
)
|
124
|
-
@click.option(
|
125
|
-
"--userid", default="erinoverview", envvar="EGERIA_USER", help="Egeria user"
|
126
|
-
)
|
123
|
+
@click.option("--userid", default="garygeeke", envvar="EGERIA_USER", help="Egeria user")
|
127
124
|
@click.option(
|
128
125
|
"--password",
|
129
126
|
default="secret",
|
@@ -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="
|
115
|
+
"--userid", default="peterprofile", envvar="EGERIA_USER", help="Egeria user"
|
116
116
|
)
|
117
117
|
@click.option(
|
118
118
|
"--password",
|
@@ -104,57 +104,8 @@ def update_catalog_target(ctx, relationship_guid: str, catalog_target_name: str)
|
|
104
104
|
print_exception_response(e)
|
105
105
|
|
106
106
|
|
107
|
-
# @click.command("stop")
|
108
|
-
# @click.pass_context
|
109
|
-
# def stop_server(ctx):
|
110
|
-
# """Stop an integration daemon"""
|
111
|
-
# try:
|
112
|
-
# c = ctx.obj
|
113
|
-
# p_client = Platform(
|
114
|
-
# c.integration_daemon, c.integration_daemon_url, c.userid, c.password
|
115
|
-
# )
|
116
|
-
#
|
117
|
-
# p_client.shutdown_server()
|
118
|
-
#
|
119
|
-
# click.echo(f"Stopped server {c.integration_daemon}")
|
120
|
-
# except (InvalidParameterException, PropertyServerException) as e:
|
121
|
-
# print_exception_response(e)
|
122
|
-
#
|
123
|
-
#
|
124
|
-
# @click.command("start")
|
125
|
-
# @click.pass_context
|
126
|
-
# def start_server(ctx):
|
127
|
-
# """Start or restart an integration daemon from its known configuration"""
|
128
|
-
# try:
|
129
|
-
# c = ctx.obj
|
130
|
-
# p_client = Platform(
|
131
|
-
# c.integration_daemon, c.integration_daemon_url, c.userid, c.password
|
132
|
-
# )
|
133
|
-
#
|
134
|
-
# p_client.activate_server_stored_config()
|
135
|
-
#
|
136
|
-
# click.echo(f"Started server {c.integration_daemon}")
|
137
|
-
#
|
138
|
-
# except (InvalidParameterException, PropertyServerException) as e:
|
139
|
-
# print_exception_response(e)
|
140
107
|
@click.command("refresh-gov-eng-config")
|
141
108
|
@click.pass_context
|
142
|
-
# @click.option(
|
143
|
-
# "--engine-host", default=EGERIA_ENGINE_HOST, help="Engine Host to refresh"
|
144
|
-
# )
|
145
|
-
# @click.option(
|
146
|
-
# "--view-server", default=EGERIA_VIEW_SERVER, help="View Server to communicate with"
|
147
|
-
# )
|
148
|
-
# @click.option(
|
149
|
-
# "--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
|
150
|
-
# )
|
151
|
-
# @click.option("--userid", default="garygeeke", envvar="EGERIA_USER", help="Egeria user")
|
152
|
-
# @click.option(
|
153
|
-
# "--password",
|
154
|
-
# default="secret",
|
155
|
-
# envvar="EGERIA_PASSWORD",
|
156
|
-
# help="Egeria user password",
|
157
|
-
# )
|
158
109
|
def refresh_gov_eng_config(ctx):
|
159
110
|
"""Start or restart an engine-host from its known configuration"""
|
160
111
|
c = ctx.obj
|
@@ -174,23 +125,11 @@ def refresh_gov_eng_config(ctx):
|
|
174
125
|
|
175
126
|
@click.command("start")
|
176
127
|
@click.pass_context
|
177
|
-
@click.option("--server", help="OMAG Server to start")
|
178
|
-
# @click.option(
|
179
|
-
# "--view-server", default=EGERIA_VIEW_SERVER, help="View Server to communicate with"
|
180
|
-
# )
|
181
|
-
# @click.option(
|
182
|
-
# "--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
|
183
|
-
# )
|
184
|
-
# @click.option("--userid", default="garygeeke", envvar="EGERIA_USER", help="Egeria user")
|
185
|
-
# @click.option(
|
186
|
-
# "--password",
|
187
|
-
# default="secret",
|
188
|
-
# envvar="EGERIA_USER_PASSWORD",
|
189
|
-
# help="Egeria user password",
|
190
|
-
# )
|
128
|
+
@click.option("--server", default="simple-metadata-store", help="OMAG Server to start")
|
191
129
|
def start_server(ctx, server):
|
192
130
|
"""Start or restart an engine-host from its known configuration"""
|
193
131
|
c = ctx.obj
|
132
|
+
|
194
133
|
p_client = EgeriaTech(c.view_server, c.view_server_url, c.userid, c.password)
|
195
134
|
token = p_client.create_egeria_bearer_token()
|
196
135
|
try:
|
@@ -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
|
1766
|
+
return response.json().get("elements", "No servers found")
|
1767
1767
|
|
1768
1768
|
def get_servers_by_dep_impl_type(
|
1769
1769
|
self,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|