pyegeria 0.8.4.18__py3-none-any.whl → 0.8.4.20__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.
- {examples/widgets → commands}/cli/egeria.py +43 -43
- {examples/widgets → commands}/cli/egeria_cat.py +16 -16
- commands/cli/egeria_my.py +269 -0
- {examples/widgets → commands}/cli/egeria_ops.py +22 -23
- {examples/widgets → commands}/cli/egeria_tech.py +13 -13
- commands/ops/engine_actions.py +131 -0
- {examples/widgets → commands}/ops/integration_daemon_actions.py +33 -33
- commands/ops/refresh_integration_daemon.py +85 -0
- commands/ops/restart_integration_daemon.py +86 -0
- pyegeria/runtime_manager_omvs.py +951 -263
- {pyegeria-0.8.4.18.dist-info → pyegeria-0.8.4.20.dist-info}/METADATA +1 -1
- pyegeria-0.8.4.20.dist-info/RECORD +99 -0
- pyegeria-0.8.4.20.dist-info/entry_points.txt +60 -0
- examples/widgets/cli/egeria_my.py +0 -161
- examples/widgets/ops/engine_actions.py +0 -83
- examples/widgets/ops/refresh_integration_daemon.py +0 -73
- examples/widgets/ops/restart_integration_daemon.py +0 -73
- pyegeria-0.8.4.18.dist-info/RECORD +0 -99
- pyegeria-0.8.4.18.dist-info/entry_points.txt +0 -60
- {examples/widgets → commands}/cat/README.md +0 -0
- {examples/widgets → commands}/cat/__init__.py +0 -0
- {examples/widgets → commands}/cat/get_asset_graph.py +0 -0
- {examples/widgets → commands}/cat/get_collection.py +0 -0
- {examples/widgets → commands}/cat/get_project_dependencies.py +0 -0
- {examples/widgets → commands}/cat/get_project_structure.py +0 -0
- {examples/widgets → commands}/cat/get_tech_type_elements.py +0 -0
- {examples/widgets → commands}/cat/get_tech_type_template.py +0 -0
- {examples/widgets → commands}/cat/list_archives.py +0 -0
- {examples/widgets → commands}/cat/list_assets.py +0 -0
- {examples/widgets → commands}/cat/list_cert_types.py +0 -0
- {examples/widgets → commands}/cat/list_glossary.py +0 -0
- {examples/widgets → commands}/cat/list_projects.py +0 -0
- {examples/widgets → commands}/cat/list_relationships.py +0 -0
- {examples/widgets → commands}/cat/list_tech_types.py +0 -0
- {examples/widgets → commands}/cat/list_todos.py +0 -0
- {examples/widgets → commands}/cat/list_user_ids.py +0 -0
- {examples/widgets → commands}/cli/__init__.py +0 -0
- {examples/widgets → commands}/cli/ops_config.py +0 -0
- {examples/widgets → commands}/my/README.md +0 -0
- {examples/widgets → commands}/my/__init__.py +0 -0
- {examples/widgets → commands}/my/list_my_profile.py +0 -0
- {examples/widgets → commands}/my/list_my_roles.py +0 -0
- {examples/widgets → commands}/my/monitor_my_todos.py +0 -0
- {examples/widgets → commands}/my/monitor_open_todos.py +0 -0
- {examples/widgets → commands}/my/my_profile_actions.py +0 -0
- {examples/widgets → commands}/my/todo_actions.py +0 -0
- {examples/widgets → commands}/ops/README.md +0 -0
- {examples/widgets → commands}/ops/__init__.py +0 -0
- {examples/widgets → commands}/ops/list_catalog_targets.py +0 -0
- {examples/widgets → commands}/ops/load_archive.py +0 -0
- {examples/widgets → commands}/ops/monitor_asset_events.py +0 -0
- {examples/widgets → commands}/ops/monitor_coco_status.py +0 -0
- {examples/widgets → commands}/ops/monitor_engine_activity.py +0 -0
- {examples/widgets → commands}/ops/monitor_engine_activity_c.py +0 -0
- {examples/widgets → commands}/ops/monitor_gov_eng_status.py +0 -0
- {examples/widgets → commands}/ops/monitor_integ_daemon_status.py +0 -0
- {examples/widgets → commands}/ops/monitor_platform_status.py +0 -0
- {examples/widgets → commands}/ops/monitor_server_list.py +0 -0
- {examples/widgets → commands}/ops/monitor_server_status.py +0 -0
- {examples/widgets → commands}/tech/README.md +0 -0
- {examples/widgets → commands}/tech/__init__.py +0 -0
- {examples/widgets → commands}/tech/get_element_info.py +0 -0
- {examples/widgets → commands}/tech/get_guid_info.py +0 -0
- {examples/widgets → commands}/tech/get_tech_details.py +0 -0
- {examples/widgets → commands}/tech/list_asset_types.py +0 -0
- {examples/widgets → commands}/tech/list_elements.py +0 -0
- {examples/widgets → commands}/tech/list_elements_x.py +0 -0
- {examples/widgets → commands}/tech/list_registered_services.py +0 -0
- {examples/widgets → commands}/tech/list_related_specification.py +0 -0
- {examples/widgets → commands}/tech/list_relationship_types.py +0 -0
- {examples/widgets → commands}/tech/list_tech_templates.py +0 -0
- {examples/widgets → commands}/tech/list_valid_metadata_values.py +0 -0
- {examples/widgets → commands}/tech/x_list_related_elements.py +0 -0
- {pyegeria-0.8.4.18.dist-info → pyegeria-0.8.4.20.dist-info}/LICENSE +0 -0
- {pyegeria-0.8.4.18.dist-info → pyegeria-0.8.4.20.dist-info}/WHEEL +0 -0
@@ -104,36 +104,36 @@ 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
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
@click.command("start")
|
125
|
-
@click.pass_context
|
126
|
-
def start_server(ctx):
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
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)
|
@@ -0,0 +1,85 @@
|
|
1
|
+
"""
|
2
|
+
SPDX-License-Identifier: Apache-2.0
|
3
|
+
Copyright Contributors to the ODPi Egeria project.
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
This script refreshs an integration daemon.
|
8
|
+
|
9
|
+
"""
|
10
|
+
|
11
|
+
import argparse
|
12
|
+
import os
|
13
|
+
|
14
|
+
from pyegeria import EgeriaTech
|
15
|
+
from pyegeria._exceptions import (
|
16
|
+
InvalidParameterException,
|
17
|
+
PropertyServerException,
|
18
|
+
print_exception_response,
|
19
|
+
)
|
20
|
+
|
21
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
22
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
23
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
24
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
25
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
26
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
27
|
+
)
|
28
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
29
|
+
EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
|
30
|
+
"EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
|
31
|
+
)
|
32
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "garygeeke")
|
33
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
34
|
+
|
35
|
+
|
36
|
+
def refresh_connector(
|
37
|
+
connector: str, server: str, url: str, view_server: str, userid: str, password: str
|
38
|
+
):
|
39
|
+
try:
|
40
|
+
s_client = EgeriaTech(view_server, url, userid, user_pwd=password)
|
41
|
+
token = s_client.create_egeria_bearer_token()
|
42
|
+
if connector == "all":
|
43
|
+
connector = None
|
44
|
+
statement = "ALL connectors"
|
45
|
+
else:
|
46
|
+
statement = f"the {connector} "
|
47
|
+
server = "integration-daemon" if server is None else server
|
48
|
+
server_guid = s_client.get_guid_for_name(server)
|
49
|
+
|
50
|
+
s_client.refresh_integration_connectors(
|
51
|
+
server_guid,
|
52
|
+
connector,
|
53
|
+
)
|
54
|
+
|
55
|
+
print(f"\n===> Integration Daemon '{server}' refreshed {statement}.")
|
56
|
+
|
57
|
+
except (InvalidParameterException, PropertyServerException) as e:
|
58
|
+
print_exception_response(e)
|
59
|
+
|
60
|
+
|
61
|
+
def main():
|
62
|
+
parser = argparse.ArgumentParser()
|
63
|
+
parser.add_argument("--server", help="Name of the integration daemon to refresh")
|
64
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
65
|
+
parser.add_argument("--view_server", help="Name of the view server to connect to")
|
66
|
+
parser.add_argument("--userid", help="User Id")
|
67
|
+
parser.add_argument("--password", help="User Password")
|
68
|
+
parser.add_argument(
|
69
|
+
"--connector", default="all", help="Name of the connector to refresh"
|
70
|
+
)
|
71
|
+
args = parser.parse_args()
|
72
|
+
|
73
|
+
server = args.server if args.server is not None else EGERIA_INTEGRATION_DAEMON
|
74
|
+
url = args.url if args.url is not None else EGERIA_VIEW_SERVER_URL
|
75
|
+
view_server = (
|
76
|
+
args.view_server if args.view_server is not None else EGERIA_VIEW_SERVER
|
77
|
+
)
|
78
|
+
|
79
|
+
userid = args.userid if args.userid is not None else EGERIA_USER
|
80
|
+
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
81
|
+
refresh_connector(args.connector, server, url, view_server, userid, user_pass)
|
82
|
+
|
83
|
+
|
84
|
+
if __name__ == "__main__":
|
85
|
+
main()
|
@@ -0,0 +1,86 @@
|
|
1
|
+
"""
|
2
|
+
SPDX-License-Identifier: Apache-2.0
|
3
|
+
Copyright Contributors to the ODPi Egeria project.
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
This script restarts an integration daemon.
|
8
|
+
|
9
|
+
"""
|
10
|
+
|
11
|
+
import argparse
|
12
|
+
import os
|
13
|
+
|
14
|
+
from pyegeria import EgeriaTech
|
15
|
+
from pyegeria._exceptions import (
|
16
|
+
InvalidParameterException,
|
17
|
+
PropertyServerException,
|
18
|
+
print_exception_response,
|
19
|
+
)
|
20
|
+
|
21
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
22
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
23
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
24
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
25
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
26
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
27
|
+
)
|
28
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
29
|
+
EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
|
30
|
+
"EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
|
31
|
+
)
|
32
|
+
|
33
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "garygeeke")
|
34
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
35
|
+
|
36
|
+
|
37
|
+
def restart_connector(
|
38
|
+
connector: str, server: str, url: str, view_server: str, userid: str, password: str
|
39
|
+
):
|
40
|
+
try:
|
41
|
+
s_client = EgeriaTech(view_server, url, userid, user_pwd=password)
|
42
|
+
token = s_client.create_egeria_bearer_token()
|
43
|
+
if connector == "all":
|
44
|
+
connector = None
|
45
|
+
statement = "ALL connectors"
|
46
|
+
else:
|
47
|
+
statement = f"the {connector} "
|
48
|
+
server = "integration-daemon" if server is None else server
|
49
|
+
server_guid = s_client.get_guid_for_name(server)
|
50
|
+
|
51
|
+
s_client.restart_integration_connectors(
|
52
|
+
server_guid,
|
53
|
+
connector,
|
54
|
+
)
|
55
|
+
|
56
|
+
print(f"\n===> Integration Daemon '{server}' restarted {statement}.")
|
57
|
+
|
58
|
+
except (InvalidParameterException, PropertyServerException) as e:
|
59
|
+
print_exception_response(e)
|
60
|
+
|
61
|
+
|
62
|
+
def main():
|
63
|
+
parser = argparse.ArgumentParser()
|
64
|
+
parser.add_argument("--server", help="Name of the integration daemon to refresh")
|
65
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
66
|
+
parser.add_argument("--view_server", help="Name of the view server to connect to")
|
67
|
+
parser.add_argument("--userid", help="User Id")
|
68
|
+
parser.add_argument("--password", help="User Password")
|
69
|
+
parser.add_argument(
|
70
|
+
"--connector", default="all", help="Name of the connector to refresh"
|
71
|
+
)
|
72
|
+
args = parser.parse_args()
|
73
|
+
|
74
|
+
server = args.server if args.server is not None else EGERIA_INTEGRATION_DAEMON
|
75
|
+
url = args.url if args.url is not None else EGERIA_VIEW_SERVER_URL
|
76
|
+
view_server = (
|
77
|
+
args.view_server if args.view_server is not None else EGERIA_VIEW_SERVER
|
78
|
+
)
|
79
|
+
|
80
|
+
userid = args.userid if args.userid is not None else EGERIA_USER
|
81
|
+
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
82
|
+
restart_connector(args.connector, server, url, view_server, userid, user_pass)
|
83
|
+
|
84
|
+
|
85
|
+
if __name__ == "__main__":
|
86
|
+
main()
|