pyegeria 0.3.8__tar.gz → 0.3.9__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.3.8/src/pyegeria.egg-info → pyegeria-0.3.9}/PKG-INFO +1 -3
- pyegeria-0.3.9/examples/Coco_config/__pycache__/globals.cpython-312.pyc +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Coco_config/config_cocoView1.py +2 -1
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/README.md +8 -2
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/coco_status.py +1 -3
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/collection_viewer.py +12 -31
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/engine_action_status.py +9 -28
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/find_todos.py +9 -38
- pyegeria-0.3.9/examples/widgets/get_registered_services.py +135 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/get_relationship_types.py +16 -35
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/glossary_view.py +2 -2
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/gov_engine_status.py +0 -1
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/list_asset_types.py +3 -25
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/my_todos.py +1 -1
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/open_todos.py +3 -24
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/project_list_viewer.py +12 -26
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/server_status.py +1 -20
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/view_my_profile.py +8 -34
- {pyegeria-0.3.8 → pyegeria-0.3.9}/pyproject.toml +1 -3
- {pyegeria-0.3.8 → pyegeria-0.3.9}/setup.py +10 -6
- pyegeria-0.3.9/src/pyegeria/Xasset_catalog_omvs.py +539 -0
- pyegeria-0.3.9/src/pyegeria/Xfeedback_manager_omvs.py +251 -0
- pyegeria-0.3.9/src/pyegeria/Xglossary_manager_omvs.py +3001 -0
- pyegeria-0.3.9/src/pyegeria/Xloaded_resources_omvs.py +91 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria/__init__.py +6 -10
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria/_client.py +4 -6
- pyegeria-0.3.8/src/pyegeria/gov_engine.py → pyegeria-0.3.9/src/pyegeria/_deprecated_gov_engine.py +2 -59
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria/_exceptions.py +5 -6
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria/_globals.py +1 -1
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria/automated_curation_omvs.py +320 -315
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria/collection_manager_omvs.py +187 -248
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria/core_omag_server_config.py +1 -5
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria/full_omag_server_config.py +53 -83
- pyegeria-0.3.9/src/pyegeria/glossary_browser_omvs.py +2208 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria/my_profile_omvs.py +2 -7
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria/platform_services.py +0 -3
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria/project_manager_omvs.py +9 -15
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria/registered_info.py +12 -52
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria/server_operations.py +1 -5
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria/valid_metadata_omvs.py +11 -23
- {pyegeria-0.3.8 → pyegeria-0.3.9/src/pyegeria.egg-info}/PKG-INFO +1 -3
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria.egg-info/SOURCES.txt +10 -5
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria.egg-info/requires.txt +0 -2
- {pyegeria-0.3.8 → pyegeria-0.3.9}/tests/test_automated_curation_omvs.py +233 -300
- {pyegeria-0.3.8 → pyegeria-0.3.9}/tests/test_client.py +2 -5
- {pyegeria-0.3.8 → pyegeria-0.3.9}/tests/test_collection_manager_omvs.py +4 -18
- {pyegeria-0.3.8 → pyegeria-0.3.9}/tests/test_core_omag_server_config.py +4 -7
- {pyegeria-0.3.8 → pyegeria-0.3.9}/tests/test_full_omag_server_config.py +20 -4
- pyegeria-0.3.8/tests/test_glossary_omvs.py → pyegeria-0.3.9/tests/test_glossary_manager_omvs.py +3 -8
- pyegeria-0.3.9/tests/test_glossary_omvs.py +261 -0
- pyegeria-0.3.9/tests/test_loaded_resources.py +78 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/tests/test_my_profile_omvs.py +1 -1
- {pyegeria-0.3.8 → pyegeria-0.3.9}/tests/test_platform_services.py +1 -1
- {pyegeria-0.3.8 → pyegeria-0.3.9}/tests/test_registered_info.py +6 -8
- {pyegeria-0.3.8 → pyegeria-0.3.9}/tests/test_server_operations.py +1 -1
- {pyegeria-0.3.8 → pyegeria-0.3.9}/tests/test_valid_metadata_omvs.py +10 -11
- pyegeria-0.3.8/src/pyegeria/glossary_omvs.py +0 -789
- pyegeria-0.3.8/src/pyegeria/loaded_resources_omvs.py +0 -159
- pyegeria-0.3.8/tests/test_gov_engine.py +0 -276
- pyegeria-0.3.8/tests/test_loaded_resources.py +0 -1028
- {pyegeria-0.3.8 → pyegeria-0.3.9}/LICENSE +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/MANIFEST.in +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/README.md +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/.DS_Store +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Coco_config/README.md +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Coco_config/__init__.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Coco_config/config_cocoMDS1.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Coco_config/config_cocoMDS2.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Coco_config/config_cocoMDS3.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Coco_config/config_cocoMDS4.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Coco_config/config_cocoMDS5.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Coco_config/config_cocoMDS6.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Coco_config/config_cocoMDSx.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Coco_config/config_exchangeDL01.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Coco_config/config_governDL01.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Coco_config/config_monitorDev01.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Coco_config/config_monitorGov01.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Coco_config/globals.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Doc_Samples/Create_Collection_Sample.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Doc_Samples/Create_Sustainability_Collection_Sample.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Jupyter Notebooks/P-egeria-server-config.ipynb +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Jupyter Notebooks/README.md +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Jupyter Notebooks/common/P-environment-check.ipynb +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Jupyter Notebooks/common/__init__.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Jupyter Notebooks/common/common-functions.ipynb +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Jupyter Notebooks/common/environment-check.ipynb +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Jupyter Notebooks/common/globals.ipynb +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Jupyter Notebooks/common/globals.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/Jupyter Notebooks/common/orig_globals.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/__init__.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/__pycache__/__init__.cpython-312.pyc +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/.DS_Store +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/__init__.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/__pycache__/__init__.cpython-312.pyc +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/__pycache__/server_status_widget.cpython-312-pytest-7.4.4.pyc +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/get_tech_details.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/get_tech_types.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/get_valid_metadata_values.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/integration_daemon_status.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/multi-server_status.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/examples/widgets/server_status_widget.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/setup.cfg +0 -0
- /pyegeria-0.3.8/src/pyegeria/governance_author.py → /pyegeria-0.3.9/src/pyegeria/Xaction_author_omvs.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria/_validators.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria/utils.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria.egg-info/dependency_links.txt +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/src/pyegeria.egg-info/top_level.txt +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/tests/test_project_manager_omvs.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/tests/test_util_exp.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.3.9}/tests/test_validators.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyegeria
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.9
|
4
4
|
Summary: A python client for Egeria
|
5
5
|
Home-page: https://egeria-project.org/egeria-python
|
6
6
|
Author: Dan Wolfson
|
@@ -18,8 +18,6 @@ Requires-Dist: requests~=2.31.0
|
|
18
18
|
Requires-Dist: validators~=0.22.0
|
19
19
|
Requires-Dist: pytest~=7.4.2
|
20
20
|
Requires-Dist: urllib3~=1.26.15
|
21
|
-
Requires-Dist: tabulate~=0.9.0
|
22
|
-
Requires-Dist: pandas~=2.2.0
|
23
21
|
Requires-Dist: rich~=13.7.1
|
24
22
|
Requires-Dist: httpx~=0.26.0
|
25
23
|
Provides-Extra: tests
|
Binary file
|
@@ -21,7 +21,8 @@ from pyegeria.platform_services import Platform
|
|
21
21
|
disable_ssl_warnings = True
|
22
22
|
|
23
23
|
view_server = "cocoView1"
|
24
|
-
platform_url = dataLakePlatformURL
|
24
|
+
# platform_url = dataLakePlatformURL
|
25
|
+
platform_url = corePlatformURL
|
25
26
|
admin_user = "garygeeke"
|
26
27
|
view_server_user_id = "cocoView1npa"
|
27
28
|
view_server_password = "cocoView1passw0rd"
|
@@ -6,6 +6,8 @@ The applications are invoked using the python3 command - for instance:
|
|
6
6
|
Running them may require that you have pyegeria installed. pyegeria can be installed using:
|
7
7
|
'pip install pyegeria'
|
8
8
|
|
9
|
+
Some of the widgets are "live" - that is running continuously until ctrl-c is issued to interrupt it.
|
10
|
+
|
9
11
|
The functions are:
|
10
12
|
|
11
13
|
* server_status_widget: provide a live view of servers running on a platform.
|
@@ -19,8 +21,12 @@ The functions are:
|
|
19
21
|
* view_my_profile: view an Egeria profile
|
20
22
|
* list_asset_types: list the types of assets that have been configured in Egeria
|
21
23
|
* multi-server_status: show the status from two platforms concurrently
|
22
|
-
*
|
24
|
+
* coco_status.py: example showing the status of the Coco Pharmacutical platforms from the Jupyter Labs.
|
23
25
|
* get_relationship_types.py: display the different types of relationships for a given Entity type.
|
24
26
|
* get_valid_metadata_values.py: retrieve the currently defined valid metadata values for a given attribute and entity
|
25
27
|
* open_todos.py: list the open todo items
|
26
|
-
* project_list_viewer.py: List defined projects
|
28
|
+
* project_list_viewer.py: List defined projects
|
29
|
+
* collection_viewer.py: Shows a collection hierarchy
|
30
|
+
* get_registered_services.py: shows the services registered on the platform
|
31
|
+
* get_tech_details.py: get the details of a technology type
|
32
|
+
* get_tech_types.py: get a list of the technology types
|
@@ -6,7 +6,7 @@ Copyright Contributors to the ODPi Egeria project.
|
|
6
6
|
Unit tests for the Utils helper functions using the Pytest framework.
|
7
7
|
|
8
8
|
|
9
|
-
A simple server status display
|
9
|
+
A simple server status display for the Coco Pharmaceuticals Configuration
|
10
10
|
"""
|
11
11
|
|
12
12
|
import argparse
|
@@ -39,7 +39,6 @@ def test_display_status(server: str, url: str, username: str):
|
|
39
39
|
p_client2 = ServerOps('Datalake Catalog', "https://localhost:9444", username)
|
40
40
|
p_client3 = ServerOps('DevCatalog', "https://localhost:9445", username)
|
41
41
|
|
42
|
-
|
43
42
|
def generate_table(p_client) -> Table:
|
44
43
|
"""Make a new table."""
|
45
44
|
table = Table(
|
@@ -80,7 +79,6 @@ def test_display_status(server: str, url: str, username: str):
|
|
80
79
|
time.sleep(2)
|
81
80
|
live.update(layout)
|
82
81
|
|
83
|
-
|
84
82
|
except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
|
85
83
|
print_exception_response(e)
|
86
84
|
assert e.related_http_code != "200", "Invalid parameters"
|
@@ -7,43 +7,25 @@ A simple viewer for collections - provide the root and we display the hierarchy
|
|
7
7
|
|
8
8
|
"""
|
9
9
|
|
10
|
-
import time
|
11
10
|
import argparse
|
12
11
|
|
13
|
-
from rich
|
14
|
-
from rich.
|
12
|
+
from rich import print
|
13
|
+
from rich.panel import Panel
|
15
14
|
from rich.prompt import Prompt
|
16
|
-
|
17
|
-
from pyegeria._exceptions import (
|
18
|
-
InvalidParameterException,
|
19
|
-
PropertyServerException,
|
20
|
-
UserNotAuthorizedException,
|
21
|
-
print_exception_response,
|
22
|
-
)
|
23
|
-
from rich.table import Table
|
24
|
-
from rich.live import Live
|
25
15
|
from rich.text import Text
|
26
16
|
from rich.tree import Tree
|
27
|
-
from rich.markdown import Markdown
|
28
17
|
|
29
|
-
from rich import print
|
30
|
-
from rich.console import Group
|
31
|
-
from rich.panel import Panel
|
32
|
-
from rich import box, align
|
33
|
-
from rich.layout import Layout
|
34
|
-
import rich
|
35
18
|
from pyegeria import CollectionManager, UserNotAuthorizedException, PropertyServerException, InvalidParameterException
|
19
|
+
from pyegeria._exceptions import (
|
20
|
+
print_exception_response,
|
21
|
+
)
|
36
22
|
|
37
23
|
disable_ssl_warnings = True
|
38
24
|
|
39
|
-
platform = "https://127.0.0.1:9443"
|
40
|
-
user = "erinoverview"
|
41
|
-
view_server = "view-server"
|
42
25
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
def walk_collection_hierarchy(collection_client: CollectionManager, root_collection_name: str, tree: Tree) -> Tree:
|
26
|
+
def collection_viewer(root: str, server_name: str, platform_url: str, user: str):
|
27
|
+
""" A simple collection viewer"""
|
28
|
+
def walk_collection_hierarchy(collection_client: CollectionManager, root_collection_name: str, tree: Tree) -> None:
|
47
29
|
"""Recursively build a Tree with collection contents."""
|
48
30
|
members = collection_client.get_member_list(root_collection_name)
|
49
31
|
if members:
|
@@ -56,7 +38,7 @@ def collection_viewer(root: str, server_name:str, platform_url:str, user:str):
|
|
56
38
|
text_collection_type = Text(f"* Collection Type: {member['collectionType']}", "cyan")
|
57
39
|
text_description = Text(f"* Description: {member['description']}", "cyan")
|
58
40
|
p = Panel.fit(f"[white]{text_collection_name}[green]\n{text_qualified_name}\n{text_guid}\n"
|
59
|
-
|
41
|
+
f"{text_collection_type}\n{text_description}")
|
60
42
|
tt = tree.add(p, style=style)
|
61
43
|
|
62
44
|
children = collection_client.get_collection_members(member['guid'])
|
@@ -64,14 +46,13 @@ def collection_viewer(root: str, server_name:str, platform_url:str, user:str):
|
|
64
46
|
branch = tt.add(f"[bold magenta]Members", style=style, guide_style=style)
|
65
47
|
walk_collection_hierarchy(collection_client, member['qualifiedName'], branch),
|
66
48
|
|
67
|
-
|
68
49
|
try:
|
69
50
|
tree = Tree(f"[bold bright green]{root}", guide_style="bold bright_blue")
|
70
|
-
c_client = CollectionManager(
|
51
|
+
c_client = CollectionManager(server_name, platform_url,
|
71
52
|
user_id=user)
|
72
53
|
|
73
54
|
token = c_client.create_egeria_bearer_token(user, "secret")
|
74
|
-
walk_collection_hierarchy(c_client,root,tree)
|
55
|
+
walk_collection_hierarchy(c_client, root, tree)
|
75
56
|
print(tree)
|
76
57
|
|
77
58
|
except (
|
@@ -95,4 +76,4 @@ if __name__ == "__main__":
|
|
95
76
|
userid = args.userid if args.userid is not None else 'erinoverview'
|
96
77
|
|
97
78
|
root_collection = Prompt.ask("Enter the Root Collection to start from:", default="Digital Products Root")
|
98
|
-
collection_viewer(root_collection,server, url, userid)
|
79
|
+
collection_viewer(root_collection, server, url, userid)
|
@@ -11,52 +11,31 @@ A simple status display for Engine Actions
|
|
11
11
|
|
12
12
|
import argparse
|
13
13
|
import json
|
14
|
-
import time
|
15
14
|
import sys
|
15
|
+
import time
|
16
16
|
|
17
17
|
from rich import box
|
18
|
-
from rich.live import Live
|
19
|
-
from rich.table import Table
|
20
18
|
from rich.console import Console
|
19
|
+
from rich.table import Table
|
21
20
|
|
21
|
+
from pyegeria import AutomatedCuration
|
22
22
|
from pyegeria import (
|
23
23
|
InvalidParameterException,
|
24
24
|
PropertyServerException,
|
25
25
|
UserNotAuthorizedException,
|
26
26
|
print_exception_response,
|
27
27
|
)
|
28
|
-
from pyegeria import GovEng, AutomatedCuration
|
29
28
|
|
30
29
|
disable_ssl_warnings = True
|
31
30
|
|
32
|
-
good_platform1_url = "https://127.0.0.1:9443"
|
33
|
-
good_platform2_url = "https://egeria.pdr-associates.com:7443"
|
34
|
-
bad_platform1_url = "https://localhost:9443"
|
35
|
-
|
36
|
-
# good_platform1_url = "https://127.0.0.1:30080"
|
37
|
-
# good_platform2_url = "https://127.0.0.1:30081"
|
38
|
-
# bad_platform1_url = "https://localhost:9443"
|
39
31
|
|
40
|
-
|
41
|
-
good_user_2 = "erinoverview"
|
42
|
-
bad_user_1 = "eviledna"
|
43
|
-
bad_user_2 = ""
|
44
|
-
|
45
|
-
good_server_1 = "active-metadata-store"
|
46
|
-
good_server_2 = "simple-metadata-store"
|
47
|
-
good_server_3 = "view-server"
|
48
|
-
good_server_4 = "engine-host"
|
49
|
-
bad_server_1 = "coco"
|
50
|
-
bad_server_2 = ""
|
51
|
-
|
52
|
-
|
53
|
-
def display_status_engine_actions(server: str = good_server_3, url: str = good_platform1_url, user: str = good_user_1):
|
32
|
+
def display_status_engine_actions(server: str, url: str, user: str):
|
54
33
|
g_client = AutomatedCuration(server, url, user, user_pwd="secret")
|
55
34
|
|
56
35
|
def generate_table() -> Table:
|
57
36
|
"""Make a new table."""
|
58
37
|
table = Table(
|
59
|
-
title=f"Engine Action Status for Platform {
|
38
|
+
title=f"Engine Action Status for Platform {url} @ {time.asctime()}",
|
60
39
|
# style = "black on grey66",
|
61
40
|
header_style="white on dark_blue",
|
62
41
|
show_lines=True,
|
@@ -103,7 +82,7 @@ def display_status_engine_actions(server: str = good_server_3, url: str = good_p
|
|
103
82
|
else:
|
104
83
|
action_status = f"[red]{action['actionStatus']}"
|
105
84
|
|
106
|
-
target= action.get("actionTargetElements","Empty")
|
85
|
+
target= action.get("actionTargetElements", "Empty")
|
107
86
|
if type(target) is list:
|
108
87
|
target_element = json.dumps(target[0]["targetElement"]["elementProperties"]["propertiesAsStrings"])
|
109
88
|
else:
|
@@ -119,7 +98,7 @@ def display_status_engine_actions(server: str = good_server_3, url: str = good_p
|
|
119
98
|
else:
|
120
99
|
print("Egeria integration daemon not running")
|
121
100
|
sys.exit()
|
122
|
-
|
101
|
+
|
123
102
|
return table
|
124
103
|
|
125
104
|
try:
|
@@ -130,6 +109,8 @@ def display_status_engine_actions(server: str = good_server_3, url: str = good_p
|
|
130
109
|
except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
|
131
110
|
print_exception_response(e)
|
132
111
|
assert e.related_http_code != "200", "Invalid parameters"
|
112
|
+
finally:
|
113
|
+
g_client.close_session()
|
133
114
|
|
134
115
|
|
135
116
|
if __name__ == "__main__":
|
@@ -10,51 +10,24 @@ Unit tests for the Utils helper functions using the Pytest framework.
|
|
10
10
|
A simple display for glossary terms
|
11
11
|
"""
|
12
12
|
|
13
|
-
import time
|
14
|
-
import json
|
15
13
|
import argparse
|
14
|
+
import time
|
15
|
+
|
16
|
+
from rich import box
|
17
|
+
from rich.console import Console
|
18
|
+
from rich.prompt import Prompt
|
19
|
+
from rich.table import Table
|
20
|
+
|
16
21
|
from pyegeria import (
|
17
22
|
InvalidParameterException,
|
18
23
|
PropertyServerException,
|
19
24
|
UserNotAuthorizedException,
|
20
25
|
print_exception_response,
|
21
26
|
)
|
22
|
-
from rich.table import Table
|
23
|
-
from rich.live import Live
|
24
|
-
from rich import box
|
25
|
-
from rich.prompt import Prompt
|
26
|
-
from rich.tree import Tree
|
27
|
-
from rich import print
|
28
|
-
from rich.console import Console
|
29
27
|
from pyegeria.my_profile_omvs import MyProfile
|
30
28
|
|
31
|
-
from pyegeria.server_operations import ServerOps
|
32
|
-
from pyegeria.gov_engine import GovEng
|
33
|
-
from pyegeria.glossary_omvs import GlossaryBrowser
|
34
|
-
disable_ssl_warnings = True
|
35
|
-
|
36
|
-
good_platform1_url = "https://127.0.0.1:9443"
|
37
|
-
good_platform2_url = "https://egeria.pdr-associates.com:7443"
|
38
|
-
bad_platform1_url = "https://localhost:9443"
|
39
|
-
|
40
|
-
# good_platform1_url = "https://127.0.0.1:30080"
|
41
|
-
# good_platform2_url = "https://127.0.0.1:30081"
|
42
|
-
# bad_platform1_url = "https://localhost:9443"
|
43
|
-
|
44
|
-
good_user_1 = "garygeeke"
|
45
|
-
good_user_2 = "erinoverview"
|
46
|
-
bad_user_1 = "eviledna"
|
47
|
-
bad_user_2 = ""
|
48
|
-
|
49
|
-
good_server_1 = "active-metadata-store"
|
50
|
-
good_server_2 = "simple-metadata-store"
|
51
|
-
good_server_3 = "view-server"
|
52
|
-
good_server_4 = "engine-host"
|
53
|
-
bad_server_1 = "coco"
|
54
|
-
bad_server_2 = ""
|
55
|
-
|
56
29
|
|
57
|
-
def display_to_dos(search_string: str, guid:
|
30
|
+
def display_to_dos(search_string: str, guid:str, server: str, url: str, username: str):
|
58
31
|
|
59
32
|
m_client = MyProfile(server, url, user_id=username)
|
60
33
|
token = m_client.create_egeria_bearer_token(username, "secret")
|
@@ -62,7 +35,7 @@ def display_to_dos(search_string: str, guid: str=None, server: str = good_server
|
|
62
35
|
def generate_table(search_string:str = '*') -> Table:
|
63
36
|
"""Make a new table."""
|
64
37
|
table = Table(
|
65
|
-
title=f"Open ToDos for Platform {
|
38
|
+
title=f"Open ToDos for Platform {url} @ {time.asctime()}",
|
66
39
|
# style = "black on grey66",
|
67
40
|
header_style="white on dark_blue",
|
68
41
|
show_lines=True,
|
@@ -134,7 +107,6 @@ def display_to_dos(search_string: str, guid: str=None, server: str = good_server
|
|
134
107
|
assert e.related_http_code != "200", "Invalid parameters"
|
135
108
|
|
136
109
|
if __name__ == "__main__":
|
137
|
-
sus_guid = "f9b78b26-6025-43fa-9299-a905cc6d1575"
|
138
110
|
parser = argparse.ArgumentParser()
|
139
111
|
parser.add_argument("--server", help="Name of the server to display status for")
|
140
112
|
parser.add_argument("--url", help="URL Platform to connect to")
|
@@ -145,7 +117,6 @@ if __name__ == "__main__":
|
|
145
117
|
server = args.server if args.server is not None else "view-server"
|
146
118
|
url = args.url if args.url is not None else "https://localhost:9443"
|
147
119
|
userid = args.userid if args.userid is not None else 'erinoverview'
|
148
|
-
# guid = args.guid if args.guid is not None else None
|
149
120
|
guid = None
|
150
121
|
|
151
122
|
search_string = Prompt.ask("Enter the ToDo you are searching for:", default="*")
|
@@ -0,0 +1,135 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
4
|
+
Copyright Contributors to the ODPi Egeria project.
|
5
|
+
|
6
|
+
A simple widget to retrieve the registered services.
|
7
|
+
|
8
|
+
"""
|
9
|
+
|
10
|
+
import argparse
|
11
|
+
import sys
|
12
|
+
import time
|
13
|
+
|
14
|
+
from rich import box
|
15
|
+
from rich.console import Console
|
16
|
+
from rich.prompt import Prompt
|
17
|
+
from rich.table import Table
|
18
|
+
|
19
|
+
from pyegeria import (
|
20
|
+
InvalidParameterException,
|
21
|
+
PropertyServerException,
|
22
|
+
UserNotAuthorizedException,
|
23
|
+
RegisteredInfo,
|
24
|
+
)
|
25
|
+
|
26
|
+
|
27
|
+
def display_registered_svcs(service: str, server: str , url: str,
|
28
|
+
username: str, password: str ):
|
29
|
+
""" Display the registered services list
|
30
|
+
Parameters
|
31
|
+
----------
|
32
|
+
service : str, optional
|
33
|
+
The type of service to display information for. Default is "help".
|
34
|
+
|
35
|
+
server : str, optional
|
36
|
+
The server to connect to. Default is `default_server`.
|
37
|
+
|
38
|
+
url : str, optional
|
39
|
+
The platform URL. Default is `default_platform`.
|
40
|
+
|
41
|
+
username : str, optional
|
42
|
+
The username for authentication. Default is `default_user`.
|
43
|
+
|
44
|
+
password : str, optional
|
45
|
+
The password for authentication. Default is `default_password`.
|
46
|
+
"""
|
47
|
+
def generate_table(svc_list) -> Table:
|
48
|
+
"""Make a new table."""
|
49
|
+
table = Table(
|
50
|
+
title=f"Technology Types for: {url} @ {time.asctime()}",
|
51
|
+
# style = "black on grey66",
|
52
|
+
header_style="white on dark_blue",
|
53
|
+
show_lines=True,
|
54
|
+
box=box.ROUNDED,
|
55
|
+
caption=f"Registered Services from Server '{server}' @ Platform - {url}",
|
56
|
+
expand=True
|
57
|
+
)
|
58
|
+
table.add_column("Service Id")
|
59
|
+
table.add_column("Service Name")
|
60
|
+
table.add_column("Service Development Status")
|
61
|
+
table.add_column("URL Marker")
|
62
|
+
table.add_column("Description")
|
63
|
+
table.add_column("Wiki")
|
64
|
+
table.add_column("Server Type")
|
65
|
+
table.add_column("Partner Service Name")
|
66
|
+
table.add_column("Partner Service Type")
|
67
|
+
|
68
|
+
if type(svc_list) is list:
|
69
|
+
for svc in svc_list:
|
70
|
+
svc_id = str(svc.get("serviceId", " "))
|
71
|
+
svc_name = svc.get("serviceName", "b")
|
72
|
+
svc_dev_status = svc.get("serviceDevelopmentStatus", " ")
|
73
|
+
svc_url_marker = svc.get("serviceUrlMarker", " ")
|
74
|
+
svc_description = svc.get("serviceDescription", " ")
|
75
|
+
svc_wiki = svc.get("serviceWiki", " ")
|
76
|
+
svc_partner_svc_name = svc.get("partnerServiceName", " ")
|
77
|
+
svc_partner_svc_type = svc.get("partnerServiceType", " ")
|
78
|
+
|
79
|
+
table.add_row(
|
80
|
+
svc_id, svc_name, svc_dev_status, svc_url_marker, svc_description, svc_wiki,
|
81
|
+
svc_partner_svc_name, svc_partner_svc_type
|
82
|
+
)
|
83
|
+
return table
|
84
|
+
elif type(svc_list) is str:
|
85
|
+
help = """
|
86
|
+
The kinds of services that you can get more information include:
|
87
|
+
all.....................lists all registered services
|
88
|
+
access-services.........lists all registered access services
|
89
|
+
common-services.........lists all registered common services
|
90
|
+
engine-services.........lists all registered engine services
|
91
|
+
governance-services.....lists all registered governance services
|
92
|
+
integration-services....lists all registered integration services
|
93
|
+
view-services...........lists all registered view services
|
94
|
+
|
95
|
+
Pass in a parameter from the left-hand column into the function to
|
96
|
+
get more details on the specified service category.
|
97
|
+
"""
|
98
|
+
console.print(help)
|
99
|
+
|
100
|
+
else:
|
101
|
+
print("Unknown service type")
|
102
|
+
sys.exit(1)
|
103
|
+
|
104
|
+
console = Console()
|
105
|
+
try:
|
106
|
+
a_client = RegisteredInfo(server, url, username)
|
107
|
+
# token = a_client.create_egeria_bearer_token(username, password)
|
108
|
+
svc_list = a_client.list_registered_svcs(service)
|
109
|
+
|
110
|
+
with console.pager():
|
111
|
+
console.print(generate_table(svc_list))
|
112
|
+
|
113
|
+
except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
|
114
|
+
console.print_exception(show_locals=True)
|
115
|
+
finally:
|
116
|
+
a_client.close_session()
|
117
|
+
|
118
|
+
|
119
|
+
if __name__ == "__main__":
|
120
|
+
parser = argparse.ArgumentParser()
|
121
|
+
parser.add_argument("--server", help="Name of the server to display status for")
|
122
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
123
|
+
parser.add_argument("--userid", help="User Id")
|
124
|
+
parser.add_argument("--password", help="Password")
|
125
|
+
|
126
|
+
args = parser.parse_args()
|
127
|
+
|
128
|
+
server = args.server if args.server is not None else "active-metadata-store"
|
129
|
+
url = args.url if args.url is not None else "https://localhost:9443"
|
130
|
+
userid = args.userid if args.userid is not None else 'garygeeke'
|
131
|
+
password = args.password if args.password is not None else 'secret'
|
132
|
+
|
133
|
+
svc_kind = Prompt.ask("Enter the service type you are searching for:", default="all")
|
134
|
+
|
135
|
+
display_registered_svcs(svc_kind, server, url, userid, password=password)
|
@@ -8,41 +8,26 @@ Copyright Contributors to the ODPi Egeria project.
|
|
8
8
|
Get valid relationship types.
|
9
9
|
"""
|
10
10
|
|
11
|
-
import time
|
12
|
-
import json
|
13
11
|
import argparse
|
12
|
+
import time
|
13
|
+
|
14
|
+
from rich import box
|
15
|
+
from rich import print
|
16
|
+
from rich.console import Console
|
17
|
+
from rich.prompt import Prompt
|
18
|
+
from rich.table import Table
|
19
|
+
|
14
20
|
from pyegeria import (
|
15
21
|
InvalidParameterException,
|
16
22
|
PropertyServerException,
|
17
23
|
UserNotAuthorizedException,
|
18
24
|
print_exception_response,
|
19
25
|
)
|
20
|
-
from
|
21
|
-
from rich.live import Live
|
22
|
-
from rich import box
|
23
|
-
from rich.prompt import Prompt
|
24
|
-
from rich.tree import Tree
|
25
|
-
from rich import print
|
26
|
-
from rich.console import Console
|
27
|
-
from pyegeria import ValidMetadataManager, ProjectManager
|
28
|
-
|
29
|
-
disable_ssl_warnings = True
|
30
|
-
|
31
|
-
good_platform1_url = "https://127.0.0.1:9443"
|
32
|
-
|
33
|
-
|
34
|
-
# good_platform1_url = "https://127.0.0.1:30080"
|
35
|
-
# good_platform2_url = "https://127.0.0.1:30081"
|
36
|
-
# bad_platform1_url = "https://localhost:9443"
|
26
|
+
from pyegeria import ValidMetadataManager
|
37
27
|
|
38
|
-
good_user_1 = "garygeeke"
|
39
|
-
good_user_2 = "erinoverview"
|
40
|
-
good_server_3 = "view-server"
|
41
28
|
|
42
|
-
|
43
|
-
|
44
|
-
def display_list(type_name:str, server: str = good_server_3, url: str = good_platform1_url,
|
45
|
-
username: str = good_user_2, save_output: bool = False):
|
29
|
+
def display_list(type_name:str, server: str, url: str ,
|
30
|
+
username: str, save_output: bool = False):
|
46
31
|
|
47
32
|
p_client = ValidMetadataManager(server, url, user_id=username)
|
48
33
|
token = p_client.create_egeria_bearer_token(username, "secret")
|
@@ -63,15 +48,14 @@ def display_list(type_name:str, server: str = good_server_3, url: str = good_pla
|
|
63
48
|
# table.add_column("GUID", no_wrap=True,)
|
64
49
|
table.add_column("Status")
|
65
50
|
table.add_column("Description")
|
66
|
-
table.add_column("Description Wiki")
|
51
|
+
table.add_column("Description Wiki", no_wrap=True)
|
67
52
|
table.add_column("Attribute Name")
|
68
53
|
table.add_column("Attribute Status")
|
69
54
|
table.add_column("Attribute Type")
|
70
|
-
# table.add_column("Attribute Type")
|
71
55
|
table.add_column("Attribute Description")
|
72
56
|
|
73
57
|
types_list = p_client.get_valid_relationship_types(type_name)
|
74
|
-
|
58
|
+
|
75
59
|
print(type(types_list))
|
76
60
|
if types_list is None:
|
77
61
|
name = " "
|
@@ -106,10 +90,7 @@ def display_list(type_name:str, server: str = good_server_3, url: str = good_pla
|
|
106
90
|
return table
|
107
91
|
|
108
92
|
try:
|
109
|
-
|
110
|
-
# while True:
|
111
|
-
# time.sleep(2)
|
112
|
-
# live.update(generate_table())
|
93
|
+
|
113
94
|
console = Console(record=True)
|
114
95
|
with console.pager():
|
115
96
|
console.print(generate_table(type_name))
|
@@ -129,13 +110,13 @@ if __name__ == "__main__":
|
|
129
110
|
parser.add_argument("--url", help="URL Platform to connect to")
|
130
111
|
parser.add_argument("--userid", help="User Id")
|
131
112
|
parser.add_argument("--save-output", help="Save output to file?")
|
132
|
-
|
113
|
+
|
133
114
|
args = parser.parse_args()
|
134
115
|
|
135
116
|
server = args.server if args.server is not None else "view-server"
|
136
117
|
url = args.url if args.url is not None else "https://localhost:9443"
|
137
118
|
userid = args.userid if args.userid is not None else 'erinoverview'
|
138
119
|
save_output = args.save_output if args.save_output is not None else False
|
139
|
-
type_name = Prompt.ask("Enter the Type Name to retrieve:", default="
|
120
|
+
type_name = Prompt.ask("Enter the Type Name to retrieve:", default="AssetOwner")
|
140
121
|
|
141
122
|
display_list(type_name, server, url, userid, save_output)
|
@@ -28,8 +28,8 @@ from rich.console import Console
|
|
28
28
|
|
29
29
|
|
30
30
|
from pyegeria.server_operations import ServerOps
|
31
|
-
from pyegeria.
|
32
|
-
from pyegeria.
|
31
|
+
from pyegeria._deprecated_gov_engine import GovEng
|
32
|
+
from pyegeria.glossary_browser_omvs import GlossaryBrowser
|
33
33
|
disable_ssl_warnings = True
|
34
34
|
|
35
35
|
good_platform1_url = "https://127.0.0.1:9443"
|
@@ -24,38 +24,16 @@ from pyegeria import (
|
|
24
24
|
RegisteredInfo
|
25
25
|
)
|
26
26
|
|
27
|
-
disable_ssl_warnings = True
|
28
27
|
|
29
|
-
|
30
|
-
good_platform2_url = "https://egeria.pdr-associates.com:7443"
|
31
|
-
bad_platform1_url = "https://localhost:9443"
|
32
|
-
|
33
|
-
# good_platform1_url = "https://127.0.0.1:30080"
|
34
|
-
# good_platform2_url = "https://127.0.0.1:30081"
|
35
|
-
# bad_platform1_url = "https://localhost:9443"
|
36
|
-
|
37
|
-
good_user_1 = "garygeeke"
|
38
|
-
good_user_2 = "erinoverview"
|
39
|
-
bad_user_1 = "eviledna"
|
40
|
-
bad_user_2 = ""
|
41
|
-
|
42
|
-
good_server_1 = "active-metadata-store"
|
43
|
-
good_server_2 = "simple-metadata-store"
|
44
|
-
good_server_3 = "view-server"
|
45
|
-
good_server_4 = "engine-host"
|
46
|
-
bad_server_1 = "coco"
|
47
|
-
bad_server_2 = ""
|
48
|
-
|
49
|
-
|
50
|
-
def display_asset_types(server: str = good_server_3, url: str = good_platform1_url, username: str = good_user_2):
|
28
|
+
def display_asset_types(server: str, url: str, username: str):
|
51
29
|
r_client = RegisteredInfo(server, url, username)
|
52
|
-
token = r_client.create_egeria_bearer_token(
|
30
|
+
token = r_client.create_egeria_bearer_token(username, "secret")
|
53
31
|
asset_types = r_client.list_asset_types()
|
54
32
|
|
55
33
|
def generate_table() -> Table:
|
56
34
|
"""Make a new table."""
|
57
35
|
table = Table(
|
58
|
-
title=f"Asset Types for: {
|
36
|
+
title=f"Asset Types for: {url} @ {time.asctime()}",
|
59
37
|
# style = "black on grey66",
|
60
38
|
header_style="white on dark_blue",
|
61
39
|
show_lines=True,
|
@@ -24,7 +24,7 @@ from pyegeria import (
|
|
24
24
|
UserNotAuthorizedException,
|
25
25
|
print_exception_response,
|
26
26
|
)
|
27
|
-
from pyegeria.
|
27
|
+
from pyegeria._deprecated_gov_engine import GovEng
|
28
28
|
from pyegeria.my_profile_omvs import MyProfile
|
29
29
|
disable_ssl_warnings = True
|
30
30
|
|