History log of /openbmc/phosphor-fan-presence/control/json/config_base.hpp (Results 1 – 10 of 10)
Revision Date Author Comments
# b2e9a4fc 13-Jun-2022 Mike Capps <mikepcapps@gmail.com>

meson support: remove code warnings 2

This commit contains code changes necessary to support the increased
warning level from Meson builds. Most changes are for unused variables.
to keep the review

meson support: remove code warnings 2

This commit contains code changes necessary to support the increased
warning level from Meson builds. Most changes are for unused variables.
to keep the review size manageable, this commit contains only control
changes (plus one in sensor-monitor).

Change-Id: Ie20f1d9028add4b605e4cc9fb230940710365706
Signed-off-by: Mike Capps <mikepcapps@gmail.com>

show more ...


# c272790a 02-Feb-2022 Matt Spinler <spinler@us.ibm.com>

control: Add 'less_than' modifier

This modifier allows one to return a value from a table based on if the
value passed to it is less than the table key value.

For example:

"modifier": {
"operato

control: Add 'less_than' modifier

This modifier allows one to return a value from a table based on if the
value passed to it is less than the table key value.

For example:

"modifier": {
"operator": "less_than",
"value": [
{
"arg_value": 30,
"parameter_value": 300
},
{
"arg_value": 40,
"parameter_value": 400
},
{
"arg_value": 50,
"parameter_value": 500
}
]
}

With the above config, it would do the following:
* value less than 30: return 300
* else if value less than 40: return 400
* else if value less than 50: return 500
* else: return a default value based on data type of parameter_value

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I8b47341f41723c0cdf1ee2786526550fc24551f9

show more ...


# e5578602 30-Mar-2021 Matthew Barth <msbarth@us.ibm.com>

control: Use Group objects in events

Use the generated Group objects in configured events. Group objects are
temporarily generated from the `groups.json` configuration and passed to
each event. When

control: Use Group objects in events

Use the generated Group objects in configured events. Group objects are
temporarily generated from the `groups.json` configuration and passed to
each event. When the event is generated from its JSON configuration, the
group(s) its configured to use in the event are first copied from the
list of Group objects and then populated with the remaining details for
the group configuration that's provided in the event. Groups to be used
in the event must either have no profiles restricting their use or have
a profile that matches the event's profile where that profile is also
active.

Change-Id: Ifda7493ab256fa2fbf869e984609888c418b1f9b
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 44ab7693 26-Mar-2021 Matthew Barth <msbarth@us.ibm.com>

control: Load JSON configured groups and events

Load the JSON configured groups and events, removing the remaining
references to the YAML based groups, triggers, and actions types. JSON
configured g

control: Load JSON configured groups and events

Load the JSON configured groups and events, removing the remaining
references to the YAML based groups, triggers, and actions types. JSON
configured groups are loaded and provided to each event so that they can
eventually be copied and updated for the specifics of the event.

Change-Id: If713809b2865b5fe84b7bbb5a086cd49ba7fe55c
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# bfd7e1b7 04-Feb-2021 Matthew Barth <msbarth@us.ibm.com>

control: Extend actions from the config base object

Make actions also be base config objects to allow profiles to be defined
on an action. This also provides the parsing of variable values from the

control: Extend actions from the config base object

Make actions also be base config objects to allow profiles to be defined
on an action. This also provides the parsing of variable values from the
JSON of a configured action.

Included in this commit is an action parsing error exception class that
actions will use when a required attribute fails to be parsed from the
JSON for the given action.

Change-Id: I0fb040afb09d17830e7bb1a587de1b501b638eae
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# b584d818 11-Mar-2021 Matthew Barth <msbarth@us.ibm.com>

control: Use JSON zone object's dbus property methods

Return a set property function handler for dbus interfaces/properties
configured in the zone's JSON configuration file. Each interface's
propert

control: Use JSON zone object's dbus property methods

Return a set property function handler for dbus interfaces/properties
configured in the zone's JSON configuration file. Each interface's
property configuration is parsed by a method that returns a set property
function handler that is called providing the pointer to the zone object
that the property should be set on. This completes the separation of the
JSON based binary and YAML based binary of fan control.

Since this is the last thing to finalize the separation of the two ways
to configure fan control, the config base class was updated to remove
the reference to the YAML defined types.

Also, since this change dealt with what is hosted on dbus by the fan
control application, it can now claim the configured bus name after the
JSON based zone objects are created.

Change-Id: I1c0c0794e4fdbb15b21f47fa55126d396672daad
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# a3a8cc57 15-Jan-2021 Matthew Barth <msbarth@us.ibm.com>

control: Add all fan functionality to JSON fan object

In transitioning to JSON based configuration support, the objects
created based on the JSON will eventually replace the similar objects
used for

control: Add all fan functionality to JSON fan object

In transitioning to JSON based configuration support, the objects
created based on the JSON will eventually replace the similar objects
used for YAML based configurations. This adds all the functionality from
the current fan class used for YAML configs to the fan class used for
JSON configs.

Change-Id: I50bdd218fc964a4b75126643727f1c3f4d27966b
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# ce957268 27-Aug-2020 Matthew Barth <msbarth@us.ibm.com>

control: Pair profiles with name as key

Include the profiles of a configuration object in combination with its
name to construct a unique key for building the complete fan control
configuration. Thi

control: Pair profiles with name as key

Include the profiles of a configuration object in combination with its
name to construct a unique key for building the complete fan control
configuration. This is necessary for supporting the zones, groups, and
events configurations.

Tested:
Object name and list of profiles construct key
Profile objects always contain an empty list of profiles
Fan objects may or may not contain a list of profiles

Change-Id: I4be7229e3fb695d845d60159d0f08f601512c812
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 9167c4d5 24-Aug-2020 Matthew Barth <msbarth@us.ibm.com>

control: Complete profile configuration parsing

Profiles' have an active state that are determined by a given method
within the JSON configuration. Each method for determining a profile's
active sta

control: Complete profile configuration parsing

Profiles' have an active state that are determined by a given method
within the JSON configuration. Each method for determining a profile's
active state is mapped from its JSON configuration method name to the
handler function that is implemented to parse and return the profile's
active state based on the configuration. At this time, only an `all_of`
active state method is supported where all of the provided list of dbus
properties must match their given value for the profile to be active.

Tested:
Profile method parsed and active state set appropriately

Change-Id: I258ecabccb849b2fa2662a157d6cb108af2c9886
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 554ba472 18-Aug-2020 Matthew Barth <msbarth@us.ibm.com>

control: Base JSON configuration attribute class

Base class to be extended by each JSON configuration file parsing
classes. All JSON configuration attributes must have a name provided.
This name wil

control: Base JSON configuration attribute class

Base class to be extended by each JSON configuration file parsing
classes. All JSON configuration attributes must have a name provided.
This name will be used to index into a map of each configuration
attribute type to retrieve its corresponding configuration object.

Tested:
Name is retrieved from JSON object provided
Throws runtime exception when "name" is not found

Change-Id: I4a19887fffa05ca582422277469de9ec9b06fe92
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...