# Example PDM configuration file. - name: example path group description: > 'A path group is a named collection of DBus object paths and associated metadata. These collections serve only to be referenced by other configuration directives. The metadata element has different uses depending on the referencing directive. Within a single configuration file path group names must be unique. The same name can appear in multiple configuration files; however, the referencing directive will only search for the group in the same configuration file.' class: group group: path members: - meta: path path: /xyz/openbmc_project/testing/inst1 - meta: path path: /xyz/openbmc_project/testing/inst2 - meta: path path: /xyz/openbmc_project/testing/inst3 - meta: path path: /xyz/openbmc_project/testing/inst4 - name: example property group description: > 'Like path groups, a property group is a named collection of DBus property names and associated metadata. Properties in a group must all have the same DBus type signature and must be explicitly declared.' class: group group: property type: uint32 members: - interface: xyz.openbmc_project.Sensor.Value meta: property property: ValueA - interface: xyz.openbmc_project.Sensor.Value meta: property property: ValueB - name: example property watch description: > 'A property watch instructs PDM to maintain a cache of the state of the specified properties on the specified DBus objects. An optional callback can be triggered when property values change.' class: watch watch: property paths: example path group properties: example property group callback: example count condition - name: example journal callback description: > 'Callbacks are actions PDM should take when instructed to do so. Some callback types refer to a group of paths and group of properties in a similar fashion as the property watch directive. The journal callback logs the specified message to the systemd journal with the specified severity. Additionally, the journal callback will add to the journal key value pair metadata for each property in the specified property group with the key being the property element metadata and the value being the property value.' class: callback callback: journal paths: example path group properties: example property group severity: INFO message: Hello world from PDM! - name: example callback group description: > 'Callbacks groups are simply named collections of other callbacks. Configuration file directives can only refer to a single callback. Through use of a group, these configuration file directives can refer to more than one callback. For example for a given event, one may wish to trace multiple messages to the systemd journal. The journal callback does not support tracing multiple messages. To do that, define a callback group composed of multiple journal callbacks. This example callback group only has one member. To add more, add additional callbacks to the members element.' class: callback callback: group members: - example journal callback - name: example count condition description: > 'Conditions or conditional callbacks apply a test prior to invoking the callback function. All conditional callbacks must specify the callback to issue if the condition evaulates. The count condition applies the op comparison operator to the value of each property in the specified groups. It then counts the number of properties that pass the comparison, and applies another comparison on the result against the specified bound. For example, a callback that requires at least three temperature sensors in the group to be higher than 115 degrees might use a count condition with an op of >, a count op of >=, a bound of 115, and a countbound of 3.' class: condition condition: count paths: example path group properties: example property group callback: example callback group countop: '>=' countbound: 3 op: '>=' bound: 115