pyegeria 5.3.9.9.7__py3-none-any.whl → 5.4.0__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.
- commands/cat/debug_log +2806 -0
- commands/cat/debug_log.2025-07-15_14-28-38_087378.zip +0 -0
- commands/cat/debug_log.2025-07-16_15-48-50_037087.zip +0 -0
- commands/cat/dr_egeria_command_help.py +273 -0
- commands/cat/dr_egeria_md.py +90 -20
- commands/cat/glossary_actions.py +2 -2
- commands/cat/list_collections.py +24 -10
- commands/cat/list_data_designer.py +183 -0
- md_processing/__init__.py +28 -5
- md_processing/data/commands.json +31474 -1096
- md_processing/dr_egeria_outbox-pycharm/.obsidian/app.json +1 -0
- md_processing/dr_egeria_outbox-pycharm/.obsidian/appearance.json +1 -0
- md_processing/dr_egeria_outbox-pycharm/.obsidian/core-plugins.json +31 -0
- md_processing/dr_egeria_outbox-pycharm/.obsidian/workspace.json +177 -0
- md_processing/dr_egeria_outbox-pycharm/monday/processed-2025-07-14 12:38-data_designer_out.md +663 -0
- md_processing/dr_egeria_outbox-pycharm/thursday/processed-2025-07-17 15:00-Derive-Dr-Gov-Defs.md +719 -0
- md_processing/dr_egeria_outbox-pycharm/thursday/processed-2025-07-17 20:13-Derive-Dr-Gov-Defs.md +41 -0
- md_processing/dr_egeria_outbox-pycharm/thursday/processed-2025-07-17 20:14-Derive-Dr-Gov-Defs.md +33 -0
- md_processing/dr_egeria_outbox-pycharm/thursday/processed-2025-07-17 20:50-Derive-Dr-Gov-Defs.md +192 -0
- md_processing/dr_egeria_outbox-pycharm/tuesday/processed-2025-07-16 19:15-gov_def2.md +527 -0
- md_processing/dr_egeria_outbox-pycharm/tuesday/processed-2025-07-17 12:08-gov_def2.md +527 -0
- md_processing/dr_egeria_outbox-pycharm/tuesday/processed-2025-07-17 14:27-gov_def2.md +474 -0
- md_processing/family_docs/Data Designer/Create_Data_Class.md +164 -0
- md_processing/family_docs/Data Designer/Create_Data_Dictionary.md +30 -0
- md_processing/family_docs/Data Designer/Create_Data_Field.md +162 -0
- md_processing/family_docs/Data Designer/Create_Data_Specification.md +36 -0
- md_processing/family_docs/Data Designer/Create_Data_Structure.md +38 -0
- md_processing/family_docs/Data Designer/View_Data_Classes.md +78 -0
- md_processing/family_docs/Data Designer/View_Data_Dictionaries.md +78 -0
- md_processing/family_docs/Data Designer/View_Data_Fields.md +78 -0
- md_processing/family_docs/Data Designer/View_Data_Specifications.md +78 -0
- md_processing/family_docs/Data Designer/View_Data_Structures.md +78 -0
- md_processing/family_docs/Data Designer.md +842 -0
- md_processing/family_docs/Digital Product Manager/Add_Member->Collection.md +42 -0
- md_processing/family_docs/Digital Product Manager/Attach_Collection->Resource.md +36 -0
- md_processing/family_docs/Digital Product Manager/Create_Agreement.md +96 -0
- md_processing/family_docs/Digital Product Manager/Create_Data_Sharing_Agreement.md +72 -0
- md_processing/family_docs/Digital Product Manager/Create_DigitalSubscription.md +102 -0
- md_processing/family_docs/Digital Product Manager/Create_Digital_Product.md +134 -0
- md_processing/family_docs/Digital Product Manager/Link_Agreement_Items.md +60 -0
- md_processing/family_docs/Digital Product Manager/Link_Contracts.md +26 -0
- md_processing/family_docs/Digital Product Manager/Link_Digital_Product_-_Digital_Product.md +30 -0
- md_processing/family_docs/Digital Product Manager/Link_Subscribers.md +48 -0
- md_processing/family_docs/Digital Product Manager.md +668 -0
- md_processing/family_docs/Glossary/Attach_Category_Parent.md +18 -0
- md_processing/family_docs/Glossary/Attach_Term-Term_Relationship.md +26 -0
- md_processing/family_docs/Glossary/Create_Category.md +38 -0
- md_processing/family_docs/Glossary/Create_Glossary.md +42 -0
- md_processing/family_docs/Glossary/Create_Term.md +70 -0
- md_processing/family_docs/Glossary.md +206 -0
- md_processing/family_docs/Governance Officer/Create_Business_Imperative.md +106 -0
- md_processing/family_docs/Governance Officer/Create_Certification_Type.md +112 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Approach.md +114 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Obligation.md +114 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Principle.md +114 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Procedure.md +128 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Process.md +122 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Processing_Purpose.md +106 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Responsibility.md +122 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Rule.md +122 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Strategy.md +106 -0
- md_processing/family_docs/Governance Officer/Create_License_Type.md +112 -0
- md_processing/family_docs/Governance Officer/Create_Naming_Standard_Rule.md +122 -0
- md_processing/family_docs/Governance Officer/Create_Regulation_Article.md +106 -0
- md_processing/family_docs/Governance Officer/Create_Regulation_Definition.md +118 -0
- md_processing/family_docs/Governance Officer/Create_Security_Access_Control.md +114 -0
- md_processing/family_docs/Governance Officer/Create_Security_Group.md +120 -0
- md_processing/family_docs/Governance Officer/Create_Service_Level_Objectives.md +122 -0
- md_processing/family_docs/Governance Officer/Create_Threat_Definition.md +106 -0
- md_processing/family_docs/Governance Officer/Link_Governance_Controls.md +32 -0
- md_processing/family_docs/Governance Officer/Link_Governance_Drivers.md +32 -0
- md_processing/family_docs/Governance Officer/Link_Governance_Policies.md +32 -0
- md_processing/family_docs/Governance Officer/View_Governance_Definitions.md +82 -0
- md_processing/family_docs/Governance Officer.md +2412 -0
- md_processing/family_docs/Solution Architect/Create_Information_Supply_Chain.md +70 -0
- md_processing/family_docs/Solution Architect/Create_Solution_Blueprint.md +44 -0
- md_processing/family_docs/Solution Architect/Create_Solution_Component.md +96 -0
- md_processing/family_docs/Solution Architect/Create_Solution_Role.md +66 -0
- md_processing/family_docs/Solution Architect/Link_Information_Supply_Chain_Peers.md +32 -0
- md_processing/family_docs/Solution Architect/Link_Solution_Component_Peers.md +32 -0
- md_processing/family_docs/Solution Architect/View_Information_Supply_Chains.md +32 -0
- md_processing/family_docs/Solution Architect/View_Solution_Blueprints.md +32 -0
- md_processing/family_docs/Solution Architect/View_Solution_Components.md +32 -0
- md_processing/family_docs/Solution Architect/View_Solution_Roles.md +32 -0
- md_processing/family_docs/Solution Architect.md +490 -0
- md_processing/md_commands/data_designer_commands.py +1192 -710
- md_processing/md_commands/glossary_commands.py +19 -32
- md_processing/md_commands/governance_officer_commands.py +420 -0
- md_processing/md_commands/product_manager_commands.py +1180 -0
- md_processing/md_commands/project_commands.py +5 -2
- md_processing/md_commands/solution_architect_commands.py +1140 -0
- md_processing/md_processing_utils/common_md_proc_utils.py +288 -96
- md_processing/md_processing_utils/common_md_utils.py +205 -6
- md_processing/md_processing_utils/debug_log +574 -0
- md_processing/md_processing_utils/dr-egeria-help-2025-07-17T17:22:09.md +2065 -0
- md_processing/md_processing_utils/extraction_utils.py +1 -1
- md_processing/md_processing_utils/generate_dr_help.py +165 -0
- md_processing/md_processing_utils/generate_md_cmd_templates.py +143 -0
- md_processing/md_processing_utils/generate_md_templates.py +92 -0
- md_processing/md_processing_utils/generated_help_terms.md +842 -0
- md_processing/md_processing_utils/md_processing_constants.py +94 -17
- pyegeria/__init__.py +1 -0
- pyegeria/_client.py +39 -1
- pyegeria/classification_manager_omvs.py +1 -1
- pyegeria/collection_manager_omvs.py +4667 -1178
- pyegeria/data_designer_omvs.py +348 -31
- pyegeria/egeria_tech_client.py +9 -25
- pyegeria/glossary_browser_omvs.py +5 -6
- pyegeria/glossary_manager_omvs.py +2 -2
- pyegeria/governance_officer_omvs.py +2367 -0
- pyegeria/output_formatter.py +157 -32
- pyegeria/solution_architect_omvs.py +5063 -1110
- pyegeria/utils.py +22 -2
- {pyegeria-5.3.9.9.7.dist-info → pyegeria-5.4.0.dist-info}/METADATA +3 -1
- pyegeria-5.4.0.dist-info/RECORD +243 -0
- {pyegeria-5.3.9.9.7.dist-info → pyegeria-5.4.0.dist-info}/entry_points.txt +5 -0
- commands/cat/.DS_Store +0 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro.md +0 -254
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_more_terms.md +0 -696
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part1.md +0 -254
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part2.md +0 -298
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part3.md +0 -608
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part4.md +0 -94
- md_processing/dr_egeria_inbox/archive/freddie_intro.md +0 -284
- md_processing/dr_egeria_inbox/archive/freddie_intro_orig.md +0 -275
- md_processing/dr_egeria_inbox/archive/test-term.md +0 -110
- md_processing/dr_egeria_inbox/cat_test.md +0 -100
- md_processing/dr_egeria_inbox/data_field.md +0 -54
- md_processing/dr_egeria_inbox/data_spec.md +0 -77
- md_processing/dr_egeria_inbox/data_spec_test.md +0 -2406
- md_processing/dr_egeria_inbox/data_test.md +0 -86
- md_processing/dr_egeria_inbox/dr_egeria_intro_categories.md +0 -168
- md_processing/dr_egeria_inbox/dr_egeria_intro_part1.md +0 -280
- md_processing/dr_egeria_inbox/dr_egeria_intro_part2.md +0 -313
- md_processing/dr_egeria_inbox/dr_egeria_intro_part3.md +0 -1073
- md_processing/dr_egeria_inbox/dr_egeria_isc1.md +0 -44
- md_processing/dr_egeria_inbox/glossary_test1.md +0 -324
- md_processing/dr_egeria_inbox/rel.md +0 -8
- md_processing/dr_egeria_inbox/sb.md +0 -119
- md_processing/dr_egeria_inbox/search_test.md +0 -39
- md_processing/dr_egeria_inbox/solution-components.md +0 -154
- md_processing/dr_egeria_inbox/solution_blueprints.md +0 -118
- md_processing/dr_egeria_inbox/synonym_test.md +0 -42
- md_processing/dr_egeria_inbox/t1.md +0 -0
- md_processing/dr_egeria_inbox/t2.md +0 -268
- md_processing/dr_egeria_outbox/processed-2025-05-15 19:52-data_test.md +0 -94
- md_processing/dr_egeria_outbox/processed-2025-05-16 07:39-data_test.md +0 -88
- md_processing/dr_egeria_outbox/processed-2025-05-17 16:01-data_field.md +0 -56
- md_processing/dr_egeria_outbox/processed-2025-05-18 15:51-data_test.md +0 -103
- md_processing/dr_egeria_outbox/processed-2025-05-18 16:47-data_test.md +0 -94
- md_processing/dr_egeria_outbox/processed-2025-05-19 07:14-data_test.md +0 -96
- md_processing/dr_egeria_outbox/processed-2025-05-19 07:20-data_test.md +0 -100
- md_processing/dr_egeria_outbox/processed-2025-05-19 07:22-data_test.md +0 -88
- md_processing/dr_egeria_outbox/processed-2025-05-19 09:26-data_test.md +0 -91
- md_processing/dr_egeria_outbox/processed-2025-05-19 10:27-data_test.md +0 -91
- md_processing/dr_egeria_outbox/processed-2025-05-19 14:04-data_test.md +0 -91
- md_processing/md_commands/blueprint_commands.py +0 -303
- pyegeria/.DS_Store +0 -0
- pyegeria/m_test.py +0 -118
- pyegeria-5.3.9.9.7.dist-info/RECORD +0 -196
- /commands/cat/{list_data_structures.py → list_data_structures_full.py} +0 -0
- {pyegeria-5.3.9.9.7.dist-info → pyegeria-5.4.0.dist-info}/LICENSE +0 -0
- {pyegeria-5.3.9.9.7.dist-info → pyegeria-5.4.0.dist-info}/WHEEL +0 -0
@@ -3,23 +3,60 @@ This file contains general utility functions for processing Egeria Markdown
|
|
3
3
|
"""
|
4
4
|
import os
|
5
5
|
import re
|
6
|
+
import sys
|
7
|
+
import json
|
6
8
|
from datetime import datetime
|
7
9
|
from typing import Any
|
8
|
-
|
10
|
+
from loguru import logger
|
9
11
|
from rich import print
|
10
12
|
from rich.console import Console
|
11
13
|
from rich.markdown import Markdown
|
12
|
-
|
14
|
+
from pyegeria.utils import (camel_to_title_case)
|
13
15
|
from pyegeria._globals import DEBUG_LEVEL
|
14
16
|
from md_processing.md_processing_utils.message_constants import message_types
|
15
17
|
|
16
18
|
# Constants
|
17
|
-
|
19
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
20
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
21
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
22
|
+
EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
|
23
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get("EGERIA_VIEW_SERVER_URL", "https://localhost:9443")
|
24
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon")
|
25
|
+
EGERIA_INTEGRATION_DAEMON_URL = os.environ.get("EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443")
|
26
|
+
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
27
|
+
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
28
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
29
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
30
|
+
EGERIA_WIDTH = os.environ.get("EGERIA_WIDTH", 220)
|
31
|
+
EGERIA_JUPYTER = os.environ.get("EGERIA_JUPYTER", False)
|
32
|
+
EGERIA_HOME_GLOSSARY_GUID = os.environ.get("EGERIA_HOME_GLOSSARY_GUID", None)
|
33
|
+
EGERIA_GLOSSARY_PATH = os.environ.get("EGERIA_GLOSSARY_PATH", None)
|
34
|
+
EGERIA_ROOT_PATH = os.environ.get("EGERIA_ROOT_PATH", "../../")
|
35
|
+
EGERIA_INBOX_PATH = os.environ.get("EGERIA_INBOX_PATH", "md_processing/dr_egeria_inbox")
|
36
|
+
EGERIA_OUTBOX_PATH = os.environ.get("EGERIA_OUTBOX_PATH", "md_processing/dr_egeria_outbox")
|
37
|
+
LOG_FORMAT = "D <green> {time} </green> | {level} | {function} | {line} | {message} | {extra}"
|
38
|
+
CONSOLE_LOG_FORMAT = "<green>{time}</green> | {message}"
|
39
|
+
|
18
40
|
console = Console(width=EGERIA_WIDTH)
|
41
|
+
GENERAL_GOVERNANCE_DEFINITIONS = ["Business Imperative", "Regulation Article", "Threat", "Governance Principle",
|
42
|
+
"Governance Obligation", "Governance Approach", "Governance Processing Purpose"]
|
43
|
+
|
44
|
+
GOVERNANCE_CONTROLS = ["Governance Rule", "Service Level Objective", "Governance Process",
|
45
|
+
"Governance Responsibility", "Governance Procedure", "Security Access Control"]
|
19
46
|
|
20
47
|
debug_level = DEBUG_LEVEL
|
21
48
|
global COMMAND_DEFINITIONS
|
22
49
|
|
50
|
+
def setup_log():
|
51
|
+
logger.remove()
|
52
|
+
logger.add(sys.stderr, level="SUCCESS", format=CONSOLE_LOG_FORMAT, colorize=True)
|
53
|
+
full_file_path = os.path.join(EGERIA_ROOT_PATH, EGERIA_INBOX_PATH, "data_designer_debug.log")
|
54
|
+
# logger.add(full_file_path, rotation="1 day", retention="1 week", compression="zip", level="TRACE", format=log_format,
|
55
|
+
# colorize=True)
|
56
|
+
logger.add("debug_log", rotation="1 day", retention="1 week", compression="zip", level="INFO", format=LOG_FORMAT,
|
57
|
+
colorize=True)
|
58
|
+
|
59
|
+
|
23
60
|
def split_tb_string(input: str)-> [Any]:
|
24
61
|
"""Split the string and trim the items"""
|
25
62
|
l = [item.strip() for item in re.split(r'[;,\n]+',input)] if input is not None else None
|
@@ -73,8 +110,8 @@ def print_msg(msg_level: str, msg: str, verbosity: str):
|
|
73
110
|
"""
|
74
111
|
if msg_level == "ALWAYS":
|
75
112
|
print(f"{message_types.get(msg_level, '')}{msg}")
|
76
|
-
else:
|
77
|
-
|
113
|
+
# else:
|
114
|
+
# logger.info(f"{message_types.get(msg_level, '')}{msg}")
|
78
115
|
# elif verbosity == "verbose" and msg_level in ["INFO", "WARNING", "ERROR"]:
|
79
116
|
# print(f"{message_types.get(msg_level, '')}{msg}")
|
80
117
|
# elif verbosity == "quiet" and msg_level in ["WARNING", "ERROR"]:
|
@@ -84,7 +121,14 @@ def print_msg(msg_level: str, msg: str, verbosity: str):
|
|
84
121
|
# print(f"{message_types.get(msg_level, '')}{msg}")
|
85
122
|
# elif verbosity == "display-only" and msg_level in ["ALWAYS", "ERROR"]:
|
86
123
|
# print(f"{message_types.get(msg_level, '')}{msg}")
|
87
|
-
|
124
|
+
elif msg_level == "ERROR":
|
125
|
+
logger.error(f"{message_types.get(msg_level, '')}{msg}")
|
126
|
+
elif msg_level == "WARNING":
|
127
|
+
logger.warning(f"{message_types.get(msg_level, '')}{msg}")
|
128
|
+
elif msg_level == "DEBUG":
|
129
|
+
logger.debug(f"{message_types.get(msg_level, '')}{msg}")
|
130
|
+
else:
|
131
|
+
logger.info(f"{message_types.get(msg_level, '')}{msg}")
|
88
132
|
|
89
133
|
def process_provenance_command(file_path: str, txt: [str]) -> str:
|
90
134
|
"""
|
@@ -170,3 +214,158 @@ def find_key_with_value(value: str) -> str | None:
|
|
170
214
|
return key
|
171
215
|
|
172
216
|
return None # If value not found
|
217
|
+
|
218
|
+
|
219
|
+
def set_create_body(object_type: str, attributes: dict)->dict:
|
220
|
+
prop_name = object_type.replace(" ", "")
|
221
|
+
body = {
|
222
|
+
"class": "NewGovernanceDefinitionRequestBody",
|
223
|
+
"externalSourceGUID": attributes.get('External Source GUID', {}).get('guid', None),
|
224
|
+
"externalSourceName": attributes.get('External Source Name', {}).get('value', None),
|
225
|
+
"effectiveTime": attributes.get('Effective Time', {}).get('value', None),
|
226
|
+
"forLineage": attributes.get('For Lineage', {}).get('value', False),
|
227
|
+
"forDuplicateProcessing": attributes.get('For Duplicate Processing', {}).get('value', False),
|
228
|
+
"anchorGUID": attributes.get('Anchor ID', {}).get('guid', None),
|
229
|
+
"isOwnAnchor": attributes.get('Is Own Anchor', {}).get('value', True),
|
230
|
+
"parentGUID": attributes.get('Parent ID', {}).get('guid', None),
|
231
|
+
"parentRelationshipTypeName": attributes.get('Parent Relationship Type Name', {}).get('value', None),
|
232
|
+
"parentRelationshipProperties": attributes.get('Parent Relationship Properties', {}).get('value', None),
|
233
|
+
"parentAtEnd1": attributes.get('Parent at End1', {}).get('value', True),
|
234
|
+
"properties": "",
|
235
|
+
"initialStatus": attributes.get('Status', {}).get('value', "ACTIVE")
|
236
|
+
}
|
237
|
+
|
238
|
+
return body
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
def set_update_body(object_type: str, attributes: dict)->dict:
|
244
|
+
return {
|
245
|
+
"class" : "UpdateElementRequestBody",
|
246
|
+
"externalSourceGUID": attributes.get('External Source GUID', {}).get('guid', None),
|
247
|
+
"externalSourceName": attributes.get('External Source Name', {}).get('value', None),
|
248
|
+
"effectiveTime": attributes.get('Effective Time', {}).get('value', None),
|
249
|
+
"forLineage": attributes.get('For Lineage', {}).get('value', False),
|
250
|
+
"forDuplicateProcessing": attributes.get('For Duplicate Processing', {}).get('value', False),
|
251
|
+
"mergeUpdate": attributes.get('Merge Update', {}).get('value', True),
|
252
|
+
"properties": "",
|
253
|
+
}
|
254
|
+
|
255
|
+
def set_prop_body(object_type: str, qualified_name: str, attributes: dict)->dict:
|
256
|
+
|
257
|
+
prop_name = object_type.replace(" ", "")
|
258
|
+
|
259
|
+
return {
|
260
|
+
"class": prop_name + "Properties",
|
261
|
+
"displayName": attributes['Display Name'].get('value', None),
|
262
|
+
"qualifiedName" : qualified_name,
|
263
|
+
"description": attributes['Description'].get('value', None),
|
264
|
+
"versionIdentifier": attributes.get('Version Identifier', {}).get('value', None),
|
265
|
+
"effectiveFrom": attributes.get('Effective From', {}).get('value', None),
|
266
|
+
"effectiveTo": attributes.get('Effective To', {}).get('value', None),
|
267
|
+
"additionalProperties": attributes.get('Additional Properties', {}).get('value', None),
|
268
|
+
"extendedProperties": attributes.get('Extended Properties', {}).get('value', None)
|
269
|
+
}
|
270
|
+
|
271
|
+
def set_gov_prop_body(object_type: str, qualified_name: str, attributes: dict)->dict:
|
272
|
+
prop_name = object_type.replace(" ", "")
|
273
|
+
prop_bod = set_prop_body(object_type, qualified_name, attributes)
|
274
|
+
prop_bod["domainIdentifier"] = attributes.get('Domain Identifier', {}).get('value', None)
|
275
|
+
# prop_bod["documentIdentifier"] = attributes.get('Document Identifier', {}).get('value', None)
|
276
|
+
prop_bod["title"]= attributes.get('Display Name', {}).get('value', None)
|
277
|
+
prop_bod['documentIdentifier'] = qualified_name
|
278
|
+
prop_bod["versionIdentifier"] = attributes.get('Version Identifier', {}).get('value', None)
|
279
|
+
prop_bod["summary"] = attributes.get('Summary', {}).get('value', None)
|
280
|
+
prop_bod["scope"] = attributes.get('Scope', {}).get('value', None)
|
281
|
+
prop_bod["importance"] = attributes.get('Importance', {}).get('value', None)
|
282
|
+
prop_bod["implications"] = attributes.get('Implication', {}).get('value', [])
|
283
|
+
prop_bod["outcomes"] = attributes.get('Outcomes', {}).get('value', [])
|
284
|
+
prop_bod["results"] = attributes.get('Results', {}).get('value', [])
|
285
|
+
|
286
|
+
body = update_body_for_type(object_type, prop_bod, attributes)
|
287
|
+
return body
|
288
|
+
|
289
|
+
|
290
|
+
def update_body_for_type(object_type: str, body: dict, attributes: dict) -> dict:
|
291
|
+
gov_def_name = object_type.replace(" ", "")
|
292
|
+
if object_type in GENERAL_GOVERNANCE_DEFINITIONS:
|
293
|
+
return body
|
294
|
+
elif object_type == "Governance Strategy":
|
295
|
+
body['businessImperatives'] = attributes.get('Business Imperatives', {}).get('value', [])
|
296
|
+
return body
|
297
|
+
|
298
|
+
elif object_type == "Regulation":
|
299
|
+
body['source'] = attributes.get('Source', {}).get('value', None)
|
300
|
+
body['regulators'] = attributes.get('Regulators', {}).get('value', [])
|
301
|
+
return body
|
302
|
+
|
303
|
+
elif object_type in GOVERNANCE_CONTROLS:
|
304
|
+
body['implementationDescription'] = attributes.get('Implementation Description', {}).get('value', None)
|
305
|
+
return body
|
306
|
+
elif object_type == "Security Group":
|
307
|
+
body['distinguishedName'] = attributes.get('Distinguished Name', {}).get('value', None)
|
308
|
+
return body
|
309
|
+
elif object_type == "Naming Standard Rule":
|
310
|
+
body['namePatterns'] = attributes.get('Name Patterns', {}).get('value', [])
|
311
|
+
return body
|
312
|
+
elif object_type in ["Certification Type", "License Type"]:
|
313
|
+
body['details'] = attributes.get('Details', {}).get('value', None)
|
314
|
+
return body
|
315
|
+
|
316
|
+
|
317
|
+
def set_rel_request_body(object_type: str, attributes: dict)->dict:
|
318
|
+
return {
|
319
|
+
"class" : "RelationshipRequestBody",
|
320
|
+
"externalSourceGUID": attributes.get('External Source GUID', {}).get('guid', None),
|
321
|
+
"externalSourceName": attributes.get('External Source Name', {}).get('value', None),
|
322
|
+
"effectiveTime": attributes.get('Effective Time', {}).get('value', None),
|
323
|
+
"forLineage": attributes.get('For Lineage', {}).get('value', False),
|
324
|
+
"forDuplicateProcessing": attributes.get('For Duplicate Processing', {}).get('value', False),
|
325
|
+
"properties": "",
|
326
|
+
}
|
327
|
+
|
328
|
+
def set_peer_gov_def_request_body(object_type: str, attributes: dict)->dict:
|
329
|
+
rel_body = set_rel_request_body(object_type, attributes)
|
330
|
+
rel_body["properties"] = {
|
331
|
+
"class" : "PeerDefinitionProperties",
|
332
|
+
"description": attributes.get('Description', {}).get('value', None),
|
333
|
+
"effectiveFrom": attributes.get('Effective From', {}).get('value', None),
|
334
|
+
"effectiveTo": attributes.get('Effective To', {}).get('value', None),
|
335
|
+
"label": attributes.get('Label', {}).get('value', None),
|
336
|
+
}
|
337
|
+
return rel_body
|
338
|
+
|
339
|
+
def set_metadata_source_request_body(object_type: str, attributes: dict)->dict:
|
340
|
+
return {
|
341
|
+
"class": "MetadataSourceRequestBody",
|
342
|
+
"externalSourceGUID": attributes.get('External Source GUID', {}).get('guid', None),
|
343
|
+
"externalSourceName": attributes.get('External Source Name', {}).get('value', None),
|
344
|
+
"effectiveTime": attributes.get('Effective Time', {}).get('value', None),
|
345
|
+
"forLineage": attributes.get('For Lineage', {}).get('value', False),
|
346
|
+
"forDuplicateProcessing": attributes.get('For Duplicate Processing', {}).get('value', False)
|
347
|
+
}
|
348
|
+
|
349
|
+
def set_filter_request_body(object_type: str, attributes: dict)->dict:
|
350
|
+
return {
|
351
|
+
"class": "FilterRequestBody",
|
352
|
+
"asOfTime": attributes.get('AsOfTime', {}).get('value', None),
|
353
|
+
"effectiveTime": attributes.get('Effective Time', {}).get('value', None),
|
354
|
+
"forLineage": attributes.get('For Lineage', {}).get('value', False),
|
355
|
+
"forDuplicateProcessing": attributes.get('For Duplicate Processing', {}).get('value', False),
|
356
|
+
"limitResultsByStatus": attributes.get('Limit Result by Status', {}).get('value', None),
|
357
|
+
"sequencingOrder": attributes.get('Sequencing Order', {}).get('value', None),
|
358
|
+
"sequencingProperty": attributes.get('Sequencing Property', {}).get('value', None),
|
359
|
+
"filter": attributes.get('Search String', {}).get('value', None),
|
360
|
+
}
|
361
|
+
|
362
|
+
def set_element_status_request_body(object_type: str, attributes: dict)->dict:
|
363
|
+
return {
|
364
|
+
"class": f"{camel_to_title_case(object_type)}StatusRequestBody",
|
365
|
+
"status": attributes.get('Status', {}).get('value', None),
|
366
|
+
"externalSourceGUID": attributes.get('External Source GUID', {}).get('guid', None),
|
367
|
+
"externalSourceName": attributes.get('External Source Name', {}).get('value', None),
|
368
|
+
"effectiveTime": attributes.get('Effective Time', {}).get('value', None),
|
369
|
+
"forLineage": attributes.get('For Lineage', {}).get('value', False),
|
370
|
+
"forDuplicateProcessing": attributes.get('For Duplicate Processing', {}).get('value', False)
|
371
|
+
}
|