History log of /openbmc/bmcweb/features/redfish/lib/sensors.hpp (Results 51 – 75 of 191)
Revision Date Author Comments
# b2ba3072 12-May-2023 Patrick Williams <patrick@stwcx.xyz>

fix more push vs emplace calls

It seems like clang-tidy doesn't catch every place that an emplace could
be used instead of a push. Use a few grep/sed pairs to find and fix up
some common patterns.

fix more push vs emplace calls

It seems like clang-tidy doesn't catch every place that an emplace could
be used instead of a push. Use a few grep/sed pairs to find and fix up
some common patterns.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I93eaec26b8e3be240599e92b66cf54947073dc4c

show more ...


# 89492a15 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I75f89d2959b0f1338c20d72ad669fbdc1d720835
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# f7afb17b 27-Apr-2023 Alexander Hansen <alexander.hansen@9elements.com>

bugfix: find existing powersupply for power sensor

Fix lookup for existing powersupplies
when building json. (dbus: '_' , json: ' ')

Tested: manually with 2 Supermicro Power Supplies.

Change-Id: I

bugfix: find existing powersupply for power sensor

Fix lookup for existing powersupplies
when building json. (dbus: '_' , json: ' ')

Tested: manually with 2 Supermicro Power Supplies.

Change-Id: Iecd14c0b9860a12c64b004c99cb6a7fb1dd0328a
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...


# 6c3e9451 02-Mar-2023 George Liu <liuxiwei@inspur.com>

Refactor getAssociationEndPoints method

Since the getAssociationEndPoints method has been implemented in
dbus_utility and this commit is to integrate all the places where the
endpoints attribute is

Refactor getAssociationEndPoints method

Since the getAssociationEndPoints method has been implemented in
dbus_utility and this commit is to integrate all the places where the
endpoints attribute is obtained, and use the method in dbus_utility
uniformly.

Tested:
1. Redfish Validator Passed
2. For all the endpoints we changed, we got the same result as before

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I91a5e80de5bc3b5712c2d5b81f2f8b982d1c884e

show more ...


# 3e35c761 08-Mar-2023 George Liu <liuxiwei@inspur.com>

Fix `MemberId` value error causes Validator to fail

The test using the latest Redfish verifier found the following errors
```
1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/
Temperat

Fix `MemberId` value error causes Validator to fail

The test using the latest Redfish verifier found the following errors
```
1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/
Temperatures/0
1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/
Temperatures/1
1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/
Temperatures/2
1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/Fans/0
1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/Fans/1
1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/Fans/2
1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/Fans/3
1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/Fans/4
1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/Fans/5
1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/Fans/6
1 badMemberId errors in /redfish/v1/Chassis/chassis/Thermal#/Fans/7
1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/0
1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/1
1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/2
1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/3
1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/4
1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/5
1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/6
1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/7
1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/8
1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/Voltages/9
1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/
Voltages/10
1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/
Voltages/11
1 badMemberId errors in /redfish/v1/Chassis/chassis/Power#/
Voltages/12
```

Because the Redfish verifier checks whether the MemberId matches the
last part of the URL [1]
```
Added validation of the last segment of the URI to ensure it matches
the Id property or MemberId property where appropriate.
```

[1] https://github.com/DMTF/Redfish-Service-Validator/blob/master/CHANGELOG.md#224---2023-02-05

Tested: Validator passes
curl -k -H "X-Auth-Token: $token" -X GET
https://${bmc}/redfish/v1/Chassis/chassis/Thermal
{
"@odata.id": "/redfish/v1/Chassis/chassis/Thermal",
"@odata.type": "#Thermal.v1_4_0.Thermal",
"Fans": [
{
"@odata.id": "/redfish/v1/Chassis/chassis/Thermal#/Fans/0",
"@odata.type": "#Thermal.v1_3_0.Fan",
"MemberId": "0",
...
},
{
"@odata.id": "/redfish/v1/Chassis/chassis/Thermal#/Fans/1",
"@odata.type": "#Thermal.v1_3_0.Fan",
"MemberId": "1",
...
},
{
"@odata.id": "/redfish/v1/Chassis/chassis/Thermal#/Fans/2",
"@odata.type": "#Thermal.v1_3_0.Fan",
"MemberId": "2",
...
},
{
"@odata.id": "/redfish/v1/Chassis/chassis/Thermal#/Fans/3",
"@odata.type": "#Thermal.v1_3_0.Fan",
"MemberId": "3",
...
},
...

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I12151a2b20475071ea9b3ed3296754d56a0fed53

show more ...


# 5e7e2dc5 16-Feb-2023 Ed Tanous <edtanous@google.com>

Take boost error_code by reference

By convention, we should be following boost here, and passing error_code
by reference, not by value. This makes our code consistent, and removes
the need for a co

Take boost error_code by reference

By convention, we should be following boost here, and passing error_code
by reference, not by value. This makes our code consistent, and removes
the need for a copy in some cases.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Id42ea4a90b6685a84818b87d1506c11256b3b9ae

show more ...


# eddfc437 26-Sep-2022 Willy Tu <wltu@google.com>

Update most resources to use urlFromPieces

Only id in event_service and account_service have not been updated due
to the risk of it breaking the username/id. It will require further
testing to verif

Update most resources to use urlFromPieces

Only id in event_service and account_service have not been updated due
to the risk of it breaking the username/id. It will require further
testing to verify.

Use urlFromPieces wherever that is needed to insert a variable in the
URI. Don't use urlFromPieces when it is hardcoded values. This allow us
to control all resource URIs that is dynamically added and to sync with
the current recommanded method for `@odata.id`. The goal is to have a
common place to manage the url created from dbus-paths in order to
manage/update it easily when needed.

Tested:
RedfishValidtor Passed for all resource including the sensors with the
fragments.

Change-Id: I95cdfaaee58fc7f21c95f5944e1e5c813b3215f2
Signed-off-by: Willy Tu <wltu@google.com>
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...


# 50ebd4af 19-Jan-2023 Ed Tanous <edtanous@google.com>

Implement alternative to on boost::split

boost::split has a documented false-positive in clang-tidy. While
normally we'd handle this with NOLINTNEXTLINE, this doesn't appear to
work in all cases.

Implement alternative to on boost::split

boost::split has a documented false-positive in clang-tidy. While
normally we'd handle this with NOLINTNEXTLINE, this doesn't appear to
work in all cases. Unclear why, but seems to be due to some of our
lambda callback complexity.

Each of these uses is a case where we should be using a more specific
check, rather than split, but for the moment, this is the best we have.

Tested: clang-tidy passes.

[1] https://github.com/llvm/llvm-project/issues/40486

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I144c6610cb740287b7225e2be03b4142a64f9563

show more ...


# e99073f5 08-Dec-2022 George Liu <liuxiwei@inspur.com>

Refactor GetSubTree method

Since the GetSubTree method has been implemented in dbus_utility and
this commit is to integrate all the places where the GetSubTree
method is called, and use the method i

Refactor GetSubTree method

Since the GetSubTree method has been implemented in dbus_utility and
this commit is to integrate all the places where the GetSubTree
method is called, and use the method in dbus_utility uniformly.

Tested: Redfish Validator Passed

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: If3852b487d74e7cd8f123e0efffbd4affe92743c

show more ...


# 2b73119c 11-Jan-2023 George Liu <liuxiwei@inspur.com>

Add the GetObject method to dbus_utility

There are currently many files that use the GetObject method.
Since they are a general method, they are defined in the
dbus_utility.hpp file and refactors th

Add the GetObject method to dbus_utility

There are currently many files that use the GetObject method.
Since they are a general method, they are defined in the
dbus_utility.hpp file and refactors them.

Tested: Built bmcweb successfully and Validator passes.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: If2af77294389b023b611987252ee6149906fcd25

show more ...


# 3ccb3adb 13-Jan-2023 Ed Tanous <edtanous@google.com>

Fix a boatload of #includes

Most of these missing includes were found by running clang-tidy on all
files, including headers. The existing scripts just run clang-tidy on
source files, which doesn't

Fix a boatload of #includes

Most of these missing includes were found by running clang-tidy on all
files, including headers. The existing scripts just run clang-tidy on
source files, which doesn't catch most of these.

Tested: Code compiles

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ic741fbb2cc9e5e92955fd5a1b778a482830e80e8

show more ...


# cf9e417d 21-Dec-2022 Ed Tanous <edtanous@google.com>

Add check for globals

We don't follow this cpp core guidelines rule well. This is something
that we should aspire to cleaning up in the future, but for the moment,
lets turn the rule on in clang-ti

Add check for globals

We don't follow this cpp core guidelines rule well. This is something
that we should aspire to cleaning up in the future, but for the moment,
lets turn the rule on in clang-tidy to stop the bleeding, add ignores
for the things that we know need some better abstractions, and work on
these over time.

Most of this commit is just adding NOLINTNEXTLINE exceptions for all of
our globals. There was one case in the sensor code where clang
correctly noted that those globals weren't actually const, which got
missed because of the use of auto.

Tested: CI should be good enough for this. Passes clang-tidy.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ieda08fee69a3b209d4b3e9771809a6c41524f066

show more ...


# 7a1dbc48 07-Dec-2022 George Liu <liuxiwei@inspur.com>

Refactor GetSubTreePaths method

Since the GetSubTreePaths method has been implemented in dbus_utility
and this commit is to integrate all the places where the
GetSubTreePaths method is called, and u

Refactor GetSubTreePaths method

Since the GetSubTreePaths method has been implemented in dbus_utility
and this commit is to integrate all the places where the
GetSubTreePaths method is called, and use the method in dbus_utility
uniformly.

Requires https://gerrit.openbmc.org/c/openbmc/sdbusplus/+/60020 to
build.

Tested: Redfish Validator Passed

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ie4140d4484a7e4f4b943013f4371ffd2d44a22e9

show more ...


# c71d6125 29-Nov-2022 Ed Tanous <edtanous@google.com>

Fix sensor override

c1d019a6056a2a0ef50e577b3139ab5a8dc49355 Sensor Optimization

Recently changed the way Ids were calculated in the sensor subsystem.
Unfortunately, it wasn't clear to the author t

Fix sensor override

c1d019a6056a2a0ef50e577b3139ab5a8dc49355 Sensor Optimization

Recently changed the way Ids were calculated in the sensor subsystem.
Unfortunately, it wasn't clear to the author that this would effect the
sensor override system, which relies on matching up a member ID with a
dbus path, and was broken by this change.

This commit breaks out the code to calculate the type and name from a
given URI segment into a helper method.

Tested: Inspection only. Very few systems support this feature. Code appears more correct than previously, which is known broken, so the lack of testing here seems reasonable.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I9aa8099a947a36b5ce914bc07ae60f1ebf0d209b

show more ...


# f8fe53e7 30-Jun-2022 Ed Tanous <edtanous@google.com>

Change variable scopes

cppcheck correctly notes that a lot of our variables can be declared at
more specific scopes, and in every case, it seems to be correct.

Tested: Redfish service validator pas

Change variable scopes

cppcheck correctly notes that a lot of our variables can be declared at
more specific scopes, and in every case, it seems to be correct.

Tested: Redfish service validator passes. Unit test coverage on others.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ia4414410d0e8f74a3bd40fdc0e0232450d1a6416

show more ...


# f8bb0ff3 09-Dec-2022 Ed Tanous <edtanous@google.com>

Make inventory get inventory paths

A recent regression causes failures on Thermal and Power paths that have
to grab inventory items. This commit changes to search for the right
path.

Tested: Gunna

Make inventory get inventory paths

A recent regression causes failures on Thermal and Power paths that have
to grab inventory items. This commit changes to search for the right
path.

Tested: Gunnar tested on a Witherspoon. No longer see Internal Errors.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I0f7468ecf948f3cbfecb20c9ad470dced370ad3a
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 51c35a8f 13-Oct-2022 George Liu <liuxiwei@inspur.com>

Add Accuracy property to sensors

Base on Sensor.v1_2_0.json[1], add the Accuracy property to sensors.
At present, the D-Bus interface[2] has been exposed in the
phosphor-hwmon repo[3], and this func

Add Accuracy property to sensors

Base on Sensor.v1_2_0.json[1], add the Accuracy property to sensors.
At present, the D-Bus interface[2] has been exposed in the
phosphor-hwmon repo[3], and this function will be synchronized to the
dbus-sensor repo in the future.

[1]http://redfish.dmtf.org/schemas/v1/Sensor.v1_2_0.json
[2]https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/53569
[3]https://gerrit.openbmc.org/c/openbmc/phosphor-hwmon/+/57839

Tested: built bmcweb successfully and validator passes
get Accuracy:
curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/
Chassis/chassis/Sensors/temperature_inlet
{
"@odata.id": "/redfish/v1/Chassis/chassis/Sensors/temperature_inlet",
"@odata.type": "#Sensor.v1_2_0.Sensor",
"Accuracy": 5.0,
"Id": "Sensors_inlet",
"Name": "inlet",
...
}

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ie51356d810f63ba70c56ce702d6bbeb97e279530

show more ...


# d0090733 04-Oct-2022 Ed Tanous <edtanous@google.com>

Remove ObjectManager search code in sensors

Per [1], daemons implementing sensors are supposed to implement an
ObjectManager at /xyz/openbmc_project/sensors. Once this is made
consistent, there is

Remove ObjectManager search code in sensors

Per [1], daemons implementing sensors are supposed to implement an
ObjectManager at /xyz/openbmc_project/sensors. Once this is made
consistent, there is no need for this complex code to search for an
ObjectManager instance, when we can simply look it up.

This commit deletes the ObjectManager search code, which saves a Dbus
call for any sensor read done within thermal or sensor schemas.

This does have the negative of requiring that ObjectMapper implements
its ObjectManager on "/". Considering there is only one implementation
of ObjectMapper, this seems reasonable to hardcode.

Tested:
Redfish Service Validator passes.

'''
curl --insecure --user root:0penBmc https://192.168.10.156/redfish/v1/Chassis/Tyan_S7106_Baseboard/Thermal
'''

returns the sensors on an S7106 platform.

[1] https://github.com/openbmc/phosphor-dbus-interfaces/blob/991b2b8bdbc950f2a85aebfc29d1b34ea3264686/yaml/xyz/openbmc_project/Sensor/Value.interface.yaml#L18

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I69071848c685c33320d920d9faec16e5a1b563ca

show more ...


# 0ec8b83d 14-Mar-2022 Ed Tanous <edtanous@google.com>

Generate Redfish enums from schemas

OpenBMC tends to have a significant problem in doing the appropriate
lookups from the schema files, and many bugs have been injected by users
picking a bad enum,

Generate Redfish enums from schemas

OpenBMC tends to have a significant problem in doing the appropriate
lookups from the schema files, and many bugs have been injected by users
picking a bad enum, or mistyping the casing of an enum value.

At the same time, nlohmann::json has recently added first class support
for enums, https://json.nlohmann.me/features/enum_conversion/

This commit attempts to build a set of redfish includes file with all
the available Redfish enums in an easy to use enum class. This makes it
very clear which enums are supported by the schemas we produce, and adds
very little to no extra boilerplate on the human-written code we
produced previously.

Note, in the generated enum class, because of our use of the clang-tidy
check for macros, the clang-tidy check needs an exception for these
macros that don't technically follow the coding standard. This seems
like a reasonable compromise, and in this case, given that nlohmann
doesn't support a non-macro version of this.

One question that arises is what this does to the binary size.... Under
the current compiler optimizations, and with the current best practices,
it leads to an overall increase in binary size of ~1200 bytes for the
enum machinery, then approximately 200 bytes for every call site we
switch over. We should decide if this nominal increase is reasonable.

Tested: Redfish protocol validator runs with same number of failures as
previously.
Redfish Service Validator passes (one unrelated qemu-specific exception)

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I7c7ee4db0823f7c57ecaa59620b280b53a46e2c1

show more ...


# 40e4f380 09-Aug-2022 Ed Tanous <edtanous@google.com>

Remove support for scaling parameter sensors

Scaling parameters on integer value sensors were removed from
phosphor-dbus-interfaces a long time ago[1] in lieu of double
parameters. It has been seve

Remove support for scaling parameter sensors

Scaling parameters on integer value sensors were removed from
phosphor-dbus-interfaces a long time ago[1] in lieu of double
parameters. It has been several years since that change, and to the
projects knowlege, all sensor daemons either never produced an int64
type, or have since been converted to producing double.

Bmcweb kept compatibility for some time during the transition, but these
days it is just unused code. Remove it.

Tested: Redfish-service-validator passes.

[1] https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/11739

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ie64b093f7b787c169613bb0ff2d9f96fba8dda1a

show more ...


# 677bb756 15-Sep-2022 Ed Tanous <edtanous@google.com>

Fix regression on expand handling

It was found that as part of
c1d019a6056a2a0ef50e577b3139ab5a8dc49355 Sensor optimization

We missed updating the odata.id for the expand case. This wasn't really

Fix regression on expand handling

It was found that as part of
c1d019a6056a2a0ef50e577b3139ab5a8dc49355 Sensor optimization

We missed updating the odata.id for the expand case. This wasn't really
found because most clients either use expand, or they don't, and
depending on which path you take, both paths are valid. With that said,
we should be following the spec here, and returning the same result
regardless of whether we're being processed as expand or not.

This patchset is a little rough, and probably should be iterated on.

TODO (at a later date). Try to get a tool that can detect these
failures.

Tested: Tested by @Carson to resolve the regression.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ieed7796895a3c5937fd901d5afa7dd4ea0693099

show more ...


# c1343bf6 31-Aug-2022 Krzysztof Grobelny <krzysztof.grobelny@intel.com>

used sdbusplus::unpackPropertiesNoThrow part 6

used sdbusplus::unpackPropertiesNoThrow in openbmc_dbus_rest.hpp,
memory.hpp and sensors.hpp, also replaced all usages of "GetAll" with
sdbusplus::asio

used sdbusplus::unpackPropertiesNoThrow part 6

used sdbusplus::unpackPropertiesNoThrow in openbmc_dbus_rest.hpp,
memory.hpp and sensors.hpp, also replaced all usages of "GetAll" with
sdbusplus::asio::getAllProperties

bmcweb size: 2697624 -> 2697624 (0)
compressed size: 1129645 -> 1130037 (+392)

Tested:
Performed get on:
- /redfish/v1/Systems/system/Memory/dimm0

Performed get one of the members of:
- /redfish/v1/Chassis/chassis/Sensors

Get result before and after the change was in same format.

Change-Id: I05efcedfd905ea2c8d1d663e909cb59ebc2cf2b7
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>

show more ...


# c1d019a6 06-Aug-2022 Ed Tanous <edtanous@google.com>

Sensor optimization

SensorsAsyncResp has existed for a long time, and has slowly morphed
from its intended usage (as an RAII response object) into a
conglomeration of all possible things that a sens

Sensor optimization

SensorsAsyncResp has existed for a long time, and has slowly morphed
from its intended usage (as an RAII response object) into a
conglomeration of all possible things that a sensor request could want.
This leads to a ton of inefficient queries, and lots of data being held
for much longer than we'd like.

This commit tries to start breaking things apart, and follow the
patterns we use elsewhere, passing AsyncResp where a response object is
needed, and passing specialized data structures only into the scopes
where they're needed. This significantly increases the performance of
the /redfish/v1/Chassis/<>/Sensors/<sensor> URI.

The optimization changes the URI such that in includes both the sensor
type as well as the sensor name in the URI, meaning that from a given
tree, we can directly look up the sensor path, instead of having to look
up all sensor paths, and do a filename() compare on them.

Implementation-wise, there is one main difference in user-facing
behavior, in that instead of using a mechanized version of the sensor
name for the URI (aka /redfish/v1/Chassis/my_chassis/Sensors/my_sensor)
the URI now contains the sensor type (ex
/redfish/v1/Chassis/my_chassis/Sensors/temperature_my_sensor). One
implementation note: because fan_pwm and fan_tach namespaces have an
underscore in them, we normalize these in the URI to fanpwm and fantach
respectively such that we can differentiate between the two without
looping, and special case them on the other side. This seems like a
reasonable compromise.

The above means that when a request comes in to query the sensor, we no
longer have to pull all sensors to identify the one that matches the
name, and we can go directly to the mapper to determine which sensor we
need, with a GetObject query. This significantly reduces the amount of
time to grab the information from a single sensor.

To accomplish this, the per-sensor methods needed broken down into
pieces that allowed loading a single sensor at a time, rather than a
complete GetManagedObjects call. In practice, this just means breaking
out one helper function, such that the new code can directly call
GetAll.

In a few places, const std::string& had to be replaced with
std::string_view, because the new sensor API can directly inline its
const char* parameters for types, which allows it to avoid constructing
a string copy to do it.

Tested:
Redfish service validator passes on a S7106 system, and shows a timing
of ~40-50ms per sensor request, which is in line with what we'd expect
for a keepalive function using Session auth.

'''
curl --insecure -w "@curl-format.txt" -H "X-Auth-Token: nOIarWLRFkFN14qVONs0" https://192.168.10.140/redfish/v1/Chassis/Tyan_S7106_Baseboard/Sensors/temperature_sys_air_inlet
'''

returns timing that is on the order of 125ms. On this setup,
ServiceRoot (which should do no dbus calls) returns in 90ms, so the
sensor implementation itself is on the order of 40% of the timing.

TelemetryService functions as expected
'''
curl -k --user "root:0penBmc" -X POST https://$bmc/redfish/v1/TelemetryService/MetricReportDefinitions/ -d '{"Id": "lxw1", "Metrics": [{"MetricId": "123", "MetricProperties": ["/redfish/v1/Chassis/Tyan_S7106_Baseboard/Power#/Voltages/0"]}], "MetricReportDefinitionType": "OnRequest", "ReportActions": ["LogToMetricReportsCollection"], "Schedule": {"RecurrenceInterval": "100"}}'
'''

Succeeds.

Also succeeds with MetricProperties set to:
/redfish/v1/Chassis/Tyan_S7106_Baseboard/Sensors/voltage_vcc5

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: If42f531b385c3b611b100c1c485a1e4e877c5512

show more ...


# 7f1cc26d 09-Aug-2022 Ed Tanous <edtanous@google.com>

Refactor functions in sensors

Refactor more functions out of sensors such that they don't require the
use of SensorAsyncResp in all cases. This is to prepare for
implementations that might not rely

Refactor functions in sensors

Refactor more functions out of sensors such that they don't require the
use of SensorAsyncResp in all cases. This is to prepare for
implementations that might not rely on SensorAsyncResp at all.

Tested:
Tested at end of series. Merge together.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ie359f449c0f7ace57a09c0db0c4f1b347b5d5030

show more ...


# 1d7c0054 09-Aug-2022 Ed Tanous <edtanous@google.com>

Refactor sensor code

Refactor some methods of the sensor code to not rely directly on
SensorAsyncResponse, or to require an ObjectManager response. This is
done to allow later patches to implement

Refactor sensor code

Refactor some methods of the sensor code to not rely directly on
SensorAsyncResponse, or to require an ObjectManager response. This is
done to allow later patches to implement individual sensor collection
using GetAll instead of GetManagedObjects for a single sensor

This is done by making the underlying implementations rely on the
properties alone, as we do in other locations.

Behavior should not change with this patchset.

Tested:
Testing in later patch that behavior is the same. Merge at the same
time

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I77838ee14c14dcc9d2bc50375b2a5b0ffbc4573c

show more ...


12345678