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