pyegeria 0.3.7__tar.gz → 0.3.8__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.7/src/pyegeria.egg-info → pyegeria-0.3.8}/PKG-INFO +1 -1
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Jupyter Notebooks/common/P-environment-check.ipynb +13 -12
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Jupyter Notebooks/common/common-functions.ipynb +46 -46
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/engine_action_status.py +7 -4
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/find_todos.py +3 -3
- {pyegeria-0.3.7 → pyegeria-0.3.8}/pyproject.toml +1 -1
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria/__init__.py +2 -1
- pyegeria-0.3.8/src/pyegeria/loaded_resources_omvs.py +159 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria/my_profile_omvs.py +6 -5
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria/registered_info.py +1 -1
- {pyegeria-0.3.7 → pyegeria-0.3.8/src/pyegeria.egg-info}/PKG-INFO +1 -1
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria.egg-info/SOURCES.txt +2 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/tests/test_automated_curation_omvs.py +12 -12
- pyegeria-0.3.8/tests/test_loaded_resources.py +1028 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/tests/test_my_profile_omvs.py +4 -4
- {pyegeria-0.3.7 → pyegeria-0.3.8}/tests/test_server_operations.py +10 -8
- {pyegeria-0.3.7 → pyegeria-0.3.8}/LICENSE +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/MANIFEST.in +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/README.md +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/.DS_Store +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Coco_config/README.md +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Coco_config/__init__.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Coco_config/config_cocoMDS1.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Coco_config/config_cocoMDS2.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Coco_config/config_cocoMDS3.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Coco_config/config_cocoMDS4.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Coco_config/config_cocoMDS5.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Coco_config/config_cocoMDS6.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Coco_config/config_cocoMDSx.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Coco_config/config_cocoView1.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Coco_config/config_exchangeDL01.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Coco_config/config_governDL01.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Coco_config/config_monitorDev01.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Coco_config/config_monitorGov01.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Coco_config/globals.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Doc_Samples/Create_Collection_Sample.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Doc_Samples/Create_Sustainability_Collection_Sample.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Jupyter Notebooks/P-egeria-server-config.ipynb +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Jupyter Notebooks/README.md +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Jupyter Notebooks/common/__init__.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Jupyter Notebooks/common/environment-check.ipynb +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Jupyter Notebooks/common/globals.ipynb +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Jupyter Notebooks/common/globals.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Jupyter Notebooks/common/orig_globals.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/__init__.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/__pycache__/__init__.cpython-312.pyc +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/.DS_Store +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/README.md +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/__init__.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/__pycache__/__init__.cpython-312.pyc +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/__pycache__/server_status_widget.cpython-312-pytest-7.4.4.pyc +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/coco_status.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/collection_viewer.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/get_relationship_types.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/get_tech_details.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/get_tech_types.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/get_valid_metadata_values.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/glossary_view.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/gov_engine_status.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/integration_daemon_status.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/list_asset_types.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/multi-server_status.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/my_todos.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/open_todos.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/project_list_viewer.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/server_status.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/server_status_widget.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/examples/widgets/view_my_profile.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/setup.cfg +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/setup.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria/_client.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria/_exceptions.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria/_globals.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria/_validators.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria/automated_curation_omvs.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria/collection_manager_omvs.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria/core_omag_server_config.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria/full_omag_server_config.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria/glossary_omvs.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria/gov_engine.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria/governance_author.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria/platform_services.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria/project_manager_omvs.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria/server_operations.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria/utils.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria/valid_metadata_omvs.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria.egg-info/dependency_links.txt +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria.egg-info/requires.txt +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/src/pyegeria.egg-info/top_level.txt +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/tests/test_client.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/tests/test_collection_manager_omvs.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/tests/test_core_omag_server_config.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/tests/test_full_omag_server_config.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/tests/test_glossary_omvs.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/tests/test_gov_engine.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/tests/test_platform_services.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/tests/test_project_manager_omvs.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/tests/test_registered_info.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/tests/test_util_exp.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/tests/test_valid_metadata_omvs.py +0 -0
- {pyegeria-0.3.7 → pyegeria-0.3.8}/tests/test_validators.py +0 -0
{pyegeria-0.3.7 → pyegeria-0.3.8}/examples/Jupyter Notebooks/common/P-environment-check.ipynb
RENAMED
@@ -6,7 +6,6 @@
|
|
6
6
|
"metadata": {
|
7
7
|
"collapsed": false
|
8
8
|
},
|
9
|
-
"outputs": [],
|
10
9
|
"source": [
|
11
10
|
"\n",
|
12
11
|
"#\n",
|
@@ -21,11 +20,11 @@
|
|
21
20
|
"from globals import (adminUserId, cocoMDS1Name, cocoMDS2Name, cocoMDS3Name, cocoMDS4Name, cocoMDS5Name, cocoMDS6Name, cocoView1Name, cocoOLS1Name, cocoMDSxName, devPlatformName, dataLakePlatformName, corePlatformName, corePlatformURL, dataLakePlatformURL, devPlatformURL)\n",
|
22
21
|
"import nest_asyncio \n",
|
23
22
|
"nest_asyncio.apply()"
|
24
|
-
]
|
23
|
+
],
|
24
|
+
"outputs": []
|
25
25
|
},
|
26
26
|
{
|
27
27
|
"cell_type": "code",
|
28
|
-
"outputs": [],
|
29
28
|
"source": [
|
30
29
|
"\n",
|
31
30
|
"print(\"\\nChecking OMAG Server Platform availability...\")\n",
|
@@ -39,11 +38,11 @@
|
|
39
38
|
"metadata": {
|
40
39
|
"collapsed": false
|
41
40
|
},
|
42
|
-
"execution_count": null
|
41
|
+
"execution_count": null,
|
42
|
+
"outputs": []
|
43
43
|
},
|
44
44
|
{
|
45
45
|
"cell_type": "code",
|
46
|
-
"outputs": [],
|
47
46
|
"source": [
|
48
47
|
"# Try to activate each of the platforms\n",
|
49
48
|
"# nest_asyncio.apply()\n",
|
@@ -52,11 +51,11 @@
|
|
52
51
|
"metadata": {
|
53
52
|
"collapsed": false
|
54
53
|
},
|
55
|
-
"execution_count": null
|
54
|
+
"execution_count": null,
|
55
|
+
"outputs": []
|
56
56
|
},
|
57
57
|
{
|
58
58
|
"cell_type": "code",
|
59
|
-
"outputs": [],
|
60
59
|
"source": [
|
61
60
|
"# nest_asyncio.apply()\n",
|
62
61
|
"activatePlatform(dataLakePlatformName, dataLakePlatformURL, [cocoMDS1Name, cocoMDS4Name, cocoView1Name, cocoOLS1Name], adminUserId)"
|
@@ -64,11 +63,11 @@
|
|
64
63
|
"metadata": {
|
65
64
|
"collapsed": false
|
66
65
|
},
|
67
|
-
"execution_count": null
|
66
|
+
"execution_count": null,
|
67
|
+
"outputs": []
|
68
68
|
},
|
69
69
|
{
|
70
70
|
"cell_type": "code",
|
71
|
-
"outputs": [],
|
72
71
|
"source": [
|
73
72
|
"# nest_asyncio.apply()\n",
|
74
73
|
"activatePlatform(devPlatformName, devPlatformURL, [cocoMDSxName], adminUserId)\n",
|
@@ -79,15 +78,17 @@
|
|
79
78
|
"metadata": {
|
80
79
|
"tags": []
|
81
80
|
},
|
82
|
-
"execution_count": null
|
81
|
+
"execution_count": null,
|
82
|
+
"outputs": []
|
83
83
|
},
|
84
84
|
{
|
85
85
|
"cell_type": "code",
|
86
|
-
"outputs": [],
|
87
86
|
"source": [],
|
88
87
|
"metadata": {
|
89
88
|
"collapsed": false
|
90
|
-
}
|
89
|
+
},
|
90
|
+
"execution_count": null,
|
91
|
+
"outputs": []
|
91
92
|
}
|
92
93
|
],
|
93
94
|
"metadata": {
|
@@ -6,7 +6,6 @@
|
|
6
6
|
"metadata": {
|
7
7
|
"is_executing": true
|
8
8
|
},
|
9
|
-
"outputs": [],
|
10
9
|
"source": [
|
11
10
|
"#\n",
|
12
11
|
"# This file contains the common functions and definitions used in the Egeria Hands on\n",
|
@@ -54,13 +53,13 @@
|
|
54
53
|
"# A targeted use of this flag is recommended, set this before and reset this after the code you would like to produce debug\n",
|
55
54
|
"#\n",
|
56
55
|
"isDebug = False"
|
57
|
-
]
|
56
|
+
],
|
57
|
+
"outputs": []
|
58
58
|
},
|
59
59
|
{
|
60
60
|
"cell_type": "code",
|
61
61
|
"execution_count": null,
|
62
62
|
"metadata": {},
|
63
|
-
"outputs": [],
|
64
63
|
"source": [
|
65
64
|
"#\n",
|
66
65
|
"# Definitions of the Coco Pharmaceuticals Environment\n",
|
@@ -178,13 +177,13 @@
|
|
178
177
|
"monitorDev01Name = \"monitorDev01\"\n",
|
179
178
|
"monitorDev01ServerType = \"Integration Daemon\"\n",
|
180
179
|
"monitorDev01MDS = \"cocoMDSx\"\n"
|
181
|
-
]
|
180
|
+
],
|
181
|
+
"outputs": []
|
182
182
|
},
|
183
183
|
{
|
184
184
|
"cell_type": "code",
|
185
185
|
"execution_count": null,
|
186
186
|
"metadata": {},
|
187
|
-
"outputs": [],
|
188
187
|
"source": [
|
189
188
|
"#\n",
|
190
189
|
"# Common processing of REST API errors.\n",
|
@@ -310,13 +309,13 @@
|
|
310
309
|
" print (\" ...... (POST\", url, \")\")\n",
|
311
310
|
" response = requests.post(url, json=json, headers=headers, verify=False)\n",
|
312
311
|
" print (\" ...... Response: \", response.json())\n"
|
313
|
-
]
|
312
|
+
],
|
313
|
+
"outputs": []
|
314
314
|
},
|
315
315
|
{
|
316
316
|
"cell_type": "code",
|
317
317
|
"execution_count": null,
|
318
318
|
"metadata": {},
|
319
|
-
"outputs": [],
|
320
319
|
"source": [
|
321
320
|
"# Server configuration can be deployed from one OMAG Server Platform to another.\n",
|
322
321
|
"# This enables a server configuration to be tested and then deployed in production.\n",
|
@@ -331,13 +330,13 @@
|
|
331
330
|
" }\n",
|
332
331
|
" jsonContentHeader = {'content-type':'application/json'}\n",
|
333
332
|
" postAndPrintResult(url, json=platformTarget, headers=jsonContentHeader)\n"
|
334
|
-
]
|
333
|
+
],
|
334
|
+
"outputs": []
|
335
335
|
},
|
336
336
|
{
|
337
337
|
"cell_type": "code",
|
338
338
|
"execution_count": null,
|
339
339
|
"metadata": {},
|
340
|
-
"outputs": [],
|
341
340
|
"source": [
|
342
341
|
"# The OMAG Server Platform is a single executable (application) that can be started\n",
|
343
342
|
"# from the command line or a script or as part of a pre-built container environment\n",
|
@@ -491,11 +490,11 @@
|
|
491
490
|
" print (\"Response: \")\n",
|
492
491
|
" print (prettyResponse)\n",
|
493
492
|
" print (\" \")\n"
|
494
|
-
]
|
493
|
+
],
|
494
|
+
"outputs": []
|
495
495
|
},
|
496
496
|
{
|
497
497
|
"cell_type": "code",
|
498
|
-
"outputs": [],
|
499
498
|
"source": [
|
500
499
|
"\n",
|
501
500
|
"#\n",
|
@@ -717,13 +716,13 @@
|
|
717
716
|
" issuePost(url, requestBody)"
|
718
717
|
],
|
719
718
|
"metadata": {},
|
720
|
-
"execution_count": 0
|
719
|
+
"execution_count": 0,
|
720
|
+
"outputs": []
|
721
721
|
},
|
722
722
|
{
|
723
723
|
"cell_type": "code",
|
724
724
|
"execution_count": null,
|
725
725
|
"metadata": {},
|
726
|
-
"outputs": [],
|
727
726
|
"source": [
|
728
727
|
"\n",
|
729
728
|
"# Each server is configured to define which services should be active. This configuration results in\n",
|
@@ -831,13 +830,13 @@
|
|
831
830
|
" for x in range(len(hostedServerNames)):\n",
|
832
831
|
" activateServerOnPlatform(hostedServerNames[x], serverPlatformName, serverPlatformURL)\n",
|
833
832
|
"\n"
|
834
|
-
]
|
833
|
+
],
|
834
|
+
"outputs": []
|
835
835
|
},
|
836
836
|
{
|
837
837
|
"cell_type": "code",
|
838
838
|
"execution_count": null,
|
839
839
|
"metadata": {},
|
840
|
-
"outputs": [],
|
841
840
|
"source": [
|
842
841
|
"#\n",
|
843
842
|
"# Repository Services\n",
|
@@ -1006,20 +1005,20 @@
|
|
1006
1005
|
" metadataHighwayServicesURLcore = '/servers/' + serverName + '/open-metadata/repository-services/users/' + adminUserId + '/metadata-highway'\n",
|
1007
1006
|
" url = serverPlatformURL + metadataHighwayServicesURLcore + '/cohorts/' + cohortName + '/unregister'\n",
|
1008
1007
|
" response = issueGet(url)\n"
|
1009
|
-
]
|
1008
|
+
],
|
1009
|
+
"outputs": []
|
1010
1010
|
},
|
1011
1011
|
{
|
1012
1012
|
"cell_type": "code",
|
1013
1013
|
"execution_count": null,
|
1014
1014
|
"metadata": {},
|
1015
|
-
"
|
1016
|
-
"
|
1015
|
+
"source": [],
|
1016
|
+
"outputs": []
|
1017
1017
|
},
|
1018
1018
|
{
|
1019
1019
|
"cell_type": "code",
|
1020
1020
|
"execution_count": null,
|
1021
1021
|
"metadata": {},
|
1022
|
-
"outputs": [],
|
1023
1022
|
"source": [
|
1024
1023
|
"#\n",
|
1025
1024
|
"# OMAS\n",
|
@@ -1112,13 +1111,13 @@
|
|
1112
1111
|
" for guid in guids:\n",
|
1113
1112
|
" returnGUID = guid\n",
|
1114
1113
|
" return returnGUID"
|
1115
|
-
]
|
1114
|
+
],
|
1115
|
+
"outputs": []
|
1116
1116
|
},
|
1117
1117
|
{
|
1118
1118
|
"cell_type": "code",
|
1119
1119
|
"execution_count": null,
|
1120
1120
|
"metadata": {},
|
1121
|
-
"outputs": [],
|
1122
1121
|
"source": [
|
1123
1122
|
"#\n",
|
1124
1123
|
"# OCF Common services\n",
|
@@ -1603,13 +1602,13 @@
|
|
1603
1602
|
" if isPublic:\n",
|
1604
1603
|
" print(\" public: \" + str(isPublic))\n",
|
1605
1604
|
"\n"
|
1606
|
-
]
|
1605
|
+
],
|
1606
|
+
"outputs": []
|
1607
1607
|
},
|
1608
1608
|
{
|
1609
1609
|
"cell_type": "code",
|
1610
1610
|
"execution_count": null,
|
1611
1611
|
"metadata": {},
|
1612
|
-
"outputs": [],
|
1613
1612
|
"source": [
|
1614
1613
|
" \n",
|
1615
1614
|
"#\n",
|
@@ -1814,13 +1813,13 @@
|
|
1814
1813
|
" else:\n",
|
1815
1814
|
" print (\"No semantic assignment Relationship created\")\n",
|
1816
1815
|
" processErrorResponse(serverName, serverPlatformName, serverPlatformURL, response)\n"
|
1817
|
-
]
|
1816
|
+
],
|
1817
|
+
"outputs": []
|
1818
1818
|
},
|
1819
1819
|
{
|
1820
1820
|
"cell_type": "code",
|
1821
1821
|
"execution_count": null,
|
1822
1822
|
"metadata": {},
|
1823
|
-
"outputs": [],
|
1824
1823
|
"source": [
|
1825
1824
|
"#\n",
|
1826
1825
|
"# Asset Consumer OMAS\n",
|
@@ -2266,13 +2265,13 @@
|
|
2266
2265
|
"\n",
|
2267
2266
|
"def assetConsumerPrintAssetComments(serverName, serverPlatformName, serverPlatformURL, userId, requestType):\n",
|
2268
2267
|
" printAssetComments(serverName, serverPlatformName, serverPlatformURL, \"asset-consumer\", userId, requestType)\n"
|
2269
|
-
]
|
2268
|
+
],
|
2269
|
+
"outputs": []
|
2270
2270
|
},
|
2271
2271
|
{
|
2272
2272
|
"cell_type": "code",
|
2273
2273
|
"execution_count": null,
|
2274
2274
|
"metadata": {},
|
2275
|
-
"outputs": [],
|
2276
2275
|
"source": [
|
2277
2276
|
"#\n",
|
2278
2277
|
"# Asset Manager OMAS\n",
|
@@ -2382,20 +2381,20 @@
|
|
2382
2381
|
" print (\"No process created\")\n",
|
2383
2382
|
" processErrorResponse(serverName, serverPlatformName, serverPlatformURL, response)\n",
|
2384
2383
|
" "
|
2385
|
-
]
|
2384
|
+
],
|
2385
|
+
"outputs": []
|
2386
2386
|
},
|
2387
2387
|
{
|
2388
2388
|
"cell_type": "code",
|
2389
2389
|
"execution_count": null,
|
2390
2390
|
"metadata": {},
|
2391
|
-
"
|
2392
|
-
"
|
2391
|
+
"source": [],
|
2392
|
+
"outputs": []
|
2393
2393
|
},
|
2394
2394
|
{
|
2395
2395
|
"cell_type": "code",
|
2396
2396
|
"execution_count": null,
|
2397
2397
|
"metadata": {},
|
2398
|
-
"outputs": [],
|
2399
2398
|
"source": [
|
2400
2399
|
"#\n",
|
2401
2400
|
"# Subject Area OMAS\n",
|
@@ -2654,13 +2653,13 @@
|
|
2654
2653
|
" else:\n",
|
2655
2654
|
" print(\"No terms created\")\n",
|
2656
2655
|
" \n"
|
2657
|
-
]
|
2656
|
+
],
|
2657
|
+
"outputs": []
|
2658
2658
|
},
|
2659
2659
|
{
|
2660
2660
|
"cell_type": "code",
|
2661
2661
|
"execution_count": null,
|
2662
2662
|
"metadata": {},
|
2663
|
-
"outputs": [],
|
2664
2663
|
"source": [
|
2665
2664
|
"# Open Governance and Discovery\n",
|
2666
2665
|
"# Working with the engine host server and the Governance Engine OMAS of the metadata server.\n",
|
@@ -3307,13 +3306,13 @@
|
|
3307
3306
|
" except Exception as error:\n",
|
3308
3307
|
" print(\"Exception: %s\" % error)\n",
|
3309
3308
|
" print(\"Platform \" + serverPlatformURL + \" is returning an error\")\n"
|
3310
|
-
]
|
3309
|
+
],
|
3310
|
+
"outputs": []
|
3311
3311
|
},
|
3312
3312
|
{
|
3313
3313
|
"cell_type": "code",
|
3314
3314
|
"execution_count": null,
|
3315
3315
|
"metadata": {},
|
3316
|
-
"outputs": [],
|
3317
3316
|
"source": [
|
3318
3317
|
"#\n",
|
3319
3318
|
"# Working with Governance Actions, Governance Action Processes and Governance Action Types through the Governance Engine OMAS\n",
|
@@ -3667,25 +3666,25 @@
|
|
3667
3666
|
" except Exception as error:\n",
|
3668
3667
|
" print(\"Exception: %s\" % error )\n",
|
3669
3668
|
" print(\"Platform \" + serverPlatformURL + \" is returning an error\")\n"
|
3670
|
-
]
|
3669
|
+
],
|
3670
|
+
"outputs": []
|
3671
3671
|
},
|
3672
3672
|
{
|
3673
3673
|
"cell_type": "code",
|
3674
3674
|
"execution_count": null,
|
3675
3675
|
"metadata": {},
|
3676
|
-
"outputs": [],
|
3677
3676
|
"source": [
|
3678
3677
|
"#\n",
|
3679
3678
|
"# Using the OpenMetadataStore services to report on running governance action processes.\n",
|
3680
3679
|
"#\n",
|
3681
3680
|
"\n"
|
3682
|
-
]
|
3681
|
+
],
|
3682
|
+
"outputs": []
|
3683
3683
|
},
|
3684
3684
|
{
|
3685
3685
|
"cell_type": "code",
|
3686
3686
|
"execution_count": null,
|
3687
3687
|
"metadata": {},
|
3688
|
-
"outputs": [],
|
3689
3688
|
"source": [
|
3690
3689
|
"# \n",
|
3691
3690
|
"# Interaction with the Integration Daemon OMAG Server\n",
|
@@ -3845,13 +3844,13 @@
|
|
3845
3844
|
" print(\"Exception: %s\" % error)\n",
|
3846
3845
|
" print(\"Platform \" + serverPlatformURL + \" is returning an error\")\n",
|
3847
3846
|
" "
|
3848
|
-
]
|
3847
|
+
],
|
3848
|
+
"outputs": []
|
3849
3849
|
},
|
3850
3850
|
{
|
3851
3851
|
"cell_type": "code",
|
3852
3852
|
"execution_count": null,
|
3853
3853
|
"metadata": {},
|
3854
|
-
"outputs": [],
|
3855
3854
|
"source": [
|
3856
3855
|
"## Open Metadata Integration Services\n",
|
3857
3856
|
"\n",
|
@@ -3920,13 +3919,13 @@
|
|
3920
3919
|
" print(\"Exception: %s\" % error)\n",
|
3921
3920
|
" print(\"Platform \" + serverPlatformURL + \" is returning an error\")\n",
|
3922
3921
|
" \n"
|
3923
|
-
]
|
3922
|
+
],
|
3923
|
+
"outputs": []
|
3924
3924
|
},
|
3925
3925
|
{
|
3926
3926
|
"cell_type": "code",
|
3927
3927
|
"execution_count": null,
|
3928
3928
|
"metadata": {},
|
3929
|
-
"outputs": [],
|
3930
3929
|
"source": [
|
3931
3930
|
"#\n",
|
3932
3931
|
"# Load an archive\n",
|
@@ -3943,13 +3942,13 @@
|
|
3943
3942
|
" print (prettyResponse)\n",
|
3944
3943
|
" print(\" \")\n",
|
3945
3944
|
"\n"
|
3946
|
-
]
|
3945
|
+
],
|
3946
|
+
"outputs": []
|
3947
3947
|
},
|
3948
3948
|
{
|
3949
3949
|
"cell_type": "code",
|
3950
3950
|
"execution_count": null,
|
3951
3951
|
"metadata": {},
|
3952
|
-
"outputs": [],
|
3953
3952
|
"source": [
|
3954
3953
|
"#\n",
|
3955
3954
|
"# Issue requests to the Asset Manager OMAS\n",
|
@@ -4667,7 +4666,8 @@
|
|
4667
4666
|
"\n",
|
4668
4667
|
"\n",
|
4669
4668
|
"\n"
|
4670
|
-
]
|
4669
|
+
],
|
4670
|
+
"outputs": []
|
4671
4671
|
}
|
4672
4672
|
],
|
4673
4673
|
"metadata": {
|
@@ -12,6 +12,7 @@ A simple status display for Engine Actions
|
|
12
12
|
import argparse
|
13
13
|
import json
|
14
14
|
import time
|
15
|
+
import sys
|
15
16
|
|
16
17
|
from rich import box
|
17
18
|
from rich.live import Live
|
@@ -76,7 +77,7 @@ def display_status_engine_actions(server: str = good_server_3, url: str = good_p
|
|
76
77
|
|
77
78
|
token = g_client.create_egeria_bearer_token()
|
78
79
|
action_status = g_client.get_engine_actions()
|
79
|
-
if
|
80
|
+
if type(action_status) is str:
|
80
81
|
requested_time = " "
|
81
82
|
start_time = " "
|
82
83
|
completion_time = " "
|
@@ -86,9 +87,9 @@ def display_status_engine_actions(server: str = good_server_3, url: str = good_p
|
|
86
87
|
target_element = " "
|
87
88
|
process_name = " "
|
88
89
|
completion_message = " "
|
89
|
-
|
90
|
+
elif type(action_status) is list:
|
90
91
|
for action in action_status:
|
91
|
-
requested_time = action
|
92
|
+
requested_time = action.get("requestedTime", " ")
|
92
93
|
start_time = action.get("startTime", " ")
|
93
94
|
completion_time = action.get("completionTime", " ")
|
94
95
|
|
@@ -115,7 +116,9 @@ def display_status_engine_actions(server: str = good_server_3, url: str = good_p
|
|
115
116
|
requested_time, start_time, action_guid,engine_name, request_type,
|
116
117
|
action_status, target_element, completion_time, process_name, completion_message
|
117
118
|
)
|
118
|
-
|
119
|
+
else:
|
120
|
+
print("Egeria integration daemon not running")
|
121
|
+
sys.exit()
|
119
122
|
# g_client.close_session()
|
120
123
|
return table
|
121
124
|
|
@@ -81,9 +81,9 @@ def display_to_dos(search_string: str, guid: str=None, server: str = good_server
|
|
81
81
|
table.add_column("Status")
|
82
82
|
table.add_column("Sponsor")
|
83
83
|
|
84
|
-
todo_items = m_client.find_to_do(
|
84
|
+
todo_items = m_client.find_to_do(search_string)
|
85
85
|
|
86
|
-
if todo_items is
|
86
|
+
if type(todo_items) is str:
|
87
87
|
name = " "
|
88
88
|
type_name = " "
|
89
89
|
created = " "
|
@@ -107,7 +107,7 @@ def display_to_dos(search_string: str, guid: str=None, server: str = good_server
|
|
107
107
|
sponsor = "erinoverview"
|
108
108
|
if status in ("WAITING", "OPEN"):
|
109
109
|
status = f"[yellow]{status}"
|
110
|
-
elif status in ("
|
110
|
+
elif status in ("IN_PROGRESS", "COMPLETE"):
|
111
111
|
status = f"[green]{status}"
|
112
112
|
else:
|
113
113
|
status = f"[red]{status}"
|
@@ -43,4 +43,5 @@ from .server_operations import ServerOps
|
|
43
43
|
from .collection_manager_omvs import CollectionManager
|
44
44
|
from .project_manager_omvs import ProjectManager
|
45
45
|
from .valid_metadata_omvs import ValidMetadataManager
|
46
|
-
|
46
|
+
from .loaded_resources_omvs import LoadedResources
|
47
|
+
__version__ = "0.38"
|
@@ -0,0 +1,159 @@
|
|
1
|
+
"""
|
2
|
+
SPDX-License-Identifier: Apache-2.0
|
3
|
+
Copyright Contributors to the ODPi Egeria project.
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
This module allows users to query the available (registered) capabilities of Egeria. Detailed information is returned
|
8
|
+
to provide both insight and understanding in how to use these capabilities. For example, when configuring an Egeria
|
9
|
+
integration service, it is importregistered_info.pyant to know what companion service it depends on so that you can make sure the
|
10
|
+
companion service is also configured and running.
|
11
|
+
|
12
|
+
"""
|
13
|
+
|
14
|
+
import pandas as pd
|
15
|
+
from tabulate import tabulate
|
16
|
+
|
17
|
+
from pyegeria._client import Client
|
18
|
+
from pyegeria.utils import wrap_text
|
19
|
+
|
20
|
+
|
21
|
+
class LoadedResources(Client):
|
22
|
+
""" Client to search and retrieve currently loaded information about connectors, templates, governance actions,
|
23
|
+
etc.
|
24
|
+
|
25
|
+
Attributes:
|
26
|
+
----------
|
27
|
+
server_name: str
|
28
|
+
Name of the server to use.
|
29
|
+
platform_url : str
|
30
|
+
URL of the server platform to connect to
|
31
|
+
user_id : str
|
32
|
+
The identity of the user calling the method - this sets a default optionally used by the methods
|
33
|
+
when the user doesn't pass the user_id on a method call.
|
34
|
+
user_pwd: str
|
35
|
+
The password associated with the user_id. Defaults to None
|
36
|
+
verify_flag: bool
|
37
|
+
Flag to indicate if SSL Certificates should be verified in the HTTP requests.
|
38
|
+
Defaults to False.
|
39
|
+
|
40
|
+
Methods:
|
41
|
+
-------
|
42
|
+
|
43
|
+
"""
|
44
|
+
|
45
|
+
admin_command_root: str
|
46
|
+
|
47
|
+
def __init__(
|
48
|
+
self,
|
49
|
+
server_name: str,
|
50
|
+
platform_url: str,
|
51
|
+
user_id: str,
|
52
|
+
user_pwd: str = None,
|
53
|
+
verify_flag: bool = False,
|
54
|
+
):
|
55
|
+
if server_name is None:
|
56
|
+
server_name = "NA"
|
57
|
+
Client.__init__(self, server_name, platform_url,
|
58
|
+
user_id, user_pwd, verify_flag)
|
59
|
+
|
60
|
+
def get_all_templates(self, server: str = None, start_from: int = 0, page_size: int = 0) -> list | str:
|
61
|
+
""" Get Loaded templates for the Server.
|
62
|
+
|
63
|
+
Parameters
|
64
|
+
----------
|
65
|
+
|
66
|
+
Returns
|
67
|
+
-------
|
68
|
+
dict | str
|
69
|
+
A dictionary containing a simplified list of key template attributes.
|
70
|
+
|
71
|
+
Raises
|
72
|
+
------
|
73
|
+
InvalidParameterException
|
74
|
+
If the response code is not 200.
|
75
|
+
PropertyServerException:
|
76
|
+
Raised by the server when an issue arises in processing a valid request
|
77
|
+
NotAuthorizedException:
|
78
|
+
The principle specified by the user_id does not have authorization for the requested action
|
79
|
+
|
80
|
+
"""
|
81
|
+
server = self.server_name if server is None else server
|
82
|
+
url = (f"{self.platform_url}/servers/{server}/open-metadata/framework-services/asset-owner/open-metadata-store/"
|
83
|
+
f"users/{self.user_id}/metadata-elements/by-search-string?startFrom=start_from&pageSize=page_size")
|
84
|
+
body = {
|
85
|
+
"class" : "SearchStringRequestBody",
|
86
|
+
"searchString" : ".*Template.*"
|
87
|
+
}
|
88
|
+
response = self.make_request("POST", url, body)
|
89
|
+
return response.json().get("elementList", "No elements")
|
90
|
+
|
91
|
+
def list_severity_definitions(self, fmt: str = 'json', skinny: bool = True, wrap_len: int = 30) -> list | str:
|
92
|
+
""" Get the registered severities for the OMAG Server
|
93
|
+
|
94
|
+
Parameters
|
95
|
+
----------
|
96
|
+
fmt: str, optional, default = 'json'
|
97
|
+
If fmt is 'json', then return the result as a JSON string. If fmt is 'table', then
|
98
|
+
return the result as a nicely formatted table string.
|
99
|
+
skinny: bool, optional, default = True
|
100
|
+
If a table is being created and `skinny` is true, then return a subset of the information,
|
101
|
+
if false return all columns.
|
102
|
+
wrap_len: int, optional, default = 30
|
103
|
+
If a table is being created, the width of the column to wrap text to.
|
104
|
+
|
105
|
+
Returns
|
106
|
+
-------
|
107
|
+
dict | str
|
108
|
+
If fmt is 'JSON' then return a dictionary containing the registered services for the specified
|
109
|
+
platform. If fmt is 'table' then return the result as a nicely formatted printable table string.
|
110
|
+
|
111
|
+
Raises
|
112
|
+
------
|
113
|
+
InvalidParameterException
|
114
|
+
If the response code is not 200.
|
115
|
+
PropertyServerException:
|
116
|
+
Raised by the server when an issue arises in processing a valid request
|
117
|
+
NotAuthorizedException:
|
118
|
+
The principle specified by the user_id does not have authorization for the requested action
|
119
|
+
|
120
|
+
"""
|
121
|
+
url = (f"{self.platform_url}/servers/{self.server_name}/open-metadata/repository-services"
|
122
|
+
f"/users/{self.user_id}/audit-log/severity-definitions"
|
123
|
+
)
|
124
|
+
response = self.make_request("GET", url)
|
125
|
+
if fmt == 'json':
|
126
|
+
return response.json().get("severities", "No severities found")
|
127
|
+
elif fmt == 'table':
|
128
|
+
df = pd.DataFrame(response.json().get("severities", []))
|
129
|
+
if skinny:
|
130
|
+
df = df.drop(columns=['ordinal'])
|
131
|
+
return tabulate(wrap_text(df, wrap_len=wrap_len), headers='keys', tablefmt='psql')
|
132
|
+
|
133
|
+
def list_asset_types(self, server: str = None) -> list | str:
|
134
|
+
""" Get the registered severities for the OMAG Server
|
135
|
+
|
136
|
+
Parameters
|
137
|
+
----------
|
138
|
+
server: str, optional, default = None
|
139
|
+
|
140
|
+
Returns
|
141
|
+
-------
|
142
|
+
dict | str
|
143
|
+
Returns a list of the asset types.
|
144
|
+
|
145
|
+
Raises
|
146
|
+
------
|
147
|
+
InvalidParameterException
|
148
|
+
If the response code is not 200.
|
149
|
+
PropertyServerException:
|
150
|
+
Raised by the server when an issue arises in processing a valid request
|
151
|
+
NotAuthorizedException:
|
152
|
+
The principle specified by the user_id does not have authorization for the requested action
|
153
|
+
|
154
|
+
"""
|
155
|
+
server = self.server_name if server is None else server
|
156
|
+
url = f"{self.platform_url}/servers/{self.server_name}/api/open-metadata/asset-catalog/assets/types"
|
157
|
+
|
158
|
+
response = self.make_request("GET", url)
|
159
|
+
return response.json().get('types', 'no types found')
|