forked from DMTF/Redfish-Schema-C-Struct-Generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RedfishCSDef.py
59 lines (51 loc) · 2.16 KB
/
RedfishCSDef.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
57
58
59
#
# Redfish JSON resource to C structure converter source code generator.
#
# Copyright Notice:
# Copyright 2021 DMTF. All rights reserved.
# License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-Tacklebox/blob/main/LICENSE.md
#
REDFISH_STRUCT_NAME_HEAD = "Redfish"
REDFISH_STRUCT_NAME_TAIL = "_CS"
REDFISH_ARRAY_CS_TAIL = "_Array_CS"
REDFISH_NON_STRUCTURE_ARRAY_CS_TAIL = "_Array"
STRUCTURE_MEMBER_NEED_SECOND_PHASE_PARSE = "NEED_2ND_PHASE"
REDFISH_SCHEMA_NAMING_NOVERSIONED = "NOVERSIONED"
STRUCTURE_MEMBER_TUPLE_DATATYPE = 0
STRUCTURE_MEMBER_TUPLE_DESCRIPTION = 1
STRUCTURE_MEMBER_TUPLE_SECOND_PHASE_LIST = 2
STRUCTURE_MEMBER_TUPLE_ORG_KEY_NAME = 3
STRUCTURE_MEMBER_TUPLE_IS_STRUCTURE = 4
IS_STRUCTURE = True
IS_NOT_STRUCTURE = False
IS_EMPTY_PROPERTY = True
IS_NOT_EMPTY_PROPERTY = False
STRUCTURE_MEMBER_TUPLE_IS_READONLY = 5
STRUCTURE_MEMBER_TUPLE_IS_REQUIRED = 6
IS_REDFISH_CS_LINK_ARRAY = True
IS_NOT_REDFISH_CS_LINK_ARRAY = False
REDFISH_URI_NAMESPACE_TUPLE_RESOURCE_TYPE = 0
REDFISH_URI_NAMESPACE_TUPLE_VERSION = 1
REDFISH_URI_NAMESPACE_TUPLE_TYPE_ID = 2
REDFISH_GET_DATATYPE_KEY = 0
REDFISH_GET_DATATYPE_CS_TYPE = 1
REDFISH_GET_DATATYPE_VALUE = 2
# Return tuple (RedfishDatatypeKey, CS Datatype, RedfishDatatype)
LOGFOR_CSTRUCTURE_TO_JSON_IS_ROOT = 0
LOGFOR_CSTRUCTURE_TO_JSON_IS_LINK_ARRAY = 1
LOGFOR_CSTRUCTURE_TO_JSON_IS_STRUCT_MEM_NAME = 2
LOGFOR_CSTRUCTURE_TO_JSON_ALIAS_STRUCTURE_NAME = 3
LOGFOR_CSTRUCTURE_TO_JSON_RESOURCETYPE = 4
LOGFOR_CSTRUCTURE_TO_JSON_VERSION = 5
LOGFOR_CSTRUCTURE_TO_JSON_IS_STRUCT_MEM_NAME_DATATYPE = 0
LOGFOR_CSTRUCTURE_TO_JSON_IS_STRUCT_MEM_NAME_JSON_KEY = 1
LOGFOR_CSTRUCTURE_TO_JSON_ALIAS_STRUCTURE_NAME = 3
STRUCTURE_NAME_TUPLE_NAME = 0
STRUCTURE_NAME_TUPLE_DESCRIPTION = 1
TAB_SPACE = " "
C_SRC_TAB_SPACE = " "
MEMBER_DESCRIPTION_CHARS = 30
VERBOSE_ERROR = "[***ERROR***]"
VERBOSE_ERROR_EXIT = "[***ERROR EXIT***]"
VERBOSE_WARNING = "[---WARNING---]"
VERBOSE_INFO = "[INFO]"