pyegeria 0.3.8__tar.gz → 0.4.0__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.4.0}/PKG-INFO +5 -4
- {pyegeria-0.3.8 → pyegeria-0.4.0}/README.md +4 -1
- pyegeria-0.4.0/examples/Coco_config/__pycache__/globals.cpython-312.pyc +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Coco_config/config_cocoView1.py +2 -1
- pyegeria-0.4.0/examples/widgets/README.md +34 -0
- pyegeria-0.4.0/examples/widgets/catalog_user/README.md +15 -0
- pyegeria-0.4.0/examples/widgets/catalog_user/__init__.py +0 -0
- pyegeria-0.4.0/examples/widgets/catalog_user/list_assets.py +138 -0
- pyegeria-0.4.0/examples/widgets/catalog_user/view_asset_graph.py +236 -0
- pyegeria-0.3.8/examples/widgets/collection_viewer.py → pyegeria-0.4.0/examples/widgets/catalog_user/view_collection.py +12 -31
- pyegeria-0.3.8/examples/widgets/glossary_view.py → pyegeria-0.4.0/examples/widgets/catalog_user/view_glossary.py +2 -2
- pyegeria-0.4.0/examples/widgets/developer/README.md +24 -0
- pyegeria-0.4.0/examples/widgets/developer/__init__.py +0 -0
- pyegeria-0.4.0/examples/widgets/developer/get_guid_info.py +86 -0
- {pyegeria-0.3.8/examples/widgets → pyegeria-0.4.0/examples/widgets/developer}/get_tech_details.py +1 -37
- {pyegeria-0.3.8/examples/widgets → pyegeria-0.4.0/examples/widgets/developer}/list_asset_types.py +3 -25
- pyegeria-0.4.0/examples/widgets/developer/list_registered_services.py +135 -0
- pyegeria-0.3.8/examples/widgets/get_relationship_types.py → pyegeria-0.4.0/examples/widgets/developer/list_relationship_types.py +25 -43
- pyegeria-0.4.0/examples/widgets/developer/list_tech_templates.py +134 -0
- pyegeria-0.3.8/examples/widgets/get_valid_metadata_values.py → pyegeria-0.4.0/examples/widgets/developer/list_valid_metadata_values.py +1 -1
- pyegeria-0.4.0/examples/widgets/operational/README.md +24 -0
- pyegeria-0.4.0/examples/widgets/operational/__init__.py +0 -0
- pyegeria-0.4.0/examples/widgets/operational/get_tech_type_elements.py +137 -0
- pyegeria-0.4.0/examples/widgets/operational/get_tech_type_template.py +137 -0
- pyegeria-0.4.0/examples/widgets/operational/view_asset_changes.py +82 -0
- pyegeria-0.4.0/examples/widgets/operational/view_asset_events.py +82 -0
- pyegeria-0.3.8/examples/widgets/coco_status.py → pyegeria-0.4.0/examples/widgets/operational/view_coco_status.py +1 -3
- pyegeria-0.3.8/examples/widgets/engine_action_status.py → pyegeria-0.4.0/examples/widgets/operational/view_eng_action_status.py +17 -31
- pyegeria-0.3.8/examples/widgets/gov_engine_status.py → pyegeria-0.4.0/examples/widgets/operational/view_gov_eng_status.py +0 -1
- pyegeria-0.3.8/examples/widgets/integration_daemon_status.py → pyegeria-0.4.0/examples/widgets/operational/view_integ_daemon_status.py +30 -42
- pyegeria-0.4.0/examples/widgets/operational/view_platform_status.py +123 -0
- pyegeria-0.3.8/examples/widgets/server_status.py → pyegeria-0.4.0/examples/widgets/operational/view_server_status.py +1 -20
- pyegeria-0.4.0/examples/widgets/personal_organizer/README.md +17 -0
- pyegeria-0.4.0/examples/widgets/personal_organizer/__init__.py +0 -0
- pyegeria-0.3.8/examples/widgets/view_my_profile.py → pyegeria-0.4.0/examples/widgets/personal_organizer/get_my_profile.py +8 -34
- pyegeria-0.3.8/examples/widgets/project_list_viewer.py → pyegeria-0.4.0/examples/widgets/personal_organizer/list_projects.py +13 -27
- pyegeria-0.3.8/examples/widgets/find_todos.py → pyegeria-0.4.0/examples/widgets/personal_organizer/list_todos.py +11 -39
- pyegeria-0.3.8/examples/widgets/my_todos.py → pyegeria-0.4.0/examples/widgets/personal_organizer/view_my_todos.py +1 -1
- pyegeria-0.3.8/examples/widgets/open_todos.py → pyegeria-0.4.0/examples/widgets/personal_organizer/view_open_todos.py +3 -24
- {pyegeria-0.3.8 → pyegeria-0.4.0}/pyproject.toml +1 -3
- pyegeria-0.4.0/setup.py +83 -0
- pyegeria-0.4.0/src/pyegeria/Xfeedback_manager_omvs.py +238 -0
- pyegeria-0.4.0/src/pyegeria/Xloaded_resources_omvs.py +91 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria/__init__.py +15 -12
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria/_client.py +4 -6
- pyegeria-0.3.8/src/pyegeria/gov_engine.py → pyegeria-0.4.0/src/pyegeria/_deprecated_gov_engine.py +2 -59
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria/_exceptions.py +5 -6
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria/_globals.py +3 -1
- pyegeria-0.4.0/src/pyegeria/asset_catalog_omvs.py +672 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria/automated_curation_omvs.py +627 -359
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria/collection_manager_omvs.py +187 -248
- pyegeria-0.4.0/src/pyegeria/core_guids.py +128 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria/core_omag_server_config.py +1 -5
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria/full_omag_server_config.py +53 -83
- pyegeria-0.4.0/src/pyegeria/glossary_browser_omvs.py +2208 -0
- pyegeria-0.4.0/src/pyegeria/glossary_manager_omvs.py +3002 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria/my_profile_omvs.py +2 -7
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria/platform_services.py +0 -3
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria/project_manager_omvs.py +9 -15
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria/registered_info.py +12 -52
- pyegeria-0.4.0/src/pyegeria/runtime_manager_omvs.py +967 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria/server_operations.py +1 -5
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria/valid_metadata_omvs.py +204 -43
- {pyegeria-0.3.8 → pyegeria-0.4.0/src/pyegeria.egg-info}/PKG-INFO +5 -4
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria.egg-info/SOURCES.txt +50 -24
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria.egg-info/requires.txt +0 -2
- pyegeria-0.3.8/tests/test_glossary_omvs.py → pyegeria-0.4.0/tests/test_Xglossary_manager_omvs.py +3 -8
- pyegeria-0.4.0/tests/test_asset_catalog_omvs.py +247 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/tests/test_automated_curation_omvs.py +335 -308
- {pyegeria-0.3.8 → pyegeria-0.4.0}/tests/test_client.py +2 -5
- {pyegeria-0.3.8 → pyegeria-0.4.0}/tests/test_collection_manager_omvs.py +4 -18
- {pyegeria-0.3.8 → pyegeria-0.4.0}/tests/test_core_omag_server_config.py +4 -7
- {pyegeria-0.3.8 → pyegeria-0.4.0}/tests/test_full_omag_server_config.py +20 -4
- pyegeria-0.4.0/tests/test_glossary_omvs.py +261 -0
- pyegeria-0.4.0/tests/test_loaded_resources.py +78 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/tests/test_my_profile_omvs.py +6 -6
- {pyegeria-0.3.8 → pyegeria-0.4.0}/tests/test_platform_services.py +1 -1
- {pyegeria-0.3.8 → pyegeria-0.4.0}/tests/test_registered_info.py +6 -8
- pyegeria-0.4.0/tests/test_runtime_manager.py +223 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/tests/test_server_operations.py +5 -5
- {pyegeria-0.3.8 → pyegeria-0.4.0}/tests/test_valid_metadata_omvs.py +57 -13
- pyegeria-0.3.8/examples/widgets/README.md +0 -26
- pyegeria-0.3.8/examples/widgets/multi-server_status.py +0 -120
- pyegeria-0.3.8/setup.py +0 -67
- 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.4.0}/LICENSE +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/MANIFEST.in +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/.DS_Store +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Coco_config/README.md +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Coco_config/__init__.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Coco_config/config_cocoMDS1.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Coco_config/config_cocoMDS2.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Coco_config/config_cocoMDS3.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Coco_config/config_cocoMDS4.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Coco_config/config_cocoMDS5.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Coco_config/config_cocoMDS6.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Coco_config/config_cocoMDSx.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Coco_config/config_exchangeDL01.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Coco_config/config_governDL01.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Coco_config/config_monitorDev01.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Coco_config/config_monitorGov01.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Coco_config/globals.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Doc_Samples/Create_Collection_Sample.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Doc_Samples/Create_Sustainability_Collection_Sample.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Jupyter Notebooks/P-egeria-server-config.ipynb +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Jupyter Notebooks/README.md +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Jupyter Notebooks/common/P-environment-check.ipynb +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Jupyter Notebooks/common/__init__.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Jupyter Notebooks/common/common-functions.ipynb +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Jupyter Notebooks/common/environment-check.ipynb +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Jupyter Notebooks/common/globals.ipynb +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Jupyter Notebooks/common/globals.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/Jupyter Notebooks/common/orig_globals.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/__init__.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/__pycache__/__init__.cpython-312.pyc +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/widgets/.DS_Store +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/widgets/__init__.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/widgets/__pycache__/__init__.cpython-312.pyc +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/examples/widgets/__pycache__/server_status_widget.cpython-312-pytest-7.4.4.pyc +0 -0
- /pyegeria-0.3.8/examples/widgets/get_tech_types.py → /pyegeria-0.4.0/examples/widgets/developer/list_tech_types.py +0 -0
- /pyegeria-0.3.8/examples/widgets/server_status_widget.py → /pyegeria-0.4.0/examples/widgets/operational/view_server_list.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/setup.cfg +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria/_validators.py +0 -0
- /pyegeria-0.3.8/src/pyegeria/governance_author.py → /pyegeria-0.4.0/src/pyegeria/action_author_omvs.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria/utils.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria.egg-info/dependency_links.txt +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/src/pyegeria.egg-info/top_level.txt +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/tests/test_project_manager_omvs.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/tests/test_util_exp.py +0 -0
- {pyegeria-0.3.8 → pyegeria-0.4.0}/tests/test_validators.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyegeria
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.4.0
|
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
|
@@ -40,13 +38,16 @@ open metadata environment from python. Details about the
|
|
40
38
|
open source Egeria project can be found at [Egeria Project](https://egeria-project.org).
|
41
39
|
|
42
40
|
This package is in active development. There is initial
|
43
|
-
support for many of Egeria's services including
|
41
|
+
support for many of Egeria's services including configuration and operation. This client depends on
|
44
42
|
Egeria 4.4 Snapshot and above - although most of the functions may work on earlier versions of Egeria as well.
|
45
43
|
|
46
44
|
The code is organized to mimic the existing Egeria Java Client structure.
|
47
45
|
|
48
46
|
A new examples folder holds some useful text widgets that help to visualize the status of an Egeria deployment.
|
49
47
|
|
48
|
+
WARNING: files that start with "X" are in-progress placeholders that are not meant to be used..they will mature and
|
49
|
+
evolve.
|
50
|
+
|
50
51
|
All feedback is welcome. Please engage via our [community](http://egeria-project.org/guides/community/),
|
51
52
|
team calls, or via github issues in this repo. If interested in contributing,
|
52
53
|
you can engage via the community or directly reach out to
|
@@ -13,13 +13,16 @@ open metadata environment from python. Details about the
|
|
13
13
|
open source Egeria project can be found at [Egeria Project](https://egeria-project.org).
|
14
14
|
|
15
15
|
This package is in active development. There is initial
|
16
|
-
support for many of Egeria's services including
|
16
|
+
support for many of Egeria's services including configuration and operation. This client depends on
|
17
17
|
Egeria 4.4 Snapshot and above - although most of the functions may work on earlier versions of Egeria as well.
|
18
18
|
|
19
19
|
The code is organized to mimic the existing Egeria Java Client structure.
|
20
20
|
|
21
21
|
A new examples folder holds some useful text widgets that help to visualize the status of an Egeria deployment.
|
22
22
|
|
23
|
+
WARNING: files that start with "X" are in-progress placeholders that are not meant to be used..they will mature and
|
24
|
+
evolve.
|
25
|
+
|
23
26
|
All feedback is welcome. Please engage via our [community](http://egeria-project.org/guides/community/),
|
24
27
|
team calls, or via github issues in this repo. If interested in contributing,
|
25
28
|
you can engage via the community or directly reach out to
|
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"
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
|
2
|
+
<!-- Copyright Contributors to the Egeria project. -->
|
3
|
+
|
4
|
+
The example applications in this directory provide some simple but useful visualization of the Egeria environment. They
|
5
|
+
are built with the **Rich** python package and demonstrate the use of **pyegeria** .
|
6
|
+
|
7
|
+
The applications are invoked using the python3 command - for instance:
|
8
|
+
`python3 server_status_widget -h` would display the help information for the server_status_widget.
|
9
|
+
Running them requires that you have pyegeria installed. pyegeria can be installed using:
|
10
|
+
'pip install pyegeria'
|
11
|
+
|
12
|
+
Once pyegeria is installed, the scripts may also be run as commands from any directory without having to specify python3 in front such as:
|
13
|
+
`view_platform_status.py
|
14
|
+
|
15
|
+
Some of the widgets are "live" - that is running continuously until ctrl-c is issued to interrupt it.
|
16
|
+
|
17
|
+
As the number of widgets has grown, they have been organized by role into different sub-directories:
|
18
|
+
|
19
|
+
* catalog_user - for users of the Egeria environment
|
20
|
+
* developer - for those building with, or working on Egeria
|
21
|
+
* operational - for visualizing the current state of Egeria - typically for administrators
|
22
|
+
* personal_organizer - for visualizing work and individual items
|
23
|
+
|
24
|
+
The naming convention for the widgets helps to understand their behaviour:
|
25
|
+
Here is a list - if the widget starts with:
|
26
|
+
|
27
|
+
* get - it will return details about a single item
|
28
|
+
* list - lists elements through a paging interface like "more" - use q to quit.
|
29
|
+
* view - provides a live view - typically of a status - use control-c to quit
|
30
|
+
|
31
|
+
|
32
|
+
----
|
33
|
+
License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
|
34
|
+
Copyright Contributors to the Egeria project.
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
|
2
|
+
<!-- Copyright Contributors to the Egeria project. -->
|
3
|
+
|
4
|
+
# Catalog User
|
5
|
+
|
6
|
+
These widgets display different kinds of information useful to a typical catalog user. Widgets
|
7
|
+
will continue to be added over time to cover more facets of catalog use.
|
8
|
+
|
9
|
+
* list_assets.py - lists assets containing the user provided search string in the display name or qualified name. Search string must be a minimum of three characters.
|
10
|
+
* view_asset_graph.py - shows a tree view of an asset with its nested elements and relationships.
|
11
|
+
* view_collection.py - provides a tree view of a collection with all nested collections and items within the collection.
|
12
|
+
* view_glossary.py - provides a simple glossary viewer showing terms and related information.
|
13
|
+
----
|
14
|
+
License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
|
15
|
+
Copyright Contributors to the Egeria project.
|
File without changes
|
@@ -0,0 +1,138 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
4
|
+
Copyright Contributors to the ODPi Egeria project.
|
5
|
+
|
6
|
+
Unit tests for the Utils helper functions using the Pytest framework.
|
7
|
+
|
8
|
+
|
9
|
+
A simple display for glossary terms
|
10
|
+
"""
|
11
|
+
|
12
|
+
import time
|
13
|
+
import json
|
14
|
+
import argparse
|
15
|
+
from pyegeria import (
|
16
|
+
InvalidParameterException,
|
17
|
+
PropertyServerException,
|
18
|
+
UserNotAuthorizedException,
|
19
|
+
print_exception_response,
|
20
|
+
AssetCatalog
|
21
|
+
)
|
22
|
+
# import pyegeria.X_asset_catalog_omvs
|
23
|
+
from rich.table import Table
|
24
|
+
from rich.live import Live
|
25
|
+
from rich import box
|
26
|
+
from rich.prompt import Prompt
|
27
|
+
from rich.tree import Tree
|
28
|
+
from rich import print
|
29
|
+
from rich.console import Console
|
30
|
+
|
31
|
+
|
32
|
+
from pyegeria.server_operations import ServerOps
|
33
|
+
from pyegeria._deprecated_gov_engine import GovEng
|
34
|
+
from pyegeria.glossary_browser_omvs import GlossaryBrowser
|
35
|
+
disable_ssl_warnings = True
|
36
|
+
|
37
|
+
good_platform1_url = "https://127.0.0.1:9443"
|
38
|
+
good_platform2_url = "https://egeria.pdr-associates.com:7443"
|
39
|
+
bad_platform1_url = "https://localhost:9443"
|
40
|
+
|
41
|
+
# good_platform1_url = "https://127.0.0.1:30080"
|
42
|
+
# good_platform2_url = "https://127.0.0.1:30081"
|
43
|
+
# bad_platform1_url = "https://localhost:9443"
|
44
|
+
|
45
|
+
good_user_1 = "garygeeke"
|
46
|
+
good_user_2 = "erinoverview"
|
47
|
+
bad_user_1 = "eviledna"
|
48
|
+
bad_user_2 = ""
|
49
|
+
|
50
|
+
good_server_1 = "active-metadata-store"
|
51
|
+
good_server_2 = "simple-metadata-store"
|
52
|
+
good_server_3 = "view-server"
|
53
|
+
good_server_4 = "engine-host"
|
54
|
+
bad_server_1 = "coco"
|
55
|
+
bad_server_2 = ""
|
56
|
+
|
57
|
+
|
58
|
+
def display_assets(search_string: str, guid: str=None, server: str = good_server_3, url: str = good_platform1_url, username: str = good_user_2):
|
59
|
+
|
60
|
+
g_client = AssetCatalog(server, url, username)
|
61
|
+
token = g_client.create_egeria_bearer_token(username, "secret")
|
62
|
+
|
63
|
+
|
64
|
+
def generate_table(search_string:str = '*') -> Table:
|
65
|
+
"""Make a new table."""
|
66
|
+
table = Table(
|
67
|
+
title=f"Asset Definitions for assets like {search_string} @ {time.asctime()}",
|
68
|
+
# style = "black on grey66",
|
69
|
+
header_style="white on dark_blue",
|
70
|
+
show_lines=True,
|
71
|
+
box=box.ROUNDED,
|
72
|
+
caption=f"View Server '{server}' @ Platform - {url}",
|
73
|
+
expand=True
|
74
|
+
)
|
75
|
+
table.add_column("Display Name")
|
76
|
+
table.add_column("Type Name")
|
77
|
+
table.add_column("GUID", no_wrap=True)
|
78
|
+
table.add_column("Network Address/Path")
|
79
|
+
table.add_column("Qualified Name")
|
80
|
+
|
81
|
+
|
82
|
+
assets = g_client.find_assets_in_domain(search_string, starts_with=False,
|
83
|
+
ends_with=False, ignore_case=True, page_size=10)
|
84
|
+
if type(assets) is str:
|
85
|
+
return table
|
86
|
+
|
87
|
+
for element in assets:
|
88
|
+
display_name = element["displayName"]
|
89
|
+
qualified_name = element["qualifiedName"]
|
90
|
+
type_name = element["type"]["typeName"]
|
91
|
+
guid = element["guid"]
|
92
|
+
path_name = element.get("extendedProperties", None)
|
93
|
+
if path_name:
|
94
|
+
path = path_name.get("pathName"," ")
|
95
|
+
else:
|
96
|
+
path = " "
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
table.add_row(
|
101
|
+
display_name, type_name,guid, path, qualified_name
|
102
|
+
)
|
103
|
+
|
104
|
+
g_client.close_session()
|
105
|
+
return table
|
106
|
+
|
107
|
+
try:
|
108
|
+
# with Live(generate_table(), refresh_per_second=4, screen=True) as live:
|
109
|
+
# while True:
|
110
|
+
# time.sleep(2)
|
111
|
+
# live.update(generate_table())
|
112
|
+
console = Console()
|
113
|
+
with console.pager():
|
114
|
+
console.print(generate_table(search_string))
|
115
|
+
|
116
|
+
|
117
|
+
except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
|
118
|
+
print_exception_response(e)
|
119
|
+
assert e.related_http_code != "200", "Invalid parameters"
|
120
|
+
|
121
|
+
if __name__ == "__main__":
|
122
|
+
sus_guid = "f9b78b26-6025-43fa-9299-a905cc6d1575"
|
123
|
+
parser = argparse.ArgumentParser()
|
124
|
+
parser.add_argument("--server", help="Name of the server to display status for")
|
125
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
126
|
+
parser.add_argument("--userid", help="User Id")
|
127
|
+
parser.add_argument("--guid", help="GUID of glossary to search")
|
128
|
+
parser.add_argument("--sustainability", help="Set True for Sustainability Glossary")
|
129
|
+
args = parser.parse_args()
|
130
|
+
|
131
|
+
server = args.server if args.server is not None else "view-server"
|
132
|
+
url = args.url if args.url is not None else "https://localhost:9443"
|
133
|
+
userid = args.userid if args.userid is not None else 'garygeeke'
|
134
|
+
guid = args.guid if args.guid is not None else None
|
135
|
+
guid = sus_guid if args.sustainability else None
|
136
|
+
|
137
|
+
search_string = Prompt.ask("Enter the asset you are searching for:", default="*")
|
138
|
+
display_assets(search_string, guid,server, url, userid)
|
@@ -0,0 +1,236 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
4
|
+
Copyright Contributors to the ODPi Egeria project.
|
5
|
+
|
6
|
+
Display the status of cataloged platforms and servers.
|
7
|
+
"""
|
8
|
+
import sys
|
9
|
+
import time
|
10
|
+
import argparse
|
11
|
+
|
12
|
+
from rich import json
|
13
|
+
from rich.panel import Panel
|
14
|
+
|
15
|
+
from pyegeria import (
|
16
|
+
InvalidParameterException,
|
17
|
+
PropertyServerException,
|
18
|
+
UserNotAuthorizedException,
|
19
|
+
print_exception_response,
|
20
|
+
AssetCatalog
|
21
|
+
)
|
22
|
+
from rich.table import Table
|
23
|
+
from rich.live import Live
|
24
|
+
from rich.console import Console
|
25
|
+
from rich.markdown import Markdown
|
26
|
+
from rich.tree import Tree
|
27
|
+
from rich.prompt import Prompt
|
28
|
+
from rich.panel import Panel
|
29
|
+
from rich.text import Text
|
30
|
+
from rich import print
|
31
|
+
|
32
|
+
disable_ssl_warnings = True
|
33
|
+
console = Console(width=200)
|
34
|
+
|
35
|
+
platform = "https://127.0.0.1:9443"
|
36
|
+
user = "erinoverview"
|
37
|
+
view_server = "view-server"
|
38
|
+
|
39
|
+
guid_list = []
|
40
|
+
|
41
|
+
def asset_viewer(asset_name: str, server_name:str, platform_url:str, user:str):
|
42
|
+
|
43
|
+
def build_classifications(classification: dict) -> Markdown:
|
44
|
+
|
45
|
+
class_md = "-"
|
46
|
+
for c in classification:
|
47
|
+
c_type = c["classificationName"]
|
48
|
+
if c_type == "Anchors":
|
49
|
+
continue
|
50
|
+
class_md += f"* Classification: {c_type}\n"
|
51
|
+
class_props = c["classificationProperties"]
|
52
|
+
for prop in class_props.keys():
|
53
|
+
class_md += f"* {prop}: {class_props[prop]}\n"
|
54
|
+
if class_md == "-":
|
55
|
+
output = None
|
56
|
+
else:
|
57
|
+
output = class_md
|
58
|
+
return output
|
59
|
+
|
60
|
+
def build_nested_elements(nested_element: dict) -> Markdown:
|
61
|
+
ne_md = " "
|
62
|
+
|
63
|
+
ne_created_by = nested_element["versions"]["createdBy"]
|
64
|
+
ne_created_at = nested_element["versions"]["createTime"]
|
65
|
+
ne_guid = nested_element["guid"]
|
66
|
+
guid_list.append(ne_guid)
|
67
|
+
|
68
|
+
ne_type = nested_element["type"]["typeName"]
|
69
|
+
ne_classifications = nested_element["classifications"]
|
70
|
+
ne_class_md = build_classifications(ne_classifications)
|
71
|
+
# ne_class_md = " " if ne_class_md is None else ne_class_md
|
72
|
+
ne_props = nested_element["properties"]
|
73
|
+
|
74
|
+
ne_prop_md = ""
|
75
|
+
for prop in ne_props.keys():
|
76
|
+
ne_prop_md += f"* {prop}: {ne_props[prop]}\n"
|
77
|
+
ne_md = (f"Nested Element of Type: {ne_type} with GUID: {ne_guid} \n "
|
78
|
+
f"* created by {ne_created_by} at time {ne_created_at}\n"
|
79
|
+
f"{ne_prop_md}\n")
|
80
|
+
if ne_class_md is not None:
|
81
|
+
ne_md += f"* {ne_class_md}"
|
82
|
+
|
83
|
+
output = Markdown(ne_md)
|
84
|
+
return output
|
85
|
+
|
86
|
+
try:
|
87
|
+
|
88
|
+
console = Console(width=200)
|
89
|
+
|
90
|
+
a_client = AssetCatalog(view_server, platform,
|
91
|
+
user_id=user)
|
92
|
+
|
93
|
+
token = a_client.create_egeria_bearer_token(user, "secret")
|
94
|
+
asset_info = a_client.find_assets_in_domain(asset_name)
|
95
|
+
asset_guid = asset_info[0]['guid']
|
96
|
+
guid_list.append(asset_guid)
|
97
|
+
|
98
|
+
asset_graph = a_client.get_asset_graph(asset_guid)
|
99
|
+
if type(asset_graph) is not dict:
|
100
|
+
print(f"\n No Asset found for {asset_name}")
|
101
|
+
sys.exit(1)
|
102
|
+
|
103
|
+
# print(f"\n{json.dumps(asset_graph, indent =2)}\n")
|
104
|
+
tree = Tree(f"{asset_name} ({asset_guid})", style = "bold bright_white",guide_style="bold bright_blue")
|
105
|
+
style = ""
|
106
|
+
|
107
|
+
asset_name = asset_graph["displayName"]
|
108
|
+
qualified_name = asset_graph["qualifiedName"]
|
109
|
+
resource_name = asset_graph["resourceName"]
|
110
|
+
|
111
|
+
asset_type = asset_graph["type"]["typeName"]
|
112
|
+
asset_origin = asset_graph["origin"]["homeMetadataCollectionName"]
|
113
|
+
asset_creation = asset_graph["versions"]["createTime"]
|
114
|
+
asset_created_by = asset_graph["versions"]["createdBy"]
|
115
|
+
asset_classifications = asset_graph["classifications"]
|
116
|
+
asset_nested_elements = asset_graph["anchoredElements"]
|
117
|
+
asset_relationships = asset_graph["relationships"]
|
118
|
+
asset_class_md = build_classifications(asset_classifications)
|
119
|
+
|
120
|
+
|
121
|
+
asset_properties = asset_graph["extendedProperties"]
|
122
|
+
prop_md = ""
|
123
|
+
for prop in asset_properties:
|
124
|
+
prop_md = f"{prop_md}* {prop}: {asset_properties[prop]}\n"
|
125
|
+
|
126
|
+
core_md = (f"**Type: {asset_type} Created by: {asset_created_by} on {asset_creation}**\n"
|
127
|
+
f"* Qualified Name: {qualified_name}\n "
|
128
|
+
f"* Resource Name: {resource_name}\n"
|
129
|
+
f"* Display Name: {asset_name}\n"
|
130
|
+
f"* Asset Origin: {asset_origin}\n{prop_md}"
|
131
|
+
)
|
132
|
+
core_md = Markdown(core_md)
|
133
|
+
p1 = Panel.fit(core_md, style = "bold bright_white")
|
134
|
+
l2 = tree.add(p1)
|
135
|
+
if asset_class_md is not None:
|
136
|
+
p2 = Panel.fit(Markdown(asset_class_md), style = "bold bright_white")
|
137
|
+
l2 = tree.add(p2)
|
138
|
+
|
139
|
+
#
|
140
|
+
# Nested Assets
|
141
|
+
#
|
142
|
+
l2 = tree.add("Nested Elements", style = "bold white")
|
143
|
+
for el in asset_nested_elements:
|
144
|
+
asset_ne_md = build_nested_elements(el)
|
145
|
+
p3 = Panel.fit(asset_ne_md, style = "bold bright_white", title="Nested Elements")
|
146
|
+
l2.add(p3)
|
147
|
+
|
148
|
+
#
|
149
|
+
# Now work on the Relationships
|
150
|
+
#
|
151
|
+
for relationship in asset_relationships:
|
152
|
+
# Find the end guids - if one isn't in our list then display
|
153
|
+
rel_end1 = relationship["end1"]
|
154
|
+
rel_end1_type = rel_end1["type"]["typeName"]
|
155
|
+
rel_end1_guid = rel_end1["guid"]
|
156
|
+
rel_end1_unique_name = rel_end1["uniqueName"]
|
157
|
+
|
158
|
+
rel_end2 = relationship["end2"]
|
159
|
+
rel_end2_type = rel_end2["type"]["typeName"]
|
160
|
+
rel_end2_guid = rel_end2["guid"]
|
161
|
+
rel_end2_unique_name = rel_end2["uniqueName"]
|
162
|
+
|
163
|
+
if (rel_end1_guid not in guid_list) or (rel_end2_guid not in guid_list):
|
164
|
+
rel_end1_class_md = build_classifications(rel_end1["classifications"])
|
165
|
+
rel_end2_class_md = build_classifications(rel_end2["classifications"])
|
166
|
+
|
167
|
+
relationship_guid = relationship["guid"]
|
168
|
+
relationship_type = relationship["type"]["typeName"]
|
169
|
+
relationship_created_by = relationship["versions"]["createdBy"]
|
170
|
+
relationship_creation_time = relationship["versions"]["createTime"]
|
171
|
+
relationship_properties = relationship.get("properties"," ")
|
172
|
+
relationship_md = (f"Relationship Type {relationship_type}\n"
|
173
|
+
f"* GUID: {relationship_guid}\n* Created by: {relationship_created_by} \n"
|
174
|
+
f"* Creation Time: {relationship_creation_time}\n"
|
175
|
+
f"* Properties: {relationship_properties}\n")
|
176
|
+
|
177
|
+
|
178
|
+
rel_md = (
|
179
|
+
f"* Relationship Type: {relationship_type}\n"
|
180
|
+
f"* Relationship GUID: {relationship_guid}\n"
|
181
|
+
f"* Created by: {relationship_created_by} at time {relationship_creation_time}\n"
|
182
|
+
)
|
183
|
+
rel_end1_md = (
|
184
|
+
f"* End1:\n"
|
185
|
+
f"\t* Type: {rel_end1_type}\n"
|
186
|
+
f"\t* GUID: {rel_end1_guid}\n"
|
187
|
+
f"\t* Unique Name: {rel_end1_unique_name}\n"
|
188
|
+
)
|
189
|
+
|
190
|
+
if rel_end1_class_md is not None:
|
191
|
+
rel_end1_md = rel_end1_md + rel_end1_class_md
|
192
|
+
|
193
|
+
rel_end2_md = (
|
194
|
+
f"* End1:\n"
|
195
|
+
f"\t* Type: {rel_end2_type}\n"
|
196
|
+
f"\t* GUID: {rel_end2_guid}\n"
|
197
|
+
f"\t* Unique Name: {rel_end2_unique_name}\n"
|
198
|
+
)
|
199
|
+
|
200
|
+
if rel_end2_class_md is not None:
|
201
|
+
rel_end1_md = rel_end2_md + rel_end2_class_md
|
202
|
+
#
|
203
|
+
# for prop in relationship_properties.keys():
|
204
|
+
# relationship_md += f"* {prop}: {relationship_properties[prop]}\n"
|
205
|
+
|
206
|
+
relationship_md += rel_end1_md + rel_end2_md
|
207
|
+
|
208
|
+
relationship_panel = Panel.fit(Markdown(relationship_md), style="bold bright_white")
|
209
|
+
tree.add(relationship_panel)
|
210
|
+
|
211
|
+
|
212
|
+
print("\n\n")
|
213
|
+
print(tree)
|
214
|
+
|
215
|
+
except (
|
216
|
+
InvalidParameterException,
|
217
|
+
PropertyServerException,
|
218
|
+
UserNotAuthorizedException
|
219
|
+
) as e:
|
220
|
+
print_exception_response(e)
|
221
|
+
|
222
|
+
|
223
|
+
if __name__ == "__main__":
|
224
|
+
parser = argparse.ArgumentParser()
|
225
|
+
|
226
|
+
parser.add_argument("--server", help="Name of the server to display status for")
|
227
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
228
|
+
parser.add_argument("--userid", help="User Id")
|
229
|
+
args = parser.parse_args()
|
230
|
+
|
231
|
+
server = args.server if args.server is not None else "view-server"
|
232
|
+
url = args.url if args.url is not None else "https://localhost:9443"
|
233
|
+
userid = args.userid if args.userid is not None else 'erinoverview'
|
234
|
+
|
235
|
+
asset_name = Prompt.ask("Enter the Asset Name to view:", default="TransMorg-Clinical-Trials-Weeklies")
|
236
|
+
asset_viewer(asset_name,server, url, userid)
|
@@ -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)
|
@@ -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"
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
|
2
|
+
<!-- Copyright Contributors to the Egeria project. -->
|
3
|
+
|
4
|
+
# Developer
|
5
|
+
|
6
|
+
These widgets display different kinds of information useful to developers. Widgets
|
7
|
+
will continue to be added over time to cover more facets. Useful developer information
|
8
|
+
can also be found on [Egeria Project](https://egeria-project.org) and in [Egeria Explorers](https://egeria-project.org/release-notes/june-2024/?h=brain#egeria-explorers).
|
9
|
+
|
10
|
+
* get_guid_info.py - lists information about the metadata element specified by the Egeria guid.
|
11
|
+
* get_tech_details.py - shows a tree view showing the Egeria support for a particular technology (e.g PostgreSQL Server).
|
12
|
+
* list_asset_types.py - provides a tree view of a collection with all nested collections and items within the collection.
|
13
|
+
* list_registered_services.py - lists the services available on an Egeria platform.
|
14
|
+
* list_relationship_types.py - list the relationships details for a specified Egeria type.
|
15
|
+
* list_tech_templates.py - list template details for technology types
|
16
|
+
* list_tech_types.py - list the technology types that Egeria currently supports
|
17
|
+
* list_valid_metadata_values.py - list valid metadata values for a particular property and category.
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
----
|
23
|
+
License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
|
24
|
+
Copyright Contributors to the Egeria project.
|
File without changes
|