#
1a555607 |
| 08-Dec-2022 |
Matt Spinler <spinler@us.ibm.com> |
control: mapped_floor: Add conditions
Add the concept of a condition to the mapped_floor action such that it will only run if the condition is met. If the condition isn't met, the run() function wi
control: mapped_floor: Add conditions
Add the concept of a condition to the mapped_floor action such that it will only run if the condition is met. If the condition isn't met, the run() function will just exit immediately.
A condition is created by placing the following in the JSON:
* condition_group - The name of the group that has the property the condition will use. For now, it must be a single member group. * condition_value - The value the property has to be to meet the condition. * condition_op - Either 'equal' or 'not_equal', where the property has to either be equal to or not equal to the condition value.
For example, the following says the single member of the 'cpu 0' group must have its Model property be equal to "1234" for the action to run:
{ "groups": [{ "name": "cpu 0", "interface": "xyz.openbmc_project.Inventory.Decorator.Asset", "property": { "name": "Model" } } ... ], ... "name": "mapped_floor", "key_group": "ambient temp", "condition_group": "cpu 0", "condition_value": "1234", "condition_op": "equal", ... }
If a condition is present but isn't met, the action will remove its floor hold if it has one to support the case of the condition property changing values.
Change-Id: I3ede20efd334e2c5292a441c089534420959c7bc Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
#
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 ...
|
#
76ef2013 |
| 03-Feb-2022 |
Matt Spinler <spinler@us.ibm.com> |
control: mapped_floor: Add default floors
Add support for two optional default floor values in the mapped floor action. The first is action wide, and the second is key value wide. These would be ch
control: mapped_floor: Add default floors
Add support for two optional default floor values in the mapped floor action. The first is action wide, and the second is key value wide. These would be chosen in certain situations when a normal floor can't be calculated.
Default floor at action level: { "name": "mapped_floor", "key_group": "ambient_temp", "default_floor": 2000, <--- ... }
Default floor at key value level: { "key": 27, "default_floor": 3000, <--- "floors": [ ... ] }
The key level default floor would be selected when no other floor value could be found within that that key's tables.
The action level default floor would be used when a key table couldn't be found based on the actual key value, or when a key level default floor would have been used but it wasn't supplied.
The default floor from the zone will be used when no other default floor is provided at the key level or action level.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I740220a97477e9a4fb16cdc54c91f86c99c8b461
show more ...
|
#
a17d5cc0 |
| 02-Feb-2022 |
Matt Spinler <spinler@us.ibm.com> |
control: mapped_floor: Support floor offset param
Add support to the mapped floor action to read the name of an optional floor offset parameter from the JSON. If it's there, then any time a floor i
control: mapped_floor: Support floor offset param
Add support to the mapped floor action to read the name of an optional floor offset parameter from the JSON. If it's there, then any time a floor is calculated it will add that offset to the floor value before setting it. This is added at the level of the key value, so that particular offset is only applied to floors found in that section.
For example, if "key": 27, "floor_offset_parameter": "floor_altitude_offset", ...
is in the JSON config, it will add whatever value is in the floor_altitude_offset parameter to the floor value it calculates when that key value is valid.
This allows one to do something like set an floor offset based on the current altitude.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I39ab6287a6948058981aed1cdbae5e91aade80d9
show more ...
|
#
c981bb5b |
| 21-Sep-2021 |
Matt Spinler <spinler@us.ibm.com> |
control: Mapped floor action can use parameters
Previously, the mapped floor action could only set floor values based on group property values. This commit adds support to be able to use a manager
control: Mapped floor action can use parameters
Previously, the mapped floor action could only set floor values based on group property values. This commit adds support to be able to use a manager parameter instead of a floor value.
For example:
"floors": [ { "parameter": "pcie_floor_index", "floors": [ { "value": 1, "floor": 2000 } ... } ...
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I874fa0f0c6b9befd74a095c31b893c5435b08abe
show more ...
|
#
848799f9 |
| 01-Jul-2021 |
Matt Spinler <spinler@us.ibm.com> |
control: Create MappedFloor action
This action can be used to set a floor value based on 2 or more groups having values within certain ranges, where the key group chooses the set of tables in which
control: Create MappedFloor action
This action can be used to set a floor value based on 2 or more groups having values within certain ranges, where the key group chooses the set of tables in which to check the remaining group values.
For example, with the following JSON:
{ "name": "mapped_floor", "key_group": "ambient_temp", "fan_floors": [ { "key": 27, "floors": [ { "group": "altitude", "floors": [ { "value": 5000, "floor": 2000 }, { "value": 7000, "floor": 6000 } ] }, { "group": "power_mode", "floors": [ { "value": "PowerSave", "floor": 3000 }, { "value": "MaximumPerformance", "floor": 5000 } ] } ] } ] }
If the ambient_temp group has a value less than 27, then it looks up the values for the altitude and power_mode groups, where for altitude, since it's numeric, it will use a <= operator, and for power_mode, since it's a string, it will use an == operator when comparing to the values in the JSON. It will then choose the largest floor value between the altitude and power_mode results.
There are several scenarios that result in a default floor being set.
Full action documentation is in the class header file.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I8e0ff3a97ff73dd20018473c1993b2e043276099
show more ...
|