pyegeria 0.3.3__tar.gz → 0.3.5__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.
Files changed (101) hide show
  1. pyegeria-0.3.5/MANIFEST.in +1 -0
  2. {pyegeria-0.3.3/src/pyegeria.egg-info → pyegeria-0.3.5}/PKG-INFO +1 -1
  3. pyegeria-0.3.5/examples/.DS_Store +0 -0
  4. pyegeria-0.3.5/examples/Coco_config/README.md +19 -0
  5. pyegeria-0.3.5/examples/Coco_config/__init__.py +4 -0
  6. pyegeria-0.3.5/examples/Coco_config/config_cocoMDS1.py +108 -0
  7. pyegeria-0.3.5/examples/Coco_config/config_cocoMDS2.py +109 -0
  8. pyegeria-0.3.5/examples/Coco_config/config_cocoMDS3.py +104 -0
  9. pyegeria-0.3.5/examples/Coco_config/config_cocoMDS4.py +95 -0
  10. pyegeria-0.3.5/examples/Coco_config/config_cocoMDS5.py +97 -0
  11. pyegeria-0.3.5/examples/Coco_config/config_cocoMDS6.py +112 -0
  12. pyegeria-0.3.5/examples/Coco_config/config_cocoMDSx.py +114 -0
  13. pyegeria-0.3.5/examples/Coco_config/config_cocoView1.py +157 -0
  14. pyegeria-0.3.5/examples/Coco_config/config_exchangeDL01.py +104 -0
  15. pyegeria-0.3.5/examples/Coco_config/config_governDL01.py +79 -0
  16. pyegeria-0.3.5/examples/Coco_config/config_monitorDev01.py +58 -0
  17. pyegeria-0.3.5/examples/Coco_config/config_monitorGov01.py +217 -0
  18. pyegeria-0.3.5/examples/Coco_config/globals.py +153 -0
  19. pyegeria-0.3.5/examples/Doc_Samples/Create_Collection_Sample.py +292 -0
  20. pyegeria-0.3.5/examples/Doc_Samples/Create_Sustainability_Collection_Sample.py +115 -0
  21. pyegeria-0.3.5/examples/Jupyter Notebooks/P-egeria-server-config.ipynb +2248 -0
  22. pyegeria-0.3.5/examples/Jupyter Notebooks/README.md +2 -0
  23. pyegeria-0.3.5/examples/Jupyter Notebooks/common/P-environment-check.ipynb +114 -0
  24. pyegeria-0.3.5/examples/Jupyter Notebooks/common/__init__.py +15 -0
  25. pyegeria-0.3.5/examples/Jupyter Notebooks/common/common-functions.ipynb +4694 -0
  26. pyegeria-0.3.5/examples/Jupyter Notebooks/common/environment-check.ipynb +53 -0
  27. pyegeria-0.3.5/examples/Jupyter Notebooks/common/globals.ipynb +184 -0
  28. pyegeria-0.3.5/examples/Jupyter Notebooks/common/globals.py +153 -0
  29. pyegeria-0.3.5/examples/Jupyter Notebooks/common/orig_globals.py +151 -0
  30. pyegeria-0.3.5/examples/__init__.py +4 -0
  31. pyegeria-0.3.5/examples/__pycache__/__init__.cpython-312.pyc +0 -0
  32. pyegeria-0.3.5/examples/widgets/.DS_Store +0 -0
  33. pyegeria-0.3.5/examples/widgets/README.md +26 -0
  34. pyegeria-0.3.5/examples/widgets/__init__.py +4 -0
  35. pyegeria-0.3.5/examples/widgets/__pycache__/__init__.cpython-312.pyc +0 -0
  36. pyegeria-0.3.5/examples/widgets/__pycache__/server_status_widget.cpython-312-pytest-7.4.4.pyc +0 -0
  37. pyegeria-0.3.5/examples/widgets/coco_status.py +100 -0
  38. pyegeria-0.3.5/examples/widgets/collection_viewer.py +98 -0
  39. pyegeria-0.3.5/examples/widgets/engine_action_status.py +145 -0
  40. pyegeria-0.3.5/examples/widgets/find_todos.py +152 -0
  41. pyegeria-0.3.5/examples/widgets/get_relationship_types.py +141 -0
  42. pyegeria-0.3.5/examples/widgets/get_valid_metadata_values.py +144 -0
  43. pyegeria-0.3.5/examples/widgets/glossary_view.py +135 -0
  44. pyegeria-0.3.5/examples/widgets/gov_engine_status.py +120 -0
  45. pyegeria-0.3.5/examples/widgets/integration_daemon_status.py +130 -0
  46. pyegeria-0.3.5/examples/widgets/list_asset_types.py +114 -0
  47. pyegeria-0.3.5/examples/widgets/multi-server_status.py +120 -0
  48. pyegeria-0.3.5/examples/widgets/my_todos.py +162 -0
  49. pyegeria-0.3.5/examples/widgets/open_todos.py +140 -0
  50. pyegeria-0.3.5/examples/widgets/project_list_viewer.py +153 -0
  51. pyegeria-0.3.5/examples/widgets/server_status.py +105 -0
  52. pyegeria-0.3.5/examples/widgets/server_status_widget.py +93 -0
  53. pyegeria-0.3.5/examples/widgets/view_my_profile.py +140 -0
  54. {pyegeria-0.3.3 → pyegeria-0.3.5}/pyproject.toml +6 -4
  55. {pyegeria-0.3.3 → pyegeria-0.3.5}/setup.py +24 -1
  56. {pyegeria-0.3.3 → pyegeria-0.3.5}/src/pyegeria/__init__.py +3 -1
  57. {pyegeria-0.3.3 → pyegeria-0.3.5}/src/pyegeria/automated_curation_omvs.py +15 -10
  58. pyegeria-0.3.5/src/pyegeria/collection_manager_omvs.py +2428 -0
  59. {pyegeria-0.3.3 → pyegeria-0.3.5}/src/pyegeria/core_omag_server_config.py +15 -22
  60. {pyegeria-0.3.3 → pyegeria-0.3.5}/src/pyegeria/full_omag_server_config.py +0 -1
  61. {pyegeria-0.3.3 → pyegeria-0.3.5}/src/pyegeria/glossary_omvs.py +14 -2
  62. {pyegeria-0.3.3 → pyegeria-0.3.5}/src/pyegeria/gov_engine.py +1 -8
  63. {pyegeria-0.3.3 → pyegeria-0.3.5}/src/pyegeria/governance_author.py +2 -0
  64. {pyegeria-0.3.3 → pyegeria-0.3.5}/src/pyegeria/my_profile_omvs.py +1 -1
  65. {pyegeria-0.3.3 → pyegeria-0.3.5}/src/pyegeria/platform_services.py +2 -39
  66. pyegeria-0.3.5/src/pyegeria/project_manager_omvs.py +1689 -0
  67. {pyegeria-0.3.3 → pyegeria-0.3.5}/src/pyegeria/registered_info.py +3 -1
  68. {pyegeria-0.3.3 → pyegeria-0.3.5}/src/pyegeria/server_operations.py +2 -2
  69. pyegeria-0.3.5/src/pyegeria/valid_metadata_omvs.py +779 -0
  70. {pyegeria-0.3.3 → pyegeria-0.3.5/src/pyegeria.egg-info}/PKG-INFO +1 -1
  71. pyegeria-0.3.5/src/pyegeria.egg-info/SOURCES.txt +95 -0
  72. {pyegeria-0.3.3 → pyegeria-0.3.5}/tests/test_automated_curation_omvs.py +3 -3
  73. pyegeria-0.3.5/tests/test_collection_manager_omvs.py +1207 -0
  74. {pyegeria-0.3.3 → pyegeria-0.3.5}/tests/test_core_omag_server_config.py +1 -1
  75. {pyegeria-0.3.3 → pyegeria-0.3.5}/tests/test_my_profile_omvs.py +1 -1
  76. {pyegeria-0.3.3 → pyegeria-0.3.5}/tests/test_platform_services.py +33 -33
  77. pyegeria-0.3.5/tests/test_project_manager_omvs.py +704 -0
  78. {pyegeria-0.3.3 → pyegeria-0.3.5}/tests/test_registered_info.py +1 -1
  79. pyegeria-0.3.5/tests/test_valid_metadata_omvs.py +346 -0
  80. pyegeria-0.3.3/MANIFEST.in +0 -0
  81. pyegeria-0.3.3/src/pyegeria/exceptions.py +0 -382
  82. pyegeria-0.3.3/src/pyegeria.egg-info/SOURCES.txt +0 -40
  83. pyegeria-0.3.3/tests/test_automated_curation_omvs_cray.py +0 -320
  84. {pyegeria-0.3.3 → pyegeria-0.3.5}/LICENSE +0 -0
  85. {pyegeria-0.3.3 → pyegeria-0.3.5}/README.md +0 -0
  86. {pyegeria-0.3.3 → pyegeria-0.3.5}/setup.cfg +0 -0
  87. {pyegeria-0.3.3 → pyegeria-0.3.5}/src/pyegeria/_client.py +0 -0
  88. {pyegeria-0.3.3 → pyegeria-0.3.5}/src/pyegeria/_exceptions.py +0 -0
  89. {pyegeria-0.3.3 → pyegeria-0.3.5}/src/pyegeria/_globals.py +0 -0
  90. {pyegeria-0.3.3 → pyegeria-0.3.5}/src/pyegeria/_validators.py +0 -0
  91. {pyegeria-0.3.3 → pyegeria-0.3.5}/src/pyegeria/utils.py +0 -0
  92. {pyegeria-0.3.3 → pyegeria-0.3.5}/src/pyegeria.egg-info/dependency_links.txt +0 -0
  93. {pyegeria-0.3.3 → pyegeria-0.3.5}/src/pyegeria.egg-info/requires.txt +0 -0
  94. {pyegeria-0.3.3 → pyegeria-0.3.5}/src/pyegeria.egg-info/top_level.txt +0 -0
  95. {pyegeria-0.3.3 → pyegeria-0.3.5}/tests/test_client.py +0 -0
  96. {pyegeria-0.3.3 → pyegeria-0.3.5}/tests/test_full_omag_server_config.py +0 -0
  97. {pyegeria-0.3.3 → pyegeria-0.3.5}/tests/test_glossary_omvs.py +0 -0
  98. {pyegeria-0.3.3 → pyegeria-0.3.5}/tests/test_gov_engine.py +0 -0
  99. {pyegeria-0.3.3 → pyegeria-0.3.5}/tests/test_server_operations.py +0 -0
  100. {pyegeria-0.3.3 → pyegeria-0.3.5}/tests/test_util_exp.py +0 -0
  101. {pyegeria-0.3.3 → pyegeria-0.3.5}/tests/test_validators.py +0 -0
@@ -0,0 +1 @@
1
+ recursive-include examples *
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 0.3.3
3
+ Version: 0.3.5
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://egeria-project.org/egeria-python
6
6
  Author: Dan Wolfson
Binary file
@@ -0,0 +1,19 @@
1
+ # pyegeria: Coco Pharmaceuticals Lab Configurations
2
+
3
+ This is an experimental package that demonstrates how we can configure the servers used in the
4
+ Egeria Jupyter Labs [Egeria Project - Open metadata and governance for enterprises](https://egeria-project.org/guides/operations/kubernetes/charts/lab/?h=coco)
5
+ using the new pyegeria client.
6
+
7
+ This package will evolve with planned enhancements to the Coco Pharmaceuticals Jupyter Labs.
8
+
9
+ All feedback is welcome. Please engage via our [community](http://egeria-project.org/guides/community/),
10
+ team calls, or via github issues in this repo. If interested in contributing,
11
+ you can engage via the community or directly reach out to
12
+ [dan.wolfson\@pdr-associates.com](mailto:dan.wolfson@pdr-associates.com?subject=pyegeria).
13
+
14
+ This is a learning experience.
15
+
16
+
17
+ ----
18
+ License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
19
+ Copyright Contributors to the ODPi Egeria project.
@@ -0,0 +1,4 @@
1
+ """
2
+
3
+ Coco Pharmaceuticals Configurations
4
+ """
@@ -0,0 +1,108 @@
1
+ """
2
+ SPDX-License-Identifier: Apache-2.0
3
+ Copyright Contributors to the ODPi Egeria project.
4
+
5
+ Egeria Coco Pharmaceutical demonstration labs.
6
+
7
+ Configuring cocoMDS1 - Data Lake Operations metadata server
8
+
9
+ """
10
+
11
+
12
+ import json
13
+
14
+ from globals import (adminUserId, cocoMDS1Name, dataLakePlatformURL, cocoCohort)
15
+ from pyegeria import CoreServerConfig, Platform
16
+ from pyegeria import (
17
+ print_exception_response,
18
+ )
19
+
20
+ mdr_server = cocoMDS1Name
21
+ platform_url = dataLakePlatformURL
22
+ admin_user = adminUserId
23
+ mdr_server_user_id = "cocoMDS1npa"
24
+ mdr_server_password = "cocoMDS1passw0rd"
25
+ metadataCollectionId = f"{mdr_server}-e915f2fa-aa3g-4396-8bde-bcd65e642b1d"
26
+ metadataCollectionName = "Data Lake Catalog"
27
+
28
+ max_page_size = 600
29
+
30
+ print("Configuring " + mdr_server + "..." + " @ " + platform_url)
31
+
32
+ try:
33
+ o_client = CoreServerConfig(mdr_server, platform_url, admin_user)
34
+
35
+ o_client.set_basic_server_properties(metadataCollectionName,
36
+ "Coco Pharmaceuticals",
37
+ platform_url,
38
+ mdr_server_user_id, mdr_server_password,
39
+ max_page_size)
40
+
41
+ # Can also inherit event bus config from application properties
42
+
43
+ event_bus_config = {
44
+ "producer": {
45
+ "bootstrap.servers": "localhost:9092"
46
+ },
47
+ "consumer": {
48
+ "bootstrap.servers": "localhost:9092"
49
+ }
50
+ }
51
+
52
+ o_client.set_event_bus(event_bus_config)
53
+
54
+ security_connection_body = {
55
+ "class": "Connection",
56
+ "connectorType": {
57
+ "class": "ConnectorType",
58
+ "connectorProviderClassName":
59
+ "org.odpi.openmetadata.metadatasecurity.samples.CocoPharmaServerSecurityProvider"
60
+ }
61
+ }
62
+ o_client.set_xtdb_local_kv_repository()
63
+ # o_client.set_in_mem_local_repository()
64
+ o_client.add_default_log_destinations()
65
+ o_client.set_server_security_connection(security_connection_body)
66
+ o_client.set_local_metadata_collection_name(metadataCollectionName)
67
+ o_client.set_local_metadata_collection_id(metadataCollectionId)
68
+
69
+ o_client.add_cohort_registration(cocoCohort)
70
+
71
+ print(f"Configuring {mdr_server} Access Services (OMAS)....")
72
+
73
+ # o_client.configure_all_access_services()
74
+ access_service_options = {
75
+ "SupportedZones": ["quarantine", "clinical-trials", "research", "data-lake", "trash-can"]
76
+ }
77
+
78
+ o_client.configure_access_service("asset-catalog", access_service_options)
79
+ o_client.configure_access_service("asset-consumer", access_service_options)
80
+
81
+ access_service_options["DefaultZones"] = ["quarantine"]
82
+ access_service_options["PublishZones"] = ["data-lake"]
83
+
84
+ # print(f"Access Service Options: {access_service_options}")
85
+
86
+ o_client.configure_access_service("asset-manager", access_service_options)
87
+ o_client.configure_access_service("asset-owner", access_service_options)
88
+ o_client.configure_access_service("community-profile",
89
+ {"KarmaPointPlateau": "500"})
90
+ o_client.configure_access_service("glossary-view", {})
91
+ o_client.configure_access_service("asset-owner", access_service_options)
92
+ o_client.configure_access_service("data-engine", access_service_options)
93
+ o_client.configure_access_service("data-manager", access_service_options)
94
+ o_client.configure_access_service("digital-architecture", access_service_options)
95
+ o_client.configure_access_service("governance-engine", access_service_options)
96
+ o_client.configure_access_service("governance-server", access_service_options)
97
+ o_client.configure_access_service("asset-lineage", access_service_options)
98
+
99
+ print(f"Activating {mdr_server}")
100
+ p_client = Platform(mdr_server, platform_url, admin_user)
101
+ p_client.activate_server_stored_config()
102
+
103
+ config = o_client.get_stored_configuration()
104
+ print(f"\n\n\tConfiguration of {mdr_server} is complete.")
105
+ print(f"\nThe server stored configuration is:\n {json.dumps(config, indent=4)}")
106
+
107
+ except Exception as e:
108
+ print_exception_response(e)
@@ -0,0 +1,109 @@
1
+ """
2
+ SPDX-License-Identifier: Apache-2.0
3
+ Copyright Contributors to the ODPi Egeria project.
4
+
5
+
6
+
7
+ Egeria Coco Pharmaceutical demonstration labs.
8
+
9
+ This script creates and configures the cocoMDS2 - Governance metadata server
10
+
11
+
12
+ """
13
+
14
+
15
+ import json
16
+
17
+ from globals import (cocoMDS2Name, corePlatformURL, cocoCohort, devCohort, iotCohort, max_paging_size)
18
+ from pyegeria import CoreServerConfig, Platform
19
+ from pyegeria import (
20
+ print_exception_response,
21
+ )
22
+
23
+
24
+ disable_ssl_warnings = True
25
+
26
+ mdr_server = cocoMDS2Name
27
+ platform_url = corePlatformURL
28
+ admin_user = "garygeeke"
29
+ mdr_server_user_id = "cocoMDS2npa"
30
+ mdr_server_password = "cocoMDS2passw0rd"
31
+ metadataCollectionId = f"{mdr_server}-e915f2fa-aa3g-4396-8bde-bcd65e642b1d"
32
+ metadataCollectionName = "Governance Catalog"
33
+
34
+ print("Configuring " + mdr_server + "...")
35
+
36
+ try:
37
+ o_client = CoreServerConfig(mdr_server, platform_url, admin_user)
38
+
39
+ o_client.set_basic_server_properties(metadataCollectionName,
40
+ "Coco Pharmaceuticals",
41
+ platform_url,
42
+ mdr_server_user_id, mdr_server_password,
43
+ max_paging_size)
44
+
45
+ # Inherit event bus config
46
+
47
+ event_bus_config = {
48
+ "producer": {
49
+ "bootstrap.servers": "localhost:9092"
50
+ },
51
+ "consumer": {
52
+ "bootstrap.servers": "localhost:9092"
53
+ }
54
+ }
55
+
56
+ o_client.set_event_bus(event_bus_config)
57
+
58
+ security_connection_body = {
59
+ "class": "Connection",
60
+ "connectorType": {
61
+ "class": "ConnectorType",
62
+ "connectorProviderClassName":
63
+ "org.odpi.openmetadata.metadatasecurity.samples.CocoPharmaServerSecurityProvider"
64
+ }
65
+ }
66
+
67
+ o_client.set_server_security_connection(security_connection_body)
68
+ o_client.add_default_log_destinations()
69
+
70
+ # o_client.set_in_mem_local_repository()
71
+ o_client.set_xtdb_local_kv_repository()
72
+
73
+ o_client.set_local_metadata_collection_id(metadataCollectionId)
74
+ o_client.set_local_metadata_collection_name(metadataCollectionName)
75
+
76
+ o_client.add_cohort_registration(cocoCohort)
77
+ o_client.add_cohort_registration(devCohort)
78
+ o_client.add_cohort_registration(iotCohort)
79
+
80
+ print(f"Configuring {mdr_server} Access Services (OMAS)....")
81
+
82
+ o_client.configure_access_service("asset-catalog", {})
83
+ o_client.configure_access_service("asset-consumer", {})
84
+
85
+ o_client.configure_access_service("asset-owner", {})
86
+ o_client.configure_access_service("community-profile",
87
+ {"KarmaPointPlateau": "500"})
88
+ o_client.configure_access_service("glossary-view", {})
89
+ o_client.configure_access_service("subject-area", {})
90
+ o_client.configure_access_service("governance-engine", {})
91
+ o_client.configure_access_service("governance-server", {})
92
+ o_client.configure_access_service("governance-program", {})
93
+ o_client.configure_access_service("data-privacy", {})
94
+ o_client.configure_access_service("digital-architecture", {})
95
+ o_client.configure_access_service("security-officer", {})
96
+ o_client.configure_access_service("asset-lineage", {})
97
+ o_client.configure_access_service("it-infrastructure", {})
98
+ o_client.configure_access_service("project-management", {})
99
+
100
+ p_client = Platform(mdr_server, platform_url, admin_user)
101
+ p_client.activate_server_stored_config()
102
+
103
+ print(f"\n\n\tConfiguration of {mdr_server} is complete.")
104
+
105
+ config = o_client.get_stored_configuration()
106
+ print(f"The server stored configuration is \n{json.dumps(config, indent=4)}")
107
+
108
+ except Exception as e:
109
+ print_exception_response(e)
@@ -0,0 +1,104 @@
1
+ """
2
+ SPDX-License-Identifier: Apache-2.0
3
+ Copyright Contributors to the ODPi Egeria project.
4
+
5
+
6
+
7
+ Egeria Coco Pharmaceutical demonstration labs.
8
+
9
+ This script creates and configures the cocoMDS3 - Research server.
10
+
11
+ """
12
+
13
+
14
+ import json
15
+
16
+ from globals import (cocoMDS3Name, corePlatformURL, cocoCohort, max_paging_size)
17
+ from pyegeria import (
18
+ print_exception_response,
19
+ )
20
+ from pyegeria.core_omag_server_config import CoreServerConfig
21
+ from pyegeria.platform_services import Platform
22
+
23
+ mdr_server = cocoMDS3Name
24
+ platform_url = corePlatformURL
25
+ admin_user = "garygeeke"
26
+ mdr_server_user_id = "cocoMDS3npa"
27
+ mdr_server_password = "cocoMDS3passw0rd"
28
+ metadataCollectionId = f"{mdr_server}-e915f2fa-aa3g-4396-8bde-bcd65e642b1d"
29
+ metadataCollectionName = "Research Catalog"
30
+
31
+ print("Configuring " + mdr_server + "...")
32
+ try:
33
+ o_client = CoreServerConfig(mdr_server, platform_url, admin_user)
34
+
35
+ o_client.set_basic_server_properties(metadataCollectionName,
36
+ "Coco Pharmaceuticals",
37
+ platform_url,
38
+ mdr_server_user_id, mdr_server_password,
39
+ max_paging_size)
40
+
41
+ # Can inherit event bus config
42
+
43
+ event_bus_config = {
44
+ "producer": {
45
+ "bootstrap.servers": "localhost:9092"
46
+ },
47
+ "consumer": {
48
+ "bootstrap.servers": "localhost:9092"
49
+ }
50
+ }
51
+
52
+ o_client.set_event_bus(event_bus_config)
53
+
54
+ security_connection_body = {
55
+ "class": "Connection",
56
+ "connectorType": {
57
+ "class": "ConnectorType",
58
+ "connectorProviderClassName":
59
+ "org.odpi.openmetadata.metadatasecurity.samples.CocoPharmaServerSecurityProvider"
60
+ }
61
+ }
62
+ o_client.set_server_security_connection(security_connection_body)
63
+ o_client.add_default_log_destinations()
64
+
65
+ # o_client.set_in_mem_local_repository()
66
+ o_client.set_xtdb_local_kv_repository()
67
+
68
+ o_client.set_local_metadata_collection_id(metadataCollectionId)
69
+ o_client.set_local_metadata_collection_name(metadataCollectionName)
70
+
71
+ o_client.add_cohort_registration(cocoCohort)
72
+
73
+ print(f"Configuring {mdr_server} Access Services (OMAS)....")
74
+
75
+ access_service_options = {
76
+ "SupportedZones": ["personal-files", "clinical-trials", "research", "data-lake", "trash-can"]
77
+ }
78
+ o_client.configure_access_service("asset-catalog", access_service_options)
79
+ o_client.configure_access_service("asset-consumer", access_service_options)
80
+
81
+ access_service_options["DefaultZones"] = ["personal-files"]
82
+
83
+ o_client.configure_access_service("asset-owner", access_service_options)
84
+ o_client.configure_access_service("community-profile",
85
+ {"KarmaPointPlateau": "500"})
86
+ o_client.configure_access_service("glossary-view", {})
87
+ o_client.configure_access_service("data-science", {})
88
+ o_client.configure_access_service("subject-area", {})
89
+ o_client.configure_access_service("asset-manager", access_service_options)
90
+ o_client.configure_access_service("governance-engine", access_service_options)
91
+ o_client.configure_access_service("governance-server", access_service_options)
92
+
93
+ o_client.configure_access_service("project-management", access_service_options)
94
+
95
+ p_client = Platform(mdr_server, platform_url, admin_user)
96
+ p_client.activate_server_stored_config()
97
+
98
+ print(f"\n\n\tConfiguration of {mdr_server} is complete.")
99
+
100
+ config = o_client.get_stored_configuration()
101
+ print(f"The server stored configuration is \n{json.dumps(config, indent=4)}")
102
+
103
+ except Exception as e:
104
+ print_exception_response(e)
@@ -0,0 +1,95 @@
1
+ """
2
+ SPDX-License-Identifier: Apache-2.0
3
+ Copyright Contributors to the ODPi Egeria project.
4
+
5
+
6
+
7
+ Egeria Coco Pharmaceutical demonstration labs.
8
+
9
+ This script creates and configures the cocoMDS4 - Data Lake Users
10
+
11
+ """
12
+
13
+
14
+ import json
15
+
16
+ from globals import (cocoMDS4Name, corePlatformURL, cocoCohort, max_paging_size)
17
+ from pyegeria import CoreServerConfig, Platform
18
+ from pyegeria import (
19
+ print_exception_response,
20
+ )
21
+
22
+ disable_ssl_warnings = True
23
+
24
+ mdr_server = cocoMDS4Name
25
+ platform_url = corePlatformURL
26
+ admin_user = "garygeeke"
27
+ mdr_server_user_id = "cocoMDS4npa"
28
+ mdr_server_password = "cocoMDS4passw0rd"
29
+ metadataCollectionId = f"{mdr_server}-e915f2fa-aa3g-4396-8bde-bcd65e642b1d"
30
+ metadataCollectionName = "Data Lake Users"
31
+
32
+ print("Configuring " + mdr_server + "...")
33
+
34
+ try:
35
+ o_client = CoreServerConfig(mdr_server, platform_url, admin_user)
36
+
37
+ o_client.set_basic_server_properties(metadataCollectionName,
38
+ "Coco Pharmaceuticals",
39
+ platform_url,
40
+ mdr_server_user_id, mdr_server_password,
41
+ max_paging_size)
42
+
43
+ # Inherit event bus config
44
+
45
+ event_bus_config = {
46
+ "producer": {
47
+ "bootstrap.servers": "localhost:9092"
48
+ },
49
+ "consumer": {
50
+ "bootstrap.servers": "localhost:9092"
51
+ }
52
+ }
53
+
54
+ o_client.set_event_bus(event_bus_config)
55
+
56
+ security_connection_body = {
57
+ "class": "Connection",
58
+ "connectorType": {
59
+ "class": "ConnectorType",
60
+ "connectorProviderClassName":
61
+ "org.odpi.openmetadata.metadatasecurity.samples.CocoPharmaServerSecurityProvider"
62
+ }
63
+ }
64
+
65
+ o_client.set_server_security_connection(security_connection_body)
66
+ o_client.add_default_log_destinations()
67
+
68
+ # Note: no metadata repository or collection configuration in this server.
69
+
70
+ o_client.add_cohort_registration(cocoCohort)
71
+
72
+ print(f"Configuring {mdr_server} Access Services (OMAS)....")
73
+
74
+ accessServiceOptions = {
75
+ "SupportedZones": ["data-lake"]
76
+ }
77
+
78
+ o_client.configure_access_service("asset-catalog", accessServiceOptions)
79
+ o_client.configure_access_service("asset-consumer", accessServiceOptions)
80
+ o_client.configure_access_service("asset-owner", {})
81
+ o_client.configure_access_service("community-profile",
82
+ {"KarmaPointPlateau": "500"})
83
+ o_client.configure_access_service("glossary-view", {})
84
+ o_client.configure_access_service("data-science", accessServiceOptions)
85
+
86
+ p_client = Platform(mdr_server, platform_url, admin_user)
87
+ p_client.activate_server_stored_config()
88
+
89
+ print(f"\n\n\tConfiguration of {mdr_server} is complete.")
90
+
91
+ config = o_client.get_stored_configuration()
92
+ print(f"The server stored configuration is \n{json.dumps(config, indent=4)}")
93
+
94
+ except Exception as e:
95
+ print_exception_response(e)
@@ -0,0 +1,97 @@
1
+ """
2
+ SPDX-License-Identifier: Apache-2.0
3
+ Copyright Contributors to the ODPi Egeria project.
4
+
5
+
6
+
7
+ Egeria Coco Pharmaceutical demonstration labs.
8
+
9
+ This script creates and configures the cocoMDS5 - Business Systems
10
+
11
+ """
12
+
13
+
14
+ import json
15
+
16
+ from pyegeria import (
17
+ InvalidParameterException,
18
+ PropertyServerException,
19
+ UserNotAuthorizedException,
20
+ print_exception_response,
21
+ )
22
+
23
+ from pyegeria.core_omag_server_config import CoreServerConfig
24
+ from pyegeria.platform_services import Platform
25
+
26
+ from globals import (adminUserId, cocoMDS1Name, cocoMDS2Name, cocoMDS3Name, cocoMDS4Name, cocoMDS5Name, cocoMDS6Name,
27
+ cocoView1Name, cocoOLS1Name, cocoMDSxName, devPlatformName, dataLakePlatformName, corePlatformName,
28
+ corePlatformURL, dataLakePlatformURL, devPlatformURL, cocoCohort, devCohort, iotCohort,
29
+ max_paging_size)
30
+
31
+
32
+ disable_ssl_warnings = True
33
+
34
+ mdr_server = cocoMDS5Name
35
+ platform_url = corePlatformURL
36
+ admin_user = "garygeeke"
37
+ mdr_server_user_id = "cocoMDS5npa"
38
+ mdr_server_password = "cocoMDS5passw0rd"
39
+ metadataCollectionId = f"{mdr_server}-e915f2fa-aa3g-4396-8bde-bcd65e642b1d"
40
+ metadataCollectionName = "Business Systems Catalog"
41
+
42
+ print("Configuring " + mdr_server + "...")
43
+ try:
44
+ o_client = CoreServerConfig(mdr_server, platform_url, admin_user)
45
+
46
+ o_client.set_basic_server_properties(metadataCollectionName,
47
+ "Coco Pharmaceuticals",
48
+ platform_url,
49
+ mdr_server_user_id, mdr_server_password,
50
+ max_paging_size)
51
+
52
+ # Inherit event bus config
53
+
54
+ event_bus_config = {
55
+ "producer": {
56
+ "bootstrap.servers": "localhost:9092"
57
+ },
58
+ "consumer": {
59
+ "bootstrap.servers": "localhost:9092"
60
+ }
61
+ }
62
+
63
+ o_client.set_event_bus(event_bus_config)
64
+
65
+ security_connection_body = {
66
+ "class": "Connection",
67
+ "connectorType": {
68
+ "class": "ConnectorType",
69
+ "connectorProviderClassName":
70
+ "org.odpi.openmetadata.metadatasecurity.samples.CocoPharmaServerSecurityProvider"
71
+ }
72
+ }
73
+ o_client.set_server_security_connection(security_connection_body)
74
+ o_client.add_default_log_destinations()
75
+
76
+ # o_client.set_in_mem_local_repository()
77
+ o_client.set_xtdb_local_kv_repository()
78
+
79
+ o_client.set_local_metadata_collection_id(metadataCollectionId)
80
+ o_client.set_local_metadata_collection_name(metadataCollectionName)
81
+
82
+ o_client.add_cohort_registration(cocoCohort)
83
+
84
+ proxy_details = ("org.odpi.openmetadata.adapters.repositoryservices.readonly.repositoryconnector." +
85
+ "ReadOnlyOMRSRepositoryConnectorProvider")
86
+ o_client.set_repository_proxy_details(proxy_details)
87
+
88
+ p_client = Platform(mdr_server, platform_url, admin_user)
89
+ p_client.activate_server_stored_config()
90
+
91
+ print(f"\n\n\tConfiguration of {mdr_server} is complete.")
92
+
93
+ config = o_client.get_stored_configuration()
94
+ print(f"The server stored configuration is \n{json.dumps(config, indent=4)}")
95
+
96
+ except Exception as e:
97
+ print_exception_response(e)
@@ -0,0 +1,112 @@
1
+ """
2
+ SPDX-License-Identifier: Apache-2.0
3
+ Copyright Contributors to the ODPi Egeria project.
4
+
5
+
6
+
7
+ Egeria Coco Pharmaceutical demonstration labs.
8
+
9
+ This script creates and configures the cocoMDS6 - Manufacturing
10
+
11
+ """
12
+
13
+
14
+ import json
15
+
16
+ from globals import (cocoMDS6Name,
17
+ corePlatformURL, cocoCohort, iotCohort,
18
+ max_paging_size)
19
+ from pyegeria import CoreServerConfig, Platform
20
+ from pyegeria import (
21
+ print_exception_response,
22
+ )
23
+
24
+ disable_ssl_warnings = True
25
+
26
+ mdr_server = cocoMDS6Name
27
+ platform_url = corePlatformURL
28
+ admin_user = "garygeeke"
29
+ mdr_server_user_id = "cocoMDS6npa"
30
+ mdr_server_password = "cocoMDS6passw0rd"
31
+ metadataCollectionId = f"{mdr_server}-e915f2fa-aa3g-4396-8bde-bcd65e642b1d"
32
+ metadataCollectionName = "Manufacturing Catalog"
33
+
34
+ print("Configuring " + mdr_server + "...")
35
+
36
+ try:
37
+ o_client = CoreServerConfig(mdr_server, platform_url, admin_user)
38
+
39
+ o_client.set_basic_server_properties(metadataCollectionName,
40
+ "Coco Pharmaceuticals",
41
+ platform_url,
42
+ mdr_server_user_id, mdr_server_password,
43
+ max_paging_size)
44
+
45
+ # Can inherit event bus config
46
+
47
+ event_bus_config = {
48
+ "producer": {
49
+ "bootstrap.servers": "localhost:9092"
50
+ },
51
+ "consumer": {
52
+ "bootstrap.servers": "localhost:9092"
53
+ }
54
+ }
55
+
56
+ o_client.set_event_bus(event_bus_config)
57
+
58
+ security_connection_body = {
59
+ "class": "Connection",
60
+ "connectorType": {
61
+ "class": "ConnectorType",
62
+ "connectorProviderClassName":
63
+ "org.odpi.openmetadata.metadatasecurity.samples.CocoPharmaServerSecurityProvider"
64
+ }
65
+ }
66
+
67
+ o_client.set_server_security_connection(security_connection_body)
68
+ o_client.add_default_log_destinations()
69
+
70
+ # o_client.set_in_mem_local_repository()
71
+ o_client.set_xtdb_local_kv_repository()
72
+
73
+ o_client.set_local_metadata_collection_id(metadataCollectionId)
74
+ o_client.set_local_metadata_collection_name(metadataCollectionName)
75
+
76
+ o_client.add_cohort_registration(cocoCohort)
77
+ o_client.add_cohort_registration(iotCohort)
78
+
79
+ print(f"Configuring {mdr_server} Access Services (OMAS)....")
80
+
81
+ access_service_options = {
82
+ "SupportedZones": ["manufacturing"],
83
+ "DefaultZones": ["manufacturing"]
84
+ }
85
+
86
+ o_client.configure_access_service("asset-catalog", access_service_options)
87
+ o_client.configure_access_service("asset-consumer", access_service_options)
88
+ o_client.configure_access_service("asset-owner", access_service_options)
89
+ o_client.configure_access_service("community-profile",
90
+ {"KarmaPointPlateau": "500"})
91
+ o_client.configure_access_service("glossary-view", {})
92
+ o_client.configure_access_service("data-science", access_service_options)
93
+ o_client.configure_access_service("subject-area", {})
94
+ o_client.configure_access_service("asset-manager", access_service_options)
95
+ o_client.configure_access_service("governance-engine", access_service_options)
96
+ o_client.configure_access_service("governance-server", access_service_options)
97
+ o_client.configure_access_service("asset-owner", access_service_options)
98
+ o_client.configure_access_service("data-engine", access_service_options)
99
+ o_client.configure_access_service("data-manager", access_service_options)
100
+ o_client.configure_access_service("it-infrastructure", access_service_options)
101
+ o_client.configure_access_service("project-management", access_service_options)
102
+
103
+ p_client = Platform(mdr_server, platform_url, admin_user)
104
+ p_client.activate_server_stored_config()
105
+
106
+ print(f"\n\n\tConfiguration of {mdr_server} is complete.")
107
+
108
+ config = o_client.get_stored_configuration()
109
+ print(f"The server stored configuration is \n{json.dumps(config, indent=4)}")
110
+
111
+ except Exception as e:
112
+ print_exception_response(e)