pyegeria 5.4.8.6__py3-none-any.whl → 5.4.8.8__py3-none-any.whl
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.
- examples/Coco_config/README.md +19 -0
- examples/Coco_config/__init__.py +4 -0
- examples/Coco_config/config_cocoMDS1.py +108 -0
- examples/Coco_config/config_cocoMDS2.py +126 -0
- examples/Coco_config/config_cocoMDS3.py +109 -0
- examples/Coco_config/config_cocoMDS4.py +91 -0
- examples/Coco_config/config_cocoMDS5.py +116 -0
- examples/Coco_config/config_cocoMDS6.py +114 -0
- examples/Coco_config/config_cocoMDSx.py +119 -0
- examples/Coco_config/config_cocoView1.py +155 -0
- examples/Coco_config/config_coco_core.py +255 -0
- examples/Coco_config/config_coco_datalake.py +450 -0
- examples/Coco_config/config_exchangeDL01.py +106 -0
- examples/Coco_config/config_governDL01.py +80 -0
- examples/Coco_config/config_monitorDev01.py +60 -0
- examples/Coco_config/config_monitorGov01.py +194 -0
- examples/Coco_config/globals.py +154 -0
- examples/GeoSpatial Products Example.py +535 -0
- examples/Jupyter Notebooks/P-egeria-server-config.ipynb +2137 -0
- examples/Jupyter Notebooks/README.md +2 -0
- examples/Jupyter Notebooks/common/P-environment-check.ipynb +115 -0
- examples/Jupyter Notebooks/common/__init__.py +14 -0
- examples/Jupyter Notebooks/common/common-functions.ipynb +4694 -0
- examples/Jupyter Notebooks/common/environment-check.ipynb +53 -0
- examples/Jupyter Notebooks/common/globals.ipynb +184 -0
- examples/Jupyter Notebooks/common/globals.py +154 -0
- examples/Jupyter Notebooks/common/orig_globals.py +152 -0
- examples/format_sets/all_format_sets.json +910 -0
- examples/format_sets/custom_format_sets.json +268 -0
- examples/format_sets/subset_format_sets.json +187 -0
- examples/format_sets_save_load_example.py +294 -0
- examples/output_formats_example.py +193 -0
- md_processing/__init__.py +6 -0
- md_processing/data/commands.json +30640 -59579
- md_processing/dr_egeria.py +18 -0
- md_processing/md_commands/feedback_commands.py +763 -0
- md_processing/md_commands/project_commands.py +1 -1
- md_processing/md_processing_utils/md_processing_constants.py +134 -4
- pyegeria/__init__.py +1 -1
- pyegeria/_client_new.py +109 -12
- pyegeria/_globals.py +3 -2
- pyegeria/base_report_formats.py +17 -0
- pyegeria/format_set_executor.py +5 -2
- {pyegeria-5.4.8.6.dist-info → pyegeria-5.4.8.8.dist-info}/METADATA +1 -1
- {pyegeria-5.4.8.6.dist-info → pyegeria-5.4.8.8.dist-info}/RECORD +49 -16
- {pyegeria-5.4.8.6.dist-info → pyegeria-5.4.8.8.dist-info}/top_level.txt +1 -0
- {pyegeria-5.4.8.6.dist-info → pyegeria-5.4.8.8.dist-info}/WHEEL +0 -0
- {pyegeria-5.4.8.6.dist-info → pyegeria-5.4.8.8.dist-info}/entry_points.txt +0 -0
- {pyegeria-5.4.8.6.dist-info → pyegeria-5.4.8.8.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,119 @@
|
|
|
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 cocoMDSx server.
|
|
10
|
+
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
import json
|
|
14
|
+
|
|
15
|
+
from globals import cocoCohort, cocoMDSxName, devPlatformURL, iotCohort
|
|
16
|
+
|
|
17
|
+
from pyegeria import CoreServerConfig, Platform, print_exception_response
|
|
18
|
+
|
|
19
|
+
# from pyegeria.admin_services import FullServerConfig
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
disable_ssl_warnings = True
|
|
23
|
+
|
|
24
|
+
mdr_server = cocoMDSxName
|
|
25
|
+
platform_url = devPlatformURL
|
|
26
|
+
admin_user = "garygeeke"
|
|
27
|
+
mdr_server_user_id = "cocoMDSxnpa"
|
|
28
|
+
mdr_server_password = "cocoMDSxpassw0rd"
|
|
29
|
+
metadataCollectionId = f"{mdr_server}-e915f2fa-aa3g-4396-8bde-bcd65e642b1d"
|
|
30
|
+
metadataCollectionName = "Development Catalog"
|
|
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(
|
|
38
|
+
"Development Server",
|
|
39
|
+
"Coco Pharmaceuticals",
|
|
40
|
+
platform_url,
|
|
41
|
+
mdr_server_user_id,
|
|
42
|
+
mdr_server_password,
|
|
43
|
+
600,
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
# Can inherit event bus config
|
|
47
|
+
|
|
48
|
+
# event_bus_config = {
|
|
49
|
+
# "producer": {
|
|
50
|
+
# "bootstrap.servers": "localhost:9092"
|
|
51
|
+
# },
|
|
52
|
+
# "consumer": {
|
|
53
|
+
# "bootstrap.servers": "localhost:9092"
|
|
54
|
+
# }
|
|
55
|
+
# }
|
|
56
|
+
#
|
|
57
|
+
# o_client.set_event_bus(event_bus_config)
|
|
58
|
+
|
|
59
|
+
security_connection_body = {
|
|
60
|
+
"class": "Connection",
|
|
61
|
+
"connectorType": {
|
|
62
|
+
"class": "ConnectorType",
|
|
63
|
+
"connectorProviderClassName": "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
|
+
o_client.set_in_mem_local_repository()
|
|
70
|
+
# o_client.set_xtdb_local_kv_repository()
|
|
71
|
+
|
|
72
|
+
o_client.set_local_metadata_collection_id(metadataCollectionId)
|
|
73
|
+
o_client.set_local_metadata_collection_name(metadataCollectionName)
|
|
74
|
+
|
|
75
|
+
o_client.add_cohort_registration(cocoCohort)
|
|
76
|
+
o_client.add_cohort_registration(iotCohort)
|
|
77
|
+
|
|
78
|
+
print(f"Configuring {mdr_server} Access Services (OMAS)....")
|
|
79
|
+
|
|
80
|
+
access_service_options = {
|
|
81
|
+
"SupportedZones": [
|
|
82
|
+
"sdlc",
|
|
83
|
+
"quarantine",
|
|
84
|
+
"clinical-trials",
|
|
85
|
+
"research",
|
|
86
|
+
"data-lake",
|
|
87
|
+
"trash-can",
|
|
88
|
+
],
|
|
89
|
+
"DefaultZones": ["sdlc", "quarantine"],
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
# o_client.configure_access_service("asset-catalog", access_service_options)
|
|
93
|
+
o_client.configure_access_service("asset-consumer", access_service_options)
|
|
94
|
+
o_client.configure_access_service("asset-owner", access_service_options)
|
|
95
|
+
o_client.configure_access_service("community-profile", {"KarmaPointPlateau": "500"})
|
|
96
|
+
# o_client.configure_access_service("glossary-view", {})
|
|
97
|
+
o_client.configure_access_service("data-science", access_service_options)
|
|
98
|
+
# o_client.configure_access_service("subject-area", {})
|
|
99
|
+
o_client.configure_access_service("asset-manager", access_service_options)
|
|
100
|
+
o_client.configure_access_service("governance-engine", access_service_options)
|
|
101
|
+
o_client.configure_access_service("governance-server", access_service_options)
|
|
102
|
+
# o_client.configure_access_service("data-manager", access_service_options)
|
|
103
|
+
o_client.configure_access_service("it-infrastructure", access_service_options)
|
|
104
|
+
o_client.configure_access_service("project-management", access_service_options)
|
|
105
|
+
o_client.configure_access_service("software-tech", access_service_options)
|
|
106
|
+
# o_client.configure_access_service("devops", access_service_options)
|
|
107
|
+
o_client.configure_access_service("digital-architecture", access_service_options)
|
|
108
|
+
o_client.configure_access_service("design-model", access_service_options)
|
|
109
|
+
|
|
110
|
+
p_client = Platform(mdr_server, platform_url, admin_user)
|
|
111
|
+
p_client.activate_server_stored_config()
|
|
112
|
+
|
|
113
|
+
print(f"\n\n\tConfiguration of {mdr_server} is complete.")
|
|
114
|
+
|
|
115
|
+
config = o_client.get_stored_configuration()
|
|
116
|
+
print(f"The server stored configuration is \n{json.dumps(config, indent=4)}")
|
|
117
|
+
|
|
118
|
+
except Exception as e:
|
|
119
|
+
print_exception_response(e)
|
|
@@ -0,0 +1,155 @@
|
|
|
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
|
+
This script creates and configures the cocoView1 server.
|
|
8
|
+
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import json
|
|
12
|
+
|
|
13
|
+
from globals import cocoMDS2Name, corePlatformURL, dataLakePlatformURL, devPlatformURL
|
|
14
|
+
|
|
15
|
+
from pyegeria import print_exception_response
|
|
16
|
+
from pyegeria.full_omag_server_config import FullServerConfig
|
|
17
|
+
from pyegeria.platform_services import Platform
|
|
18
|
+
|
|
19
|
+
disable_ssl_warnings = True
|
|
20
|
+
|
|
21
|
+
view_server = "cocoView1"
|
|
22
|
+
|
|
23
|
+
platform_url = corePlatformURL
|
|
24
|
+
admin_user = "garygeeke"
|
|
25
|
+
view_server_user_id = "cocoView1npa"
|
|
26
|
+
view_server_password = "cocoView1passw0rd"
|
|
27
|
+
view_server_type = "View Server"
|
|
28
|
+
remote_platform_url = corePlatformURL
|
|
29
|
+
remote_server_name = cocoMDS2Name
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
print("Configuring " + view_server + "...")
|
|
33
|
+
try:
|
|
34
|
+
f_client = FullServerConfig(view_server, platform_url, admin_user)
|
|
35
|
+
|
|
36
|
+
f_client.set_server_user_id(view_server_user_id)
|
|
37
|
+
f_client.set_server_user_password(view_server_password)
|
|
38
|
+
f_client.set_organization_name("Coco Pharmaceuticals")
|
|
39
|
+
|
|
40
|
+
f_client.set_server_description("Coco View Server")
|
|
41
|
+
f_client.set_server_url_root(platform_url)
|
|
42
|
+
|
|
43
|
+
# Can 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
|
+
# f_client.set_event_bus(event_bus_config)
|
|
55
|
+
|
|
56
|
+
security_connection_body = {
|
|
57
|
+
"class": "Connection",
|
|
58
|
+
"connectorType": {
|
|
59
|
+
"class": "ConnectorType",
|
|
60
|
+
"connectorProviderClassName": "org.odpi.openmetadata.metadatasecurity.samples.CocoPharmaServerSecurityProvider",
|
|
61
|
+
},
|
|
62
|
+
}
|
|
63
|
+
f_client.set_server_security_connection(security_connection_body)
|
|
64
|
+
|
|
65
|
+
f_client.add_default_log_destinations()
|
|
66
|
+
#
|
|
67
|
+
# view_server_config = {
|
|
68
|
+
# "class": "ViewServiceRequestBody",
|
|
69
|
+
# "omagserverPlatformRootURL": remote_platform_url,
|
|
70
|
+
# "omagserverName": remote_server_name,
|
|
71
|
+
# "resourceEndpoints": [
|
|
72
|
+
# {
|
|
73
|
+
# "class": "ResourceEndpointConfig",
|
|
74
|
+
# "resourceCategory": "Platform",
|
|
75
|
+
# "description": "Core Platform",
|
|
76
|
+
# "platformName": "Core",
|
|
77
|
+
# "platformRootURL": corePlatformURL
|
|
78
|
+
# },
|
|
79
|
+
# {
|
|
80
|
+
# "class": "ResourceEndpointConfig",
|
|
81
|
+
# "resourceCategory": "Platform",
|
|
82
|
+
# "description": "DataLake Platform",
|
|
83
|
+
# "platformName": "DataLake",
|
|
84
|
+
# "platformRootURL": dataLakePlatformURL
|
|
85
|
+
# },
|
|
86
|
+
# {
|
|
87
|
+
# "class": "ResourceEndpointConfig",
|
|
88
|
+
# "resourceCategory": "Platform",
|
|
89
|
+
# "description": "Development Platform",
|
|
90
|
+
# "platformName": "Development",
|
|
91
|
+
# "platformRootURL": devPlatformURL
|
|
92
|
+
# },
|
|
93
|
+
# {
|
|
94
|
+
# "class": "ResourceEndpointConfig",
|
|
95
|
+
# "resourceCategory": "Server",
|
|
96
|
+
# "serverInstanceName": "cocoMDS1",
|
|
97
|
+
# "description": "Data Lake Operations",
|
|
98
|
+
# "platformName": "DataLake",
|
|
99
|
+
# "serverName": "cocoMDS1"
|
|
100
|
+
# },
|
|
101
|
+
# {
|
|
102
|
+
# "class": "ResourceEndpointConfig",
|
|
103
|
+
# "resourceCategory": "Server",
|
|
104
|
+
# "serverInstanceName": "cocoMDS2",
|
|
105
|
+
# "description": "Governance",
|
|
106
|
+
# "platformName": "Core",
|
|
107
|
+
# "serverName": "cocoMDS2"
|
|
108
|
+
# },
|
|
109
|
+
# {
|
|
110
|
+
# "class": "ResourceEndpointConfig",
|
|
111
|
+
# "resourceCategory": "Server",
|
|
112
|
+
# "serverInstanceName": "cocoMDS3",
|
|
113
|
+
# "description": "Research",
|
|
114
|
+
# "platformName": "Core",
|
|
115
|
+
# "serverName": "cocoMDS3"
|
|
116
|
+
# },
|
|
117
|
+
# {
|
|
118
|
+
# "class": "ResourceEndpointConfig",
|
|
119
|
+
# "resourceCategory": "Server",
|
|
120
|
+
# "serverInstanceName": "cocoMDS5",
|
|
121
|
+
# "description": "Business Systems",
|
|
122
|
+
# "platformName": "Core",
|
|
123
|
+
# "serverName": "cocoMDS5"
|
|
124
|
+
# },
|
|
125
|
+
# {
|
|
126
|
+
# "class": "ResourceEndpointConfig",
|
|
127
|
+
# "resourceCategory": "Server",
|
|
128
|
+
# "serverInstanceName": "cocoMDS6",
|
|
129
|
+
# "description": "Manufacturing",
|
|
130
|
+
# "platformName": "Core",
|
|
131
|
+
# "serverName": "cocoMDS6"
|
|
132
|
+
# },
|
|
133
|
+
# {
|
|
134
|
+
# "class": "ResourceEndpointConfig",
|
|
135
|
+
# "resourceCategory": "Server",
|
|
136
|
+
# "serverInstanceName": "cocoMDSx",
|
|
137
|
+
# "description": "Development",
|
|
138
|
+
# "platformName": "Development",
|
|
139
|
+
# "serverName": "cocoMDSx"
|
|
140
|
+
# },
|
|
141
|
+
# ]
|
|
142
|
+
# }
|
|
143
|
+
|
|
144
|
+
f_client.config_all_view_services(remote_server_name, platform_url)
|
|
145
|
+
|
|
146
|
+
p_client = Platform(view_server, platform_url, admin_user)
|
|
147
|
+
p_client.activate_server_stored_config()
|
|
148
|
+
|
|
149
|
+
config = f_client.get_stored_configuration()
|
|
150
|
+
print(f"The server stored configuration is {json.dumps(config, indent=4)}")
|
|
151
|
+
view_config = f_client.get_view_svcs_config()
|
|
152
|
+
print(f"The view config is {json.dumps(view_config, indent=4)}")
|
|
153
|
+
|
|
154
|
+
except Exception as e:
|
|
155
|
+
print_exception_response(e)
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Copyright Contributors to the ODPi Egeria project.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Egeria Coco Pharmaceutical demonstration labs.
|
|
9
|
+
|
|
10
|
+
This script creates and configures the cocoMDS2 - Governance metadata server
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import argparse
|
|
17
|
+
import json
|
|
18
|
+
from datetime import datetime
|
|
19
|
+
|
|
20
|
+
from globals import (
|
|
21
|
+
adminUserId,
|
|
22
|
+
cocoCohort,
|
|
23
|
+
cocoMDS2Name,
|
|
24
|
+
cocoMDS5Name,
|
|
25
|
+
cocoMDS6Name,
|
|
26
|
+
corePlatformURL,
|
|
27
|
+
devCohort,
|
|
28
|
+
iotCohort,
|
|
29
|
+
max_paging_size,
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
from pyegeria import CoreServerConfig, Platform, print_exception_response
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def config_coco_core(url: str, userid: str):
|
|
36
|
+
disable_ssl_warnings = True
|
|
37
|
+
print("Configuring and activating the Datalake")
|
|
38
|
+
platform_url = url
|
|
39
|
+
admin_user = userid
|
|
40
|
+
|
|
41
|
+
# event_bus_config = {
|
|
42
|
+
# "producer": {
|
|
43
|
+
# "bootstrap.servers": "{{kafkaEndpoint}}"
|
|
44
|
+
# },
|
|
45
|
+
# "consumer": {
|
|
46
|
+
# "bootstrap.servers": "{{kafkaEndpoint}}"
|
|
47
|
+
# }
|
|
48
|
+
# }
|
|
49
|
+
event_bus_config = {
|
|
50
|
+
"producer": {"bootstrap.servers": "host.docker.internal:9192"},
|
|
51
|
+
"consumer": {"bootstrap.servers": "host.docker.internal:9192"},
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
security_connection_body = {
|
|
55
|
+
"class": "Connection",
|
|
56
|
+
"connectorType": {
|
|
57
|
+
"class": "ConnectorType",
|
|
58
|
+
"connectorProviderClassName": "org.odpi.openmetadata.metadatasecurity.samples.CocoPharmaServerSecurityProvider",
|
|
59
|
+
},
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
#
|
|
63
|
+
# Configure MDS2
|
|
64
|
+
#
|
|
65
|
+
mdr_server = cocoMDS2Name
|
|
66
|
+
mdr_server_user_id = "cocoMDS2npa"
|
|
67
|
+
mdr_server_password = "cocoMDS2passw0rd"
|
|
68
|
+
metadataCollectionId = f"{mdr_server}-e915f2fa-aa3g-4396-8bde-bcd65e642b1d"
|
|
69
|
+
metadataCollectionName = "Governance Catalog"
|
|
70
|
+
|
|
71
|
+
try:
|
|
72
|
+
o_client = CoreServerConfig(mdr_server, platform_url, admin_user)
|
|
73
|
+
|
|
74
|
+
o_client.set_basic_server_properties(
|
|
75
|
+
"Governance Server",
|
|
76
|
+
"Coco Pharmaceuticals",
|
|
77
|
+
platform_url,
|
|
78
|
+
mdr_server_user_id,
|
|
79
|
+
mdr_server_password,
|
|
80
|
+
max_paging_size,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
o_client.set_event_bus(event_bus_config)
|
|
84
|
+
o_client.set_server_security_connection(security_connection_body)
|
|
85
|
+
o_client.add_default_log_destinations()
|
|
86
|
+
|
|
87
|
+
# o_client.set_in_mem_local_repository()
|
|
88
|
+
o_client.set_xtdb_local_kv_repository()
|
|
89
|
+
|
|
90
|
+
o_client.set_local_metadata_collection_id(metadataCollectionId)
|
|
91
|
+
o_client.set_local_metadata_collection_name(metadataCollectionName)
|
|
92
|
+
|
|
93
|
+
o_client.add_cohort_registration(cocoCohort)
|
|
94
|
+
o_client.add_cohort_registration(devCohort)
|
|
95
|
+
o_client.add_cohort_registration(iotCohort)
|
|
96
|
+
|
|
97
|
+
# o_client.configure_access_service("asset-catalog", {})
|
|
98
|
+
o_client.configure_access_service("asset-consumer", {})
|
|
99
|
+
|
|
100
|
+
o_client.configure_access_service("asset-owner", {})
|
|
101
|
+
o_client.configure_access_service(
|
|
102
|
+
"community-profile", {"KarmaPointPlateau": "500"}
|
|
103
|
+
)
|
|
104
|
+
# o_client.configure_access_service("glossary-view", {})
|
|
105
|
+
# o_client.configure_access_service("subject-area", {})
|
|
106
|
+
o_client.configure_access_service("governance-engine", {})
|
|
107
|
+
o_client.configure_access_service("governance-server", {})
|
|
108
|
+
o_client.configure_access_service("governance-program", {})
|
|
109
|
+
# o_client.configure_access_service("data-privacy", {})
|
|
110
|
+
o_client.configure_access_service("digital-architecture", {})
|
|
111
|
+
o_client.configure_access_service("security-manager", {})
|
|
112
|
+
o_client.configure_access_service("asset-lineage", {})
|
|
113
|
+
o_client.configure_access_service("it-infrastructure", {})
|
|
114
|
+
o_client.configure_access_service("project-management", {})
|
|
115
|
+
print(f"Activating {mdr_server}")
|
|
116
|
+
p_client = Platform(mdr_server, platform_url, admin_user)
|
|
117
|
+
p_client.activate_server_stored_config()
|
|
118
|
+
print(f"{mdr_server} activated")
|
|
119
|
+
except Exception as e:
|
|
120
|
+
print_exception_response(e)
|
|
121
|
+
#
|
|
122
|
+
# Configure MDS5
|
|
123
|
+
#
|
|
124
|
+
disable_ssl_warnings = True
|
|
125
|
+
|
|
126
|
+
mdr_server = cocoMDS5Name
|
|
127
|
+
mdr_server_user_id = "cocoMDS5npa"
|
|
128
|
+
mdr_server_password = "cocoMDS5passw0rd"
|
|
129
|
+
metadataCollectionId = f"{mdr_server}-e915f2fa-aa3g-4396-8bde-bcd65e642b1d"
|
|
130
|
+
metadataCollectionName = "Business Systems Catalog"
|
|
131
|
+
|
|
132
|
+
print("Configuring " + mdr_server + "...")
|
|
133
|
+
try:
|
|
134
|
+
o_client = CoreServerConfig(mdr_server, platform_url, admin_user)
|
|
135
|
+
|
|
136
|
+
o_client.set_basic_server_properties(
|
|
137
|
+
"Business Systems",
|
|
138
|
+
"Coco Pharmaceuticals",
|
|
139
|
+
platform_url,
|
|
140
|
+
mdr_server_user_id,
|
|
141
|
+
mdr_server_password,
|
|
142
|
+
max_paging_size,
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
o_client.set_event_bus(event_bus_config)
|
|
146
|
+
o_client.set_server_security_connection(security_connection_body)
|
|
147
|
+
o_client.add_default_log_destinations()
|
|
148
|
+
|
|
149
|
+
# o_client.set_in_mem_local_repository()
|
|
150
|
+
o_client.set_xtdb_local_kv_repository()
|
|
151
|
+
|
|
152
|
+
o_client.set_local_metadata_collection_id(metadataCollectionId)
|
|
153
|
+
o_client.set_local_metadata_collection_name(metadataCollectionName)
|
|
154
|
+
|
|
155
|
+
o_client.add_cohort_registration(cocoCohort)
|
|
156
|
+
|
|
157
|
+
proxy_details = (
|
|
158
|
+
"org.odpi.openmetadata.adapters.repositoryservices.readonly.repositoryconnector."
|
|
159
|
+
+ "ReadOnlyOMRSRepositoryConnectorProvider"
|
|
160
|
+
)
|
|
161
|
+
o_client.set_repository_proxy_details(proxy_details)
|
|
162
|
+
print(f"Activating {mdr_server}")
|
|
163
|
+
p_client = Platform(mdr_server, platform_url, admin_user)
|
|
164
|
+
p_client.activate_server_stored_config()
|
|
165
|
+
print(f"{mdr_server} activated")
|
|
166
|
+
except Exception as e:
|
|
167
|
+
print_exception_response(e)
|
|
168
|
+
|
|
169
|
+
#
|
|
170
|
+
# Configure MDS6
|
|
171
|
+
#
|
|
172
|
+
disable_ssl_warnings = True
|
|
173
|
+
|
|
174
|
+
mdr_server = cocoMDS6Name
|
|
175
|
+
platform_url = corePlatformURL
|
|
176
|
+
admin_user = "garygeeke"
|
|
177
|
+
mdr_server_user_id = "cocoMDS6npa"
|
|
178
|
+
mdr_server_password = "cocoMDS6passw0rd"
|
|
179
|
+
metadataCollectionId = f"{mdr_server}-e915f2fa-aa3g-4396-8bde-bcd65e642b1d"
|
|
180
|
+
metadataCollectionName = "Manufacturing Catalog"
|
|
181
|
+
|
|
182
|
+
print("Configuring " + mdr_server + "...")
|
|
183
|
+
|
|
184
|
+
try:
|
|
185
|
+
o_client = CoreServerConfig(mdr_server, platform_url, admin_user)
|
|
186
|
+
|
|
187
|
+
o_client.set_basic_server_properties(
|
|
188
|
+
"Manufacturing",
|
|
189
|
+
"Coco Pharmaceuticals",
|
|
190
|
+
platform_url,
|
|
191
|
+
mdr_server_user_id,
|
|
192
|
+
mdr_server_password,
|
|
193
|
+
max_paging_size,
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
o_client.set_event_bus(event_bus_config)
|
|
197
|
+
|
|
198
|
+
o_client.set_server_security_connection(security_connection_body)
|
|
199
|
+
o_client.add_default_log_destinations()
|
|
200
|
+
|
|
201
|
+
# o_client.set_in_mem_local_repository()
|
|
202
|
+
o_client.set_xtdb_local_kv_repository()
|
|
203
|
+
|
|
204
|
+
o_client.set_local_metadata_collection_id(metadataCollectionId)
|
|
205
|
+
o_client.set_local_metadata_collection_name(metadataCollectionName)
|
|
206
|
+
|
|
207
|
+
o_client.add_cohort_registration(cocoCohort)
|
|
208
|
+
o_client.add_cohort_registration(iotCohort)
|
|
209
|
+
|
|
210
|
+
access_service_options = {
|
|
211
|
+
"SupportedZones": ["manufacturing"],
|
|
212
|
+
"DefaultZones": ["manufacturing"],
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
# o_client.configure_access_service("asset-catalog", access_service_options)
|
|
216
|
+
o_client.configure_access_service("asset-consumer", access_service_options)
|
|
217
|
+
o_client.configure_access_service("asset-owner", access_service_options)
|
|
218
|
+
o_client.configure_access_service(
|
|
219
|
+
"community-profile", {"KarmaPointPlateau": "500"}
|
|
220
|
+
)
|
|
221
|
+
# o_client.configure_access_service("glossary-view", {})
|
|
222
|
+
o_client.configure_access_service("data-science", access_service_options)
|
|
223
|
+
# o_client.configure_access_service("subject-area", {})
|
|
224
|
+
o_client.configure_access_service("asset-manager", access_service_options)
|
|
225
|
+
o_client.configure_access_service("governance-engine", access_service_options)
|
|
226
|
+
o_client.configure_access_service("governance-server", access_service_options)
|
|
227
|
+
o_client.configure_access_service("asset-owner", access_service_options)
|
|
228
|
+
# o_client.configure_access_service("data-engine", access_service_options)
|
|
229
|
+
o_client.configure_access_service("data-manager", access_service_options)
|
|
230
|
+
o_client.configure_access_service("it-infrastructure", access_service_options)
|
|
231
|
+
o_client.configure_access_service("project-management", access_service_options)
|
|
232
|
+
|
|
233
|
+
print(f"Activating {mdr_server}")
|
|
234
|
+
p_client = Platform(mdr_server, platform_url, admin_user)
|
|
235
|
+
p_client.activate_server_stored_config()
|
|
236
|
+
print(f"{mdr_server} activated")
|
|
237
|
+
except Exception as e:
|
|
238
|
+
print_exception_response(e)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def main():
|
|
242
|
+
parser = argparse.ArgumentParser()
|
|
243
|
+
|
|
244
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
|
245
|
+
parser.add_argument("--userid", help="User Id")
|
|
246
|
+
args = parser.parse_args()
|
|
247
|
+
|
|
248
|
+
url = args.url if args.url is not None else corePlatformURL
|
|
249
|
+
userid = args.userid if args.userid is not None else adminUserId
|
|
250
|
+
|
|
251
|
+
config_coco_core(url, userid)
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
if __name__ == "__main__":
|
|
255
|
+
main()
|