Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
subprojects/ | H | - | - | 28 | 20 | |
.clang-format | H A D | 01-Feb-2025 | 3.7 KiB | 137 | 135 | |
.gitignore | H A D | 26-Apr-2023 | 42 | 4 | 3 | |
LICENSE | H A D | 18-Dec-2015 | 11.1 KiB | 203 | 169 | |
OWNERS | H A D | 03-Aug-2022 | 1.7 KiB | 53 | 48 | |
README-settings-manager.md | H A D | 06-Dec-2022 | 1.3 KiB | 43 | 30 | |
README.txt | H A D | 13-Oct-2016 | 661 | 18 | 15 | |
meson.build | H A D | 01-Feb-2025 | 2 KiB | 76 | 68 | |
meson.options | H A D | 15-Aug-2023 | 129 | 7 | 6 | |
settings.py | H A D | 24-Apr-2023 | 880 | 37 | 25 | |
settings.yaml | H A D | 06-Dec-2022 | 2.1 KiB | 79 | 70 | |
settings_example.yaml | H A D | 06-Dec-2022 | 1.7 KiB | 51 | 42 | |
settings_main.cpp | H A D | 24-Apr-2023 | 634 | 26 | 16 | |
settings_manager.mako.hpp | H A D | 25-May-2023 | 13.2 KiB | 452 | 401 |
README-settings-manager.md
1# Settings Manager 2 3## Introduction 4 5The settings manager has the following design goals: 6 7- Each setting should be a distinct D-Bus object. 8 9- The above makes it possible to not even create settings objects that do not 10 apply to a specific system. 11 12- It should be possible, for example, for host0/ and host1/ on a system with two 13 hosts to not only have different values for certain settings, but have 14 different applicable settings as well. 15 16- It should be possible to specify default settings for a system at build-time, 17 based on which the settings manager should at run-time create appropriate 18 D-Bus objects and place them on the bus. 19 20## Settings policy file 21 22Some of the design goals above are achieved via a policy file, which is written 23in YAML. Based on this policy file, the settings manager code is generated to be 24able to create only relevant settings D-Bus objects along with specifying their 25defaults. 26 27Here's an example of how entries in the YAML would look: 28 29```yaml 30/xyz/openbmc_project/control/host0/boot_mode: 31 Interface: xyz.openbmc_project.Control.Boot.Mode 32 Defaults: 33 BootMode: Mode::Modes::Regular 34 35/xyz/openbmc_project/control/host1/boot_mode: 36 Interface: xyz.openbmc_project.Control.Boot.Mode 37 Defaults: 38 BootMode: Mode::Modes::Safe 39``` 40 41It is possible to specify this policy file via a bitbake recipe for a system 42specific policy. 43
README.txt
1How to use 'query' in the YAML file 2'query' contains information for settings_manager.py to search for 3and match inventory objects: 4 5query: 6 name: type 7 keyregex: "dimm" 8 subtree: "/org/openbmc/inventory" 9 matchregex: "/(dimm\d*)$" 10 11In the example above setting_manager.py will explore all existing 12objects at /org/openbmc/inventory that relate to the 'dimm' main 13category in the YAML file. 14The 'matchregex' will identify all objects with names that start with 'dimm', 15followed by any number of digits. The name should be at the end of the path. 16settings_manager.py will create a corresponding object with the same name, 17which is a group (dimm\d*). 18