pyegeria 1.5.1.1.60__py3-none-any.whl → 5.2__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/__init__.py +2 -0
- pyegeria/_client.py +7 -2
- pyegeria/asset_catalog_omvs.py +34 -0
- pyegeria/classification_manager_omvs.py +2 -3
- pyegeria/collection_manager_omvs.py +92 -45
- pyegeria/commands/README.md +2 -1
- pyegeria/commands/cat/__init__.py +1 -5
- pyegeria/commands/cat/exp_list_glossaries.py +156 -0
- pyegeria/commands/cat/get_collection.py +23 -14
- pyegeria/commands/cat/get_tech_type_elements.py +1 -1
- pyegeria/commands/cat/glossary_actions.py +28 -8
- pyegeria/commands/cat/list_assets.py +8 -17
- pyegeria/commands/cat/list_cert_types.py +1 -1
- pyegeria/commands/cat/list_collections.py +162 -0
- pyegeria/commands/cat/list_deployed_catalogs.py +6 -3
- pyegeria/commands/cat/list_deployed_database_schemas.py +8 -13
- pyegeria/commands/cat/list_deployed_databases.py +3 -3
- pyegeria/commands/cat/list_tech_type_elements.py +190 -0
- pyegeria/commands/cat/list_tech_types.py +36 -24
- pyegeria/commands/cat/list_terms.py +7 -2
- pyegeria/commands/cli/egeria.py +120 -129
- pyegeria/commands/cli/egeria_cat.py +63 -52
- pyegeria/commands/cli/egeria_login_tui.py +313 -0
- pyegeria/commands/cli/egeria_my.py +25 -33
- pyegeria/commands/cli/egeria_ops.py +38 -40
- pyegeria/commands/cli/egeria_tech.py +55 -41
- pyegeria/commands/cli/ops_config.py +3 -1
- pyegeria/commands/cli/txt_custom_v2.tcss +19 -0
- pyegeria/commands/doc/README.md +145 -0
- pyegeria/commands/doc/Visual Command Reference/README.md +511 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/asset-graph 2024-11-20 at 15.56.42.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/assets-in-domain 2024-11-20 at 15.49.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/elements-of-type 2024-11-20 at 16.01.35.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/tech-type-elements 2024-11-20 at 16.05.05.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs 2024-12-17 at 15.43.27@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs-2024-11-20 at 16.17.43@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-11-25 at 20.14.50@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-12-17 at 15.48.38@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-11-25 at 20.21.25@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-12-17 at 15.52.16@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed_databases 2024-12-16 at 16.40.31@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-glossaries 2024-11-25 at 20.30.02.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-terms 2024-11-25 at 20.32.11.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/asset-types 2024-11-25 at 20.34.19@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/certification-types 2024-11-25 at 20.37.07.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/collection-graph 2024-12-12 at 11.33.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-collections 2024-12-10 at 14.25.51@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-todos 2024-12-12 at 11.46.30@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-user-ids 2024-12-12 at 11.51.09@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/tech-types 2024-12-12 at 11.37.20@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_dependencies 2024-12-14 at 16.24.39@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_structure 2024-12-14 at 16.21.35@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/projects 2024-12-14 at 16.18.10@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/hey_egeria tui 2024-12-16 at 16.58.22@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_profile 2024-12-14 at 16.29.27@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_roles 2024-12-14 at 16.32.10@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_todos 2024-12-15 at 16.24.13@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/open_todos 2024-12-14 at 16.36.12@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/list_engine_activity compressed 2024-12-15 at 16.48.48@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity 2024-12-15 at 16.32.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity compressed 2024-12-15 at 16.38.29@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_status 2024-12-15 at 16.51.26.jpeg +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_daemon_status 2024-12-15 at 16.57.12@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_targets 2024-12-15 at 17.02.19@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/platforms/monitor_platform_status 2024-12-15 at 19.53.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status 2024-12-15 at 19.59.39@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status full 2024-12-15 at 20.01.57@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_startup_servers 2024-12-15 at 19.56.07@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_anchored_elements 2024-12-15 at 21.25.41@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_elements_of_om_type 2024-12-16 at 14.39.59@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/info_for_guid 2024-12-16 at 11.35.29@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type 2024-12-16 at 14.24.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type extended 2024-12-16 at 14.28.46@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_of_om_type_by_classification 2024-12-16 at 14.35.26@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/related_elements 2024-12-16 at 14.55.01@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/show_related_specifications 2024-12-16 at 15.04.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/asset_types 2024-12-16 at 15.10.16@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/detailed_governance_action_processes 2024-12-16 at 15.16.26@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/governance_action_processes 2024-12-16 at 15.13.01@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/registered_services 2024-12-16 at 16.44.54@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-16 at 16.20.34@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-19 at 10.51.54@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/valid_metadata_values 2024-12-16 at 15.31.56@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_tech_type_template_specs 2024-12-16 at 16.03.22@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_technology_types 2024-12-16 at 15.39.20@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_details 2024-12-16 at 15.37.21@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_templates 2024-12-16 at 16.11.48@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/{hey_egeria: overview.md → README.md } +9 -1
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/CleanShot 2024-11-18 at 21.32.03@2x.png +0 -0
- pyegeria/commands/my/monitor_my_todos.py +17 -5
- pyegeria/commands/my/monitor_open_todos.py +1 -1
- pyegeria/commands/my/todo_actions.py +7 -14
- pyegeria/commands/ops/monitor_asset_events.py +27 -22
- pyegeria/commands/ops/monitor_engine_activity_c.py +1 -1
- pyegeria/commands/ops/monitor_gov_eng_status.py +31 -4
- pyegeria/commands/ops/monitor_integ_daemon_status.py +17 -14
- pyegeria/commands/ops/monitor_platform_status.py +15 -3
- pyegeria/commands/ops/monitor_server_status.py +1 -1
- pyegeria/commands/ops/orig_monitor_server_status.py +36 -21
- pyegeria/commands/ops/refresh_integration_daemon.py +1 -1
- pyegeria/commands/ops/restart_integration_daemon.py +1 -1
- pyegeria/commands/ops/x_engine_actions.py +2 -59
- pyegeria/commands/tech/get_tech_details.py +79 -42
- pyegeria/commands/tech/get_tech_type_template.py +69 -53
- pyegeria/commands/tech/{list_element_graph.py → list_anchored_elements.py} +20 -17
- pyegeria/commands/tech/list_elements_x.py +7 -4
- pyegeria/commands/tech/list_registered_services.py +1 -1
- pyegeria/commands/tech/list_relationship_types.py +19 -21
- pyegeria/commands/tech/list_relationships.py +7 -3
- pyegeria/commands/tech/table_tech_templates.py +3 -1
- pyegeria/core_omag_server_config.py +36 -0
- pyegeria/create_tech_guid_lists.py +2 -2
- pyegeria/egeria_client.py +2 -0
- pyegeria/egeria_tech_client.py +5 -0
- pyegeria/glossary_manager_omvs.py +101 -7
- pyegeria/metadata_explorer_omvs.py +2371 -0
- pyegeria/server_operations.py +4 -4
- pyegeria/template_manager_omvs.py +1 -3
- pyegeria/valid_metadata_omvs.py +1 -1
- {pyegeria-1.5.1.1.60.dist-info → pyegeria-5.2.dist-info}/METADATA +7 -9
- pyegeria-5.2.dist-info/RECORD +232 -0
- {pyegeria-1.5.1.1.60.dist-info → pyegeria-5.2.dist-info}/entry_points.txt +4 -1
- pyegeria/commands/doc/command-overview.md +0 -99
- pyegeria-1.5.1.1.60.dist-info/RECORD +0 -167
- {pyegeria-1.5.1.1.60.dist-info → pyegeria-5.2.dist-info}/LICENSE +0 -0
- {pyegeria-1.5.1.1.60.dist-info → pyegeria-5.2.dist-info}/WHEEL +0 -0
@@ -9,6 +9,8 @@ A command line interface for Egeria Users - of individual relevance
|
|
9
9
|
This is an emerging capability based on the **click** package. Feedback welcome!
|
10
10
|
|
11
11
|
"""
|
12
|
+
import os
|
13
|
+
|
12
14
|
import click
|
13
15
|
from trogon import tui
|
14
16
|
|
@@ -47,87 +49,81 @@ from pyegeria.commands.my.todo_actions import (
|
|
47
49
|
@click.group()
|
48
50
|
@click.option(
|
49
51
|
"--server",
|
50
|
-
default="active-metadata-store",
|
51
|
-
envvar="EGERIA_METADATA_STORE",
|
52
|
+
default=os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store"),
|
52
53
|
help="Egeria metadata store to work with",
|
53
54
|
)
|
54
55
|
@click.option(
|
55
56
|
"--url",
|
56
|
-
default="https://localhost:9443",
|
57
|
-
envvar="EGERIA_PLATFORM_URL",
|
57
|
+
default=os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443"),
|
58
58
|
help="URL of Egeria metadata store platform to connect to",
|
59
59
|
)
|
60
60
|
@click.option(
|
61
|
-
"--
|
62
|
-
default="integration-daemon",
|
63
|
-
envvar="EGERIA_INTEGRATION_DAEMON",
|
61
|
+
"--integration_daemon",
|
62
|
+
default=os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon"),
|
64
63
|
help="Egeria integration daemon to work with",
|
65
64
|
)
|
66
65
|
@click.option(
|
67
66
|
"--integration_daemon_url",
|
68
|
-
default="https://localhost:9443",
|
69
|
-
envvar="EGERIA_INTEGRATION_DAEMON_URL",
|
67
|
+
default=os.environ.get("EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"),
|
70
68
|
help="URL of Egeria integration daemon platform to connect to",
|
71
69
|
)
|
72
70
|
@click.option(
|
73
71
|
"--view_server",
|
74
|
-
default="view-server",
|
75
|
-
envvar="EGERIA_VIEW_SERVER",
|
72
|
+
default=os.environ.get("EGERIA_VIEW_SERVER", "view-server"),
|
76
73
|
help="Egeria view server to work with",
|
77
74
|
)
|
78
75
|
@click.option(
|
79
76
|
"--view_server_url",
|
80
|
-
default="https://localhost:9443",
|
81
|
-
envvar="EGERIA_VIEW_SERVER_URL",
|
77
|
+
default=os.environ.get("EGERIA_VIEW_SERVER_URL", "https://localhost:9443"),
|
82
78
|
help="URL of Egeria view server platform to connect to",
|
83
79
|
)
|
84
80
|
@click.option(
|
85
81
|
"--engine_host",
|
86
|
-
default="engine-host",
|
87
|
-
envvar="EGERIA_ENGINE_HOST",
|
82
|
+
default=os.environ.get("EGERIA_ENGINE_HOST", "engine-host"),
|
88
83
|
help="Egeria engine host to work with",
|
89
84
|
)
|
90
85
|
@click.option(
|
91
86
|
"--engine_host_url",
|
92
|
-
default="https://localhost:9443",
|
93
|
-
envvar="EGERIA_ENGINE_HOST_URL",
|
87
|
+
default=os.environ.get("EGERIA_ENGINE_HOST_URL", "https://localhost:9443"),
|
94
88
|
help="URL of Egeria engine host platform to connect to",
|
95
89
|
)
|
96
90
|
@click.option(
|
97
91
|
"--admin_user",
|
98
|
-
default="garygeeke",
|
99
|
-
envvar="EGERIA_ADMIN_USER",
|
92
|
+
default=os.environ.get("EGERIA_ADMIN_USER", "garygeeke"),
|
100
93
|
help="Egeria admin user",
|
101
94
|
)
|
102
95
|
@click.option(
|
103
96
|
"--admin_user_password",
|
104
|
-
default="secret",
|
105
|
-
envvar="EGERIA_ADMIN_PASSWORD",
|
97
|
+
default=os.environ.get("EGERIA_ADMIN_PASSWORD", "secret"),
|
106
98
|
help="Egeria admin password",
|
107
99
|
)
|
108
100
|
@click.option(
|
109
|
-
"--userid",
|
101
|
+
"--userid",
|
102
|
+
default=os.environ.get("EGERIA_USER", "peterprofile"),
|
103
|
+
help="Egeria user",
|
110
104
|
)
|
111
105
|
@click.option(
|
112
106
|
"--password",
|
113
|
-
default="secret",
|
114
|
-
envvar="EGERIA_PASSWORD",
|
107
|
+
default=os.environ.get("EGERIA_USER_PASSWORD", "secret"),
|
115
108
|
help="Egeria user password",
|
116
109
|
)
|
117
110
|
@click.option("--timeout", default=60, help="Number of seconds to wait")
|
118
111
|
@click.option(
|
119
112
|
"--jupyter",
|
120
113
|
is_flag=True,
|
121
|
-
default=False,
|
122
|
-
envvar="EGERIA_JUPYTER",
|
114
|
+
default=os.environ.get("EGERIA_JUPYTER", "False"),
|
123
115
|
help="Enable for rendering in a Jupyter terminal",
|
124
116
|
)
|
125
117
|
@click.option(
|
126
118
|
"--width",
|
127
|
-
default=200,
|
128
|
-
envvar="EGERIA_WIDTH",
|
119
|
+
default=os.environ.get("EGERIA_WIDTH", "200"),
|
129
120
|
help="Screen width, in characters, to use",
|
130
121
|
)
|
122
|
+
@click.option(
|
123
|
+
"--home_glossary_guid",
|
124
|
+
default=os.environ.get("EGERIA_HOME_GLOSSARY_GUID", None),
|
125
|
+
help="Glossary guid to use as the home glossary",
|
126
|
+
)
|
131
127
|
@click.pass_context
|
132
128
|
def cli(
|
133
129
|
ctx,
|
@@ -193,11 +189,7 @@ def show_my_profile(ctx):
|
|
193
189
|
@show.command("my-roles")
|
194
190
|
@click.pass_context
|
195
191
|
def show_my_roles(ctx):
|
196
|
-
"""Display my
|
197
|
-
|
198
|
-
Usage: show my-profile
|
199
|
-
|
200
|
-
"""
|
192
|
+
"""Display my roles"""
|
201
193
|
c = ctx.obj
|
202
194
|
display_my_roles(
|
203
195
|
c.view_server, c.view_server_url, c.userid, c.password, c.jupyter, c.width
|
@@ -9,6 +9,8 @@ A command line interface for Egeria operations.
|
|
9
9
|
This is an emerging capability based on the **click** package. Feedback welcome!
|
10
10
|
|
11
11
|
"""
|
12
|
+
import os
|
13
|
+
|
12
14
|
import click
|
13
15
|
from trogon import tui
|
14
16
|
|
@@ -63,85 +65,81 @@ from pyegeria.commands.ops.list_archives import display_archive_list
|
|
63
65
|
@click.group()
|
64
66
|
@click.option(
|
65
67
|
"--server",
|
66
|
-
default="active-metadata-store",
|
67
|
-
envvar="EGERIA_METADATA_STORE",
|
68
|
+
default=os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store"),
|
68
69
|
help="Egeria metadata store to work with",
|
69
70
|
)
|
70
71
|
@click.option(
|
71
72
|
"--url",
|
72
|
-
default="https://localhost:9443",
|
73
|
-
envvar="EGERIA_PLATFORM_URL",
|
73
|
+
default=os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443"),
|
74
74
|
help="URL of Egeria metadata store platform to connect to",
|
75
75
|
)
|
76
76
|
@click.option(
|
77
|
-
"--
|
78
|
-
default="integration-daemon",
|
79
|
-
envvar="EGERIA_INTEGRATION_DAEMON",
|
77
|
+
"--integration_daemon",
|
78
|
+
default=os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon"),
|
80
79
|
help="Egeria integration daemon to work with",
|
81
80
|
)
|
82
81
|
@click.option(
|
83
82
|
"--integration_daemon_url",
|
84
|
-
default="https://localhost:9443",
|
85
|
-
envvar="EGERIA_INTEGRATION_DAEMON_URL",
|
83
|
+
default=os.environ.get("EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"),
|
86
84
|
help="URL of Egeria integration daemon platform to connect to",
|
87
85
|
)
|
88
86
|
@click.option(
|
89
87
|
"--view_server",
|
90
|
-
default="view-server",
|
91
|
-
envvar="EGERIA_VIEW_SERVER",
|
88
|
+
default=os.environ.get("EGERIA_VIEW_SERVER", "view-server"),
|
92
89
|
help="Egeria view server to work with",
|
93
90
|
)
|
94
91
|
@click.option(
|
95
92
|
"--view_server_url",
|
96
|
-
default="https://localhost:9443",
|
97
|
-
envvar="EGERIA_VIEW_SERVER_URL",
|
93
|
+
default=os.environ.get("EGERIA_VIEW_SERVER_URL", "https://localhost:9443"),
|
98
94
|
help="URL of Egeria view server platform to connect to",
|
99
95
|
)
|
100
96
|
@click.option(
|
101
97
|
"--engine_host",
|
102
|
-
default="engine-host",
|
103
|
-
envvar="EGERIA_ENGINE_HOST",
|
98
|
+
default=os.environ.get("EGERIA_ENGINE_HOST", "engine-host"),
|
104
99
|
help="Egeria engine host to work with",
|
105
100
|
)
|
106
101
|
@click.option(
|
107
102
|
"--engine_host_url",
|
108
|
-
default="https://localhost:9443",
|
109
|
-
envvar="EGERIA_ENGINE_HOST_URL",
|
103
|
+
default=os.environ.get("EGERIA_ENGINE_HOST_URL", "https://localhost:9443"),
|
110
104
|
help="URL of Egeria engine host platform to connect to",
|
111
105
|
)
|
112
106
|
@click.option(
|
113
107
|
"--admin_user",
|
114
|
-
default="garygeeke",
|
115
|
-
envvar="EGERIA_ADMIN_USER",
|
108
|
+
default=os.environ.get("EGERIA_ADMIN_USER", "garygeeke"),
|
116
109
|
help="Egeria admin user",
|
117
110
|
)
|
118
111
|
@click.option(
|
119
112
|
"--admin_user_password",
|
120
|
-
default="secret",
|
121
|
-
envvar="EGERIA_ADMIN_PASSWORD",
|
113
|
+
default=os.environ.get("EGERIA_ADMIN_PASSWORD", "secret"),
|
122
114
|
help="Egeria admin password",
|
123
115
|
)
|
124
|
-
@click.option(
|
116
|
+
@click.option(
|
117
|
+
"--userid",
|
118
|
+
default=os.environ.get("EGERIA_USER", "peterprofile"),
|
119
|
+
help="Egeria user",
|
120
|
+
)
|
125
121
|
@click.option(
|
126
122
|
"--password",
|
127
|
-
default="secret",
|
128
|
-
envvar="EGERIA_USER_PASSWORD",
|
123
|
+
default=os.environ.get("EGERIA_USER_PASSWORD", "secret"),
|
129
124
|
help="Egeria user password",
|
130
125
|
)
|
131
126
|
@click.option("--timeout", default=60, help="Number of seconds to wait")
|
132
127
|
@click.option(
|
133
128
|
"--jupyter",
|
134
129
|
is_flag=True,
|
135
|
-
default=False,
|
136
|
-
envvar="EGERIA_JUPYTER",
|
130
|
+
default=os.environ.get("EGERIA_JUPYTER", "False"),
|
137
131
|
help="Enable for rendering in a Jupyter terminal",
|
138
132
|
)
|
139
133
|
@click.option(
|
140
134
|
"--width",
|
141
|
-
default=200,
|
142
|
-
envvar="EGERIA_WIDTH",
|
135
|
+
default=os.environ.get("EGERIA_WIDTH", "200"),
|
143
136
|
help="Screen width, in characters, to use",
|
144
137
|
)
|
138
|
+
@click.option(
|
139
|
+
"--home_glossary_guid",
|
140
|
+
default=os.environ.get("EGERIA_HOME_GLOSSARY_GUID", None),
|
141
|
+
help="Glossary guid to use as the home glossary",
|
142
|
+
)
|
145
143
|
@click.pass_context
|
146
144
|
def cli(
|
147
145
|
ctx,
|
@@ -254,7 +252,7 @@ def show_startup_status(ctx):
|
|
254
252
|
@show_server.command("archives")
|
255
253
|
@click.pass_context
|
256
254
|
def list_archives(ctx):
|
257
|
-
"""Display a
|
255
|
+
"""Display a list of archives"""
|
258
256
|
c = ctx.obj
|
259
257
|
display_archive_list(
|
260
258
|
c.view_server,
|
@@ -294,14 +292,14 @@ def gov_eng_status(ctx, engine_list, engine_host, list):
|
|
294
292
|
c = ctx.obj
|
295
293
|
display_gov_eng_status(
|
296
294
|
[engine_list],
|
297
|
-
engine_host,
|
298
|
-
c.view_server,
|
299
|
-
c.view_server_url,
|
300
|
-
c.userid,
|
301
|
-
c.password,
|
302
|
-
list,
|
303
|
-
c.jupyter,
|
304
|
-
c.width,
|
295
|
+
engine_host=engine_host,
|
296
|
+
view_server=c.view_server,
|
297
|
+
url=c.view_server_url,
|
298
|
+
username=c.userid,
|
299
|
+
user_pass=c.password,
|
300
|
+
paging=list,
|
301
|
+
jupyter=c.jupyter,
|
302
|
+
width=c.width,
|
305
303
|
)
|
306
304
|
|
307
305
|
|
@@ -373,7 +371,7 @@ def integrations(ctx):
|
|
373
371
|
)
|
374
372
|
@click.pass_context
|
375
373
|
def integrations_status(ctx, connector_list, list):
|
376
|
-
"""Display
|
374
|
+
"""Display integration_daemon status information"""
|
377
375
|
c = ctx.obj
|
378
376
|
display_integration_daemon_status(
|
379
377
|
[connector_list],
|
@@ -389,7 +387,7 @@ def integrations_status(ctx, connector_list, list):
|
|
389
387
|
)
|
390
388
|
|
391
389
|
|
392
|
-
@integrations.command("targets")
|
390
|
+
@integrations.command("--targets")
|
393
391
|
@click.pass_context
|
394
392
|
@click.argument("connector", nargs=1)
|
395
393
|
def integrations_status(ctx, connector):
|
@@ -432,7 +430,7 @@ servers.add_command(stop_server)
|
|
432
430
|
@tell.group("integration-daemon")
|
433
431
|
@click.pass_context
|
434
432
|
def integration_daemon(ctx):
|
435
|
-
"""Group of commands to an
|
433
|
+
"""Group of commands to an integration_daemon"""
|
436
434
|
pass
|
437
435
|
|
438
436
|
|
@@ -9,6 +9,9 @@ A command line interface for Egeria Data techs.
|
|
9
9
|
This is an emerging capability based on the **click** package. Feedback welcome!
|
10
10
|
|
11
11
|
"""
|
12
|
+
import os
|
13
|
+
import sys
|
14
|
+
|
12
15
|
import click
|
13
16
|
from trogon import tui
|
14
17
|
|
@@ -23,7 +26,7 @@ from pyegeria.commands.tech.list_relationship_types import display_relationship_
|
|
23
26
|
from pyegeria.commands.tech.list_tech_templates import display_templates_spec
|
24
27
|
from pyegeria.commands.tech.list_valid_metadata_values import display_metadata_values
|
25
28
|
from pyegeria.commands.tech.get_tech_type_template import template_viewer
|
26
|
-
from pyegeria.commands.tech.
|
29
|
+
from pyegeria.commands.tech.list_anchored_elements import display_anchored_elements
|
27
30
|
from pyegeria.commands.tech.list_elements import list_elements
|
28
31
|
|
29
32
|
from pyegeria.commands.tech.get_element_info import display_elements
|
@@ -61,87 +64,81 @@ from pyegeria.commands.tech.get_tech_type_template import template_viewer
|
|
61
64
|
@click.group()
|
62
65
|
@click.option(
|
63
66
|
"--server",
|
64
|
-
default="active-metadata-store",
|
65
|
-
envvar="EGERIA_METADATA_STORE",
|
67
|
+
default=os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store"),
|
66
68
|
help="Egeria metadata store to work with",
|
67
69
|
)
|
68
70
|
@click.option(
|
69
71
|
"--url",
|
70
|
-
default="https://localhost:9443",
|
71
|
-
envvar="EGERIA_PLATFORM_URL",
|
72
|
+
default=os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443"),
|
72
73
|
help="URL of Egeria metadata store platform to connect to",
|
73
74
|
)
|
74
75
|
@click.option(
|
75
|
-
"--
|
76
|
-
default="integration-daemon",
|
77
|
-
envvar="EGERIA_INTEGRATION_DAEMON",
|
76
|
+
"--integration_daemon",
|
77
|
+
default=os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon"),
|
78
78
|
help="Egeria integration daemon to work with",
|
79
79
|
)
|
80
80
|
@click.option(
|
81
81
|
"--integration_daemon_url",
|
82
|
-
default="https://localhost:9443",
|
83
|
-
envvar="EGERIA_INTEGRATION_DAEMON_URL",
|
82
|
+
default=os.environ.get("EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"),
|
84
83
|
help="URL of Egeria integration daemon platform to connect to",
|
85
84
|
)
|
86
85
|
@click.option(
|
87
86
|
"--view_server",
|
88
|
-
default="view-server",
|
89
|
-
envvar="EGERIA_VIEW_SERVER",
|
87
|
+
default=os.environ.get("EGERIA_VIEW_SERVER", "view-server"),
|
90
88
|
help="Egeria view server to work with",
|
91
89
|
)
|
92
90
|
@click.option(
|
93
91
|
"--view_server_url",
|
94
|
-
default="https://localhost:9443",
|
95
|
-
envvar="EGERIA_VIEW_SERVER_URL",
|
92
|
+
default=os.environ.get("EGERIA_VIEW_SERVER_URL", "https://localhost:9443"),
|
96
93
|
help="URL of Egeria view server platform to connect to",
|
97
94
|
)
|
98
95
|
@click.option(
|
99
96
|
"--engine_host",
|
100
|
-
default="engine-host",
|
101
|
-
envvar="EGERIA_ENGINE_HOST",
|
97
|
+
default=os.environ.get("EGERIA_ENGINE_HOST", "engine-host"),
|
102
98
|
help="Egeria engine host to work with",
|
103
99
|
)
|
104
100
|
@click.option(
|
105
101
|
"--engine_host_url",
|
106
|
-
default="https://localhost:9443",
|
107
|
-
envvar="EGERIA_ENGINE_HOST_URL",
|
102
|
+
default=os.environ.get("EGERIA_ENGINE_HOST_URL", "https://localhost:9443"),
|
108
103
|
help="URL of Egeria engine host platform to connect to",
|
109
104
|
)
|
110
105
|
@click.option(
|
111
106
|
"--admin_user",
|
112
|
-
default="garygeeke",
|
113
|
-
envvar="EGERIA_ADMIN_USER",
|
107
|
+
default=os.environ.get("EGERIA_ADMIN_USER", "garygeeke"),
|
114
108
|
help="Egeria admin user",
|
115
109
|
)
|
116
110
|
@click.option(
|
117
111
|
"--admin_user_password",
|
118
|
-
default="secret",
|
119
|
-
envvar="EGERIA_ADMIN_PASSWORD",
|
112
|
+
default=os.environ.get("EGERIA_ADMIN_PASSWORD", "secret"),
|
120
113
|
help="Egeria admin password",
|
121
114
|
)
|
122
115
|
@click.option(
|
123
|
-
"--userid",
|
116
|
+
"--userid",
|
117
|
+
default=os.environ.get("EGERIA_USER", "peterprofile"),
|
118
|
+
help="Egeria user",
|
124
119
|
)
|
125
120
|
@click.option(
|
126
121
|
"--password",
|
127
|
-
default="secret",
|
128
|
-
envvar="EGERIA_PASSWORD",
|
122
|
+
default=os.environ.get("EGERIA_USER_PASSWORD", "secret"),
|
129
123
|
help="Egeria user password",
|
130
124
|
)
|
131
125
|
@click.option("--timeout", default=60, help="Number of seconds to wait")
|
132
126
|
@click.option(
|
133
127
|
"--jupyter",
|
134
128
|
is_flag=True,
|
135
|
-
default=False,
|
136
|
-
envvar="EGERIA_JUPYTER",
|
129
|
+
default=os.environ.get("EGERIA_JUPYTER", "False"),
|
137
130
|
help="Enable for rendering in a Jupyter terminal",
|
138
131
|
)
|
139
132
|
@click.option(
|
140
133
|
"--width",
|
141
|
-
default=200,
|
142
|
-
envvar="EGERIA_WIDTH",
|
134
|
+
default=os.environ.get("EGERIA_WIDTH", "200"),
|
143
135
|
help="Screen width, in characters, to use",
|
144
136
|
)
|
137
|
+
@click.option(
|
138
|
+
"--home_glossary_guid",
|
139
|
+
default=os.environ.get("EGERIA_HOME_GLOSSARY_GUID", None),
|
140
|
+
help="Glossary guid to use as the home glossary",
|
141
|
+
)
|
145
142
|
@click.pass_context
|
146
143
|
def cli(
|
147
144
|
ctx,
|
@@ -213,8 +210,8 @@ def show_elements(ctx):
|
|
213
210
|
@show_elements.command("guid-info")
|
214
211
|
@click.argument("guid", nargs=1)
|
215
212
|
@click.pass_context
|
216
|
-
def
|
217
|
-
"""Display
|
213
|
+
def show_guid_info(ctx, guid):
|
214
|
+
"""Display guid information
|
218
215
|
|
219
216
|
Usage: show guid-info <a guid>
|
220
217
|
|
@@ -240,22 +237,39 @@ def show_related_specifications(ctx, element_guid):
|
|
240
237
|
)
|
241
238
|
|
242
239
|
|
243
|
-
@show_elements.command("
|
240
|
+
@show_elements.command("anchored-elements")
|
244
241
|
@click.pass_context
|
245
|
-
@click.option("--search-string", help="value we are searching for")
|
246
242
|
@click.option(
|
247
|
-
"--
|
243
|
+
"--search-string",
|
244
|
+
default="SoftwareCapability",
|
245
|
+
help="value we are searching for",
|
246
|
+
)
|
247
|
+
@click.option(
|
248
|
+
"--prop-list",
|
249
|
+
default="anchorDomainName",
|
250
|
+
help="List of properties we are searching",
|
248
251
|
)
|
249
|
-
def
|
252
|
+
def list_anchored_elements(ctx, search_string: str, prop_list: str):
|
250
253
|
"""List elements with the specified properties"""
|
251
254
|
c = ctx.obj
|
252
|
-
|
255
|
+
# put guards around this to make it a list?
|
256
|
+
if type(prop_list) is str:
|
257
|
+
property_names = prop_list.split(",")
|
258
|
+
elif type(prop_list) is list:
|
259
|
+
property_names = prop_list
|
260
|
+
else:
|
261
|
+
property_names = []
|
262
|
+
print(f"\nError --> Invalid property list - must be a string or list")
|
263
|
+
sys.exit(4)
|
264
|
+
|
265
|
+
display_anchored_elements(
|
253
266
|
search_string,
|
254
|
-
|
267
|
+
property_names,
|
255
268
|
c.view_server,
|
256
269
|
c.view_server_url,
|
257
270
|
c.userid,
|
258
271
|
c.password,
|
272
|
+
c.timeout,
|
259
273
|
c.jupyter,
|
260
274
|
c.width,
|
261
275
|
)
|
@@ -367,7 +381,7 @@ def show_registered_services(ctx, services):
|
|
367
381
|
|
368
382
|
@show_info.command("relationship-types")
|
369
383
|
@click.option(
|
370
|
-
"--
|
384
|
+
"--om-type",
|
371
385
|
default="AssetOwner",
|
372
386
|
help="Relationship type to get information about",
|
373
387
|
)
|
@@ -400,7 +414,7 @@ def show_relationship_types(ctx, rel_type):
|
|
400
414
|
)
|
401
415
|
@click.pass_context
|
402
416
|
def show_elements_by_classification(ctx, om_type, classification):
|
403
|
-
"""Show
|
417
|
+
"""Show elements by classification"""
|
404
418
|
c = ctx.obj
|
405
419
|
list_classified_elements(
|
406
420
|
om_type,
|
@@ -430,8 +444,8 @@ def show_elements_by_classification(ctx, om_type, classification):
|
|
430
444
|
help="Relationship type to follow.",
|
431
445
|
)
|
432
446
|
@click.pass_context
|
433
|
-
def
|
434
|
-
"""Show information about
|
447
|
+
def show_related_elements(ctx, element_guid, om_type, rel_type):
|
448
|
+
"""Show information about related elements"""
|
435
449
|
c = ctx.obj
|
436
450
|
list_related_elements(
|
437
451
|
element_guid,
|
@@ -8,7 +8,7 @@ class Config(object):
|
|
8
8
|
url: str = None,
|
9
9
|
view_server: str = "view-server",
|
10
10
|
view_server_url: str = "https://localhost:9443",
|
11
|
-
integration_daemon: str = "
|
11
|
+
integration_daemon: str = "integration_daemon",
|
12
12
|
integration_daemon_url: str = "https://localhost:9443",
|
13
13
|
engine_host: str = "engine-host",
|
14
14
|
engine_host_url: str = "https://localhost:9443",
|
@@ -19,6 +19,7 @@ class Config(object):
|
|
19
19
|
timeout: int = 30,
|
20
20
|
jupyter: bool = False,
|
21
21
|
width: int = 200,
|
22
|
+
home_glossary_guid: str = None,
|
22
23
|
):
|
23
24
|
self.metadata_store = server
|
24
25
|
self.metadata_store_url = url
|
@@ -37,6 +38,7 @@ class Config(object):
|
|
37
38
|
self.width = width
|
38
39
|
self.server = server
|
39
40
|
self.url = url
|
41
|
+
self.home_glossary_guid = home_glossary_guid
|
40
42
|
|
41
43
|
|
42
44
|
pass_config = click.make_pass_decorator(Config)
|