pyegeria 1.5.1.1.30__py3-none-any.whl → 1.5.1.1.31__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.
- pyegeria/commands/__init__.py +12 -3
- pyegeria/commands/cat/list_deployed_catalogs.py +27 -7
- pyegeria/commands/cat/list_deployed_database_schemas.py +25 -7
- pyegeria/commands/cat/list_deployed_databases.py +22 -6
- pyegeria/commands/cat/list_glossaries.py +25 -8
- pyegeria/commands/cat/list_terms.py +37 -10
- pyegeria/commands/ops/monitor_engine_activity_c.py +28 -9
- pyegeria/commands/ops/monitor_gov_eng_status.py +31 -1
- pyegeria/commands/ops/monitor_integ_daemon_status.py +43 -1
- pyegeria/commands/ops/monitor_platform_status.py +6 -6
- pyegeria/commands/ops/table_integ_daemon_status.py +48 -103
- {pyegeria-1.5.1.1.30.dist-info → pyegeria-1.5.1.1.31.dist-info}/METADATA +1 -1
- {pyegeria-1.5.1.1.30.dist-info → pyegeria-1.5.1.1.31.dist-info}/RECORD +16 -16
- {pyegeria-1.5.1.1.30.dist-info → pyegeria-1.5.1.1.31.dist-info}/LICENSE +0 -0
- {pyegeria-1.5.1.1.30.dist-info → pyegeria-1.5.1.1.31.dist-info}/WHEEL +0 -0
- {pyegeria-1.5.1.1.30.dist-info → pyegeria-1.5.1.1.31.dist-info}/entry_points.txt +0 -0
pyegeria/commands/__init__.py
CHANGED
@@ -1,12 +1,21 @@
|
|
1
1
|
"""
|
2
|
+
SPDX-License-Identifier: Apache-2.0
|
3
|
+
Copyright Contributors to the ODPi Egeria project.
|
2
4
|
|
3
|
-
|
5
|
+
|
6
|
+
|
7
|
+
pyegeria commands available also from python.
|
4
8
|
"""
|
5
9
|
|
6
10
|
from .ops.monitor_gov_eng_status import display_gov_eng_status
|
7
11
|
from .ops.monitor_integ_daemon_status import display_integration_daemon_status
|
8
|
-
from .cat.list_glossaries import display_glossaries
|
9
|
-
from .cat.list_terms import display_glossary_terms
|
10
12
|
from .ops.table_integ_daemon_status import (
|
11
13
|
display_integration_daemon_status as table_integ_daemon_status,
|
12
14
|
)
|
15
|
+
from .ops.monitor_engine_activity_c import display_engine_activity_c
|
16
|
+
|
17
|
+
from .cat.list_glossaries import display_glossaries
|
18
|
+
from .cat.list_terms import display_glossary_terms
|
19
|
+
from .cat.list_deployed_catalogs import list_deployed_catalogs
|
20
|
+
from .cat.list_deployed_database_schemas import list_deployed_database_schemas
|
21
|
+
from .cat.list_deployed_databases import list_deployed_databases
|
@@ -47,21 +47,41 @@ def check_if_template(header: dict) -> bool:
|
|
47
47
|
|
48
48
|
|
49
49
|
def list_deployed_catalogs(
|
50
|
-
catalog_server: str,
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
50
|
+
catalog_server: str = "*",
|
51
|
+
view_server: str = EGERIA_VIEW_SERVER,
|
52
|
+
view_url: str = EGERIA_VIEW_SERVER_URL,
|
53
|
+
user: str = EGERIA_USER,
|
54
|
+
user_pass: str = EGERIA_USER_PASSWORD,
|
55
55
|
jupyter: bool = EGERIA_JUPYTER,
|
56
56
|
width: int = EGERIA_WIDTH,
|
57
57
|
):
|
58
|
-
|
58
|
+
"""
|
59
|
+
Display the list of deployed catalogs. These could be metadata catalogs or other catalogs such as database catalogs..
|
60
|
+
|
61
|
+
Parameters
|
62
|
+
----------
|
63
|
+
catalog_server : str, optional
|
64
|
+
The name of the catalog server to query. Default is "*" for all catalog servers.
|
65
|
+
view_server : str, optional
|
66
|
+
The server providing the view. Default is EGERIA_VIEW_SERVER.
|
67
|
+
view_url : str, optional
|
68
|
+
The URL of the view server. Default is EGERIA_VIEW_SERVER_URL.
|
69
|
+
user : str, optional
|
70
|
+
The user ID for authentication. Default is EGERIA_USER.
|
71
|
+
user_pass : str, optional
|
72
|
+
The password for the user. Default is EGERIA_USER_PASSWORD.
|
73
|
+
jupyter : bool, optional
|
74
|
+
Enable Jupyter notebook output. Default is EGERIA_JUPYTER.
|
75
|
+
width : int, optional
|
76
|
+
The width of the console output. Default is EGERIA_WIDTH.
|
77
|
+
"""
|
78
|
+
c_client = EgeriaTech(view_server, view_url, user_id=user, user_pwd=user_pass)
|
59
79
|
token = c_client.create_egeria_bearer_token()
|
60
80
|
|
61
81
|
def generate_table() -> Table:
|
62
82
|
"""Make a new table."""
|
63
83
|
table = Table(
|
64
|
-
caption=f"Databases found: {
|
84
|
+
caption=f"Databases found: {view_url} - {view_server} @ {time.asctime()}",
|
65
85
|
style="bold bright_white on black",
|
66
86
|
row_styles=["bold bright_white on black"],
|
67
87
|
header_style="white on dark_blue",
|
@@ -55,21 +55,39 @@ def make_prop_md(props: dict) -> str:
|
|
55
55
|
|
56
56
|
|
57
57
|
def list_deployed_database_schemas(
|
58
|
-
db_name: str,
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
58
|
+
db_name: str = "*",
|
59
|
+
view_server: str = EGERIA_VIEW_SERVER,
|
60
|
+
view_url: str = EGERIA_VIEW_SERVER_URL,
|
61
|
+
user: str = EGERIA_USER,
|
62
|
+
user_pass: str = EGERIA_USER_PASSWORD,
|
63
63
|
jupyter: bool = EGERIA_JUPYTER,
|
64
64
|
width: int = EGERIA_WIDTH,
|
65
65
|
):
|
66
|
-
|
66
|
+
"""List schemas that have been deployed in database catalogs or databases.
|
67
|
+
Parameters
|
68
|
+
----------
|
69
|
+
db_name : str
|
70
|
+
Name of the database or catalog to get schemas for, or '*' for all databases.
|
71
|
+
view_server : str
|
72
|
+
The view server to connect to.
|
73
|
+
view_url : str
|
74
|
+
URL of the view server.
|
75
|
+
user : str
|
76
|
+
Username for authentication.
|
77
|
+
user_pass : str
|
78
|
+
Password for authentication.
|
79
|
+
jupyter : bool
|
80
|
+
Whether to force the terminal output to behave as if in a Jupyter notebook.
|
81
|
+
width : int
|
82
|
+
Width of the console output.
|
83
|
+
"""
|
84
|
+
c_client = EgeriaTech(view_server, view_url, user_id=user, user_pwd=user_pass)
|
67
85
|
token = c_client.create_egeria_bearer_token()
|
68
86
|
|
69
87
|
def generate_table() -> Table:
|
70
88
|
"""Make a new table."""
|
71
89
|
table = Table(
|
72
|
-
caption=f"Databases found: {
|
90
|
+
caption=f"Databases found: {view_url} - {view_server} @ {time.asctime()}",
|
73
91
|
style="bold bright_white on black",
|
74
92
|
row_styles=["bold bright_white on black"],
|
75
93
|
header_style="white on dark_blue",
|
@@ -47,20 +47,36 @@ def check_if_template(header: dict) -> bool:
|
|
47
47
|
|
48
48
|
|
49
49
|
def list_deployed_databases(
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
50
|
+
view_server: str = EGERIA_VIEW_SERVER,
|
51
|
+
view_url: str = EGERIA_VIEW_SERVER_URL,
|
52
|
+
user: str = EGERIA_USER,
|
53
|
+
user_pass: str = EGERIA_USER_PASSWORD,
|
54
54
|
jupyter: bool = EGERIA_JUPYTER,
|
55
55
|
width: int = EGERIA_WIDTH,
|
56
56
|
):
|
57
|
-
|
57
|
+
"""
|
58
|
+
Parameters
|
59
|
+
----------
|
60
|
+
view_server : str
|
61
|
+
The view server name to which the Egeria client will connect. By default, this is set to EGERIA_VIEW_SERVER.
|
62
|
+
view_url : str
|
63
|
+
The URL of the Egeria view server. By default, this is set to EGERIA_VIEW_SERVER_URL.
|
64
|
+
user : str
|
65
|
+
The username used for authentication with the Egeria server. By default, it is set to EGERIA_USER.
|
66
|
+
user_pass : str
|
67
|
+
The password used for authentication with the Egeria server. By default, it is set to EGERIA_USER_PASSWORD.
|
68
|
+
jupyter : bool
|
69
|
+
A flag indicating whether the output is displayed within a Jupyter notebook. Default is set to EGERIA_JUPYTER.
|
70
|
+
width : int
|
71
|
+
The width of the output console. By default, it is set to EGERIA_WIDTH.
|
72
|
+
"""
|
73
|
+
c_client = EgeriaTech(view_server, view_url, user_id=user, user_pwd=user_pass)
|
58
74
|
token = c_client.create_egeria_bearer_token()
|
59
75
|
|
60
76
|
def generate_table() -> Table:
|
61
77
|
"""Make a new table."""
|
62
78
|
table = Table(
|
63
|
-
caption=f"Databases found: {
|
79
|
+
caption=f"Databases found: {view_url} - {view_server} @ {time.asctime()}",
|
64
80
|
style="bold bright_white on black",
|
65
81
|
row_styles=["bold bright_white on black"],
|
66
82
|
header_style="white on dark_blue",
|
@@ -46,16 +46,33 @@ EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
|
46
46
|
|
47
47
|
|
48
48
|
def display_glossaries(
|
49
|
-
search_string: str,
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
49
|
+
search_string: str = "*",
|
50
|
+
view_server: str = EGERIA_VIEW_SERVER,
|
51
|
+
view_url: str = EGERIA_VIEW_SERVER_URL,
|
52
|
+
user: str = EGERIA_USER,
|
53
|
+
user_pass: str = EGERIA_USER_PASSWORD,
|
54
54
|
jupyter: bool = EGERIA_JUPYTER,
|
55
55
|
width: int = EGERIA_WIDTH,
|
56
56
|
):
|
57
|
-
"""
|
58
|
-
|
57
|
+
"""Display either a specified glossary or all glossaries if the search_string is '*'.
|
58
|
+
Parameters
|
59
|
+
----------
|
60
|
+
search_string : str, default is '*'
|
61
|
+
The string used to search for glossaries.
|
62
|
+
view_server : str
|
63
|
+
The view server name or address where the Egeria services are hosted.
|
64
|
+
view_url : str
|
65
|
+
The URL of the platform the view server is on.
|
66
|
+
user : str
|
67
|
+
The user ID for authentication with the Egeria server.
|
68
|
+
user_pass : str
|
69
|
+
The password for authentication with the Egeria server.
|
70
|
+
jupyter : bool, optional
|
71
|
+
A boolean indicating whether the output is intended for a Jupyter notebook (default is EGERIA_JUPYTER).
|
72
|
+
width : int, optional
|
73
|
+
The width of the console output (default is EGERIA_WIDTH).
|
74
|
+
"""
|
75
|
+
m_client = EgeriaTech(view_server, view_url, user_id=user, user_pwd=user_pass)
|
59
76
|
token = m_client.create_egeria_bearer_token()
|
60
77
|
try:
|
61
78
|
table = Table(
|
@@ -66,7 +83,7 @@ def display_glossaries(
|
|
66
83
|
caption_style="white on black",
|
67
84
|
show_lines=True,
|
68
85
|
box=box.ROUNDED,
|
69
|
-
caption=f"View Server '{
|
86
|
+
caption=f"View Server '{view_server}' @ Platform - {view_url}",
|
70
87
|
expand=True,
|
71
88
|
)
|
72
89
|
table.add_column("Glossary Name")
|
@@ -46,18 +46,45 @@ EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
|
46
46
|
|
47
47
|
|
48
48
|
def display_glossary_terms(
|
49
|
-
search_string: str,
|
50
|
-
glossary_guid: str,
|
51
|
-
glossary_name: str,
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
49
|
+
search_string: str = "*",
|
50
|
+
glossary_guid: str = None,
|
51
|
+
glossary_name: str = None,
|
52
|
+
view_server: str = EGERIA_VIEW_SERVER,
|
53
|
+
view_url: str = EGERIA_VIEW_SERVER_URL,
|
54
|
+
user_id: str = EGERIA_USER,
|
55
|
+
user_pass: str = EGERIA_USER_PASSWORD,
|
56
56
|
jupyter: bool = EGERIA_JUPYTER,
|
57
57
|
width: int = EGERIA_WIDTH,
|
58
58
|
):
|
59
|
-
"""Display glossary terms
|
60
|
-
|
59
|
+
"""Display a table of glossary terms filtered by search_string and glossary, if specified. If no
|
60
|
+
filters then all terms are displayed. If glossary_guid or name is specified, then only terms from that
|
61
|
+
glossary are displayed.
|
62
|
+
Parameters
|
63
|
+
----------
|
64
|
+
search_string : str, optional
|
65
|
+
The string to search for terms. Defaults to "*".
|
66
|
+
glossary_guid : str, optional
|
67
|
+
The unique identifier of the glossary. Defaults to None. If specified, then only terms from that glossary
|
68
|
+
are displayed. If both glossary_guid and glossary_name are provided then glossary_guid will take precedence.
|
69
|
+
glossary_name : str, optional
|
70
|
+
The display name of the glossary. Defaults to None. If specified, then only terms from that glossary
|
71
|
+
are displayed. If both glossary_guid and glossary_name are provided then glossary_guid will take precedence.
|
72
|
+
Note that the use of glossary display name relies on the qualified name conforming to convention. GUID is more
|
73
|
+
reliable.
|
74
|
+
view_server : str
|
75
|
+
The server where the glossary is hosted. Defaults to EGERIA_VIEW_SERVER.
|
76
|
+
view_url : str
|
77
|
+
The URL of the server where the glossary is hosted. Defaults to EGERIA_VIEW_SERVER_URL.
|
78
|
+
user_id : str
|
79
|
+
The user ID for authentication. Defaults to EGERIA_USER.
|
80
|
+
user_pass : str
|
81
|
+
The user password for authentication. Defaults to EGERIA_USER_PASSWORD.
|
82
|
+
jupyter : bool
|
83
|
+
Flag to indicate if the output should be formatted for Jupyter notebook. Defaults to EGERIA_JUPYTER.
|
84
|
+
width : int
|
85
|
+
The width of the console output. Defaults to EGERIA_WIDTH.
|
86
|
+
"""
|
87
|
+
g_client = EgeriaTech(view_server, view_url, user_id, user_pass)
|
61
88
|
token = g_client.create_egeria_bearer_token()
|
62
89
|
if (glossary_name is not None) and (glossary_name != "*"):
|
63
90
|
glossary_guid = g_client.__get_guid__(
|
@@ -78,7 +105,7 @@ def display_glossary_terms(
|
|
78
105
|
caption_style="white on black",
|
79
106
|
show_lines=True,
|
80
107
|
box=box.ROUNDED,
|
81
|
-
caption=f"View Server '{
|
108
|
+
caption=f"View Server '{view_server}' @ Platform - {view_url}",
|
82
109
|
expand=True,
|
83
110
|
)
|
84
111
|
table.add_column("Term Name")
|
@@ -54,20 +54,39 @@ disable_ssl_warnings = True
|
|
54
54
|
|
55
55
|
|
56
56
|
def display_engine_activity_c(
|
57
|
-
|
58
|
-
|
59
|
-
user: str,
|
60
|
-
user_pass: str,
|
61
|
-
paging: bool,
|
57
|
+
view_server: str = EGERIA_VIEW_SERVER,
|
58
|
+
view_url: str = EGERIA_VIEW_SERVER_URL,
|
59
|
+
user: str = EGERIA_USER,
|
60
|
+
user_pass: str = EGERIA_USER_PASSWORD,
|
61
|
+
paging: bool = True,
|
62
62
|
jupyter: bool = EGERIA_JUPYTER,
|
63
|
-
width=EGERIA_WIDTH,
|
63
|
+
width: int = EGERIA_WIDTH,
|
64
64
|
):
|
65
|
-
|
65
|
+
"""Display governance engine activity as a table.
|
66
|
+
|
67
|
+
Parameters
|
68
|
+
----------
|
69
|
+
view_server : str
|
70
|
+
The Egeria view server name.
|
71
|
+
view_url : str
|
72
|
+
The URL for the Egeria view server.
|
73
|
+
user : str
|
74
|
+
The user name for authenticating with the Egeria server.
|
75
|
+
user_pass : str
|
76
|
+
The user password for authenticating with the Egeria server.
|
77
|
+
paging : bool, default is True
|
78
|
+
Whether to enable paging mode when displaying the table.
|
79
|
+
jupyter : bool
|
80
|
+
Indicates if the environment is a Jupyter notebook.
|
81
|
+
width : int
|
82
|
+
The width of the console for table printing.
|
83
|
+
"""
|
84
|
+
g_client = AutomatedCuration(view_server, view_url, user, user_pwd=user_pass)
|
66
85
|
|
67
86
|
def generate_table() -> Table:
|
68
87
|
"""Make a new table."""
|
69
88
|
table = Table(
|
70
|
-
title=f"Engine Action Status for Platform {
|
89
|
+
title=f"Engine Action Status for Platform {view_url} @ {time.asctime()}",
|
71
90
|
style="bold white on black",
|
72
91
|
row_styles=["bold white on black"],
|
73
92
|
header_style="white on dark_blue",
|
@@ -75,7 +94,7 @@ def display_engine_activity_c(
|
|
75
94
|
caption_style="white on black",
|
76
95
|
show_lines=True,
|
77
96
|
box=box.ROUNDED,
|
78
|
-
caption=f"Engine Status for Server '{
|
97
|
+
caption=f"Engine Status for Server '{view_server}' @ Platform - {view_url}",
|
79
98
|
expand=True,
|
80
99
|
)
|
81
100
|
table.add_column("Requested Time")
|
@@ -62,7 +62,37 @@ def display_gov_eng_status(
|
|
62
62
|
jupyter: bool = EGERIA_JUPYTER,
|
63
63
|
width: int = EGERIA_WIDTH,
|
64
64
|
sort: bool = True,
|
65
|
-
):
|
65
|
+
) -> None:
|
66
|
+
"""Displays the status table of the governance engines on the specified Engine Host OMAG Server
|
67
|
+
|
68
|
+
Parameters
|
69
|
+
----------
|
70
|
+
search_list : list of str
|
71
|
+
List of governance engine names to search for. Defaults to ["*"] which returns all governance engines.
|
72
|
+
engine_host : str
|
73
|
+
The host name of the governance engine.
|
74
|
+
view_server : str
|
75
|
+
The name of the view server to interact with.
|
76
|
+
url : str
|
77
|
+
The URL of the view server.
|
78
|
+
username : str
|
79
|
+
Username for authentication with the view server.
|
80
|
+
user_pass : str
|
81
|
+
Password for authentication with the view server.
|
82
|
+
paging : bool
|
83
|
+
Determines whether to use a pager or live monitor for output. Defaults to True.
|
84
|
+
jupyter : bool
|
85
|
+
Specifies if the code is running in a Jupyter environment. Defaults to EGERIA_JUPYTER.
|
86
|
+
width : int
|
87
|
+
Width of the console output. Defaults to EGERIA_WIDTH.
|
88
|
+
sort : bool
|
89
|
+
Determines whether to sort the governance engine statuses. Defaults to True.
|
90
|
+
|
91
|
+
Returns
|
92
|
+
-------
|
93
|
+
|
94
|
+
Nothing
|
95
|
+
"""
|
66
96
|
console = Console(width=EGERIA_WIDTH)
|
67
97
|
|
68
98
|
s_client = EgeriaTech(view_server, url, username, user_pass)
|
@@ -60,7 +60,49 @@ def display_integration_daemon_status(
|
|
60
60
|
jupyter: bool = EGERIA_JUPYTER,
|
61
61
|
width: int = EGERIA_WIDTH,
|
62
62
|
sort: bool = True,
|
63
|
-
):
|
63
|
+
) -> None:
|
64
|
+
"""Display the status of connectors running on the specified Integration Daemon OMAG Server.
|
65
|
+
|
66
|
+
Parameters
|
67
|
+
----------
|
68
|
+
search_list : list[str], optional
|
69
|
+
A list of connector names to search for. Default is ["*"], which returns all connectors.
|
70
|
+
|
71
|
+
integ_server : str, optional
|
72
|
+
The name of the integration daemon server. Default is EGERIA_INTEGRATION_DAEMON.
|
73
|
+
|
74
|
+
integ_url : str, optional
|
75
|
+
The URL of the integration daemon server. Default is EGERIA_INTEGRATION_DAEMON_URL.
|
76
|
+
|
77
|
+
view_server : str, optional
|
78
|
+
The name of the view server. Default is EGERIA_VIEW_SERVER.
|
79
|
+
|
80
|
+
view_url : str, optional
|
81
|
+
The URL of the view server. Default is EGERIA_VIEW_SERVER_URL.
|
82
|
+
|
83
|
+
user : str, optional
|
84
|
+
The username for authentication. Default is EGERIA_USER.
|
85
|
+
|
86
|
+
user_pass : str, optional
|
87
|
+
The password for authenticated access. Default is EGERIA_USER_PASSWORD.
|
88
|
+
|
89
|
+
paging : bool, optional
|
90
|
+
Determines whether to use paging or a live monitor for console output. Default is True.
|
91
|
+
|
92
|
+
jupyter : bool, optional
|
93
|
+
Determines whether running in a Jupyter environment. Default is EGERIA_JUPYTER.
|
94
|
+
|
95
|
+
width : int, optional
|
96
|
+
The width of the console display. Default is EGERIA_WIDTH.
|
97
|
+
|
98
|
+
sort : bool, optional
|
99
|
+
Determines whether to sort the connector reports. Default is True.
|
100
|
+
|
101
|
+
Returns
|
102
|
+
-------
|
103
|
+
|
104
|
+
Nothing
|
105
|
+
"""
|
64
106
|
s_client = EgeriaTech(view_server, view_url, user, user_pass)
|
65
107
|
token = s_client.create_egeria_bearer_token()
|
66
108
|
|
@@ -45,15 +45,15 @@ console = Console(width=200)
|
|
45
45
|
|
46
46
|
|
47
47
|
def display_status(
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
user_pass: str,
|
48
|
+
view_server: str = EGERIA_VIEW_SERVER,
|
49
|
+
view_url: str = EGERIA_VIEW_SERVER_URL,
|
50
|
+
user: str = EGERIA_USER,
|
51
|
+
user_pass: str = EGERIA_USER_PASSWORD,
|
52
52
|
jupyter: bool = EGERIA_JUPYTER,
|
53
53
|
width: int = EGERIA_WIDTH,
|
54
54
|
):
|
55
|
-
r_client = RuntimeManager(
|
56
|
-
token = r_client.create_egeria_bearer_token(
|
55
|
+
r_client = RuntimeManager(view_server, view_url, user)
|
56
|
+
token = r_client.create_egeria_bearer_token(user, user_pass)
|
57
57
|
|
58
58
|
def generate_table() -> Table:
|
59
59
|
"""Make a new table."""
|
@@ -8,19 +8,16 @@ A simple status display for the Integration Daemon.
|
|
8
8
|
|
9
9
|
|
10
10
|
"""
|
11
|
-
import argparse
|
12
11
|
import os
|
13
12
|
import time
|
13
|
+
from typing import Union
|
14
14
|
|
15
|
+
import nest_asyncio
|
15
16
|
from rich import box
|
16
|
-
from rich.console import Console
|
17
|
-
from rich.live import Live
|
18
17
|
from rich.table import Table
|
19
|
-
import nest_asyncio
|
20
|
-
from typing import Union
|
21
18
|
from textual.widgets import DataTable
|
22
19
|
|
23
|
-
from pyegeria import EgeriaTech
|
20
|
+
from pyegeria import EgeriaTech
|
24
21
|
from pyegeria._exceptions import (
|
25
22
|
InvalidParameterException,
|
26
23
|
PropertyServerException,
|
@@ -80,6 +77,50 @@ def display_integration_daemon_status(
|
|
80
77
|
sort: bool = True,
|
81
78
|
data_table: bool = False,
|
82
79
|
) -> Table | DataTable:
|
80
|
+
"""Returns a table representing the status of connectors running on the specified Integration Daemon OMAG Server.
|
81
|
+
This routine is meant to be used in a python script or Jupyter Notebook where the resulting table is rendered
|
82
|
+
in either a Rich Console or a Textual Application.
|
83
|
+
|
84
|
+
Parameters
|
85
|
+
----------
|
86
|
+
integ_server : str, optional
|
87
|
+
The name of the integration daemon server. Default is EGERIA_INTEGRATION_DAEMON.
|
88
|
+
|
89
|
+
integ_url : str, optional
|
90
|
+
The URL of the integration daemon server. Default is EGERIA_INTEGRATION_DAEMON_URL.
|
91
|
+
|
92
|
+
view_server : str, optional
|
93
|
+
The name of the view server. Default is EGERIA_VIEW_SERVER.
|
94
|
+
|
95
|
+
view_url : str, optional
|
96
|
+
The URL of the view server. Default is EGERIA_VIEW_SERVER_URL.
|
97
|
+
|
98
|
+
user : str, optional
|
99
|
+
The username for authentication. Default is EGERIA_USER.
|
100
|
+
|
101
|
+
user_pass : str, optional
|
102
|
+
The password for authenticated access. Default is EGERIA_USER_PASSWORD.
|
103
|
+
|
104
|
+
paging : bool, optional
|
105
|
+
Determines whether to use paging or a live monitor for console output. Default is True.
|
106
|
+
|
107
|
+
jupyter : bool, optional
|
108
|
+
Determines whether running in a Jupyter environment. Default is EGERIA_JUPYTER.
|
109
|
+
|
110
|
+
width : int, optional
|
111
|
+
The width of the console display. Default is EGERIA_WIDTH.
|
112
|
+
|
113
|
+
sort : bool, optional
|
114
|
+
Determines whether to sort the connector reports. Default is True.
|
115
|
+
data_table: bool, optional, default is False.
|
116
|
+
If True, a Textual DataTable widget is returned. If false, a Rich table is returned..
|
117
|
+
|
118
|
+
Returns
|
119
|
+
-------
|
120
|
+
|
121
|
+
Either a Rich Table or a Textual DataTable depending on the status of data_table
|
122
|
+
"""
|
123
|
+
|
83
124
|
s_client = EgeriaTech(view_server, view_url, user, user_pass)
|
84
125
|
nest_asyncio.apply()
|
85
126
|
|
@@ -180,20 +221,7 @@ def display_integration_daemon_status(
|
|
180
221
|
return table
|
181
222
|
|
182
223
|
try:
|
183
|
-
|
184
|
-
console = Console(width=width, force_terminal=not jupyter)
|
185
|
-
with console.pager():
|
186
|
-
console.print(generate_table())
|
187
|
-
else:
|
188
|
-
with Live(
|
189
|
-
generate_table(),
|
190
|
-
refresh_per_second=1,
|
191
|
-
screen=True,
|
192
|
-
vertical_overflow="visible",
|
193
|
-
) as live:
|
194
|
-
while True:
|
195
|
-
time.sleep(2)
|
196
|
-
live.update(generate_table())
|
224
|
+
return generate_table()
|
197
225
|
|
198
226
|
except (
|
199
227
|
InvalidParameterException,
|
@@ -207,86 +235,3 @@ def display_integration_daemon_status(
|
|
207
235
|
|
208
236
|
finally:
|
209
237
|
s_client.close_session()
|
210
|
-
|
211
|
-
|
212
|
-
def main_live():
|
213
|
-
parser = argparse.ArgumentParser()
|
214
|
-
parser.add_argument(
|
215
|
-
"--integ_server", help="Name of the integration server to display status for"
|
216
|
-
)
|
217
|
-
parser.add_argument("--integ_url", help="URL Platform to connect to")
|
218
|
-
parser.add_argument("--view_server", help="Name of the view server to use")
|
219
|
-
parser.add_argument("--view_url", help="view server URL Platform to connect to")
|
220
|
-
parser.add_argument("--userid", help="User Id")
|
221
|
-
parser.add_argument("--password", help="User Password")
|
222
|
-
args = parser.parse_args()
|
223
|
-
|
224
|
-
integ_server = (
|
225
|
-
args.integ_server
|
226
|
-
if args.integ_server is not None
|
227
|
-
else EGERIA_INTEGRATION_DAEMON
|
228
|
-
)
|
229
|
-
integ_url = (
|
230
|
-
args.integ_url if args.integ_url is not None else EGERIA_INTEGRATION_DAEMON_URL
|
231
|
-
)
|
232
|
-
view_server = (
|
233
|
-
args.view_server if args.view_server is not None else EGERIA_VIEW_SERVER
|
234
|
-
)
|
235
|
-
view_url = args.view_url if args.view_url is not None else EGERIA_VIEW_SERVER_URL
|
236
|
-
userid = args.userid if args.userid is not None else EGERIA_USER
|
237
|
-
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
238
|
-
display_integration_daemon_status(
|
239
|
-
integ_server=integ_server,
|
240
|
-
integ_url=integ_url,
|
241
|
-
view_server=view_server,
|
242
|
-
view_url=view_url,
|
243
|
-
user=userid,
|
244
|
-
user_pass=user_pass,
|
245
|
-
paging=False,
|
246
|
-
data_table=False,
|
247
|
-
)
|
248
|
-
|
249
|
-
|
250
|
-
def main_paging():
|
251
|
-
parser = argparse.ArgumentParser()
|
252
|
-
parser.add_argument(
|
253
|
-
"--integ_server", help="Name of the integration server to display status for"
|
254
|
-
)
|
255
|
-
parser.add_argument("--integ_url", help="URL Platform to connect to")
|
256
|
-
parser.add_argument("--view_server", help="Name of the view server to use")
|
257
|
-
parser.add_argument("--view_url", help="view server URL Platform to connect to")
|
258
|
-
parser.add_argument("--userid", help="User Id")
|
259
|
-
parser.add_argument("--password", help="User Password")
|
260
|
-
args = parser.parse_args()
|
261
|
-
|
262
|
-
integ_server = (
|
263
|
-
args.integ_server
|
264
|
-
if args.integ_server is not None
|
265
|
-
else EGERIA_INTEGRATION_DAEMON
|
266
|
-
)
|
267
|
-
integ_url = (
|
268
|
-
args.integ_url if args.integ_url is not None else EGERIA_INTEGRATION_DAEMON_URL
|
269
|
-
)
|
270
|
-
view_server = (
|
271
|
-
args.view_server if args.view_server is not None else EGERIA_VIEW_SERVER
|
272
|
-
)
|
273
|
-
view_url = args.view_url if args.view_url is not None else EGERIA_VIEW_SERVER_URL
|
274
|
-
userid = args.userid if args.userid is not None else EGERIA_USER
|
275
|
-
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
276
|
-
display_integration_daemon_status(
|
277
|
-
integ_server=integ_server,
|
278
|
-
integ_url=integ_url,
|
279
|
-
view_server=view_server,
|
280
|
-
view_url=view_url,
|
281
|
-
user=userid,
|
282
|
-
user_pass=user_pass,
|
283
|
-
paging=True,
|
284
|
-
data_table=False,
|
285
|
-
)
|
286
|
-
|
287
|
-
|
288
|
-
if __name__ == "__main__":
|
289
|
-
main_live()
|
290
|
-
|
291
|
-
if __name__ == "__main_paging__":
|
292
|
-
main_paging()
|
@@ -11,7 +11,7 @@ pyegeria/classification_manager_omvs.py,sha256=3yInuRy7Cf43oSFZ8BuzcIgtGSm5BfvlK
|
|
11
11
|
pyegeria/collection_manager_omvs.py,sha256=kye2kjthNnmwxMZhHQKV0xoHbxcNPWjNzRAYOItj_gY,99201
|
12
12
|
pyegeria/commands/.DS_Store,sha256=nBgW7MKJ6b4wSWyEEeGYHWwC8QJAiteQaWKM9PoNRzY,6148
|
13
13
|
pyegeria/commands/README.md,sha256=zNfWZppDxoKqTJeRtcewzku9z1m6_hKacCyQUQw1iq4,1974
|
14
|
-
pyegeria/commands/__init__.py,sha256=
|
14
|
+
pyegeria/commands/__init__.py,sha256=dVtdNVBwR_n04rMwDPFmND4fZyuywAoucYeT7hJtIq4,782
|
15
15
|
pyegeria/commands/cat/README.md,sha256=-aaAnIT2fcfU63vajgB-RzQk4l4yFdhkyVfSaTPiqRY,967
|
16
16
|
pyegeria/commands/cat/__init__.py,sha256=ernlw1R7H7d4wN2AyzT9B1K9ANp_reKXv7VOY5BFBv4,290
|
17
17
|
pyegeria/commands/cat/get_asset_graph.py,sha256=4AO4KlCgb7vbMihJK7W_GAnrd4J9sKwc4kXxa2ZrRW4,12447
|
@@ -24,14 +24,14 @@ pyegeria/commands/cat/glossary_actions.py,sha256=T1JkB-uhf1WyM1xcIBux_kNcAnpkLt8
|
|
24
24
|
pyegeria/commands/cat/list_archives.py,sha256=FEZ2XYnQIWo2PztWqnj6unn0pbblPU0-bMbTyI3csv4,5464
|
25
25
|
pyegeria/commands/cat/list_assets.py,sha256=bNwSaBDz661hfnc2Rn4j4HPHAugKvz0XwN9L1m4FVQk,6529
|
26
26
|
pyegeria/commands/cat/list_cert_types.py,sha256=mbCls_EqC5JKG5rvS4o69k7KgZ6aNXlcqoJ3DtHsTFA,7127
|
27
|
-
pyegeria/commands/cat/list_deployed_catalogs.py,sha256=
|
28
|
-
pyegeria/commands/cat/list_deployed_database_schemas.py,sha256=
|
29
|
-
pyegeria/commands/cat/list_deployed_databases.py,sha256=
|
30
|
-
pyegeria/commands/cat/list_glossaries.py,sha256=
|
27
|
+
pyegeria/commands/cat/list_deployed_catalogs.py,sha256=sdfhzK0Wqo59tpoX6jpjnBWl5MLdD1qzU0TcXC_QtsY,8140
|
28
|
+
pyegeria/commands/cat/list_deployed_database_schemas.py,sha256=g-O5Qk6t9mHl3yAYwHIbVWNxjy5bR4YOfvJ5YMoeMyw,9535
|
29
|
+
pyegeria/commands/cat/list_deployed_databases.py,sha256=DTpt7l2z81YsmadsHsnSgrbRGPlkBzHjg2p1TdnI-zc,7565
|
30
|
+
pyegeria/commands/cat/list_glossaries.py,sha256=_2viz45k-PZQXyDfuwHEBThFCjYdmVerpN_xjjpp0fY,5527
|
31
31
|
pyegeria/commands/cat/list_projects.py,sha256=Jzs-DtIpPhCH-gY4PYT6mnRBWnEf4m18TFfcw8UymNU,8011
|
32
32
|
pyegeria/commands/cat/list_relationships.py,sha256=U9f78cOi4HyaacqNaFSMq_7rRxVcEczvwPv468GYw3Q,5869
|
33
33
|
pyegeria/commands/cat/list_tech_types.py,sha256=20T4v6L5qeebSsaL1nGkFMDAIsy2W3A3SMm1RcgFoh0,4609
|
34
|
-
pyegeria/commands/cat/list_terms.py,sha256=
|
34
|
+
pyegeria/commands/cat/list_terms.py,sha256=BvzmiE9FxlpQFo2OomPSZKLtqMSeXu4RmlDEaeUfuJs,8938
|
35
35
|
pyegeria/commands/cat/list_todos.py,sha256=iPxHRyW3X5tiREio4TUOwRPvNPjU0gxm3pVnUI79ir4,6542
|
36
36
|
pyegeria/commands/cat/list_user_ids.py,sha256=7JinL7rknPbGusIb8ikXKEaV1vvbuvx_WWtbmlfS_DY,5093
|
37
37
|
pyegeria/commands/cli/__init__.py,sha256=hpTVSMP2gnPRhcAZPdeUEsQ-eaDySlXlk239dNWYmng,292
|
@@ -56,17 +56,17 @@ pyegeria/commands/ops/list_catalog_targets.py,sha256=0FIZqZu7DSh7tnrme6EOhNiVvK8
|
|
56
56
|
pyegeria/commands/ops/load_archive.py,sha256=ZsJmQ-2cywsiO5RYHQXFF72wrlBK18jvAkyQ8N-nSp4,2744
|
57
57
|
pyegeria/commands/ops/monitor_asset_events.py,sha256=cjdlVqE0XYnoRW3aorNbsVkjByDXefPBnllaZLelGls,3838
|
58
58
|
pyegeria/commands/ops/monitor_engine_activity.py,sha256=m18OSnRoo5ut0WKKOWNoFGXJW_npjp6hzHK3RUQG8T0,8479
|
59
|
-
pyegeria/commands/ops/monitor_engine_activity_c.py,sha256=
|
60
|
-
pyegeria/commands/ops/monitor_gov_eng_status.py,sha256=
|
61
|
-
pyegeria/commands/ops/monitor_integ_daemon_status.py,sha256
|
62
|
-
pyegeria/commands/ops/monitor_platform_status.py,sha256=
|
59
|
+
pyegeria/commands/ops/monitor_engine_activity_c.py,sha256=LM__vwJUbZOBwcBTEfa4JLcqWtR3POEbt1lMTwHk4lw,10135
|
60
|
+
pyegeria/commands/ops/monitor_gov_eng_status.py,sha256=nR0xI_8L8W6gOJm8-jp8BaAeOLf1Gd5ikYP43AbJMxo,9094
|
61
|
+
pyegeria/commands/ops/monitor_integ_daemon_status.py,sha256=Fjtwwgdz9RuaeW-tPIs_VX_J0x-YrO_TIzk-HOOwqA0,11367
|
62
|
+
pyegeria/commands/ops/monitor_platform_status.py,sha256=3uIgY9JzXnMxxenLpvmKEEfv_GsxslJeeseOEVEmCbU,6492
|
63
63
|
pyegeria/commands/ops/monitor_server_startup.py,sha256=0pwnhv761uuFHGJXVANa5RhQQPPTXFldJ45TfeT7qfk,3901
|
64
64
|
pyegeria/commands/ops/monitor_server_status.py,sha256=eeZY4o_HwrH-csrhHPi95LLGu00j6AYl48A7fDYTG34,6061
|
65
65
|
pyegeria/commands/ops/orig_monitor_server_list.py,sha256=Uhtn8lv7QVXJBi9DSR3Nelmz8TB0vOsat10nFS6Nu20,4637
|
66
66
|
pyegeria/commands/ops/orig_monitor_server_status.py,sha256=A-8hMDfbscdcq-b1OD4wKn0tphumX8WIK-Hz8uPoFkc,3974
|
67
67
|
pyegeria/commands/ops/refresh_integration_daemon.py,sha256=aEaN3RAqlu2Fu9TgbJqnsfyXZ__WBml2EgRKaC48Pig,2961
|
68
68
|
pyegeria/commands/ops/restart_integration_daemon.py,sha256=dqsQ6nOBw-EJgf7NvwTcR__h317dq_cxUWYRTGxvWaM,2901
|
69
|
-
pyegeria/commands/ops/table_integ_daemon_status.py,sha256=
|
69
|
+
pyegeria/commands/ops/table_integ_daemon_status.py,sha256=to93SVOF9tlaG5FpSHV4vZwZQgVoKmj5n-wc3oVQLGU,8414
|
70
70
|
pyegeria/commands/tech/README.md,sha256=nxDnfr3BCiGgW5G1VxWxiwUWJXIe5wreNuUeRyIt_hY,1343
|
71
71
|
pyegeria/commands/tech/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
72
72
|
pyegeria/commands/tech/get_element_graph.py,sha256=YhpvHPNuSd-Ft-dBRLswGfqGYv2AlByyV0IyjhV4SSk,7367
|
@@ -108,8 +108,8 @@ pyegeria/template_manager_omvs.py,sha256=heqbKeum5hPCHap4r1RUZU8YB3QaQlxVNbq4GZi
|
|
108
108
|
pyegeria/utils.py,sha256=1h6bwveadd6GpbnGLTmqPBmBk68QvxdjGTI9RfbrgKY,5415
|
109
109
|
pyegeria/valid_metadata_omvs.py,sha256=tfCGXed5LLt59YA8uZNNtd9UJ-lRZfPU_uZxK31Yux0,65069
|
110
110
|
pyegeria/x_action_author_omvs.py,sha256=xu1IQ0YbhIKi17C5a7Aq9u1Az2czwahNPpX9czmyVxE,6454
|
111
|
-
pyegeria-1.5.1.1.
|
112
|
-
pyegeria-1.5.1.1.
|
113
|
-
pyegeria-1.5.1.1.
|
114
|
-
pyegeria-1.5.1.1.
|
115
|
-
pyegeria-1.5.1.1.
|
111
|
+
pyegeria-1.5.1.1.31.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
112
|
+
pyegeria-1.5.1.1.31.dist-info/METADATA,sha256=8r4TuemXiuer3YGLNhZQXTrSCMMR7Fo_8W_Li7lSzdc,2998
|
113
|
+
pyegeria-1.5.1.1.31.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
114
|
+
pyegeria-1.5.1.1.31.dist-info/entry_points.txt,sha256=YxEUUWKTrK3YStEbBqM6TD_UetgVKy5LYGWBnxnyNz0,4886
|
115
|
+
pyegeria-1.5.1.1.31.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|