openubmc-bingo 0.5.254__py3-none-any.whl → 0.5.261__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.

Potentially problematic release.


This version of openubmc-bingo might be problematic. Click here for more details.

Files changed (28) hide show
  1. bmcgo/__init__.py +1 -1
  2. bmcgo/codegen/lua/codegen.py +23 -0
  3. bmcgo/codegen/lua/script/model_consistency_check.py +242 -0
  4. bmcgo/codegen/lua/script/render_utils/__init__.py +7 -4
  5. bmcgo/codegen/lua/script/render_utils/client_lua.py +1 -1
  6. bmcgo/codegen/lua/script/render_utils/message_lua.py +2 -1
  7. bmcgo/codegen/lua/script/render_utils/service_lua.py +1 -1
  8. bmcgo/codegen/lua/script/utils.py +30 -3
  9. bmcgo/codegen/lua/templates/apps/Makefile +70 -2
  10. bmcgo/codegen/lua/v1/script/render_utils/client_lua.py +108 -0
  11. bmcgo/codegen/lua/v1/script/render_utils/db_lua.py +223 -0
  12. bmcgo/codegen/lua/v1/script/render_utils/model_lua.py +29 -0
  13. bmcgo/codegen/lua/v1/templates/apps/client.lua.mako +244 -0
  14. bmcgo/codegen/lua/v1/templates/apps/db.lua.mako +62 -0
  15. bmcgo/codegen/lua/v1/templates/apps/local_db.lua.mako +184 -0
  16. bmcgo/codegen/lua/v1/templates/apps/message.lua.mako +35 -0
  17. bmcgo/codegen/lua/v1/templates/apps/model.lua.mako +3 -0
  18. bmcgo/codegen/lua/v1/templates/apps/service.lua.mako +8 -47
  19. bmcgo/codegen/lua/v1/templates/apps/utils/mdb_intf.lua.mako +27 -0
  20. bmcgo/codegen/lua/v1/templates/apps/utils/mdb_obj.lua.mako +14 -0
  21. bmcgo/component/coverage/incremental_cov.py +4 -4
  22. bmcgo/tasks/task_build_rootfs_img.py +2 -2
  23. {openubmc_bingo-0.5.254.dist-info → openubmc_bingo-0.5.261.dist-info}/METADATA +1 -1
  24. {openubmc_bingo-0.5.254.dist-info → openubmc_bingo-0.5.261.dist-info}/RECORD +28 -19
  25. /bmcgo/codegen/lua/script/{render_utils/mdb_register.py → mdb_register.py} +0 -0
  26. {openubmc_bingo-0.5.254.dist-info → openubmc_bingo-0.5.261.dist-info}/WHEEL +0 -0
  27. {openubmc_bingo-0.5.254.dist-info → openubmc_bingo-0.5.261.dist-info}/entry_points.txt +0 -0
  28. {openubmc_bingo-0.5.254.dist-info → openubmc_bingo-0.5.261.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,62 @@
1
+ ${make_header('lua')}
2
+ local class = require 'mc.class'
3
+ local db_base = require 'database.db_base'
4
+ local Col = require 'database.column'
5
+ <%namespace name="imports" file="../../../templates/apps/utils/imports.mako"/>
6
+ ${imports.render(root)}
7
+ <%
8
+ ClassName = root['package'] + 'Database'
9
+ %>
10
+
11
+ % for msg in root['data']:
12
+ % if render_utils.table_name(msg):
13
+ ---@class ${msg['name']}Table: Table
14
+ % for prop in msg['properties']:
15
+ ---@field ${prop['name']} FieldBase
16
+ % endfor
17
+ % endif
18
+
19
+ % endfor
20
+
21
+ ---@class ${ClassName}
22
+ ---@field db DataBase
23
+ % for msg in root['data']:
24
+ % if render_utils.table_name(msg):
25
+ ---@field ${msg['name']} ${msg['name']}Table
26
+ % endif
27
+ % endfor
28
+ local ${ClassName} = class(db_base)
29
+
30
+ function ${ClassName}:ctor()
31
+ % for msg in root['data']:
32
+ % if render_utils.table_name(msg):
33
+ self.${msg['name']} = self.db:Table('${render_utils.table_name(msg)}', {
34
+ % for prop in msg['properties']:
35
+ ${prop['name']} = Col.${render_utils.column_type(prop)}:cid(${prop['id']})${render_utils.primary_key(prop)}${render_utils.persistence_key(prop)}${render_utils.unique(prop)}${render_utils.allow_null(prop)}${render_utils.max_len(prop)}${render_utils.default(msg['name'], prop)}${render_utils.critical(prop)},
36
+ % endfor
37
+ % if render_utils.all_persistence(msg) != 'nil':
38
+ }, "${render_utils.all_persistence(msg)}"):create_if_not_exist(self.datas and self.datas['${render_utils.table_name(msg)}'])
39
+ % else:
40
+ }):create_if_not_exist(self.datas and self.datas['${render_utils.table_name(msg)}'])
41
+ % endif
42
+ % if render_utils.table_max_rows(msg) and render_utils.get_lua_codegen_version() >= 11:
43
+ self.${msg['name']}.table_max_rows = ${msg['options']['table_max_rows']}
44
+ %endif
45
+ % endif
46
+ % endfor
47
+
48
+ self.tables = self.db.tables
49
+ end
50
+
51
+ % for msg in root['data']:
52
+ % if render_utils.table_name(msg):
53
+ % if render_utils.table_max_rows(msg) and render_utils.get_lua_codegen_version() >= 11:
54
+
55
+ function ${ClassName}:Register${msg['name']}TableMaxRowsCallback(cb)
56
+ self.${msg['name']}.table_max_rows_cb = cb
57
+ end
58
+ % endif
59
+ % endif
60
+ % endfor
61
+
62
+ return ${ClassName}.new
@@ -0,0 +1,184 @@
1
+ ${make_header('lua')}
2
+ local class = require 'mc.class'
3
+ local db_base = require 'database.db_base'
4
+ local Col = require 'database.column'
5
+ <%namespace name="imports" file="../../../templates/apps/utils/imports.mako"/>
6
+ ${imports.render(root)}
7
+ <%
8
+ has_poweroff, has_reset, has_temporary = render_utils.check_local_per_type(root)
9
+ %>
10
+
11
+ local db_selector = {}
12
+
13
+ % if has_poweroff:
14
+ <% ClassName = root['package'] + 'DatabasePoweroff' %>
15
+ % for msg in root['data']:
16
+ % if render_utils.table_name(msg) and render_utils.check_local_per_poweroff(msg):
17
+ ---@class ${msg['name']}Table: Table
18
+ % for prop in msg['properties']:
19
+ ---@field ${prop['name']} FieldBase
20
+ % endfor
21
+ % endif
22
+
23
+ % endfor
24
+
25
+ ---@class ${ClassName}
26
+ ---@field db DataBase
27
+ % for msg in root['data']:
28
+ % if render_utils.table_name(msg) and render_utils.check_local_per_poweroff(msg):
29
+ ---@field ${msg['name']} ${msg['name']}Table
30
+ % endif
31
+ % endfor
32
+
33
+ local ${ClassName} = class(db_base)
34
+
35
+ function ${ClassName}:ctor()
36
+ % for msg in root['data']:
37
+ % if render_utils.table_name(msg) and render_utils.check_local_per_poweroff(msg):
38
+ self.${msg['name']} = self.db:Table('${render_utils.table_name(msg)}', {
39
+ % for prop in msg['properties']:
40
+ ${prop['name']} = Col.${render_utils.column_type(prop)}${render_utils.extend_field(prop)}:cid(${prop['id']})${render_utils.primary_key(prop)}${render_utils.unique(prop)}${render_utils.allow_null(prop)}${render_utils.max_len(prop)}${render_utils.default(msg['name'], prop)}${render_utils.deprecated(prop)},
41
+ % endfor
42
+ }):create_if_not_exist(self.datas and self.datas['${render_utils.table_name(msg)}'])
43
+ % if render_utils.table_max_rows(msg) and render_utils.get_lua_codegen_version() >= 11:
44
+ self.${msg['name']}.table_max_rows = ${msg['options']['table_max_rows']}
45
+ %endif
46
+ % endif
47
+ % endfor
48
+
49
+ self.tables = self.db.tables
50
+ end
51
+
52
+ % for msg in root['data']:
53
+ % if render_utils.table_name(msg) and render_utils.check_local_per_poweroff(msg):
54
+ % if render_utils.table_max_rows(msg) and render_utils.get_lua_codegen_version() >= 11:
55
+
56
+ function ${ClassName}:Register${msg['name']}TableMaxRowsCallback(cb)
57
+ self.${msg['name']}.table_max_rows_cb = cb
58
+ end
59
+ % endif
60
+ % endif
61
+ % endfor
62
+
63
+ db_selector["poweroff"] = ${ClassName}.new
64
+ % endif
65
+
66
+ % if has_reset:
67
+ <% ClassName = root['package'] + 'DatabaseReset' %>
68
+ % for msg in root['data']:
69
+ % if render_utils.table_name(msg) and render_utils.check_local_per_reset(msg):
70
+ ---@class ${msg['name']}Table: Table
71
+ % for prop in msg['properties']:
72
+ ---@field ${prop['name']} FieldBase
73
+ % endfor
74
+ % endif
75
+
76
+ % endfor
77
+
78
+ ---@class ${ClassName}
79
+ ---@field db DataBase
80
+ % for msg in root['data']:
81
+ % if render_utils.table_name(msg) and render_utils.check_local_per_reset(msg):
82
+ ---@field ${msg['name']} ${msg['name']}Table
83
+ % endif
84
+ % endfor
85
+
86
+ local ${ClassName} = class(db_base)
87
+
88
+ function ${ClassName}:ctor()
89
+ % for msg in root['data']:
90
+ % if render_utils.table_name(msg) and render_utils.check_local_per_reset(msg):
91
+ self.${msg['name']} = self.db:Table('${render_utils.table_name(msg)}', {
92
+ % for prop in msg['properties']:
93
+ ${prop['name']} = Col.${render_utils.column_type(prop)}${render_utils.extend_field(prop)}:cid(${prop['id']})${render_utils.primary_key(prop)}${render_utils.unique(prop)}${render_utils.allow_null(prop)}${render_utils.max_len(prop)}${render_utils.default(msg['name'], prop)}${render_utils.deprecated(prop)},
94
+ % endfor
95
+ }):create_if_not_exist(self.datas and self.datas['${render_utils.table_name(msg)}'])
96
+ % if render_utils.table_max_rows(msg) and render_utils.get_lua_codegen_version() >= 11:
97
+ self.${msg['name']}.table_max_rows = ${msg['options']['table_max_rows']}
98
+ %endif
99
+ % endif
100
+ % endfor
101
+
102
+ self.tables = self.db.tables
103
+ end
104
+
105
+ % for msg in root['data']:
106
+ % if render_utils.table_name(msg) and render_utils.check_local_per_reset(msg):
107
+ % if render_utils.table_max_rows(msg) and render_utils.get_lua_codegen_version() >= 11:
108
+
109
+ function ${ClassName}:Register${msg['name']}TableMaxRowsCallback(cb)
110
+ self.${msg['name']}.table_max_rows_cb = cb
111
+ end
112
+ % endif
113
+ % endif
114
+ % endfor
115
+
116
+ db_selector["reset"] = ${ClassName}.new
117
+ % endif
118
+
119
+ % if has_temporary:
120
+ <% ClassName = root['package'] + 'DatabaseTemporary' %>
121
+ % for msg in root['data']:
122
+ % if render_utils.table_name(msg) and render_utils.check_local_per_temporary(msg):
123
+ ---@class ${msg['name']}Table: Table
124
+ % for prop in msg['properties']:
125
+ ---@field ${prop['name']} FieldBase
126
+ % endfor
127
+ % endif
128
+
129
+ % endfor
130
+
131
+ ---@class ${ClassName}
132
+ ---@field db DataBase
133
+ % for msg in root['data']:
134
+ % if render_utils.table_name(msg) and render_utils.check_local_per_temporary(msg):
135
+ ---@field ${msg['name']} ${msg['name']}Table
136
+ % endif
137
+ % endfor
138
+
139
+ local ${ClassName} = class(db_base)
140
+
141
+ function ${ClassName}:ctor()
142
+ local db = Databases(path)
143
+ local obj = {db = db}
144
+
145
+ % for msg in root['data']:
146
+ % if render_utils.table_name(msg) and render_utils.check_local_per_temporary(msg):
147
+ self.${msg['name']} = self.db:Table('${render_utils.table_name(msg)}', {
148
+ % for prop in msg['properties']:
149
+ ${prop['name']} = Col.${render_utils.column_type(prop)}${render_utils.extend_field(prop)}:cid(${prop['id']})${render_utils.primary_key(prop)}${render_utils.unique(prop)}${render_utils.allow_null(prop)}${render_utils.max_len(prop)}${render_utils.default(msg['name'], prop)}${render_utils.deprecated(prop)},
150
+ % endfor
151
+ }):create_if_not_exist(self.datas and self.datas['${render_utils.table_name(msg)}'])
152
+ % if render_utils.table_max_rows(msg) and render_utils.get_lua_codegen_version() >= 11:
153
+ self.${msg['name']}.table_max_rows = ${msg['options']['table_max_rows']}
154
+ %endif
155
+ % endif
156
+ % endfor
157
+
158
+ self.tables = self.db.tables
159
+ return setmetatable(obj, ${ClassName})
160
+ end
161
+
162
+ % for msg in root['data']:
163
+ % if render_utils.table_name(msg) and render_utils.check_local_per_temporary(msg):
164
+ % if render_utils.table_max_rows(msg) and render_utils.get_lua_codegen_version() >= 11:
165
+
166
+ function ${ClassName}:Register${msg['name']}TableMaxRowsCallback(cb)
167
+ self.${msg['name']}.table_max_rows_cb = cb
168
+ end
169
+ % endif
170
+ % endif
171
+ % endfor
172
+
173
+ db_selector["temporary"] = ${ClassName}.new
174
+ % endif
175
+
176
+ <% ClassName = root['package'] + 'Database' %>
177
+ local ${ClassName} = {}
178
+ ${ClassName}.__index = ${ClassName}
179
+
180
+ function ${ClassName}.new(path, datas, type)
181
+ return db_selector[type] and db_selector[type](path, datas) or nil
182
+ end
183
+
184
+ return ${ClassName}.new
@@ -0,0 +1,35 @@
1
+ ${make_header('lua')}
2
+ <%
3
+ messages = [msg for msg in root['data'] if msg['type'] != 'Enum']
4
+ enums = [msg for msg in root['data'] if msg['type'] == 'Enum']
5
+ %>
6
+ local validate = require 'mc.validate'
7
+ local utils = require 'mc.utils'
8
+ % if len(enums) > 0:
9
+ local create_enum_type = require 'mc.enum'
10
+ % endif
11
+ <%namespace name="message" file="../../../templates/apps/utils/message.mako"/>
12
+ <%namespace name="imports" file="../../../templates/apps/utils/imports.mako"/>
13
+ <%namespace name="enum" file="../../../templates/apps/utils/enum.mako"/>
14
+ <%namespace name="mdb_intf" file= "utils/mdb_intf.lua.mako"/>
15
+ ${imports.render(root)}
16
+
17
+ local ${root['package']} = {}
18
+
19
+ % for msg in enums:
20
+ ${enum.render(msg, 'create_enum_type')}
21
+ ${root['package']}.${msg['name']} = E${msg['name']}
22
+
23
+ % endfor
24
+
25
+ % for msg in messages:
26
+ ${message.render(msg, root.get('intf', {}).get('name', ''))}
27
+
28
+ ${root['package']}.${msg['name']} = T${msg['name']}
29
+ % endfor
30
+
31
+ % if 'intf' in root:
32
+ ${root['package']}.interface = ${mdb_intf.render(root['intf'])}
33
+
34
+ % endif
35
+ return ${root['package']}
@@ -17,6 +17,9 @@ classes.${class_name} = {
17
17
  % if render_utils.has_table_name(msg):
18
18
  ['table_name'] = '${msg['tableName']}',
19
19
  % endif
20
+ % if render_utils.is_enable_orm(msg):
21
+ ['enable_orm'] = true,
22
+ % endif
20
23
  % if render_utils.has_alias(msg):
21
24
  ['alias_map'] = ${render_utils.get_alias_map(msg)},
22
25
  % endif
@@ -1,7 +1,7 @@
1
1
  ${make_header('lua')}
2
2
  <%namespace name="imports" file="../../../templates/apps/utils/imports.mako"/>
3
3
  <%namespace name="default_intf" file="../../../templates/apps/utils/default_intf.lua.mako"/>
4
- <%namespace name="mdb_obj" file= "../../../templates/apps/utils/mdb_obj.lua.mako"/>
4
+ <%namespace name="mdb_obj" file= "utils/mdb_obj.lua.mako"/>
5
5
  <% has_signal = root['signals']%>
6
6
  <% has_mdb = any('path' in cls_data for cls, cls_data in root['class_require'].items())%>
7
7
  <% has_default = any((rpc['default'] != '' and not rpc['override']) for rpc in root['methods'])%>
@@ -10,43 +10,26 @@ ${make_header('lua')}
10
10
  % if root['has_ipmi_cmd']:
11
11
  local ipmi = require 'ipmi'
12
12
  % endif
13
- % if has_default or has_mdb:
13
+ % if has_default:
14
14
  local mdb = require 'mc.mdb'
15
15
  % endif
16
- % if utils_py.check_local_reset_db(root) or utils_py.check_local_temporary_db(root):
17
- local skynet = require 'skynet'
18
- % endif
19
16
  local class = require 'mc.class'
20
17
  % if has_signal:
21
18
  local context = require 'mc.context'
22
19
  % endif
23
20
  local c = require 'mc.class_mgnt'
24
- % if utils_py.check_need_mem_db(root):
25
- local open_db = require '${project_name}.db'
26
- % endif
27
21
  local bootstrap = require 'mc.bootstrap'
28
- % if utils_py.check_local_poweroff_db(root) or utils_py.check_local_reset_db(root) or utils_py.check_local_temporary_db(root):
29
- local open_local_db = require '${project_name}.local_db'
30
- % endif
31
22
  % if (root['path_level'] == 2 and utils_py.check_db_open(root['package']) and utils_py.check_remote_per(root)) or root['class_require']:
32
23
  local object_manage = require 'mc.mdb.object_manage'
33
24
  % endif
34
25
  % if root['path_level'] == 2 and utils_py.check_db_open(root['package']) and utils_py.check_remote_per(root):
35
26
  local persist_client = require 'persistence.persist_client_lib'
36
27
  % endif
37
- % if utils_py.check_need_mem_db(root) or utils_py.check_need_local_db(root):
38
- local ok, datas = pcall(require, '${project_name}.datas')
39
- if not ok then
40
- datas = nil -- 如果没有datas配置,证明当前组件不需要datas,仅打开数据库
41
- end
42
- % endif
43
28
 
44
- % for intf, intf_data in root['intf_imports'].items():
45
- local ${intf}Types = require '${project_name}.json_types.${intf}'
46
- % endfor
29
+ local class_data = {}
47
30
 
48
31
  % for cls, cls_data in root['class_require'].items():
49
- ${mdb_obj.render(cls, cls_data['data'], root['class_require'])}
32
+ class_data.${cls} = {${mdb_obj.render(cls, cls_data['data'], root['class_require'])}}
50
33
  % endfor
51
34
 
52
35
  % if root['path_level'] == 2:
@@ -135,32 +118,11 @@ end
135
118
  % endif
136
119
 
137
120
  function ${ClassName}:ctor(${"" if root['path_level'] == 2 else "bus"})
138
- self.name = '${project_name}'
139
- % if utils_py.check_need_mem_db(root):
140
- self.db = open_db(':memory:', datas)
141
- % endif
142
- % if root['path_level'] == 2:
143
- % if utils_py.check_local_poweroff_db(root):
144
- self.local_db = open_local_db(bootstrap.Service:get_local_db_path(self.name) .. '/${project_name}.db', datas, 'poweroff')
145
- % endif
146
- % endif
147
- % if utils_py.check_local_reset_db(root) or utils_py.check_local_temporary_db(root):
148
- if skynet.getenv('TEST_DATA_DIR') then
149
- % if utils_py.check_local_reset_db(root):
150
- self.reset_local_db = open_local_db(skynet.getenv('TEST_DATA_DIR')..'/${project_name}_reset.db', datas, "reset")
151
- % endif
152
- % if utils_py.check_local_temporary_db(root):
153
- self.temporary_local_db = open_local_db(skynet.getenv('TEST_DATA_DIR')..'/${project_name}_temp.db', datas, "temporary")
154
- % endif
155
- else
156
- % if utils_py.check_local_reset_db(root):
157
- self.reset_local_db = open_local_db('/opt/bmc/pram/persistence.local/${project_name}.db', datas, "reset")
158
- % endif
159
- % if utils_py.check_local_temporary_db(root):
160
- self.temporary_local_db = open_local_db('/dev/shm/persistence.local/${project_name}.db', datas, "temporary")
161
- % endif
162
- end
121
+ % if utils_py.has_db(root):
122
+ self.db_types = ${utils_py.get_db_types(root)}
163
123
  % endif
124
+ self.class_data = class_data
125
+ self.name = '${project_name}'
164
126
  end
165
127
 
166
128
  % if root['path_level'] == 2:
@@ -168,7 +130,6 @@ function ${ClassName}:pre_init()
168
130
  ${ClassName}.super.pre_init(self)
169
131
  % if utils_py.check_remote_per(root):
170
132
  self.persist = persist_client.new(self.bus, self.db, self, ${render_utils.get_not_recover_tables(root)})
171
- object_manage.set_persist_client(self.persist)
172
133
  % endif
173
134
  end
174
135
  % endif
@@ -0,0 +1,27 @@
1
+ <%def name="render(intf)">
2
+ {
3
+ '${intf['name']}', {
4
+ % if 'properties' in intf['data'] :
5
+ % for p,p_data in intf['data']['properties'].items():
6
+ ${p} = {'${render_utils.do_type_to_dbus_json(intf['data'], p_data)}', ${render_utils.options_json(p_data)}, ${render_utils.readonly_json(p_data)}, ${render_utils.default_json(p_data)}, false},
7
+ % endfor
8
+ % endif
9
+ }, {
10
+ % if 'methods' in intf['data'] :
11
+ % for method, method_data in intf['data']['methods'].items():
12
+ % if version >= 16:
13
+ ${method} = {'a{ss}${render_utils.do_types_to_dbus_json(intf['data'], method_data, 'req')}', '${render_utils.do_types_to_dbus_json(intf['data'], method_data,'rsp')}', T${method}Req, T${method}Rsp${render_utils.get_method_description(intf['name'], method_data)}},
14
+ % else:
15
+ ${method} = {'a{ss}${render_utils.do_types_to_dbus_json(intf['data'], method_data, 'req')}', '${render_utils.do_types_to_dbus_json(intf['data'], method_data,'rsp')}', T${method}Req, T${method}Rsp},
16
+ %endif
17
+ % endfor
18
+ % endif
19
+ }, {
20
+ % if 'signals' in intf['data'] :
21
+ % for s,s_data in intf['data']['signals'].items():
22
+ ${s} = 'a{ss}${render_utils.do_types_to_dbus_json(intf['data'], intf['data']['signals'], s)}',
23
+ % endfor
24
+ % endif
25
+ }
26
+ }
27
+ </%def>
@@ -0,0 +1,14 @@
1
+
2
+
3
+ <%def name="render(class_name, class_data, class_require)">
4
+ % if 'path' in class_data:
5
+ path = '${render_utils.get_path(class_name, class_require)}',
6
+ % if 'interfaces' in class_data:
7
+ interface_data = {
8
+ % for intf in class_data['interfaces']:
9
+ {name = '${intf}'},
10
+ % endfor
11
+ }
12
+ %endif
13
+ %endif
14
+ </%def>
@@ -140,16 +140,16 @@ class IncrementalCov(object):
140
140
  temp_uncovers = []
141
141
  temp_changes = []
142
142
  filters = filter_lines[file]
143
- if file not in cov_lines or file not in filter_lines:
144
- continue
143
+ if file not in cov_lines:
144
+ cov = []
145
145
  else:
146
146
  cov = cov_lines[file]
147
147
 
148
148
  for change in change_lines:
149
- if filters[change] == 0:
149
+ if filters[change - 1] == 0:
150
150
  continue
151
151
  temp_changes.append(change)
152
- if not cov or not cov[change]:
152
+ if not cov or not cov[change - 1]:
153
153
  temp_uncovers.append(change)
154
154
  lua_changes[file] = temp_changes
155
155
  uncovers[file] = temp_uncovers
@@ -277,7 +277,7 @@ class TaskClass(Task):
277
277
  soft_sr_file_path = os.path.join(sr_dir, soft_sr_file_name)
278
278
  if not os.path.exists(soft_sr_file_path):
279
279
  return
280
- soft_sr_dir_permission = self.tools.get_file_permission(sr_dir)
280
+ soft_sr_file_permission = self.tools.get_file_permission(soft_sr_file_path)
281
281
  self.run_command(f"chmod 777 {soft_sr_file_path}", sudo=True, command_echo=False)
282
282
  with open(soft_sr_file_path, "r") as fp:
283
283
  soft_sr_data = json.load(fp)
@@ -288,7 +288,7 @@ class TaskClass(Task):
288
288
  if key in soft_sr_data['Objects']:
289
289
  sr_data['Objects'][key] = {**value, **soft_sr_data['Objects'][key]}
290
290
  sr_data['Objects'] = {**soft_sr_data['Objects'], **sr_data['Objects']}
291
- self.run_command(f"chmod {soft_sr_dir_permission} {soft_sr_file_path}", sudo=True, command_echo=False)
291
+ self.run_command(f"chmod {soft_sr_file_permission} {soft_sr_file_path}", sudo=True, command_echo=False)
292
292
  except Exception as e:
293
293
  raise Exception(f"{sr_file.path} 文件合并失败: {e}") from e
294
294
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openubmc-bingo
3
- Version: 0.5.254
3
+ Version: 0.5.261
4
4
  Summary: Tools provided by openubmc
5
5
  Home-page: https://openubmc.cn
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,4 +1,4 @@
1
- bmcgo/__init__.py,sha256=raLp35VhtW_V2qbfKmaKKWBtbrpksL9JqqOSEC_mO-A,563
1
+ bmcgo/__init__.py,sha256=0P6_XTVwChevSJWobH0kv7Sz9eL7mbHXSc_AIFNgp9s,563
2
2
  bmcgo/bmcgo.py,sha256=uD4TsfjrFB5aQPIS6WRUVc9ShXX-dSImY9ezkB13g1w,685
3
3
  bmcgo/bmcgo_config.py,sha256=zPghH-W8vNK1bAc5PjfwnWzkHYT499PlGbhUWhPKT5U,10888
4
4
  bmcgo/errors.py,sha256=QW1ndrJcJ2Ws7riOznPKVvZsNlrYk73eZol7w8gJTPU,3076
@@ -34,7 +34,7 @@ bmcgo/codegen/c/template/server.h.mako,sha256=hZg1U64YKtlUm4wuKRobhjGW8e7rzFu9xg
34
34
  bmcgo/codegen/lua/.lua-format,sha256=h6RLqe84SjDqKO1mqoCW7XVtrAwDMTRM1Rj8nwzPGwQ,188
35
35
  bmcgo/codegen/lua/Makefile,sha256=wliuAhxhChrpsTnWuOlje3gtW2KRqayIhGRYBkvFi-c,3304
36
36
  bmcgo/codegen/lua/__init__.py,sha256=2yU9vzUVQmMJ0qBtNJ-AfKpnOzYZo4wAxlRnpFwgE7M,521
37
- bmcgo/codegen/lua/codegen.py,sha256=NhWJs5nDyxEehS54HRkj3nE-9X1dq6OGHOwLVx1CVaY,7818
37
+ bmcgo/codegen/lua/codegen.py,sha256=RTcigRI-_H3E2r7Dz8Afw0VOr1EPL3zFqDzPFKWw7KU,8978
38
38
  bmcgo/codegen/lua/proto/Makefile,sha256=rS4nEBwWJEDYAb5XN9S7SfII7RMFb071jh0eh_KJePo,3098
39
39
  bmcgo/codegen/lua/proto/ipmi_types.proto,sha256=BX09mymhhPkWqZE1UCVJACpLBeQh1vQN31oBRVVieFY,377
40
40
  bmcgo/codegen/lua/proto/types.proto,sha256=_X8JCKZCvO6PfWh6tuWcEqKHROrh46rCZab-OCkfirA,1162
@@ -54,16 +54,18 @@ bmcgo/codegen/lua/script/gen_rpc_msg_json.py,sha256=6fVtZTHL-v6pdCjkgxFmqCjf511c
54
54
  bmcgo/codegen/lua/script/gen_schema.py,sha256=9sfqv7fHYoCiokotesBER2HglqHwrj08ftQDbrDjrlI,10600
55
55
  bmcgo/codegen/lua/script/ipmi_types_pb2.py,sha256=CaCartJKCRgx5WLBg4mbzS8VXwSKy380o6BPYgouAJQ,6665
56
56
  bmcgo/codegen/lua/script/lua_format.py,sha256=W3UO-II34qY0_st6QiHwSOrQZnqdz4mLWOIB3pfGe58,2003
57
+ bmcgo/codegen/lua/script/mdb_register.py,sha256=m4St_oPFnaHZG0PTg_D47_zcrqGexy70otVVuu99VM8,7578
57
58
  bmcgo/codegen/lua/script/mds_util.py,sha256=CXcmVHimHMEhV7nds-Jxq29sSHJtuKjnoujgzF151JQ,11914
58
59
  bmcgo/codegen/lua/script/merge_model.py,sha256=VDe1b1zgbNEVeqpuzAyL7S8EAb1Hwy0N3Ayv4dT2_Hg,12923
59
60
  bmcgo/codegen/lua/script/merge_proto_algo.py,sha256=IK7mjBYQWzwr5RtyeHp8CQFU_jIpuHkOxe6XSI_PcXU,3007
61
+ bmcgo/codegen/lua/script/model_consistency_check.py,sha256=RzHW1heLgcPEAg9sKav-r4_XgI5JClrIPsWh7MkHHro,10670
60
62
  bmcgo/codegen/lua/script/proto_loader.py,sha256=w6TTyLvXrdXZKTKOGf87kSuSsbBviVeQJAhtjRc2K2Y,1913
61
63
  bmcgo/codegen/lua/script/proto_plugin.py,sha256=hfFr7QXndA1dbFYmpUkemFxkdSchK8i8xml_3cMdBA4,5002
62
64
  bmcgo/codegen/lua/script/redfish_source_tree.py,sha256=HzTGY4PViZXLQLOt_U7-YMqE5Ctf-Mxa1p5voOFJU4A,3905
63
65
  bmcgo/codegen/lua/script/sep_ipmi_message_cmds.py,sha256=dQZog5e7Eo8Z7xSrp9sUri8vg-VtEj_Sll_E_OhnBw4,8209
64
66
  bmcgo/codegen/lua/script/template.py,sha256=kJ5vQcHKY5OKUkYrSObFjx6WLVopveasjbr0HWgrMZM,6711
65
67
  bmcgo/codegen/lua/script/types_pb2.py,sha256=uiRP_JPK9EF57RUZuomx1K1M9_jZFZgsHXcatFrhzow,23074
66
- bmcgo/codegen/lua/script/utils.py,sha256=8iM-PS0sckMuY81QT0Va_s76m7NkhK6MaY1ctLJXzUU,23894
68
+ bmcgo/codegen/lua/script/utils.py,sha256=QrBlrntS9uTb95iAKpZLPYbSeCUNXNzSoxEm5d21zjY,24886
67
69
  bmcgo/codegen/lua/script/validate.py,sha256=_RHZBSDZklmcjETD8zRmnhz4DABzKoL-fNl1I9L4Ofs,2096
68
70
  bmcgo/codegen/lua/script/yaml_to_json.py,sha256=31J1qJPIAJrx9Cq6bNZks3QCZ754spI5mjZNlshkcJ4,2291
69
71
  bmcgo/codegen/lua/script/dto/__init__.py,sha256=nSBpsAbZ7UGd0a25ys_LLEpi3juPtUhVMy_tgGuZsNY,560
@@ -78,29 +80,28 @@ bmcgo/codegen/lua/script/loader/file_utils.py,sha256=wBWkW9o0-ij2vG1Vv7OA-EtmBm8
78
80
  bmcgo/codegen/lua/script/loader/kepler_abstract_collect.py,sha256=5NIR71Bt5EPcUEubZfcoYf_o4YKg2yuvawOm-fWGbVA,3031
79
81
  bmcgo/codegen/lua/script/loader/kepler_abstract_loader.py,sha256=wQBYQyKhBOeoUn0d1YnYFtOzWPLNZVf7QmUvjLwTMT4,1977
80
82
  bmcgo/codegen/lua/script/loader/redfish_loader.py,sha256=k7SUKN0I4Fc6uTugeOsPP0ceRM_tVEBTbQdNl_kDav4,5944
81
- bmcgo/codegen/lua/script/render_utils/__init__.py,sha256=TQLS6LwBbDdGw_nKfdfWGAP6TbaXPJ4wr_kMV2JJCS8,2014
82
- bmcgo/codegen/lua/script/render_utils/client_lua.py,sha256=rSNIjIgLjNRKNCMjbaNconBQ7Ysr1mkSLR-S3H6U3sw,3507
83
+ bmcgo/codegen/lua/script/render_utils/__init__.py,sha256=elQAJchs3xUIE2sb3mQj_MFfHZJ_u89C-D77us90PHM,2256
84
+ bmcgo/codegen/lua/script/render_utils/client_lua.py,sha256=SSbE4kLLyRWPKxUMiMfWP-nZASEnAsnlzR4u1AuZIuc,3519
83
85
  bmcgo/codegen/lua/script/render_utils/controller_lua.py,sha256=bgMXd6beOiL0Xm4rK3x09_GjaJJcDBMkt8ya0gHIqz0,2352
84
86
  bmcgo/codegen/lua/script/render_utils/db_lua.py,sha256=SHhuoIMvN0dPplUODfvu3qCDBtgP9QmnUvjLPQEjoTk,7865
85
87
  bmcgo/codegen/lua/script/render_utils/error_lua.py,sha256=CW9g-HPADf42zfzLSA6PW-0O_IchDKMyjztANGiIHC8,5928
86
88
  bmcgo/codegen/lua/script/render_utils/ipmi_lua.py,sha256=jZ98qP_gJi6dAU40OmDr_J2c49MzTPCC68Bh1sg7OFo,4997
87
89
  bmcgo/codegen/lua/script/render_utils/ipmi_message_lua.py,sha256=Y-5pXMfAPDZqqoA9spkk80UHr63S6Z35gDeyAcu1tnc,1021
88
90
  bmcgo/codegen/lua/script/render_utils/mdb_lua.py,sha256=gKX_GUkIbYbbviBw9cEO3pfTwoLWurczYFmoOoWA1Us,6141
89
- bmcgo/codegen/lua/script/render_utils/mdb_register.py,sha256=m4St_oPFnaHZG0PTg_D47_zcrqGexy70otVVuu99VM8,7578
90
- bmcgo/codegen/lua/script/render_utils/message_lua.py,sha256=yeXui-QbIDrS4SyptW59WlI0e3KQ8Wgvxt8WUPFJbjU,1072
91
+ bmcgo/codegen/lua/script/render_utils/message_lua.py,sha256=ZHJy35iJir1O149dafZnl-oEdU89-eP6VIeQmKjh9D8,1155
91
92
  bmcgo/codegen/lua/script/render_utils/messages_lua.py,sha256=eAe46JU1AJxfpifQCnioD1jxfDhfc-DLGRy8CmwCfBg,4948
92
93
  bmcgo/codegen/lua/script/render_utils/model_lua.py,sha256=DIBwEt7cQMxkePUjqBk0oks6HBy_jqB4K32J6K3UAZM,18040
93
94
  bmcgo/codegen/lua/script/render_utils/old_model_lua.py,sha256=OFUPJOaiXDjXpknbh6Pw0TNC1dUVtjPbuIs-3fSN7p4,15611
94
95
  bmcgo/codegen/lua/script/render_utils/plugin_lua.py,sha256=-_r-MqjDNnoYel6zdsNSkqYI3w1DKJPwJy5Vsevl33s,1481
95
96
  bmcgo/codegen/lua/script/render_utils/redfish_proto.py,sha256=lAVo9pPxkc7Iv22enuqCOJVTFy8_63C57iADjzYWz5g,3130
96
97
  bmcgo/codegen/lua/script/render_utils/request_lua.py,sha256=rXBk3h1uY9vlKgUs4SdGRmqNu3GyCQQMGfySqgF-lv8,3209
97
- bmcgo/codegen/lua/script/render_utils/service_lua.py,sha256=5nfUdCAlvids5bxgJQD8M90OI4-RoUZhBh-e0i1TAoM,4390
98
+ bmcgo/codegen/lua/script/render_utils/service_lua.py,sha256=8n8-P7vR5PXPhBXVdlgxL9cvvdWuj5H8DnKqatxPWtQ,4402
98
99
  bmcgo/codegen/lua/script/render_utils/utils_message_lua.py,sha256=MPAwH4lZUF1JqZMXmJV8sjBQFqcFKqBter_lpX38h-E,4940
99
100
  bmcgo/codegen/lua/script/render_utils/validate_lua.py,sha256=NVjMWZwMxwUj9kdTaCRpyVZJkUQuR9kdzI7Y-MZDPaE,7079
100
101
  bmcgo/codegen/lua/templates/Makefile,sha256=-br3qnXM_73_nJhYVgF7TsNtVxt_p_h4l5TYPjWqQIs,4044
101
102
  bmcgo/codegen/lua/templates/errors.lua.mako,sha256=T93tESJl0K3r5izufq6NsqqCptQbVslpsTEjkQdDq0U,1536
102
103
  bmcgo/codegen/lua/templates/messages.lua.mako,sha256=GfWjgRy0is3d-U8-Wq-i_oWguFi5d1VHQKv0pJhV9cE,1074
103
- bmcgo/codegen/lua/templates/apps/Makefile,sha256=OFyiSw8HV9MrwZGuaMkx0yUyAeJ7GFNV7qIl83UsKko,15461
104
+ bmcgo/codegen/lua/templates/apps/Makefile,sha256=IPU-LW3i9xTQUrb9XCWYTWlATCTu2JE3aayL43juEeM,19484
104
105
  bmcgo/codegen/lua/templates/apps/Makefile.mdb.mk,sha256=Qmd-n_YsQbfnpED_6PIp_6pL13w6UCCGgBoBA4h6r_0,3296
105
106
  bmcgo/codegen/lua/templates/apps/app.lua.mako,sha256=Y_aZCPyNgeqfa39_RWxV-_m3out1p4vTTWnzqXtPV7E,276
106
107
  bmcgo/codegen/lua/templates/apps/class.lua.mako,sha256=FZsGAZeiytVwihxyyjhw6Hvv4V01Lhtz8Q9FPZYieZw,1208
@@ -154,9 +155,17 @@ bmcgo/codegen/lua/templates/new_app/test/unit/test.lua.mako,sha256=3UleW8XN8VEF7
154
155
  bmcgo/codegen/lua/templates/new_app/user_conf/rootfs/etc/systemd/system/${project_name}.service.mako,sha256=b6wu4leCGtNlXJ_kmEjtJkQqIBSkYz6EfWViZGneCqY,400
155
156
  bmcgo/codegen/lua/templates/new_app/user_conf/rootfs/etc/systemd/system/multi-user.target.wants/${project_name}.service.link,sha256=NJ6AGF9O0FGEM5dwb62LS2_KO7T3A2_lcHYFlY-KR0k,26
156
157
  bmcgo/codegen/lua/v1/script/gen_schema.py,sha256=LtSswrIqjgk3PuGSlzKSB5Cw5OeSafYkm7PdLQ7Mrao,11717
157
- bmcgo/codegen/lua/v1/script/render_utils/model_lua.py,sha256=zIcWxspjnfF-r9MZEXM9i5IUr0zNPEIOnMAk1DN5l7g,18059
158
- bmcgo/codegen/lua/v1/templates/apps/model.lua.mako,sha256=ORS8i3cDaP7rqEa1W3yI7DmD1X3wUeIZKj42I70AmS8,1979
159
- bmcgo/codegen/lua/v1/templates/apps/service.lua.mako,sha256=52zAvt7tqgeSsBleaiOtpbUoTv0WUJd0mqzRXc8iNO4,7477
158
+ bmcgo/codegen/lua/v1/script/render_utils/client_lua.py,sha256=Ake2bt96nowwGKncxJj-t7ImEl2dXnjGCuHQeU6VMds,3914
159
+ bmcgo/codegen/lua/v1/script/render_utils/db_lua.py,sha256=59XfkKtUz8Rv73zcyIcQR25JN_2atS4hQq_4BcXRrqo,7948
160
+ bmcgo/codegen/lua/v1/script/render_utils/model_lua.py,sha256=NTB1RYxjqBypm5KeRKpJSige6HtaZl_EI9mHJ5HZ9Ss,19024
161
+ bmcgo/codegen/lua/v1/templates/apps/client.lua.mako,sha256=xFqBanl4k-qmVw3T3loWQK-jAVL7NmVR3lv-mxSn1Gg,11236
162
+ bmcgo/codegen/lua/v1/templates/apps/db.lua.mako,sha256=zrlqjVN9k6G1i3OeW2OROxzsYyhNAY-wpDt_nva5jL4,2094
163
+ bmcgo/codegen/lua/v1/templates/apps/local_db.lua.mako,sha256=6Tp99mTF9tLTMz2K6kviaxG9Lwtt0d6cMYY7ZGgMFCE,6460
164
+ bmcgo/codegen/lua/v1/templates/apps/message.lua.mako,sha256=-AUAwlgVIaNN7fiReXqDXX5Icq88i0SAar5XHlCrXQU,1039
165
+ bmcgo/codegen/lua/v1/templates/apps/model.lua.mako,sha256=EmHD62fk0QetQUO0DPz2BEc2NZmbq39pozqm4-ngYEY,2056
166
+ bmcgo/codegen/lua/v1/templates/apps/service.lua.mako,sha256=wd_NJtiSSMbR-lxEqv-rluHOdUCpeV9ZlrZDA7DDaZY,5564
167
+ bmcgo/codegen/lua/v1/templates/apps/utils/mdb_intf.lua.mako,sha256=msdj2SygZvV3RIEHLeVDfZvOzZ99Yy27SwPVrFVVcpc,1242
168
+ bmcgo/codegen/lua/v1/templates/apps/utils/mdb_obj.lua.mako,sha256=oCzx2u3bjvCdNKX5oC8j6Q-Zb21q6SFCqd14_VzrWvo,349
160
169
  bmcgo/component/__init__.py,sha256=BDXz8BcSlCkfo5UYt6j2rm89-HiYA1ZzfpFhy99MH-0,538
161
170
  bmcgo/component/build.py,sha256=S0borHjBQfb0EWQ6uqKWUJGImkzHpb2x5qqz-qnzsHI,8959
162
171
  bmcgo/component/component_dt_version_parse.py,sha256=KyrfyjbrszU-hhG1Hr6TzKuSabmGIK51b_3KuVBv5-g,14139
@@ -177,7 +186,7 @@ bmcgo/component/analysis/smc_dfx_whitelist.json,sha256=dy_6-FddhG6UY7D1KUCW3Vme2
177
186
  bmcgo/component/analysis/sr_validation.py,sha256=i1mlJb_D7RqE510LSAcCW81K1VUmZ7oSmLiMfUgdSJI,15598
178
187
  bmcgo/component/coverage/__init__.py,sha256=ZgUEyI86FTlOdBzcuTzz7UqTtfWcz416Gx4BCqcQlhA,557
179
188
  bmcgo/component/coverage/c_incremental_cov_report.template,sha256=FPhK1DZtmWsjDxa32R1ViH3IGCtNHcx0zFfgRo0s2nI,1576
180
- bmcgo/component/coverage/incremental_cov.py,sha256=JFmlJONo0eVGu39Es5BmYyKVh-PuSOPqi4FqwqrcGfE,16823
189
+ bmcgo/component/coverage/incremental_cov.py,sha256=tkeGpWfXXkipeDTEB9bS_p2S60rL_Eh0AWQbnSwHlK0,16803
181
190
  bmcgo/component/template/conanbase.py.mako,sha256=MMZezCl5oFucRraOJt1WjmPL2S7wa4Hzfc7yDfTkW7Q,10949
182
191
  bmcgo/component/template/conanfile.deploy.py.mako,sha256=zpxluBjUFmJHfFrnBknxZ3cv3cxcqzJuGh2eN0uMXZA,889
183
192
  bmcgo/functional/__init__.py,sha256=BDXz8BcSlCkfo5UYt6j2rm89-HiYA1ZzfpFhy99MH-0,538
@@ -212,7 +221,7 @@ bmcgo/tasks/download_buildtools_hm.py,sha256=f4UxStARc8Z8DnT_5O6ONajQ7P0sKyJ8bri
212
221
  bmcgo/tasks/misc.py,sha256=GK_bSDLGZW0FxywB2ICG1iIEz2y2QoCb1YQQk8SYOIA,711
213
222
  bmcgo/tasks/task.py,sha256=n7EhquD3FQeT8LHk0tREKOG9t1BcbMge_TY6ekGFydk,17064
214
223
  bmcgo/tasks/task_build_conan.py,sha256=nQt4VyK4QHh2u4JbM8kfK9WBVIMGKI18S2NPg9orlvQ,32962
215
- bmcgo/tasks/task_build_rootfs_img.py,sha256=uFrMfrpaAHB_2QQdEo46P8TgFrGMTG-xfZUlxzJLSQ0,30443
224
+ bmcgo/tasks/task_build_rootfs_img.py,sha256=0SF_3EAA1SNY1s7YyMBadHrJTp7A2mBD0r3te-231wQ,30456
216
225
  bmcgo/tasks/task_build_wbd_up.py,sha256=X9-0Qqad-s3mGfJBMeBQvfZ99KlWcgaMluDr_zv6Z-o,3122
217
226
  bmcgo/tasks/task_buildgppbin.py,sha256=Xjfw6j8OsyS_XRiOt4vqIK1rDQ4sNKG__eurDu-M9bo,6341
218
227
  bmcgo/tasks/task_buildhpm_ext4.py,sha256=DBZnmU_eb14J0CW_wVoCc9VKnssFF1vXmRhLJQ6kR28,3482
@@ -245,8 +254,8 @@ bmcgo/utils/installations/version_util.py,sha256=dOwvLZ7iOmnzSeyD6_pRm7NS7I13Um5
245
254
  bmcgo/utils/installations/install_plans/bingo.yml,sha256=Zw1HnAyNJdEwkE3fnd-_GCe9bwv1m6bmMlaQTJXaFa8,210
246
255
  bmcgo/utils/installations/installers/apt_installer.py,sha256=nPaCb4cobSi9InN_aHsEPtQ0k4FgsCUWE5_VgBPvcRE,3769
247
256
  bmcgo/utils/installations/installers/pip_installer.py,sha256=dDdios1EQ7fzt90r02pZeoM3jCmjslLzkSvzd2hgRVM,3241
248
- openubmc_bingo-0.5.254.dist-info/METADATA,sha256=8j5YISPGw7_HqnCHCbsotTo030S0JKPoYYE9dLw5-qU,925
249
- openubmc_bingo-0.5.254.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
250
- openubmc_bingo-0.5.254.dist-info/entry_points.txt,sha256=UUoUP-vAWTgg9vEYbRwYqOBHgpRtkngdzMPb-ocz90g,42
251
- openubmc_bingo-0.5.254.dist-info/top_level.txt,sha256=9AcvCAt1nZcOgMsGt6T07mg2Bgtdet-3mHTwg91axgI,6
252
- openubmc_bingo-0.5.254.dist-info/RECORD,,
257
+ openubmc_bingo-0.5.261.dist-info/METADATA,sha256=Lxad1kWz9GtlS1qgMNCcXmokR2KVUEnLx6CQunglZMs,925
258
+ openubmc_bingo-0.5.261.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
259
+ openubmc_bingo-0.5.261.dist-info/entry_points.txt,sha256=UUoUP-vAWTgg9vEYbRwYqOBHgpRtkngdzMPb-ocz90g,42
260
+ openubmc_bingo-0.5.261.dist-info/top_level.txt,sha256=9AcvCAt1nZcOgMsGt6T07mg2Bgtdet-3mHTwg91axgI,6
261
+ openubmc_bingo-0.5.261.dist-info/RECORD,,