Name Date Size #Lines LOC

..17-Aug-2024-

firmware-handler/H17-Aug-2024-7,4294,959

log-handler/H17-Aug-2024-1,4891,111

test/H09-Feb-2022-10877

version-handler/H17-Aug-2024-1,3131,085

README.mdH A D07-Aug-20242.3 KiB9273

buildjson.cppH A D03-Jun-20222 KiB7140

buildjson.hppH A D18-Jun-20243.4 KiB11562

file_handler.cppH A D17-Aug-20242.1 KiB8861

file_handler.hppH A D11-May-20231.1 KiB4627

fs.cppH A D07-Mar-20211.4 KiB5733

fs.hppH A D07-Mar-2021389 187

general_systemd.cppH A D17-Aug-20246 KiB225177

general_systemd.hppH A D17-Aug-20242.4 KiB8552

handler_config.hppH A D07-Mar-2021833 3614

image_handler.hppH A D17-Aug-20242.1 KiB8439

meson.buildH A D08-Dec-2023583 2822

skip_action.cppH A D11-May-20231,010 4622

skip_action.hppH A D07-Mar-2021715 3220

README.md

1# Format of Config file
2
3This document gives details about the format of the config file used by log,
4version and firmware handler. The config file is a .json file.
5
6## Parameters
7
8There are 3 important parameters in this config file
9
101. blob
112. handler
123. actions
13
14An example config file -
15
16```json
17{
18  "blob": "/flash/adm1266_sink0",
19  "handler": {
20    "type": "file",
21    "path": "/var/run/adm1266/adm1266_sink0.hex"
22  },
23  "actions": {
24    "preparation": {
25      "type": "skip"
26    },
27    "verification": {
28      "type": "systemd",
29      "unit": "adm1266-verify@sink0.service"
30    },
31    "update": {
32      "type": "systemd",
33      "unit": "adm1266-update@sink0.service"
34    }
35  }
36}
37```
38
39### blob
40
41This parameter defines the unique name of the blob. This parameter must be
42defined for each blob.
43
44### handler
45
46A blob must have a handler with a type. Currently only "file" type is supported.
47With file type, a path of the handler file must be provided.
48
49### actions
50
51"actions" define various steps to be performed and are required for each blob.
52These actions can be triggered from ipmi-blob commands. Currently there are 2
53types of actions supported: `systemd` to invoke a systemd service, or `skip` to
54not perform any action.
55
56## Workflow of log handler
57
58```json
59{
60  "blob": "/log/blackbox_adm1266_sink0",
61  "handler": {
62    "type": "file",
63    "path": "/var/run/adm1266/adm1266_sink0.log"
64  },
65  "actions": {
66    "open": {
67      "type": "systemd",
68      "unit": "adm1266-read-blackbox-log@sink0.service"
69    },
70    "delete": {
71      "type": "systemd",
72      "unit": "adm1266-clear-blackbox-data@sink0.service"
73    }
74  }
75}
76```
77
78In this example the blob handler is the log file that will store the blackbox
79data from adm1266 and will be returned on BmcBlobRead.
80
81Here log_blob supports 2 actions. These actions are performed on the handler
82file.
83
841. `open` : `adm1266-read-blackbox-log@sink0.service` gets launched on
85   BmcBlobOpen command. This service should read the blackbox data from adm1266
86   and place the into blob handler file. This also enables BmcBlobSessionStat
87   command to indicate that the blob is ready to read.
88
892. `delete` : `adm1266-clear-blackbox-data@sink0.service` gets launched on
90   BmcBlobDelete command. This service should delete the cached blackbox data in
91   the handler file and erase the blackbox data from adm1266.
92