Name Date Size #Lines LOC

..Today-

subprojects/H28-Apr-2023-2820

.clang-formatH A D19-Dec-20243.7 KiB137135

.gitignoreH A D28-Apr-202342 43

LICENSEH A D07-Mar-202111.1 KiB203169

OWNERSH A D10-Aug-20221.7 KiB5348

README-settings-manager.mdH A D06-Dec-20221.3 KiB4330

README.txtH A D07-Mar-2021661 1815

meson.buildH A D13-Apr-20242 KiB7668

meson.optionsH A D17-Aug-2023129 76

settings.pyH A D28-Apr-2023880 3725

settings.yamlH A D06-Dec-20222.1 KiB7978

settings_example.yamlH A D06-Dec-20221.7 KiB5146

settings_main.cppH A D28-Apr-2023634 2616

settings_manager.mako.hppH A D26-May-202313.2 KiB452401

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