pyegeria 0.8.4.17__tar.gz → 0.8.4.19__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.17 → pyegeria-0.8.4.19}/PKG-INFO +1 -1
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cli/egeria.py +43 -43
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cli/egeria_cat.py +16 -16
- pyegeria-0.8.4.19/commands/cli/egeria_my.py +269 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cli/egeria_ops.py +22 -23
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cli/egeria_tech.py +13 -13
- pyegeria-0.8.4.19/commands/ops/engine_actions.py +131 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/ops/integration_daemon_actions.py +33 -33
- pyegeria-0.8.4.19/commands/ops/refresh_integration_daemon.py +85 -0
- pyegeria-0.8.4.19/commands/ops/restart_integration_daemon.py +86 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/egeria_tech_client.py +2 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/runtime_manager_omvs.py +1014 -497
- pyegeria-0.8.4.19/pyproject.toml +118 -0
- pyegeria-0.8.4.17/examples/widgets/cli/egeria_my.py +0 -161
- pyegeria-0.8.4.17/examples/widgets/ops/engine_actions.py +0 -83
- pyegeria-0.8.4.17/examples/widgets/ops/refresh_integration_daemon.py +0 -73
- pyegeria-0.8.4.17/examples/widgets/ops/restart_integration_daemon.py +0 -73
- pyegeria-0.8.4.17/pyproject.toml +0 -118
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/LICENSE +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/README.md +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cat/README.md +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cat/__init__.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cat/get_asset_graph.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cat/get_collection.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cat/get_project_dependencies.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cat/get_project_structure.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cat/get_tech_type_elements.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cat/get_tech_type_template.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cat/list_archives.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cat/list_assets.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cat/list_cert_types.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cat/list_glossary.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cat/list_projects.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cat/list_relationships.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cat/list_tech_types.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cat/list_todos.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cat/list_user_ids.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cli/__init__.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/cli/ops_config.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/my/README.md +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/my/__init__.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/my/list_my_profile.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/my/list_my_roles.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/my/monitor_my_todos.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/my/monitor_open_todos.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/my/my_profile_actions.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/my/todo_actions.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/ops/README.md +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/ops/__init__.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/ops/list_catalog_targets.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/ops/load_archive.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/ops/monitor_asset_events.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/ops/monitor_coco_status.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/ops/monitor_engine_activity.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/ops/monitor_engine_activity_c.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/ops/monitor_gov_eng_status.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/ops/monitor_integ_daemon_status.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/ops/monitor_platform_status.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/ops/monitor_server_list.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/ops/monitor_server_status.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/tech/README.md +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/tech/__init__.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/tech/get_element_info.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/tech/get_guid_info.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/tech/get_tech_details.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/tech/list_asset_types.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/tech/list_elements.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/tech/list_elements_x.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/tech/list_registered_services.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/tech/list_related_specification.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/tech/list_relationship_types.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/tech/list_tech_templates.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/tech/list_valid_metadata_values.py +0 -0
- {pyegeria-0.8.4.17/examples/widgets → pyegeria-0.8.4.19/commands}/tech/x_list_related_elements.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/__init__.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/_client.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/_deprecated_gov_engine.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/_exceptions.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/_globals.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/_validators.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/asset_catalog_omvs.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/automated_curation_omvs.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/classification_manager_omvs.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/collection_manager_omvs.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/core_omag_server_config.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/create_tech_guid_lists.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/egeria_cat_client.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/egeria_client.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/egeria_config_client.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/egeria_my_client.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/feedback_manager_omvs.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/full_omag_server_config.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/glossary_browser_omvs.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/glossary_manager_omvs.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/mermaid_utilities.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/my_profile_omvs.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/platform_services.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/project_manager_omvs.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/registered_info.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/server_operations.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/utils.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/valid_metadata_omvs.py +0 -0
- {pyegeria-0.8.4.17 → pyegeria-0.8.4.19}/pyegeria/x_action_author_omvs.py +0 -0
@@ -12,66 +12,66 @@ This is an emerging capability based on the **click** package. Feedback welcome!
|
|
12
12
|
import click
|
13
13
|
from trogon import tui
|
14
14
|
|
15
|
-
from
|
16
|
-
from
|
17
|
-
from
|
18
|
-
from
|
19
|
-
from
|
20
|
-
from
|
21
|
-
from
|
22
|
-
from
|
23
|
-
from
|
24
|
-
from
|
25
|
-
from
|
26
|
-
from
|
27
|
-
from
|
28
|
-
from
|
29
|
-
from
|
30
|
-
from
|
31
|
-
from
|
32
|
-
from
|
33
|
-
from
|
34
|
-
from
|
35
|
-
from
|
15
|
+
from commands.cat.get_asset_graph import asset_viewer
|
16
|
+
from commands.cat.get_collection import collection_viewer
|
17
|
+
from commands.cat.get_project_dependencies import project_dependency_viewer
|
18
|
+
from commands.cat.get_project_structure import project_structure_viewer
|
19
|
+
from commands.cat.get_tech_type_elements import tech_viewer
|
20
|
+
from commands.cat.get_tech_type_template import template_viewer
|
21
|
+
from commands.cat.list_assets import display_assets
|
22
|
+
from commands.cat.list_cert_types import display_certifications
|
23
|
+
from commands.cat.list_glossary import display_glossary_terms
|
24
|
+
from commands.cat.list_projects import display_project_list
|
25
|
+
from commands.cat.list_relationships import list_relationships
|
26
|
+
from commands.cat.list_tech_types import display_tech_types
|
27
|
+
from commands.cat.list_todos import display_to_dos as list_todos
|
28
|
+
from commands.cat.list_user_ids import list_user_ids
|
29
|
+
from commands.cat.list_archives import display_archive_list
|
30
|
+
from commands.cli.ops_config import Config
|
31
|
+
from commands.my.list_my_profile import display_my_profile
|
32
|
+
from commands.my.list_my_roles import display_my_roles
|
33
|
+
from commands.my.monitor_my_todos import display_my_todos
|
34
|
+
from commands.my.monitor_open_todos import display_todos
|
35
|
+
from commands.ops.engine_actions import (
|
36
36
|
start_daemon as start_engine_host,
|
37
37
|
stop_daemon as stop_engine_host,
|
38
38
|
)
|
39
|
-
from
|
39
|
+
from commands.ops.integration_daemon_actions import (
|
40
40
|
add_catalog_target,
|
41
41
|
remove_catalog_target,
|
42
42
|
update_catalog_target,
|
43
43
|
stop_server,
|
44
44
|
start_server,
|
45
45
|
)
|
46
|
-
from
|
47
|
-
from
|
48
|
-
from
|
49
|
-
from
|
50
|
-
from
|
51
|
-
from
|
46
|
+
from commands.ops.list_catalog_targets import display_catalog_targets
|
47
|
+
from commands.ops.load_archive import load_archive
|
48
|
+
from commands.ops.monitor_engine_activity import display_engine_activity
|
49
|
+
from commands.ops.monitor_engine_activity_c import display_engine_activity_c
|
50
|
+
from commands.ops.monitor_gov_eng_status import display_gov_eng_status
|
51
|
+
from commands.ops.monitor_integ_daemon_status import (
|
52
52
|
display_integration_daemon_status,
|
53
53
|
)
|
54
|
-
from
|
54
|
+
from commands.ops.monitor_platform_status import (
|
55
55
|
display_status as p_display_status,
|
56
56
|
)
|
57
|
-
from
|
58
|
-
from
|
57
|
+
from commands.ops.monitor_server_list import display_status as display_list
|
58
|
+
from commands.ops.monitor_server_status import (
|
59
59
|
display_status as s_display_status,
|
60
60
|
)
|
61
|
-
from
|
62
|
-
from
|
63
|
-
from
|
64
|
-
from
|
65
|
-
from
|
66
|
-
from
|
67
|
-
from
|
68
|
-
from
|
69
|
-
from
|
61
|
+
from commands.ops.refresh_integration_daemon import refresh_connector
|
62
|
+
from commands.ops.restart_integration_daemon import restart_connector
|
63
|
+
from commands.tech.get_element_info import display_elements
|
64
|
+
from commands.tech.get_guid_info import display_guid
|
65
|
+
from commands.tech.get_tech_details import tech_details_viewer
|
66
|
+
from commands.tech.list_asset_types import display_asset_types
|
67
|
+
from commands.tech.list_elements import list_elements
|
68
|
+
from commands.tech.list_registered_services import display_registered_svcs
|
69
|
+
from commands.tech.list_related_specification import (
|
70
70
|
display_related_specification,
|
71
71
|
)
|
72
|
-
from
|
73
|
-
from
|
74
|
-
from
|
72
|
+
from commands.tech.list_relationship_types import display_relationship_types
|
73
|
+
from commands.tech.list_tech_templates import display_templates_spec
|
74
|
+
from commands.tech.list_valid_metadata_values import display_metadata_values
|
75
75
|
|
76
76
|
|
77
77
|
@tui()
|
@@ -12,24 +12,24 @@ This is an emerging capability based on the **click** package. Feedback welcome!
|
|
12
12
|
import click
|
13
13
|
from trogon import tui
|
14
14
|
|
15
|
-
from
|
16
|
-
from
|
17
|
-
from
|
18
|
-
from
|
19
|
-
from
|
20
|
-
from
|
21
|
-
from
|
22
|
-
from
|
23
|
-
from
|
24
|
-
from
|
25
|
-
from
|
26
|
-
from
|
27
|
-
from
|
28
|
-
from
|
29
|
-
from
|
15
|
+
from commands.cat.get_asset_graph import asset_viewer
|
16
|
+
from commands.cat.get_collection import collection_viewer
|
17
|
+
from commands.cat.get_tech_type_elements import tech_viewer
|
18
|
+
from commands.cat.get_tech_type_template import template_viewer
|
19
|
+
from commands.cat.list_assets import display_assets
|
20
|
+
from commands.cat.list_glossary import display_glossary_terms
|
21
|
+
from commands.cat.list_tech_types import display_tech_types
|
22
|
+
from commands.cat.list_projects import display_project_list
|
23
|
+
from commands.cat.list_todos import display_to_dos as list_todos
|
24
|
+
from commands.cat.get_project_structure import project_structure_viewer
|
25
|
+
from commands.cat.get_project_dependencies import project_dependency_viewer
|
26
|
+
from commands.cat.list_cert_types import display_certifications
|
27
|
+
from commands.cat.list_relationships import list_relationships
|
28
|
+
from commands.cat.list_user_ids import list_user_ids
|
29
|
+
from commands.cat.list_archives import display_archive_list
|
30
30
|
|
31
31
|
# from pyegeria import ServerOps
|
32
|
-
from
|
32
|
+
from commands.cli.ops_config import Config
|
33
33
|
|
34
34
|
|
35
35
|
# class Config(object):
|
@@ -0,0 +1,269 @@
|
|
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 Users - of individual relevance
|
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 commands.cli.ops_config import Config
|
16
|
+
|
17
|
+
from commands.my.monitor_open_todos import display_todos
|
18
|
+
from commands.my.monitor_my_todos import display_my_todos
|
19
|
+
from commands.my.list_my_profile import display_my_profile
|
20
|
+
from commands.my.list_my_roles import display_my_roles
|
21
|
+
from commands.my.todo_actions import (
|
22
|
+
create_todo,
|
23
|
+
delete_todo,
|
24
|
+
change_todo_status,
|
25
|
+
mark_todo_complete,
|
26
|
+
reassign_todo,
|
27
|
+
)
|
28
|
+
|
29
|
+
|
30
|
+
# class Config(object):
|
31
|
+
# def __init__(self, server: str = None, url: str = None, userid:str = None, password:str = None,
|
32
|
+
# timeout:int = 30, paging: bool = False):
|
33
|
+
# self.server = server
|
34
|
+
# self.url = url
|
35
|
+
# self.userid = userid
|
36
|
+
# self.password = password
|
37
|
+
# self.timeout = timeout
|
38
|
+
# self.paging = paging
|
39
|
+
#
|
40
|
+
#
|
41
|
+
# pass_config = click.make_pass_decorator(Config)
|
42
|
+
|
43
|
+
|
44
|
+
@tui()
|
45
|
+
# @tui('menu', 'menu', 'A textual command line interface')
|
46
|
+
@click.version_option("0.0.1", prog_name="egeria_ops")
|
47
|
+
@click.group()
|
48
|
+
@click.option(
|
49
|
+
"--server",
|
50
|
+
default="active-metadata-store",
|
51
|
+
envvar="EGERIA_METADATA_STORE",
|
52
|
+
help="Egeria metadata store to work with",
|
53
|
+
)
|
54
|
+
@click.option(
|
55
|
+
"--url",
|
56
|
+
default="https://localhost:9443",
|
57
|
+
envvar="EGERIA_PLATFORM_URL",
|
58
|
+
help="URL of Egeria metadata store platform to connect to",
|
59
|
+
)
|
60
|
+
@click.option(
|
61
|
+
"--integration-daemon",
|
62
|
+
default="integration-daemon",
|
63
|
+
envvar="EGERIA_INTEGRATION_DAEMON",
|
64
|
+
help="Egeria integration daemon to work with",
|
65
|
+
)
|
66
|
+
@click.option(
|
67
|
+
"--integration_daemon_url",
|
68
|
+
default="https://localhost:9443",
|
69
|
+
envvar="EGERIA_INTEGRATION_DAEMON_URL",
|
70
|
+
help="URL of Egeria integration daemon platform to connect to",
|
71
|
+
)
|
72
|
+
@click.option(
|
73
|
+
"--view_server",
|
74
|
+
default="view-server",
|
75
|
+
envvar="EGERIA_VIEW_SERVER",
|
76
|
+
help="Egeria view server to work with",
|
77
|
+
)
|
78
|
+
@click.option(
|
79
|
+
"--view_server_url",
|
80
|
+
default="https://localhost:9443",
|
81
|
+
envvar="EGERIA_VIEW_SERVER_URL",
|
82
|
+
help="URL of Egeria view server platform to connect to",
|
83
|
+
)
|
84
|
+
@click.option(
|
85
|
+
"--engine_host",
|
86
|
+
default="engine-host",
|
87
|
+
envvar="EGERIA_ENGINE_HOST",
|
88
|
+
help="Egeria engine host to work with",
|
89
|
+
)
|
90
|
+
@click.option(
|
91
|
+
"--engine_host_url",
|
92
|
+
default="https://localhost:9443",
|
93
|
+
envvar="EGERIA_ENGINE_HOST_URL",
|
94
|
+
help="URL of Egeria engine host platform to connect to",
|
95
|
+
)
|
96
|
+
@click.option(
|
97
|
+
"--admin_user",
|
98
|
+
default="garygeeke",
|
99
|
+
envvar="EGERIA_ADMIN_USER",
|
100
|
+
help="Egeria admin user",
|
101
|
+
)
|
102
|
+
@click.option(
|
103
|
+
"--admin_user_password",
|
104
|
+
default="secret",
|
105
|
+
envvar="EGERIA_ADMIN_PASSWORD",
|
106
|
+
help="Egeria admin password",
|
107
|
+
)
|
108
|
+
@click.option(
|
109
|
+
"--userid", default="erinoverview", envvar="EGERIA_USER", help="Egeria user"
|
110
|
+
)
|
111
|
+
@click.option(
|
112
|
+
"--password",
|
113
|
+
default="secret",
|
114
|
+
envvar="EGERIA_PASSWORD",
|
115
|
+
help="Egeria user password",
|
116
|
+
)
|
117
|
+
@click.option("--timeout", default=60, help="Number of seconds to wait")
|
118
|
+
@click.option("--verbose", is_flag=True, default=False, help="Enable verbose mode")
|
119
|
+
@click.option(
|
120
|
+
"--paging",
|
121
|
+
is_flag=True,
|
122
|
+
default=False,
|
123
|
+
help="Enable paging snapshots vs live updates",
|
124
|
+
)
|
125
|
+
@click.option(
|
126
|
+
"--jupyter",
|
127
|
+
is_flag=True,
|
128
|
+
default=False,
|
129
|
+
envvar="EGERIA_JUPYTER",
|
130
|
+
help="Enable for rendering in a Jupyter terminal",
|
131
|
+
)
|
132
|
+
@click.option(
|
133
|
+
"--width",
|
134
|
+
default=200,
|
135
|
+
envvar="EGERIA_WIDTH",
|
136
|
+
help="Screen width, in characters, to use",
|
137
|
+
)
|
138
|
+
@click.pass_context
|
139
|
+
def cli(
|
140
|
+
ctx,
|
141
|
+
server,
|
142
|
+
url,
|
143
|
+
view_server,
|
144
|
+
view_server_url,
|
145
|
+
integration_daemon,
|
146
|
+
integration_daemon_url,
|
147
|
+
engine_host,
|
148
|
+
engine_host_url,
|
149
|
+
admin_user,
|
150
|
+
admin_user_password,
|
151
|
+
userid,
|
152
|
+
password,
|
153
|
+
timeout,
|
154
|
+
paging,
|
155
|
+
verbose,
|
156
|
+
jupyter,
|
157
|
+
width,
|
158
|
+
):
|
159
|
+
"""An Egeria Command Line interface for Operations"""
|
160
|
+
ctx.obj = Config(
|
161
|
+
server,
|
162
|
+
url,
|
163
|
+
view_server,
|
164
|
+
view_server_url,
|
165
|
+
integration_daemon,
|
166
|
+
integration_daemon_url,
|
167
|
+
engine_host,
|
168
|
+
engine_host_url,
|
169
|
+
admin_user,
|
170
|
+
admin_user_password,
|
171
|
+
userid,
|
172
|
+
password,
|
173
|
+
timeout,
|
174
|
+
paging,
|
175
|
+
verbose,
|
176
|
+
jupyter,
|
177
|
+
width,
|
178
|
+
)
|
179
|
+
ctx.max_content_width = 200
|
180
|
+
ctx.ensure_object(Config)
|
181
|
+
if verbose:
|
182
|
+
click.echo(f"we are in verbose mode - server is {server}")
|
183
|
+
|
184
|
+
|
185
|
+
@cli.group("show")
|
186
|
+
@click.pass_context
|
187
|
+
def show(ctx):
|
188
|
+
"""Display an Egeria Object"""
|
189
|
+
pass
|
190
|
+
|
191
|
+
|
192
|
+
@show.command("my-profile")
|
193
|
+
@click.pass_context
|
194
|
+
def show_my_profile(ctx):
|
195
|
+
"""Display my profiles
|
196
|
+
|
197
|
+
Usage: show my-profile
|
198
|
+
|
199
|
+
"""
|
200
|
+
c = ctx.obj
|
201
|
+
display_my_profile(
|
202
|
+
c.view_server, c.view_server_url, c.userid, c.password, c.jupyter, c.width
|
203
|
+
)
|
204
|
+
|
205
|
+
|
206
|
+
@show.command("my-roles")
|
207
|
+
@click.pass_context
|
208
|
+
def show_my_roles(ctx):
|
209
|
+
"""Display my profiles
|
210
|
+
|
211
|
+
Usage: show my-profile
|
212
|
+
|
213
|
+
"""
|
214
|
+
c = ctx.obj
|
215
|
+
display_my_roles(
|
216
|
+
c.view_server, c.view_server_url, c.userid, c.password, c.jupyter, c.width
|
217
|
+
)
|
218
|
+
|
219
|
+
|
220
|
+
@show.command("my-to-dos")
|
221
|
+
@click.pass_context
|
222
|
+
def show_my_todos(ctx):
|
223
|
+
"""Show my To-Dos
|
224
|
+
|
225
|
+
Usage: show my-to-dos
|
226
|
+
|
227
|
+
"""
|
228
|
+
c = ctx.obj
|
229
|
+
display_my_todos(
|
230
|
+
c.view_server, c.view_server_url, c.userid, c.password, c.jupyter, c.width
|
231
|
+
)
|
232
|
+
|
233
|
+
|
234
|
+
@show.command("open-to-dos")
|
235
|
+
@click.pass_context
|
236
|
+
def show_open_todos(ctx):
|
237
|
+
"""Display a live status view of Egeria servers for the specified Egeria platform
|
238
|
+
|
239
|
+
Usage: show tech-details <tech-name>
|
240
|
+
|
241
|
+
tech-name is a valid technology name (see 'show tech-types')
|
242
|
+
"""
|
243
|
+
c = ctx.obj
|
244
|
+
display_todos(
|
245
|
+
c.view_server, c.view_server_url, c.userid, c.password, c.jupyter, c.width
|
246
|
+
)
|
247
|
+
|
248
|
+
|
249
|
+
#
|
250
|
+
# Tell
|
251
|
+
#
|
252
|
+
|
253
|
+
|
254
|
+
@cli.group("tell")
|
255
|
+
@click.pass_context
|
256
|
+
def tell(ctx):
|
257
|
+
"""Perform actions an Egeria Objects"""
|
258
|
+
pass
|
259
|
+
|
260
|
+
|
261
|
+
tell.add_command(create_todo)
|
262
|
+
tell.add_command(delete_todo)
|
263
|
+
tell.add_command(change_todo_status)
|
264
|
+
tell.add_command(mark_todo_complete)
|
265
|
+
tell.add_command(reassign_todo)
|
266
|
+
|
267
|
+
|
268
|
+
if __name__ == "__main__":
|
269
|
+
cli()
|
@@ -13,36 +13,34 @@ import click
|
|
13
13
|
from trogon import tui
|
14
14
|
|
15
15
|
# from pyegeria import ServerOps
|
16
|
-
from
|
17
|
-
from
|
18
|
-
|
19
|
-
|
16
|
+
from commands.cli.ops_config import Config
|
17
|
+
from commands.ops.engine_actions import (
|
18
|
+
start_server,
|
19
|
+
stop_server,
|
20
|
+
refresh_gov_eng_config,
|
20
21
|
)
|
21
|
-
from
|
22
|
+
from commands.ops.integration_daemon_actions import (
|
22
23
|
add_catalog_target,
|
23
24
|
remove_catalog_target,
|
24
25
|
update_catalog_target,
|
25
|
-
stop_server,
|
26
|
-
start_server,
|
27
26
|
)
|
28
|
-
from
|
29
|
-
from
|
30
|
-
from
|
31
|
-
from
|
32
|
-
from
|
33
|
-
from
|
27
|
+
from commands.ops.list_catalog_targets import display_catalog_targets
|
28
|
+
from commands.ops.load_archive import load_archive
|
29
|
+
from commands.ops.monitor_engine_activity import display_engine_activity
|
30
|
+
from commands.ops.monitor_engine_activity_c import display_engine_activity_c
|
31
|
+
from commands.ops.monitor_gov_eng_status import display_gov_eng_status
|
32
|
+
from commands.ops.monitor_integ_daemon_status import (
|
34
33
|
display_integration_daemon_status,
|
35
34
|
)
|
36
|
-
from
|
35
|
+
from commands.ops.monitor_platform_status import (
|
37
36
|
display_status as p_display_status,
|
38
37
|
)
|
39
|
-
from
|
40
|
-
from
|
38
|
+
from commands.ops.monitor_server_list import display_status as display_list
|
39
|
+
from commands.ops.monitor_server_status import (
|
41
40
|
display_status as s_display_status,
|
42
41
|
)
|
43
|
-
from
|
44
|
-
from
|
45
|
-
|
42
|
+
from commands.ops.refresh_integration_daemon import refresh_connector
|
43
|
+
from commands.ops.restart_integration_daemon import restart_connector
|
46
44
|
|
47
45
|
# class Config(object):
|
48
46
|
# def __init__(self, server: str = None, url: str = None, userid:str = None, password:str = None,
|
@@ -379,6 +377,10 @@ def tell(ctx):
|
|
379
377
|
pass
|
380
378
|
|
381
379
|
|
380
|
+
tell.add_command(start_server)
|
381
|
+
tell.add_command(stop_server)
|
382
|
+
|
383
|
+
|
382
384
|
@tell.group("integration-daemon")
|
383
385
|
@click.pass_context
|
384
386
|
def integration_daemon(ctx):
|
@@ -419,8 +421,6 @@ def restart_connectors(ctx, connector):
|
|
419
421
|
integration_daemon.add_command(add_catalog_target)
|
420
422
|
integration_daemon.add_command(remove_catalog_target)
|
421
423
|
integration_daemon.add_command(update_catalog_target)
|
422
|
-
integration_daemon.add_command(stop_server)
|
423
|
-
integration_daemon.add_command(start_server)
|
424
424
|
|
425
425
|
|
426
426
|
@tell.group("engine-host")
|
@@ -430,8 +430,7 @@ def engine_host(ctx):
|
|
430
430
|
pass
|
431
431
|
|
432
432
|
|
433
|
-
engine_host.add_command(
|
434
|
-
engine_host.add_command(stop_engine_host)
|
433
|
+
engine_host.add_command(refresh_gov_eng_config)
|
435
434
|
|
436
435
|
|
437
436
|
@tell.group("repository")
|
@@ -12,19 +12,19 @@ This is an emerging capability based on the **click** package. Feedback welcome!
|
|
12
12
|
import click
|
13
13
|
from trogon import tui
|
14
14
|
|
15
|
-
from
|
16
|
-
from
|
17
|
-
from
|
18
|
-
from
|
19
|
-
from
|
20
|
-
from
|
21
|
-
from
|
22
|
-
from
|
23
|
-
from
|
24
|
-
from
|
25
|
-
from
|
26
|
-
from
|
27
|
-
from
|
15
|
+
from commands.cat.list_tech_types import display_tech_types
|
16
|
+
from commands.cli.ops_config import Config
|
17
|
+
from commands.tech.get_guid_info import display_guid
|
18
|
+
from commands.tech.get_tech_details import tech_details_viewer
|
19
|
+
from commands.tech.list_asset_types import display_asset_types
|
20
|
+
from commands.tech.list_registered_services import display_registered_svcs
|
21
|
+
from commands.tech.list_relationship_types import display_relationship_types
|
22
|
+
from commands.tech.list_tech_templates import display_templates_spec
|
23
|
+
from commands.tech.list_valid_metadata_values import display_metadata_values
|
24
|
+
from commands.cat.get_tech_type_template import template_viewer
|
25
|
+
from commands.tech.list_elements import list_elements
|
26
|
+
from commands.tech.get_element_info import display_elements
|
27
|
+
from commands.tech.list_related_specification import (
|
28
28
|
display_related_specification,
|
29
29
|
)
|
30
30
|
|
@@ -0,0 +1,131 @@
|
|
1
|
+
"""
|
2
|
+
SPDX-License-Identifier: Apache-2.0
|
3
|
+
Copyright Contributors to the ODPi Egeria project.
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
Execute engine actions.
|
8
|
+
|
9
|
+
"""
|
10
|
+
import os
|
11
|
+
|
12
|
+
import click
|
13
|
+
|
14
|
+
from commands.ops.monitor_engine_activity import EGERIA_ENGINE_HOST
|
15
|
+
|
16
|
+
# from ops_config import Config, pass_config
|
17
|
+
from pyegeria import EgeriaTech
|
18
|
+
from pyegeria._exceptions import (
|
19
|
+
InvalidParameterException,
|
20
|
+
PropertyServerException,
|
21
|
+
print_exception_response,
|
22
|
+
)
|
23
|
+
|
24
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
25
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
26
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
27
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
28
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
29
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
30
|
+
)
|
31
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
32
|
+
EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
|
33
|
+
"EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
|
34
|
+
)
|
35
|
+
|
36
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "garygeeke")
|
37
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
38
|
+
|
39
|
+
|
40
|
+
@click.command("stop")
|
41
|
+
@click.option("--server", help="OMAG Server to stop")
|
42
|
+
@click.option(
|
43
|
+
"--view-server", default=EGERIA_VIEW_SERVER, help="View Server to communicate with"
|
44
|
+
)
|
45
|
+
@click.option(
|
46
|
+
"--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
|
47
|
+
)
|
48
|
+
@click.option("--userid", default="garygeeke", envvar="EGERIA_USER", help="Egeria user")
|
49
|
+
@click.option(
|
50
|
+
"--password",
|
51
|
+
default="secret",
|
52
|
+
envvar="EGERIA_PASSWORD",
|
53
|
+
help="Egeria user password",
|
54
|
+
)
|
55
|
+
def stop_server(view_server, server, url, userid, password):
|
56
|
+
"""Stop an engine-host daemon"""
|
57
|
+
p_client = EgeriaTech(view_server, url, userid, password)
|
58
|
+
token = p_client.create_egeria_bearer_token()
|
59
|
+
try:
|
60
|
+
server_guid = p_client.get_guid_for_name(server)
|
61
|
+
|
62
|
+
p_client.shutdown_server(server_guid)
|
63
|
+
click.echo(f"Stopped server {server}")
|
64
|
+
except (InvalidParameterException, PropertyServerException) as e:
|
65
|
+
print_exception_response(e)
|
66
|
+
finally:
|
67
|
+
p_client.close_session()
|
68
|
+
|
69
|
+
|
70
|
+
@click.command("start")
|
71
|
+
@click.option("--server", help="OMAG Server to start")
|
72
|
+
@click.option(
|
73
|
+
"--view-server", default=EGERIA_VIEW_SERVER, help="View Server to communicate with"
|
74
|
+
)
|
75
|
+
@click.option(
|
76
|
+
"--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
|
77
|
+
)
|
78
|
+
@click.option("--userid", default="garygeeke", envvar="EGERIA_USER", help="Egeria user")
|
79
|
+
@click.option(
|
80
|
+
"--password",
|
81
|
+
default="secret",
|
82
|
+
envvar="EGERIA_PASSWORD",
|
83
|
+
help="Egeria user password",
|
84
|
+
)
|
85
|
+
def start_server(view_server, server, url, userid, password):
|
86
|
+
"""Start or restart an engine-host from its known configuration"""
|
87
|
+
p_client = EgeriaTech(view_server, url, userid, password)
|
88
|
+
token = p_client.create_egeria_bearer_token()
|
89
|
+
try:
|
90
|
+
server_guid = p_client.get_guid_for_name(server)
|
91
|
+
p_client.activate_server_with_stored_config(server_guid)
|
92
|
+
|
93
|
+
click.echo(f"Started server {server}")
|
94
|
+
|
95
|
+
except (InvalidParameterException, PropertyServerException) as e:
|
96
|
+
print_exception_response(e)
|
97
|
+
finally:
|
98
|
+
p_client.close_session()
|
99
|
+
|
100
|
+
|
101
|
+
@click.command("refresh-gov-eng-config")
|
102
|
+
@click.option(
|
103
|
+
"--engine-host", default=EGERIA_ENGINE_HOST, help="Engine Host to refresh"
|
104
|
+
)
|
105
|
+
@click.option(
|
106
|
+
"--view-server", default=EGERIA_VIEW_SERVER, help="View Server to communicate with"
|
107
|
+
)
|
108
|
+
@click.option(
|
109
|
+
"--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
|
110
|
+
)
|
111
|
+
@click.option("--userid", default="garygeeke", envvar="EGERIA_USER", help="Egeria user")
|
112
|
+
@click.option(
|
113
|
+
"--password",
|
114
|
+
default="secret",
|
115
|
+
envvar="EGERIA_PASSWORD",
|
116
|
+
help="Egeria user password",
|
117
|
+
)
|
118
|
+
def refresh_gov_eng_config(engine_host, view_server, url, userid, password):
|
119
|
+
"""Start or restart an engine-host from its known configuration"""
|
120
|
+
p_client = EgeriaTech(view_server, url, userid, password)
|
121
|
+
token = p_client.create_egeria_bearer_token()
|
122
|
+
try:
|
123
|
+
engine_host_guid = p_client.get_guid_for_name(engine_host)
|
124
|
+
p_client.refresh_gov_eng_config(engine_host_guid)
|
125
|
+
|
126
|
+
click.echo(f"Refreshed server {engine_host}")
|
127
|
+
|
128
|
+
except (InvalidParameterException, PropertyServerException) as e:
|
129
|
+
print_exception_response(e)
|
130
|
+
finally:
|
131
|
+
p_client.close_session()
|