-
Notifications
You must be signed in to change notification settings - Fork 6
/
serialization_constants.py
56 lines (44 loc) · 1.32 KB
/
serialization_constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import json
import pathlib
from string import Template
COMPONENT_NAME = "serialization"
CONFIGURATION_FORMAT = "json"
CURRENT_COMPONENT_PATH = pathlib.Path(__file__).parent.parent.absolute()
CONFIGURATION_PATH_TEMPLATE = Template(
str(
pathlib.PurePath(
CURRENT_COMPONENT_PATH, "configuration/model_definitions/$message_type"
)
)
+ f".{CONFIGURATION_FORMAT}"
)
LOGGING_CONFIGURATION_PATH = str(
pathlib.PurePath(CURRENT_COMPONENT_PATH, "configuration/logging.conf")
)
# TODO this path shouldn't be hardcoded,
# find way to change this to a configured value.
LOG_FILE_PATH = str(
pathlib.PurePath(CURRENT_COMPONENT_PATH, "logs")
)
ACTION_MAPPING_PATH = str(
pathlib.PurePath(
CURRENT_COMPONENT_PATH, "configuration/external_action_mapping.ini"
)
)
INTERNAL_ACTION_MAPPING_PATH = str(
pathlib.PurePath(
CURRENT_COMPONENT_PATH, "configuration/internal_action_mapping.ini"
)
)
BUSINESS_RULES_PATH = str(
pathlib.PurePath(CURRENT_COMPONENT_PATH, "configuration/business_rules.json")
)
PERSISTENCE_PATH = str(
pathlib.PurePath(CURRENT_COMPONENT_PATH, "persistence/emergencies.json")
)
MANIFEST_PATH = str(
pathlib.PurePath(CURRENT_COMPONENT_PATH, "configuration/manifest.ini")
)
class Protocols(enumerate):
XML = "XML"
PROTOBUF = "protobuf"