History log of /openbmc/bmcweb/features/redfish/lib/chassis.hpp (Results 101 – 125 of 145)
Revision Date Author Comments
# 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 ...


# 1cb1a9e6 17-Jul-2020 AppaRao Puli <apparao.puli@linux.intel.com>

Add ResetActionInfo for ResetType

OCP mandate the ResetActionInfo for convey the
parameter requirements and allowable values on
parameters for actions. So add ResetActionInfo
uri for below URI's.
/r

Add ResetActionInfo for ResetType

OCP mandate the ResetActionInfo for convey the
parameter requirements and allowable values on
parameters for actions. So add ResetActionInfo
uri for below URI's.
/redfish/v1/Systems/system/ResetActionInfo
/redfish/v1/Managers/bmc/ResetActionInfo
/redfish/v1/Chassis/<id>/ResetActionInfo

Tested:
- All action uri's show correct @Redfish.ActionInfo
"Actions": {
"#ComputerSystem.Reset": {
"@Redfish.ActionInfo": "/redfish/v1/Systems/system/ResetActionInfo",
"target": "/redfish/v1/Systems/system/Actions/ComputerSystem.Reset"
}
}

- All /ResetActionInfo uri's show correct allowable
values.
{
"@odata.id": "/redfish/v1/Systems/system/ResetActionInfo",
"@odata.type": "#ActionInfo.v1_1_2.ActionInfo",
"Id": "ResetActionInfo",
"Name": "Reset Action Info",
"Parameters": {
"AllowableValues": [
"On",
"ForceOff",
"ForceOn",
"ForceRestart",
"GracefulRestart",
"GracefulShutdown",
"PowerCycle",
"Nmi"
],
"DataType": "String",
"Name": "ResetType",
"Required": true
}
}

- Ran redfish validator and its successful.

Change-Id: I656163dde300d97fe1923f1d58fa6d104c702d27
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>

show more ...


# 4e0453b1 08-Jul-2020 Gunnar Mills <gmills@us.ibm.com>

Codespell redfish-core spelling fixes

These spelling errors were found using
https://github.com/codespell-project/codespell
Tested: Top commit (along with this) was built and ran against
val

Codespell redfish-core spelling fixes

These spelling errors were found using
https://github.com/codespell-project/codespell
Tested: Top commit (along with this) was built and ran against
validator.
Change-Id: Ic9dce27b1de8567eedf7753164ef564d3aedf8ca
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# dd99e04b 17-Jun-2020 P.K. Lee <p.k.lee@quantatw.com>

Redfish: Add chassis reset

Add chassis reset by using Redfish.

Tested:
Passed validator. Chassis reset worked.

Usage:
POST on /redfish/v1/Chassis/chassis/Actions/Chassis.Reset/
{

Redfish: Add chassis reset

Add chassis reset by using Redfish.

Tested:
Passed validator. Chassis reset worked.

Usage:
POST on /redfish/v1/Chassis/chassis/Actions/Chassis.Reset/
{
"ResetType": "PowerCycle"
}

Change-Id: Ia8949e6695e60ee63776ac70e4f8cd85a4b186c3
Signed-off-by: P.K. Lee <p.k.lee@quantatw.com>

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 ...


# 91cc52f9 14-Feb-2020 Gunnar Mills <gmills@us.ibm.com>

chassis: Remove odata.context

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

chassis: Remove odata.context

Redfish made odata.context optional (1.6.0 of DSP0266) and
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.

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

show more ...


# 1c8fba97 20-Dec-2019 James Feist <james.feist@linux.intel.com>

Add IndicatorLed to Chassis Schema

This adds the indicator property to Chassis Schema,
and moves the logic from systems.hpp to a common header
to share the code.

Tested: Passed the validator, was a

Add IndicatorLed to Chassis Schema

This adds the indicator property to Chassis Schema,
and moves the logic from systems.hpp to a common header
to share the code.

Tested: Passed the validator, was able to turn LED on

Change-Id: I79458a2a4656d7ddf2939bb9f56845eb6d9a27ca
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...


# 5fd7ba65 28-Nov-2019 Cheng C Yang <cheng.c.yang@linux.intel.com>

Fix No Total Memory Size Issue

Total Memory in redfish is always 0, fix the problem.

Tested:
After DC cycle the system. TotalSystemMemoryGiB in Redfish system page should
not be zero.

"MemorySumma

Fix No Total Memory Size Issue

Total Memory in redfish is always 0, fix the problem.

Tested:
After DC cycle the system. TotalSystemMemoryGiB in Redfish system page should
not be zero.

"MemorySummary": {
"Status": {
"State": "Enabled"
},
"TotalSystemMemoryGiB": 16
},

Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com>
Change-Id: I89ad8ed1cf5f9ca9589db444740167645dab9a6e

show more ...


# adbe192a 14-Oct-2019 Jason M. Bills <jason.m.bills@linux.intel.com>

Update to Chassis 1.10 and add PCIeDeviceCollection support

v1.10 of Chassis adds a PCIeDeviceCollection. This change adds
support for the PCIeDeviceCollection and references it from
Chassis.

Test

Update to Chassis 1.10 and add PCIeDeviceCollection support

v1.10 of Chassis adds a PCIeDeviceCollection. This change adds
support for the PCIeDeviceCollection and references it from
Chassis.

Tested:
Passed the Redfish Service Validator.

Change-Id: If3bb75f4fa90a9df4a2a94a7c7e0bcaf37673723
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>

show more ...


# 271584ab 09-Jul-2019 Ed Tanous <ed.tanous@intel.com>

Fix a bunch of warnings

using the list of warnings from here:
https://github.com/lefticus/cppbestpractices/blob/e73393f25a85f83fed7399d8b65cb117d00b2231/02-Use_the_Tools_Available.md#L100

Seems lik

Fix a bunch of warnings

using the list of warnings from here:
https://github.com/lefticus/cppbestpractices/blob/e73393f25a85f83fed7399d8b65cb117d00b2231/02-Use_the_Tools_Available.md#L100

Seems like a good place to start, and would improve things a bit
type-wise. This patchset attempts to correct all the issues in one
shot.

Tested:
It builds. Will test various subsystems that have been touched

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

show more ...


# 95a3ecad 11-Jun-2019 Anthony Wilson <wilsonan@us.ibm.com>

bmcweb: Implement SensorCollection

Add collection of all power and current sensors.

Testing: Verified SensorCollection and Sensor output
on a Witherspoon system.
Verified no error

bmcweb: Implement SensorCollection

Add collection of all power and current sensors.

Testing: Verified SensorCollection and Sensor output
on a Witherspoon system.
Verified no errors from RedfishServiceValidator.

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

show more ...


# adc4f0db 24-Jul-2019 Shawn McCarney <shawnmm@us.ibm.com>

Redfish: Move power supplies to Power schema

Made the following enhancements related to power supplies in Redfish:
* Moved power supplies from Chassis schema to Power schema
* Added support for mult

Redfish: Move power supplies to Power schema

Made the following enhancements related to power supplies in Redfish:
* Moved power supplies from Chassis schema to Power schema
* Added support for multiple power supplies within one chassis
* Added support for multiple sensors associated with one power supply
* Set power supply Name and MemberId to inventory item name (like
powersupply0) rather than sensor name (like ps0_input_power).
* Set power supply VPD fields like Manufacturer and SerialNumber

Also improved support for power sensors that are not related to power
supplies, such as VRM sensors. These sensors are no longer treated as
power supplies, and they will not be included in the Power schema
output. They should instead be included in the SensorCollection output
when that support is completed.

Uses an ObjectMapper association named "inventory" to find the power
supply inventory item associated with a power sensor. For example:

/xyz/openbmc_project/sensors/power/ps0_input_power/inventory ->
/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0

See https://github.com/openbmc/docs/blob/master/sensor-architecture.md
for more information on associations between sensors and low-level
hardware items.

Test Plan:
https://gist.github.com/smccarney/43b2fae304575302af61332a71280d74

Tested: Verified Power and Thermal output on a Witherspoon system.
Tested with power sensors that were/were not associated
with power supplies. Verified power supply properties in
Power output. Verified that power supplies are no longer
returned in Chassis collection output. Ran Redfish
Service Validator.

Change-Id: I50db389b5df011bfb561d31aafb33cc4bf7fcde6
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>

show more ...


# b49ac873 21-May-2019 James Feist <james.feist@linux.intel.com>

Health / Rollup Support

Look for associations for inventory and compare the
inventory warning / critical and global warning / critical
to get HealthRollup and Health respectively.

Tested:

Used sen

Health / Rollup Support

Look for associations for inventory and compare the
inventory warning / critical and global warning / critical
to get HealthRollup and Health respectively.

Tested:

Used sensor override to set BMC temp to Upper critical
and saw:

{
"@odata.context": "/redfish/v1/$metadata#Chassis.Chassis",
"@odata.id": "/redfish/v1/Chassis/WFP_Baseboard",
"@odata.type": "#Chassis.v1_4_0.Chassis",
"ChassisType": "RackMount",
"Id": "WFP_Baseboard",
"Links": {
"ComputerSystems": [
{
"@odata.id": "/redfish/v1/Systems/system"
}
],
"ManagedBy": [
{
"@odata.id": "/redfish/v1/Managers/bmc"
}
]
},
"Manufacturer": "Intel Corporation",
"Model": "S2600WFT",
"Name": "WFP_Baseboard",
"PartNumber": "123456789",
"Power": {
"@odata.id": "/redfish/v1/Chassis/WFP_Baseboard/Power"
},
"PowerState": "Off",
"SerialNumber": "123454321",
"Status": {
"Health": "Warning",
"HealthRollup": "Critical",
"State": "StandbyOffline"
},
"Thermal": {
"@odata.id": "/redfish/v1/Chassis/WFP_Baseboard/Thermal"
}
}

Change-Id: Idd9e832db18bb4769f1452fe243d68339a6f844d
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...


# 26f03899 03-May-2019 Shawn McCarney <shawnmm@us.ibm.com>

Redfish: Remove BMCWEB_ENABLE_REDFISH_ONE_CHASSIS

Removed the BMCWEB_ENABLE_REDFISH_ONE_CHASSIS #define. The new support
for finding chassis sensors via associations is now used on all systems.

Te

Redfish: Remove BMCWEB_ENABLE_REDFISH_ONE_CHASSIS

Removed the BMCWEB_ENABLE_REDFISH_ONE_CHASSIS #define. The new support
for finding chassis sensors via associations is now used on all systems.

Test Plan:
https://gist.github.com/smccarney/f5b4783d8cf41a486ceff9b941b1ba9a

Tested: Verified the Chassis, Power, and Thermal output was valid on a
Witherspoon system. Verified sensor associations on Witherspoon
work with bmcweb implementation. Ran Redfish Service Validator.

Change-Id: I975f79da2c9de63e4ddd155d39ea872ca9fbffa9
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>

show more ...


# 49c53ac9 02-May-2019 Johnathan Mantey <johnathanx.mantey@intel.com>

Acquire chassis sensors using the sensor association DBus item

Each entry in the Chassis Collection has, or will have, a sensors DBus
item that lists the sensors that Chassis node contains. This ch

Acquire chassis sensors using the sensor association DBus item

Each entry in the Chassis Collection has, or will have, a sensors DBus
item that lists the sensors that Chassis node contains. This change
queries that DBus entry, and uses the information to collect the
Thermal or Power sensor information.

Tested:
GET https://10.243.48.59/redfish/v1/Chassis/WP_Baseboard
GET https://10.243.48.59/redfish/v1/Chassis/WP_Baseboard/Power
GET https://10.243.48.59/redfish/v1/Chassis/WP_Baseboard/Thermal

On 2 representative systems, one with a chassis, and one without.
Observed correct behavior for both.

Ran Redfish service validator. Observed no errors in Chassis, Thermal,
Power, or ChassisCollection schemas.

Change-Id: I01fcb3707396e2e33345bf125d8ae95170088a2a
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
Signed-off-by: Ed Tanous <ed.tanous@intel.com>

show more ...


# beeca0ae 14-Feb-2019 Gunnar Mills <gmills@us.ibm.com>

Redfish: Add Chassis PowerState call

Make a call to /xyz/openbmc_project/state/chassis0 to get the
chassis PowerState.
Very similiar to how we get the System PowerState
https://github.com/openbmc/bm

Redfish: Add Chassis PowerState call

Make a call to /xyz/openbmc_project/state/chassis0 to get the
chassis PowerState.
Very similiar to how we get the System PowerState
https://github.com/openbmc/bmcweb/blob/abf2add6a35aaf42ba60c4ae955a4d8925b13b19/redfish-core/lib/systems.hpp#L471

Resolves openbmc/bmcweb#27

Tested: Loaded this on a Witherspoon and power on/off. Saw correct
PowerState.
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Change-Id: I9dd008a902098f1872560d985249375a2d317f25

show more ...


# 603a6640 21-Jan-2019 Gunnar Mills <gmills@us.ibm.com>

Add BMCWEB_ENABLE_REDFISH_ONE_CHASSIS build option

Define a new build option named BMCWEB_ENABLE_REDFISH_ONE_CHASSIS that
is not set by default.

When this build option is set, bmcweb will always re

Add BMCWEB_ENABLE_REDFISH_ONE_CHASSIS build option

Define a new build option named BMCWEB_ENABLE_REDFISH_ONE_CHASSIS that
is not set by default.

When this build option is set, bmcweb will always return a single
chassis named "chassis".

Setting this option will also cause all sensors to be shown under this
chassis.

This is a short-term solution. Long term, inventory-manager needs to be
enhanced to allow sensors to be under a chassis, or the rest of the
project needs to move to EntityManager.

Currently IBM does not use EntityManager, but EntityManager is called
directly in sensors.hpp. This results in an HTTP 500 Internal Server
Error.

Tested: The URLs /redfish/v1/Chassis/ and /redfish/v1/Chassis/chassis
show correct data on a Witherspoon. /redfish/v1/Managers/bmc/
now has a link to the single chassis.
/redfish/v1/Chassis/chassis/Power and
/redfish/v1/Chassis/chassis/Thermal no longer result in an
HTTP 500 Internal Server Error. Ran Redfish Service Validator.
Change-Id: Iec8f4da333946f19330f37ab084cd9787c52c8ea
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>

show more ...


# c181942f 26-Feb-2019 Qiang XU <qiang.xu@linux.intel.com>

redfish: chassis: add property of physical security

Get intrusion status from dbus and display property of physical security

Related patches to run test:
- meta-phosphor: dbus-sensors: Enable new s

redfish: chassis: add property of physical security

Get intrusion status from dbus and display property of physical security

Related patches to run test:
- meta-phosphor: dbus-sensors: Enable new service of intrusion sensor
https://gerrit.openbmc-project.xyz/#/c/openbmc/meta-phosphor/+/17063/
- Add chassis intrusion sensor daemon
https://gerrit.openbmc-project.xyz/#/c/openbmc/dbus-sensors/+/17064/

Tested-by:
- Verified redfish/v1/Chassis/<ChassisId> when intrusion status is true
"PhysicalSecurity": {
"IntrusionSensor": "HardwareIntrusion",
"IntrusionSensorNumber": 1
},

Change-Id: Ib231ccb847d48641eac363f578de9f930035db89
Signed-off-by: Qiang XU <qiang.xu@linux.intel.com>

show more ...


# 99cffd7f 01-Mar-2019 Shawn McCarney <shawnmm@us.ibm.com>

Redfish Chassis: Fix @odata.id, remove BuildDate

Fixed the following errors when obtaining the Redfish properties of a
Chassis:
* @odata.id URI did not contain the chassis name
* Non-Redfish DBus pr

Redfish Chassis: Fix @odata.id, remove BuildDate

Fixed the following errors when obtaining the Redfish properties of a
Chassis:
* @odata.id URI did not contain the chassis name
* Non-Redfish DBus properties like BuildDate were returned

Tested: Verified the URL /redfish/v1/Chassis/<chassis>/ returns the
correct properties on a Witherspoon system. Ran Redfish
Service Validator.

Change-Id: I73280990db0b468aea1b12b2b919dabb2e20ca89
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>

show more ...


# 029573d4 01-Feb-2019 Ed Tanous <ed.tanous@intel.com>

bmcweb: Implement single Redfish "system" endpoint

This commit changes the redfish behavior to move to a single, known name
under the /redfish/v1/Systems/system path. This is advantageous for a
lot

bmcweb: Implement single Redfish "system" endpoint

This commit changes the redfish behavior to move to a single, known name
under the /redfish/v1/Systems/system path. This is advantageous for a
lot of reasons.
1. Lots fewer dbus calls to determine the system name for every path.
This could be optimized in other ways, like checking the system name on
startup, but because redfish paths are not intended to be informative,
this patchset takes the opinion that less code is better.
2. Lots of lowered complexity, given that each endpoint underneath
/system doesn't need an individual "does this system exist, and is the
name right" check.
3. This makes it possible to correctly implement the "Links" property in
Chassis, which is required for the OCP base server profile

Tested By:
Very minimal testing done, but it seems to pass the validator.

Change-Id: Iea3cb5081b92a3843b6877decd009936de00561c
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# abf2add6 22-Jan-2019 Ed Tanous <ed.tanous@intel.com>

bmcweb: move variant usage to std namespace

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


# 734bfe90 21-Jan-2019 Gunnar Mills <gmills@us.ibm.com>

Use Chassis interfaces to determine if chassis

Use the same interfaces used to determine members of
/redfish/v1/Chassis/ as to determine if a chassis exists,
/redfish/v1/Chassis/<ChassisId>.

Using

Use Chassis interfaces to determine if chassis

Use the same interfaces used to determine members of
/redfish/v1/Chassis/ as to determine if a chassis exists,
/redfish/v1/Chassis/<ChassisId>.

Using something different, Inventory.Item.Asset, means
a /redfish/v1/Chassis/<ChassisId> could return found when it
does not belong to members of /redfish/v1/Chassis/ and
vice versa.

Changed the search depth of both commands to infinite.

Tested: Verified /redfish/v1/Chassis/ and
/redfish/v1/Chassis/<ChassisId> on a Witherspoon

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

show more ...


# 8f1ac8e9 06-Dec-2018 Gunnar Mills <gmills@us.ibm.com>

Redfish: Chassis: Remove Inventory.Item.System

To determine /redfish/v1/Chassis/<ChassisID> don't look for
xyz.openbmc_project.Inventory.Item.System which is currently
implemented at /xyz/openbmc_pr

Redfish: Chassis: Remove Inventory.Item.System

To determine /redfish/v1/Chassis/<ChassisID> don't look for
xyz.openbmc_project.Inventory.Item.System which is currently
implemented at /xyz/openbmc_project/inventory/system.

Inventory.Item.System (/xyz/openbmc_project/inventory/system)
is not a Chassis.

Inventory.Item.System is used to determine
/redfish/v1/Systems/<SystemID>.
https://gerrit.openbmc-project.xyz/#/c/openbmc/bmcweb/+/16528/

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

show more ...


123456