History log of /openbmc/bmcweb/features/redfish/lib/sensors.hpp (Results 126 – 150 of 191)
Revision Date Author Comments
# c2bf7f99 08-Mar-2021 Wludzik, Jozef <jozef.wludzik@intel.com>

Sync ReadingUnit with Redfish Sensor Schema

Actual attribute "ReadingUnits" does not match with Redfish Sensor
Schema. This change match "ReadingUnits" with Redfish Sensor Scheme
1.0.0 and add missi

Sync ReadingUnit with Redfish Sensor Schema

Actual attribute "ReadingUnits" does not match with Redfish Sensor
Schema. This change match "ReadingUnits" with Redfish Sensor Scheme
1.0.0 and add missing "ReadingType" attribute. This change affect all
users that depends on old units that does not match with Redfish
standard. Added toReadingType and toReadingUnit function that uses
values taken from Redfish Sensor Scheme 1.0.0. Latest version 1.2.0 of
Sensor scheme defines same units.

Changed value stored in ReadingUnits for Sensor resource:
- "Watts" -> "W"
- "Amperes" -> "A"
- "Percent" -> "%"

Tested:
- RedfishServiceValidator pass
- Verified that Sensors contain proper ReadingUnits
- Webui-Vue displays ReadingUnits properly in Health tab

Change-Id: I0c8820eba7271022c427cd25dec321db36aa0176
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>

show more ...


# b00dcc27 23-Feb-2021 Ed Tanous <edtanous@google.com>

Fix the build on clang-11

Clang tidy 11 got some really neat checks that do a much better job.
Unfortunately, this, combined with the change in how std::executors has
defined how callbacks should wo

Fix the build on clang-11

Clang tidy 11 got some really neat checks that do a much better job.
Unfortunately, this, combined with the change in how std::executors has
defined how callbacks should work differently in the past, which we
picked up in 1.73, and now in theory we have recursion in a bunch of our
IO loops that we have to break manually. In practice, this is unlikely
to matter, as there's almost a 0% chance that we go through N thousand
requests without ever starving the IO buffer.

Other changes to make this build include:
1. Adding inline on the appropriate places where declared in a header.
2. Removing an Openssl call that did nothing, as the result was
immediately overwritten.
3. Declaring the subproject dependencies as system dependencies, which
silences the clang-tidy checks for those projects.

Tested:
Code builds again, clang-tidy passes

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

show more ...


# 738c1e61 22-Feb-2021 Patrick Williams <patrick@stwcx.xyz>

clang-format-11: reformat

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


# 28aa8de5 01-Feb-2021 George Liu <liuxiwei@inspur.com>

Replace rfind method in sensors.hpp

Remove the rfind method and use the filename method of
sdbusplus::message::Object_path.

Tested: Built successfully and validator passes.

Signed-off-by: George L

Replace rfind method in sensors.hpp

Remove the rfind method and use the filename method of
sdbusplus::message::Object_path.

Tested: Built successfully and validator passes.

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

show more ...


# 81ce609e 17-Dec-2020 Ed Tanous <ed@tanous.net>

Fix .clang-tidy

camelLower is not a type, camelBack is.

Changes were made automatically with clang-tidy --fix-errors

To be able to apply changes automatically, the only way I've found that
works w

Fix .clang-tidy

camelLower is not a type, camelBack is.

Changes were made automatically with clang-tidy --fix-errors

To be able to apply changes automatically, the only way I've found that
works was to build the version of clang/clang-tidy that yocto has, and
run the fix script within bitbake -c devshell bmcweb. Unfortunately,
yocto has clang-tidy 11, which can apparently find a couple extra errors
in tests we already had enabled. As such, a couple of those are also
included.

Tested:
Ran clang-tidy-11 and got a clean result.

Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I9d1080b67f0342229c2f267160849445c065ca51

show more ...


# f23b7296 15-Oct-2020 Ed Tanous <ed@tanous.net>

Turn on ALL perf checks

1st, alphabetize the tidy-list for good housekeeping.

Next, enable all the clang-tidy performance checks, and resolve all the
issues. most of the issues boil down to:
1. Us

Turn on ALL perf checks

1st, alphabetize the tidy-list for good housekeeping.

Next, enable all the clang-tidy performance checks, and resolve all the
issues. most of the issues boil down to:
1. Using std::move on const variables. This does nothing.
2. Passing big variables (like std::string) by value.
3. Using double quotes on a find call, which constructs an intermediate
string, rather than using the character overload.

Tested
Loaded on system, logged in successfully and pulled down webui-vue. No
new errors.

Walked the Redfish tree a bit, and observed no new problems.

Ran redfish service validator. Got no new failures (although there are
a lot of log service deprecation warnings that we should look at).

Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I2238958c4b22c1e554e09a0a1787c744bdbca43e

show more ...


# b5a76932 29-Sep-2020 Ed Tanous <ed@tanous.net>

Lots of performance improvements

(In the voice of the kid from sixth sense) I see string copies...

Apparently there are a lot of places we make unnecessary copies. This
fixes all of them.

Not sure

Lots of performance improvements

(In the voice of the kid from sixth sense) I see string copies...

Apparently there are a lot of places we make unnecessary copies. This
fixes all of them.

Not sure how to split this up into smaller patches, or if it even needs
split up. It seems pretty easy to review to me, because basically every
diff is identical.

Change-Id: I22b4ae4f96f7e4082d2bc701098a04f7bed95369
Signed-off-by: Ed Tanous <ed@tanous.net>
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>

show more ...


# 3174e4df 07-Oct-2020 Ed Tanous <ed@tanous.net>

Write the clang-tidy file OpenBMC needs

Now that CI can handle clang-tidy, and a lot of the individual fixes
have landed for the various static analysis checks, lets see how close
we are.

This incl

Write the clang-tidy file OpenBMC needs

Now that CI can handle clang-tidy, and a lot of the individual fixes
have landed for the various static analysis checks, lets see how close
we are.

This includes bringing a bunch of the code up to par with the checks
that require. Most of them fall into the category of extraneous else
statements, const correctness problems, or extra copies.

Tested:
CI only. Unit tests pass.

Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I9fbd346560a75fdd3901fa40c57932486275e912

show more ...


# cb13a392 25-Jul-2020 Ed Tanous <ed@tanous.net>

Enable unused variable warnings and resolve

This commit enables the "unused variables" warning in clang. Throughout
this, it did point out several issues that would've been functional
bugs, so I th

Enable unused variable warnings and resolve

This commit enables the "unused variables" warning in clang. Throughout
this, it did point out several issues that would've been functional
bugs, so I think it was worthwhile. It also cleaned up several unused
variable from old constructs that no longer exist.

Tested:
Built with clang. Code no longer emits warnings.

Downloaded bmcweb to system and pulled up the webui, observed webui
loads and logs in properly.

Change-Id: I51505f4222cc147d6f2b87b14d7e2ac4a74cafa8
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...


# 23a21a1c 24-Jul-2020 Ed Tanous <ed@tanous.net>

Enable clang warnings

This commit enables clang warnings, and fixes all warnings that were
found. Most of these fall into a couple categories:

Variable shadow issues were fixed by renaming variabl

Enable clang warnings

This commit enables clang warnings, and fixes all warnings that were
found. Most of these fall into a couple categories:

Variable shadow issues were fixed by renaming variables

unused parameter warnings were resolved by either checking error codes
that had been ignored, or removing the name of the variable from the
scope.

Other various warnings were fixed in the best way I was able to come up
with.

Note, the redfish Node class is especially insidious, as it causes all
imlementers to have variables for parameters, regardless of whether or
not they are used. Deprecating the Node class is on my list of things
to do, as it adds extra overhead, and in general isn't a useful
abstraction. For now, I have simply fixed all the handlers.

Tested:
Added the current meta-clang meta layer into bblayers.conf, and added
TOOLCHAIN_pn-bmcweb = "clang" to my local.conf

Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: Ia75b94010359170159c703e535d1c1af182fe700

show more ...


# 52cc112d 18-Jul-2020 Ed Tanous <ed@tanous.net>

Remove middlewares

Middlewares, while kinda cool from an academic standpoint, make our
build times even worse than they already are. Given that we only really
use 1 real middleware today (token aut

Remove middlewares

Middlewares, while kinda cool from an academic standpoint, make our
build times even worse than they already are. Given that we only really
use 1 real middleware today (token auth) and it needs to move into the
parser mode anyway (for security limiting buffer sizes), we might as well
use this as an opportunity to delete some code.

Some other things that happen:
1. Persistent data now moves out of the crow namespace
2. App is no longer a template
3. All request_routes implementations no longer become templates. This
should be a decent (unmeasured) win on compile times.

This commit was part of a commit previously called "various cleanups".
This separates ONLY the middleware deletion part of that.

Note, this also deletes about 400 lines of hard to understand code.

Change-Id: I4c19e25491a153a2aa2e4ef46fc797bcb5b3581a
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...


# 3e9e72eb 06-Jul-2020 Kuiying Wang <kuiying.wang@intel.com>

Fix -1 issue when fan collection size is 0.

When fan collection size is 0, the MinNumNeeded shown -1
(4294967295/0xffffffff) but not 0.

"Redundancy": [
{
"@odata.id": "/redf

Fix -1 issue when fan collection size is 0.

When fan collection size is 0, the MinNumNeeded shown -1
(4294967295/0xffffffff) but not 0.

"Redundancy": [
{
"@odata.id": "/redfish/v1/Chassis/WC_Baseboard/Thermal#/Redundancy/0",
"@odata.type": "#Redundancy.v1_3_2.Redundancy",
"MemberId": "Tach",
"MinNumNeeded": 4294967295,
"Mode": "N+m",
"Name": "Tach",
"RedundancySet": [],
"Status": {
"Health": "OK",
"State": "Enabled"
}
}

Tested:
"MinNumNeeded" is 0 correctly.
https://bmc_ip/redfish/v1/Chassis/WC_Baseboard/Thermal
"Redundancy": [
{
"@odata.id": "/redfish/v1/Chassis/WC_Baseboard/Thermal#/Redundancy/0",
"@odata.type": "#Redundancy.v1_3_2.Redundancy",
"MemberId": "Tach",
"MinNumNeeded": 0,
"Mode": "N+m",
"Name": "Tach",
"RedundancySet": [],
"Status": {
"Health": "OK",
"State": "Enabled"
}
}

Change-Id: I8bf01dacd705e5309c161c5f04289d2df45ca583
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>

show more ...


# a0ec28b6 10-Apr-2020 Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>

Enable retrieving mapping of Redfish URI to D-Bus sensor path

Background:
Change is necessary to support TelemetryService implementation.
TelemetryService specifies its own resource type for data -

Enable retrieving mapping of Redfish URI to D-Bus sensor path

Background:
Change is necessary to support TelemetryService implementation.
TelemetryService specifies its own resource type for data - MetricDefinition.
In principle - MetricDefinition might point to Redfish Sensor in the system.
Each MetricDefinition requires MetricProperty - URI to specific property in
resource wih the value. This change allows retrieving such data alongside
corresponding D-Bus sensor to be used as source of Metrics value.

This change:
Function was implemented to allow retrieving mapping of Redfish URI paths
to D-Bus sensors in the system. Some minor refactoring in regards to
SensorsAsyncResponse were also introduced to enhance code locality. Idea for the
changes was to be the least intrusive if possible, as retrieving sensors in the
system requires lots of processing.

Existing logic was used and left intact. Utilizing existing logic required to
'fake' a HTTP request to traverse the sensors in the system and build the
response. It's crucial to use exact logic of building Redfish nodes
representation, as goal of the function is to retrieve exact Redfish URI for
sensor value.

Extra parameter was introduced to SensorsAsyncResp - callback to be called when
sensor data will be fully determined. After processing is complete caller is
notified with the outcome (success or failure) and map<URI:D-Bus sensor>.

Testing:
- all positive cases (3 chassis, 3 subnodes) in the system,
one of obtained mappings looked like the following:
{ /redfish/v1/Chassis/WP_Baseboard/Power#/Voltages/3/ReadingVolts :
/xyz/openbmc_project/sensors/voltage/P1V8_PCH }
- negative cases (wrong chassis, wrong subnode) - callback with error status
was called
- RedfishServiceValidator passed

Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>
Change-Id: I4389eb3df275126974168d1bb9af33dbf5cdb5b7

show more ...


# 1214b7e7 04-Jun-2020 Gunnar Mills <gmills@us.ibm.com>

clang-format: update to latest from docs repo

This is from openbmc/docs/style/cpp/.clang-format

Other OpenBMC repos are doing the same.

Tested: Built and validator passed.
Change-Id: Ief26c755c9ce

clang-format: update to latest from docs repo

This is from openbmc/docs/style/cpp/.clang-format

Other OpenBMC repos are doing the same.

Tested: Built and validator passed.
Change-Id: Ief26c755c9ce012823e16a506342b0547a53517a
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# f8ede15e 02-Jun-2020 Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>

Add 'utilization' sensor to 'Sensors' page

Recent change to xyz.openbmc_project.Sensor.Value interface has
introduced new type of sensor - 'utilization'.

This change makes bmcweb able to expose thi

Add 'utilization' sensor to 'Sensors' page

Recent change to xyz.openbmc_project.Sensor.Value interface has
introduced new type of sensor - 'utilization'.

This change makes bmcweb able to expose this kind of sensors in Sensors
schema under /Chassis/{}/Sensors.

Testing:
- implemented simple mocked sensor and verified that:
-- sensor appears in /Chassis/{}/Sensors
-- sensor values are properly shown in /Chassis/{}/Sensors/{}
-- 'ReadingUnits' is shown in /Chassis/{}/Sensors/{}
- RedfishServiceValidator passed

Change-Id: I9e4dc0b9db049a9815e79a0a64df60f275eeb822
Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>

show more ...


# 19bd78d9 13-May-2020 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: replace message::variant with std::variant

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


# f99c379d 14-Apr-2020 Gunnar Mills <gmills@us.ibm.com>

SensorCollection: Allow slash at end

Before:
curl -k https://${bmc}/redfish/v1/Chassis/chassis/Sensors/
Not Found

After both /Sensors/ and /Sensors return the SensorCollection.

This follows the pa

SensorCollection: Allow slash at end

Before:
curl -k https://${bmc}/redfish/v1/Chassis/chassis/Sensors/
Not Found

After both /Sensors/ and /Sensors return the SensorCollection.

This follows the pattern in other bmcweb redfish resources and
the redfish protocol.

Tested:
Ran the validator.

curl -k https://${bmc}/redfish/v1/Chassis/chassis/Sensors/
{
"@odata.id": "/redfish/v1/Chassis/chassis/Sensors",
"@odata.type": "#SensorCollection.SensorCollection",
"Description": "Collection of Sensors for this Chassis",
"Members": [
{

Change-Id: Id6ae5b62470c4155e7e17328037b6b2dbe2ab57e
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 91e130a3 04-Mar-2020 jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>

Allow unrestricted sensor override through flag

Allow overriding sensor values without any restriction based on
BMCWEB_INSECURE_UNRESTRICTED_SENSOR_OVERRIDE flag

Tested:
1. Redfish validator - pass

Allow unrestricted sensor override through flag

Allow overriding sensor values without any restriction based on
BMCWEB_INSECURE_UNRESTRICTED_SENSOR_OVERRIDE flag

Tested:
1. Redfish validator - passed for this new change
2. Verified for BMCWEB_ENABLE_VALIDATION_UNSECURE_FEATURE is OFF and
BMCWEB_INSECURE_UNRESTRICTED_SENSOR_OVERRIDE is ON
Case 1:
1. Enable manufacturing mode by pressing power button while bmc booting
2. Patch sensor values from Redfish.
Redfish URI:
PATCH https://<BMC-IP>/redfish/v1/Chassis/WC_Baseboard/Thermal
Body:
{
"Temperatures": [
{
"MemberId": "SSB_Temp",
"ReadingCelsius":112
}
]
}

Response:
{
"@odata.id": "/redfish/v1/Chassis/WC_Baseboard/Thermal",
"@odata.type": "#Thermal.v1_4_0.Thermal",
"Fans": [],
"Id": "Thermal",
"Name": "Thermal",
"Temperatures": []
}

3. Sensor value Overridden successfully

Case 2: Verified for ValidationUnsecure mode.
Case 3: Tested without SpecialMode mode
1. Stop the specialmodemgr.service service
2. Patch sensor values from Redfish.
3. Sensor value Overridden successfully

Case 4:
1. Disable manufacturing mode
Command: ipmitool raw 0x30 0xB4 3 0
Response: //Success
2. Patch sensor values from Redfish.
3. Sensor value Overridden successfully

Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: I0557cc88d2aceebade4b78e4478e17feecb6e088

show more ...


# 397fd61f 06-Feb-2020 jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>

Remove unused variables for setSensorsOverride

Remove unused variables for setSensorsOverride and
checkAndDoSensorsOverride methods

Tested:
1. Redfish validator - passed for this new change

Case 1

Remove unused variables for setSensorsOverride

Remove unused variables for setSensorsOverride and
checkAndDoSensorsOverride methods

Tested:
1. Redfish validator - passed for this new change

Case 1:
1. Enable manufacturing mode by pressing power button while bmc booting
2. Patch sensor values from Redfish.
Redfish URI:
PATCH https://<BMC-IP>/redfish/v1/Chassis/WC_Baseboard/Thermal
Body:
{
"Temperatures": [
{
"MemberId": "SSB_Temp",
"ReadingCelsius":112
}
]
}

Response:
{
"@odata.id": "/redfish/v1/Chassis/WC_Baseboard/Thermal",
"@odata.type": "#Thermal.v1_4_0.Thermal",
"Fans": [],
"Id": "Thermal",
"Name": "Thermal",
"Temperatures": []
}

3. Sensor value Overridden successfully

Case 2: Varified for ValidationUnsecure mode.
Case 3: Tested without SpecialMode mode
1. Stop the specialmodemgr.service service
2. Patch sensor values from Redfish.
3. Sensor value Overridden successfully

Case 4:
1. Disable manufacturing mode
Command: ipmitool raw 0x30 0xB4 3 0
Response: //Success
2. Patch sensor values from Redfish.
Redfish URI:
PATCH https://<BMC-IP>/redfish/v1/Chassis/WC_Baseboard/Thermal
Body:
{
"Temperatures": [
{
"MemberId": "SSB_Temp",
"ReadingCelsius":112
}
]
}

3. Returning proper error.
Response :
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
"Message": "The action Overriding of Sensor Value for
non manufacturing mode is not supported by the resource.",
"MessageArgs": [
"Overriding of Sensor Value for non manufacturing mode"
],
"MessageId": "Base.1.4.0.ActionNotSupported",
"Resolution": "The action supplied cannot be resubmitted to
the implementation. Perhaps the action was invalid, the
wrong resource was the target or the implementation
documentation may be of assistance.",
"Severity": "Critical"
}
],
"code": "Base.1.4.0.ActionNotSupported",
"message": "The action Overriding of Sensor Value for
non manufacturing mode is not supported by the resource."
}
}

Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: I0598f1ff16a391864cd1371e514fb8da1797d8d5

show more ...


# 70d1d0aa 21-Jan-2020 jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>

Allow sensor value override in mfg mode only

Issue: User is able to override sensor value even though system is not
in manufacturing mode

Fix: Code changes are done to patch sensor values when syst

Allow sensor value override in mfg mode only

Issue: User is able to override sensor value even though system is not
in manufacturing mode

Fix: Code changes are done to patch sensor values when system is only
in manufacturing Mode.

Tested:
1. Redfish validator - passed for this new change

Case 1:
1. Enable manufacturing mode by pressing power button while bmc booting
2. Patch sensor values from Redfish.
Redfish URI:
PATCH https://<BMC-IP>/redfish/v1/Chassis/WC_Baseboard/Thermal
Body:
{
"Temperatures": [
{
"MemberId": "SSB_Temp",
"ReadingCelsius":112
}
]
}

Response:
{
"@odata.id": "/redfish/v1/Chassis/WC_Baseboard/Thermal",
"@odata.type": "#Thermal.v1_4_0.Thermal",
"Fans": [],
"Id": "Thermal",
"Name": "Thermal",
"Temperatures": []
}

3. Sensor value Overridden successfully

Case 2: Varified for ValidationUnsecure mode.
Case 3: Tested without SpecialMode mode
1. Stop the specialmodemgr.service service
2. Patch sensor values from Redfish.
3. Sensor value Overridden successfully

Case 4:
1. Disable manufacturing mode
Command: ipmitool raw 0x30 0xB4 3 0
Response: //Success
2. Patch sensor values from Redfish.
Redfish URI:
PATCH https://<BMC-IP>/redfish/v1/Chassis/WC_Baseboard/Thermal
Body:
{
"Temperatures": [
{
"MemberId": "SSB_Temp",
"ReadingCelsius":112
}
]
}

3. Returning proper error.
Response :
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
"Message": "The action Overriding of Sensor Value for
non manufacturing mode is not supported by the resource.",
"MessageArgs": [
"Overriding of Sensor Value for non manufacturing mode"
],
"MessageId": "Base.1.4.0.ActionNotSupported",
"Resolution": "The action supplied cannot be resubmitted to
the implementation. Perhaps the action was invalid, the
wrong resource was the target or the implementation
documentation may be of assistance.",
"Severity": "Critical"
}
],
"code": "Base.1.4.0.ActionNotSupported",
"message": "The action Overriding of Sensor Value for
non manufacturing mode is not supported by the resource."
}
}

Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: I34cd53fba939fb367310c531a050792ef749dd70

show more ...


# 3463ce46 19-Feb-2020 Gunnar Mills <gmills@us.ibm.com>

Sensors: Remove odata.context

Redfish made odata.context optional (1.6.0 of DSP0266, Sept 2018).
Redfish has removed odata.context from example payloads in the
specification (1.7.0 of DSP0266), remo

Sensors: Remove odata.context

Redfish made odata.context optional (1.6.0 of DSP0266, Sept 2018).
Redfish has removed odata.context from example payloads in the
specification (1.7.0 of DSP0266), removed it from the mockups,
and Redfish recommended not using.

The reason for making optional and removing from mockups/examples,
"no one could figure out how to use it and it did not add value".

Don't see value in it for our implementation.

Change-Id: I8d1c91460ea5836cb793ba1a2774a97649da208a
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 42cbe538 15-Aug-2019 Gunnar Mills <gmills@us.ibm.com>

Add Power Supply Attributes

Map DeratingFactor from PowerSupplyAttributes.interface.yaml
to the Redfish property PowerSupply "EfficiencyPercent".

Only do this call when the "Power" schema is called

Add Power Supply Attributes

Map DeratingFactor from PowerSupplyAttributes.interface.yaml
to the Redfish property PowerSupply "EfficiencyPercent".

Only do this call when the "Power" schema is called.
Use the InventoryItem class introduced in
adc4f0db57568c5e5d2a3398fce00dbb050a3b72

Tested: Power, Thermal, all look good.
Passed the Redfish Validator.
"PowerSupplies": [
{
"@odata.id": "/redfish/v1/Chassis/chassis/Power#/PowerSupplies/0",
"EfficiencyPercent": 90,
"IndicatorLED": "Off",
"Manufacturer": "",
"MemberId": "powersupply0",
"Model": "2B1D",
"Name": "powersupply0",
"PartNumber": "01KL471",
"PowerInputWatts": 12.0,
"SerialNumber": "71G370",
"Status": {
"Health": "OK",
"State": "Enabled"
}
},

Change-Id: I344577a7a3d72cd37d5f6bab03edbdce13b9f764
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 4bb3dc34 17-Oct-2019 Carol Wang <wangkair@cn.ibm.com>

Redfish: Set the power cap

Set the PowerCap with redfish patch.

Tested:
Case 1: PowerCapEnable is false
$ curl -k -H "X-Auth-Token: $token" -X PUT -d '{"data":false}' https://$bmc/xyz/openbmc_proje

Redfish: Set the power cap

Set the PowerCap with redfish patch.

Tested:
Case 1: PowerCapEnable is false
$ curl -k -H "X-Auth-Token: $token" -X PUT -d '{"data":false}' https://$bmc/xyz/openbmc_project/control/host0/power_cap/attr/PowerCapEnable
$ curl -k -H "X-Auth-Token: $token"https://${bmc}/redfish/v1/Chassis/chassis/Power
{
"@odata.context": "/redfish/v1/$metadata#Power.Power",
"@odata.id": "/redfish/v1/Chassis/chassis/Power",
"@odata.type": "#Power.v1_5_2.Power",
"Id": "Power",
"Name": "Power",
"PowerControl": [
{
"@odata.id": "/redfish/v1/Chassis/chassis/Power#/PowerControl/0",
"@odata.type": "#Power.v1_0_0.PowerControl",
"MemberId": "0",
"Name": "Chassis Power Control",
"PowerLimit": {
"LimitInWatts": null
}
}
],
...
}
$curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/Power -X PATCH -d '{"PowerControl":[{"PowerLimit":{"LimitInWatts":2004}}]}'
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
"Message": "PowerCapEnable is false, can't set the PowerCap.",
"MessageArgs": [],
"MessageId": "Base.1.4.0.UnableToSetPowerCap",
"Resolution": "Set PowerCapEnable to be true before setting PowerCap.",
"Severity": "Warning"
}
],
"code": "Base.1.4.0.UnableToSetPowerCap",
"message": "PowerCapEnable is false, can't set the PowerCap."
}
}

Case 2: PowerCapEnable is true, PowerControl json only
$ curl -k -H "X-Auth-Token: $token" -X PUT -d '{"data":true}' https://$bmc/xyz/openbmc_project/control/host0/power_cap/attr/PowerCapEnable
$ curl -k -H "X-Auth-Token: $token"https://${bmc}/redfish/v1/Chassis/chassis/Power
{
"@odata.context": "/redfish/v1/$metadata#Power.Power",
"@odata.id": "/redfish/v1/Chassis/chassis/Power",
"@odata.type": "#Power.v1_5_2.Power",
"Id": "Power",
"Name": "Power",
"PowerControl": [
{
"@odata.id": "/redfish/v1/Chassis/chassis/Power#/PowerControl/0",
"@odata.type": "#Power.v1_0_0.PowerControl",
"MemberId": "0",
"Name": "Chassis Power Control",
"PowerLimit": {
"LimitInWatts": 2001.0
}
}
],
...
}
$ curl -k -H "X-Auth-Token: $token"https://${bmc}/redfish/v1/Chassis/chassis/Power -X PATCH -d '{"PowerControl":[{"PowerLimit":{"LimitInWatts":2004}}]}' -v
...
< HTTP/1.1 204 No Content
...
$ curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/Power
{
"@odata.context": "/redfish/v1/$metadata#Power.Power",
"@odata.id": "/redfish/v1/Chassis/chassis/Power",
"@odata.type": "#Power.v1_5_2.Power",
"Id": "Power",
"Name": "Power",
"PowerControl": [
{
"@odata.id": "/redfish/v1/Chassis/chassis/Power#/PowerControl/0",
"@odata.type": "#Power.v1_0_0.PowerControl",
"MemberId": "0",
"Name": "Chassis Power Control",
"PowerLimit": {
"LimitInWatts": 2004.0
}
}
],
...
}

Case 3: PowerCapEnable is true, PowerControl and Voltages json
$ curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/Power -X PATCH -d '{"PowerControl":[{"PowerLimit"{"LimitInWatts":2001}}], "Voltages": [{"MemberId" : "p0_vcs_voltage", "ReadingVolts":8}]}' -v
...
< HTTP/1.1 204 No Content
...

Case 4: Wrong chassis path
$ curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassi/Power -X PATCH -d '{"PowerControl":[{"PowerLimit":{"LimitInWatts":2001}}]}'
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
"Message": "The requested resource of type Chassis named chassi was not found.",
"MessageArgs": [
"Chassis",
"chassi"
],
"MessageId": "Base.1.4.0.ResourceNotFound",
"Resolution": "Provide a valid resource identifier and resubmit the request.",
"Severity": "Critical"
}
],
"code": "Base.1.4.0.ResourceNotFound",
"message": "The requested resource of type Chassis named chassi was not found."
}
}

Signed-off-by: Carol Wang <wangkair@cn.ibm.com>
Change-Id: Ifabdf053005b31cf3e3539009a1ec20ce4d46d5b

show more ...


# d500549b 31-Jul-2019 Anthony Wilson <wilsonan@us.ibm.com>

bmcweb: Add IndicatorLED property to sensors

Added support for the IndicatorLED property for physical leds
associated with Thermal and Power sensors.

Testing: Verified output on a witherspoon.

bmcweb: Add IndicatorLED property to sensors

Added support for the IndicatorLED property for physical leds
associated with Thermal and Power sensors.

Testing: Verified output on a witherspoon.
No new errors in redfish validation.

Change-Id: I4e49b3c1769742e49f57c6c1b77a82511cdc8b99
Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>

show more ...


# 9e27a22e 24-Oct-2019 Ed Tanous <ed.tanous@intel.com>

Move to more modern headers

We had a couple places where the c style headers got checked in for

Tested: Code builds.

Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: Iebfbd846033618ff972

Move to more modern headers

We had a couple places where the c style headers got checked in for

Tested: Code builds.

Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: Iebfbd846033618ff972825a0a9f89e8d05395ce8

show more ...


12345678