pyegeria 1.5.1.0.4__tar.gz → 1.5.1.0.6__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-1.5.1.0.4 → pyegeria-1.5.1.0.6}/PKG-INFO +1 -1
- pyegeria-1.5.1.0.6/commands/cat/glossary_actions.py +212 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cli/egeria.py +16 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cli/egeria_cat.py +16 -1
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/my/todo_actions.py +5 -5
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/glossary_manager_omvs.py +11 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyproject.toml +4 -1
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/LICENSE +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/README.md +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/README.md +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/__init__.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/get_asset_graph.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/get_collection.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/get_project_dependencies.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/get_project_structure.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/get_tech_type_elements.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/get_tech_type_template.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/list_archives.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/list_assets.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/list_cert_types.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/list_deployed_catalogs.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/list_deployed_database_schemas.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/list_deployed_databases.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/list_glossary.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/list_projects.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/list_relationships.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/list_tech_types.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/list_todos.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cat/list_user_ids.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cli/__init__.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cli/egeria_my.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cli/egeria_ops.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cli/egeria_tech.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/cli/ops_config.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/my/README.md +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/my/__init__.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/my/list_my_profile.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/my/list_my_roles.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/my/monitor_my_todos.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/my/monitor_open_todos.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/ops/README.md +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/ops/__init__.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/ops/engine_actions.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/ops/gov_server_actions.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/ops/list_catalog_targets.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/ops/load_archive.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/ops/monitor_asset_events.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/ops/monitor_engine_activity.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/ops/monitor_engine_activity_c.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/ops/monitor_gov_eng_status.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/ops/monitor_integ_daemon_status.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/ops/monitor_platform_status.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/ops/monitor_server_startup.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/ops/monitor_server_status.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/ops/orig_monitor_server_list.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/ops/orig_monitor_server_status.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/ops/refresh_integration_daemon.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/ops/restart_integration_daemon.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/tech/README.md +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/tech/__init__.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/tech/get_element_graph.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/tech/get_element_info.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/tech/get_guid_info.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/tech/get_tech_details.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/tech/list_asset_types.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/tech/list_elements.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/tech/list_elements_for_classification.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/tech/list_elements_x.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/tech/list_gov_action_processes.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/tech/list_registered_services.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/tech/list_related_elements.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/tech/list_related_specification.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/tech/list_relationship_types.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/tech/list_tech_templates.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/tech/list_valid_metadata_values.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/commands/tech/x_list_related_elements.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/README.md +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/__init__.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/_client.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/_deprecated_gov_engine.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/_exceptions.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/_globals.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/_validators.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/asset_catalog_omvs.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/automated_curation_omvs.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/classification_manager_omvs.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/collection_manager_omvs.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/core_omag_server_config.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/create_tech_guid_lists.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/egeria_cat_client.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/egeria_client.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/egeria_config_client.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/egeria_my_client.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/egeria_tech_client.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/feedback_manager_omvs.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/full_omag_server_config.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/glossary_browser_omvs.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/mermaid_utilities.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/my_profile_omvs.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/platform_services.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/project_manager_omvs.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/registered_info.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/runtime_manager_omvs.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/server_operations.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/utils.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/valid_metadata_omvs.py +0 -0
- {pyegeria-1.5.1.0.4 → pyegeria-1.5.1.0.6}/pyegeria/x_action_author_omvs.py +0 -0
@@ -0,0 +1,212 @@
|
|
1
|
+
"""
|
2
|
+
SPDX-License-Identifier: Apache-2.0
|
3
|
+
Copyright Contributors to the ODPi Egeria project.
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
Execute Glossary actions.
|
8
|
+
|
9
|
+
"""
|
10
|
+
import os
|
11
|
+
import sys
|
12
|
+
import time
|
13
|
+
from datetime import datetime
|
14
|
+
|
15
|
+
import click
|
16
|
+
|
17
|
+
# from ops_config import Config, pass_config
|
18
|
+
from pyegeria import EgeriaTech, body_slimmer
|
19
|
+
from pyegeria._exceptions import (
|
20
|
+
InvalidParameterException,
|
21
|
+
PropertyServerException,
|
22
|
+
print_exception_response,
|
23
|
+
)
|
24
|
+
|
25
|
+
|
26
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
27
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
28
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
29
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
30
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
31
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
32
|
+
)
|
33
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
34
|
+
EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
|
35
|
+
"EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
|
36
|
+
)
|
37
|
+
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
38
|
+
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
39
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
40
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
41
|
+
|
42
|
+
|
43
|
+
@click.command("create-glossary")
|
44
|
+
@click.option("--name", help="Name of Glossary", required=True)
|
45
|
+
@click.option("--language", help="Language of Glossary", default="English")
|
46
|
+
@click.option(
|
47
|
+
"--description",
|
48
|
+
help="Description of Glossary",
|
49
|
+
default="A description goes here",
|
50
|
+
)
|
51
|
+
@click.option(
|
52
|
+
"--usage",
|
53
|
+
help="Purpose of glossary",
|
54
|
+
default="Definitions",
|
55
|
+
)
|
56
|
+
@click.option("--server", default=EGERIA_VIEW_SERVER, help="Egeria view server to use.")
|
57
|
+
@click.option(
|
58
|
+
"--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
|
59
|
+
)
|
60
|
+
@click.option("--userid", default=EGERIA_USER, help="Egeria user")
|
61
|
+
@click.option("--password", default=EGERIA_USER_PASSWORD, help="Egeria user password")
|
62
|
+
@click.option("--timeout", default=60, help="Number of seconds to wait")
|
63
|
+
def create_glossary(
|
64
|
+
server: str,
|
65
|
+
url: str,
|
66
|
+
userid: str,
|
67
|
+
password: str,
|
68
|
+
timeout: int,
|
69
|
+
name: str,
|
70
|
+
language: str,
|
71
|
+
description: str,
|
72
|
+
usage: str,
|
73
|
+
) -> None:
|
74
|
+
"""Create a new Glossary"""
|
75
|
+
|
76
|
+
try:
|
77
|
+
m_client = EgeriaTech(server, url, userid, password)
|
78
|
+
token = m_client.create_egeria_bearer_token()
|
79
|
+
|
80
|
+
existing_glossary = m_client.find_glossaries(name)
|
81
|
+
if type(existing_glossary) is list:
|
82
|
+
click.echo(f"\nFound {len(existing_glossary)} existing Glossaries\n")
|
83
|
+
for glossary in existing_glossary:
|
84
|
+
click.echo(
|
85
|
+
f"\tFound glossary: {glossary['glossaryProperties']['qualifiedName']} with id of {glossary['elementHeader']['guid']}\n"
|
86
|
+
)
|
87
|
+
sys.exit(0)
|
88
|
+
|
89
|
+
glossary_guid = m_client.create_glossary(name, language, description, usage)
|
90
|
+
print(f"New glossary {name} created with id of {glossary_guid}")
|
91
|
+
|
92
|
+
except (InvalidParameterException, PropertyServerException) as e:
|
93
|
+
print_exception_response(e)
|
94
|
+
finally:
|
95
|
+
m_client.close_session()
|
96
|
+
|
97
|
+
|
98
|
+
@click.command("delete-glossary")
|
99
|
+
@click.option("--server", default=EGERIA_VIEW_SERVER, help="Egeria view server to use")
|
100
|
+
@click.option(
|
101
|
+
"--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
|
102
|
+
)
|
103
|
+
@click.option("--userid", default=EGERIA_USER, help="Egeria user")
|
104
|
+
@click.option("--password", default=EGERIA_USER_PASSWORD, help="Egeria user password")
|
105
|
+
@click.option("--timeout", default=60, help="Number of seconds to wait")
|
106
|
+
@click.argument("glossary-guid")
|
107
|
+
def delete_glossary(server, url, userid, password, timeout, glossary_guid):
|
108
|
+
"""Delete the glossary specified"""
|
109
|
+
m_client = EgeriaTech(server, url, user_id=userid, user_pwd=password)
|
110
|
+
token = m_client.create_egeria_bearer_token()
|
111
|
+
try:
|
112
|
+
m_client.delete_to_do(glossary_guid)
|
113
|
+
|
114
|
+
click.echo(f"Deleted Todo item {glossary_guid}")
|
115
|
+
|
116
|
+
except (InvalidParameterException, PropertyServerException) as e:
|
117
|
+
print_exception_response(e)
|
118
|
+
finally:
|
119
|
+
m_client.close_session()
|
120
|
+
|
121
|
+
|
122
|
+
@click.command("create-term")
|
123
|
+
@click.option("--glossary-name", help="Name of Glossary", required=True)
|
124
|
+
@click.option("--term-name", help="Name of Term", required=True)
|
125
|
+
@click.option(
|
126
|
+
"--summary",
|
127
|
+
help="Summary definition",
|
128
|
+
default="Summary goes here",
|
129
|
+
)
|
130
|
+
@click.option(
|
131
|
+
"--description",
|
132
|
+
help="Full description",
|
133
|
+
default="Description goes here",
|
134
|
+
)
|
135
|
+
@click.option("--abbrev", help="Abbreviation", default=None)
|
136
|
+
@click.option("--examples", help="Example usage", default=None)
|
137
|
+
@click.option("--usage", help="Usage notes", default=None)
|
138
|
+
@click.option("--version", help="Version", default="1.0")
|
139
|
+
@click.option(
|
140
|
+
"--status",
|
141
|
+
help="Status",
|
142
|
+
type=click.Choice(
|
143
|
+
["DRAFT", "ACTIVE", "DEPRACATED", "OBSOLETE", "OTHER"], case_sensitive=False
|
144
|
+
),
|
145
|
+
default="DRAFT",
|
146
|
+
)
|
147
|
+
@click.option("--server", default=EGERIA_VIEW_SERVER, help="Egeria view server to use.")
|
148
|
+
@click.option(
|
149
|
+
"--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
|
150
|
+
)
|
151
|
+
@click.option("--userid", default=EGERIA_USER, help="Egeria user")
|
152
|
+
@click.option("--password", default=EGERIA_USER_PASSWORD, help="Egeria user password")
|
153
|
+
@click.option("--timeout", default=60, help="Number of seconds to wait")
|
154
|
+
def create_term(
|
155
|
+
server,
|
156
|
+
url,
|
157
|
+
userid,
|
158
|
+
password,
|
159
|
+
timeout,
|
160
|
+
glossary_name,
|
161
|
+
term_name,
|
162
|
+
summary,
|
163
|
+
description,
|
164
|
+
abbrev,
|
165
|
+
examples,
|
166
|
+
usage,
|
167
|
+
version,
|
168
|
+
status,
|
169
|
+
):
|
170
|
+
"""Create a new term"""
|
171
|
+
m_client = EgeriaTech(server, url, user_id=userid, user_pwd=password)
|
172
|
+
token = m_client.create_egeria_bearer_token()
|
173
|
+
try:
|
174
|
+
body = {
|
175
|
+
"class": "ReferenceableRequestBody",
|
176
|
+
"elementProperties": {
|
177
|
+
"class": "GlossaryTermProperties",
|
178
|
+
"qualifiedName": f"GlossaryTerm: {term_name} : {datetime.now().isoformat()}",
|
179
|
+
"displayName": term_name,
|
180
|
+
"summary": summary,
|
181
|
+
"description": description,
|
182
|
+
"abbreviation": abbrev,
|
183
|
+
"examples": examples,
|
184
|
+
"usage": usage,
|
185
|
+
"publishVersionIdentifier": version,
|
186
|
+
},
|
187
|
+
"initialStatus": status,
|
188
|
+
}
|
189
|
+
exists = False
|
190
|
+
glossary_info = m_client.find_glossaries(glossary_name)
|
191
|
+
if type(glossary_info) is list:
|
192
|
+
for glossary in glossary_info:
|
193
|
+
if glossary["glossaryProperties"]["displayName"] == glossary_name:
|
194
|
+
exists = True
|
195
|
+
glossary_guid = glossary["elementHeader"]["guid"]
|
196
|
+
|
197
|
+
if not exists:
|
198
|
+
click.echo(f"The glossary name {glossary_name} was not found..exiting\n")
|
199
|
+
sys.exit(0)
|
200
|
+
|
201
|
+
term_guid = m_client.create_controlled_glossary_term(
|
202
|
+
glossary_guid, body_slimmer(body)
|
203
|
+
)
|
204
|
+
|
205
|
+
click.echo(
|
206
|
+
f"Successfully created term {term_name} with GUID {term_guid}, in glossary {glossary_name}.\n"
|
207
|
+
)
|
208
|
+
|
209
|
+
except (InvalidParameterException, PropertyServerException) as e:
|
210
|
+
print_exception_response(e)
|
211
|
+
finally:
|
212
|
+
m_client.close_session()
|
@@ -34,6 +34,13 @@ from commands.my.monitor_my_todos import display_my_todos
|
|
34
34
|
from commands.my.monitor_open_todos import display_todos
|
35
35
|
from commands.cat.list_deployed_database_schemas import list_deployed_database_schemas
|
36
36
|
from commands.cat.list_deployed_catalogs import list_deployed_catalogs
|
37
|
+
from commands.cat.glossary_actions import create_glossary, delete_glossary, create_term
|
38
|
+
from commands.my.todo_actions import (
|
39
|
+
mark_todo_complete,
|
40
|
+
reassign_todo,
|
41
|
+
delete_todo,
|
42
|
+
create_todo,
|
43
|
+
)
|
37
44
|
|
38
45
|
|
39
46
|
from commands.ops.gov_server_actions import (
|
@@ -957,6 +964,15 @@ def tell(ctx):
|
|
957
964
|
pass
|
958
965
|
|
959
966
|
|
967
|
+
tell.add_command(create_glossary)
|
968
|
+
tell.add_command(delete_glossary)
|
969
|
+
tell.add_command(create_term)
|
970
|
+
tell.add_command(mark_todo_complete)
|
971
|
+
tell.add_command(reassign_todo)
|
972
|
+
tell.add_command(delete_todo)
|
973
|
+
tell.add_command(create_todo)
|
974
|
+
|
975
|
+
|
960
976
|
@tell.group("survey")
|
961
977
|
@click.pass_context
|
962
978
|
def survey(ctx):
|
@@ -29,10 +29,16 @@ from commands.cat.list_user_ids import list_user_ids
|
|
29
29
|
from commands.cat.list_archives import display_archive_list
|
30
30
|
from commands.cat.list_deployed_database_schemas import list_deployed_database_schemas
|
31
31
|
from commands.cat.list_deployed_catalogs import list_deployed_catalogs
|
32
|
-
|
32
|
+
from commands.cat.glossary_actions import create_glossary, delete_glossary, create_term
|
33
33
|
|
34
34
|
# from pyegeria import ServerOps
|
35
35
|
from commands.cli.ops_config import Config
|
36
|
+
from commands.my.todo_actions import (
|
37
|
+
mark_todo_complete,
|
38
|
+
reassign_todo,
|
39
|
+
delete_todo,
|
40
|
+
create_todo,
|
41
|
+
)
|
36
42
|
|
37
43
|
|
38
44
|
# class Config(object):
|
@@ -537,6 +543,15 @@ def tell(ctx):
|
|
537
543
|
pass
|
538
544
|
|
539
545
|
|
546
|
+
tell.add_command(create_glossary)
|
547
|
+
tell.add_command(delete_glossary)
|
548
|
+
tell.add_command(create_term)
|
549
|
+
tell.add_command(mark_todo_complete)
|
550
|
+
tell.add_command(reassign_todo)
|
551
|
+
tell.add_command(delete_todo)
|
552
|
+
tell.add_command(create_todo)
|
553
|
+
|
554
|
+
|
540
555
|
@tell.group("survey")
|
541
556
|
@click.pass_context
|
542
557
|
def survey(ctx):
|
@@ -25,7 +25,7 @@ erins_guid = "a588fb08-ae09-4415-bd5d-991882ceacba"
|
|
25
25
|
peter_guid = "a187bc48-8154-491f-97b4-a2f3c3f1a00e"
|
26
26
|
tanya_guid = "26ec1614-bede-4b25-a2a3-f8ed26db3aaa"
|
27
27
|
|
28
|
-
|
28
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
29
29
|
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
30
30
|
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
31
31
|
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
@@ -43,11 +43,11 @@ EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
|
43
43
|
|
44
44
|
|
45
45
|
@click.command("create-todo")
|
46
|
+
@click.option("--server", default=EGERIA_VIEW_SERVER, help="Egeria view server to use.")
|
46
47
|
@click.option(
|
47
|
-
"--
|
48
|
-
|
49
|
-
|
50
|
-
"--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
|
48
|
+
"--url",
|
49
|
+
default=EGERIA_VIEW_SERVER_URL,
|
50
|
+
help="URL of Egeria platform to connect to.",
|
51
51
|
)
|
52
52
|
@click.option("--userid", default=EGERIA_USER, help="Egeria user")
|
53
53
|
@click.option("--password", default=EGERIA_USER_PASSWORD, help="Egeria user password")
|
@@ -1405,6 +1405,17 @@ class GlossaryManager(GlossaryBrowser):
|
|
1405
1405
|
|
1406
1406
|
return response
|
1407
1407
|
|
1408
|
+
def load_terms_from_file(
|
1409
|
+
self, glossary_name: str, filename: str, upsert: bool = False
|
1410
|
+
) -> str:
|
1411
|
+
"""This method loads glossary terms into the specified glossary from the indicated file."""
|
1412
|
+
# Check that glossary exists and get guid
|
1413
|
+
|
1414
|
+
# Open file
|
1415
|
+
|
1416
|
+
# Insert terms into glossary
|
1417
|
+
pass
|
1418
|
+
|
1408
1419
|
async def _async_create_term_copy(
|
1409
1420
|
self,
|
1410
1421
|
glossary_guid: str,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "pyegeria"
|
3
|
-
version = "1.5.1.0.
|
3
|
+
version = "1.5.1.0.6"
|
4
4
|
license = 'Apache 2.0'
|
5
5
|
authors = ["Dan Wolfson <dan.wolfson@pdr-associates.com>"]
|
6
6
|
readme = "README.md"
|
@@ -69,6 +69,9 @@ pytest = "^8.2.2"
|
|
69
69
|
list_archives = "commands.cat.list_archives:main"
|
70
70
|
list_deployed_catalogs = "commands.cat.list_deployed_catalogs:main"
|
71
71
|
list_deployed_schemas = "commands.cat.list_deployed_database_schemas:main"
|
72
|
+
create_glossary = "commands.cat.glossary_actions:create_glossary"
|
73
|
+
delete_glossary = "commands.cat.glossary_actions:delete_glossary"
|
74
|
+
create_term = "commands.cat.glossary_actions:create_term"
|
72
75
|
|
73
76
|
monitor_asset_events = "commands.ops.monitor_asset_events:main"
|
74
77
|
monitor_coco_status = "commands.ops.monitor_coco_status:main"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|