History log of /openbmc/bmcweb/features/redfish/lib/power_subsystem.hpp (Results 1 – 8 of 8)
Revision Date Author Comments
# d7857201 28-Jan-2025 Ed Tanous <etanous@nvidia.com>

Fix includes

Clang-tidy misc-include-cleaner appears to now be enforcing
significantly more headers than previously. That is overall a good
thing, but forces us to fix some issues. This commit is

Fix includes

Clang-tidy misc-include-cleaner appears to now be enforcing
significantly more headers than previously. That is overall a good
thing, but forces us to fix some issues. This commit is largely just
taking the clang-recommended fixes and checking them in. Subsequent
patches will fix the more unique issues.

Note, that a number of new ignores are added into the .clang-tidy file.
These can be cleaned up over time as they're understood. The majority
are places where boost includes a impl/x.hpp and x.hpp, but expects you
to use the later. include-cleaner opts for the impl, but it isn't clear
why.

Change-Id: Id3fdd7ee6df6c33b2fd35626898523048dd51bfb
Signed-off-by: Ed Tanous <etanous@nvidia.com>
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 40e9b92e 10-Sep-2024 Ed Tanous <etanous@nvidia.com>

Use SPDX identifiers

SPDX identifiers are simpler, and reduce the amount of cruft we have in
code files. They are recommended by linux foundation, and therefore we
should do as they allow.

This pa

Use SPDX identifiers

SPDX identifiers are simpler, and reduce the amount of cruft we have in
code files. They are recommended by linux foundation, and therefore we
should do as they allow.

This patchset does not intend to modify any intent on any existing
copyrights or licenses, only to standardize their inclusion.

[1] https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects

Change-Id: I935c7c0156caa78fc368c929cebd0f068031e830
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


# 539d8c6b 19-Jun-2024 Ed Tanous <ed@tanous.net>

Consistently use generated enumerations

This commit causes all of Redfish to use generated enum values for enum
types. Using generated code prevents problems, and makes it more clear
what types are

Consistently use generated enumerations

This commit causes all of Redfish to use generated enum values for enum
types. Using generated code prevents problems, and makes it more clear
what types are allowed.

Doing this found two places where we had structs that didn't fulfill the
schema. They have been commented, but will be fixed with a breaking
change at some point in the future.

Tested: WIP

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

show more ...


# ef4c65b7 24-Apr-2023 Ed Tanous <edtanous@google.com>

Boost::urls::format

Boost 1.82 dropped a lovely new toy, boost::urls::format, which is a lot
like our urlFromPieces method, but better in that it makes the resulting
uris more readable, and allows d

Boost::urls::format

Boost 1.82 dropped a lovely new toy, boost::urls::format, which is a lot
like our urlFromPieces method, but better in that it makes the resulting
uris more readable, and allows doing things like fragments in a single
line instead of multiple. We should prefer it in some cases.

Tested:
Redfish service validator passes.
Spot checks of URLs work as expected.
Unit tests pass.

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

show more ...


# a7210020 05-Oct-2022 George Liu <liuxiwei@inspur.com>

Implements PowerSupplies schema

This commit implements the Redfish PowerSupplyCollection at
/redfish/v1/Chassis/<chassis Id>/PowerSubsystem/PowerSupplies.
It shall contain an array of links to resou

Implements PowerSupplies schema

This commit implements the Redfish PowerSupplyCollection at
/redfish/v1/Chassis/<chassis Id>/PowerSubsystem/PowerSupplies.
It shall contain an array of links to resources of type PowerSupply
that represent the power supplies that provide power to this chassis.
For the association between power supply and chassis, refer to[1].

Also, the members property is implemented in the next commit with the
PowerSupply implementation, this is so the validator will pass.

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

Tested: Validator passes
1. curl -k -H "X-Auth-Token: $token" -X GET
https://${bmc}/redfish/v1/Chassis/chassis/PowerSubsystem/
PowerSupplies
{
"@odata.id": "/redfish/v1/Chassis/chassis/PowerSubsystem/
PowerSupplies"
"@odata.type": "#PowerSupplyCollection.PowerSupplyCollection",
"Description": "The collection of PowerSupply resource instances
chassis",
"Members": [
],
"Members@odata.count": 0,
"Name": "Power Supply Collection"
}

2. Bad chassisId
curl -k -H "X-Auth-Token: $token" -X GET
https://${bmc}/redfish/v1/Chassis/chassisError/PowerSubsystem/
PowerSupplies
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The requested resource of type Chassis named
'chassisError' was not found.",
"MessageArgs": [
"Chassis",
"chassisError"
],
"MessageId": "Base.1.13.0.ResourceNotFound",
"MessageSeverity": "Critical",
"Resolution": "Provide a valid resource identifier and resubmit the
request."
}
],
"code": "Base.1.13.0.ResourceNotFound",
"message": "The requested resource of type Chassis named
'chassisError' was not found."
}
}

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

show more ...


# 2ea468a0 26-Oct-2022 George Liu <liuxiwei@inspur.com>

Add Link header handling to PowerSubsystem

This commit is to update PowerSubsystem to respond to HEAD requests
in the way the redfish spec requires.

Tested:
HEAD /redfish/v1/Chassis/<str>/PowerSubs

Add Link header handling to PowerSubsystem

This commit is to update PowerSubsystem to respond to HEAD requests
in the way the redfish spec requires.

Tested:
HEAD /redfish/v1/Chassis/<str>/PowerSubsystem returns a correct
looking Link header.
Following that Link header resolves the schema file.

Get /redfish/v1/Chassis/BadChassis/PowerSubsystem returns 404.

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

show more ...


# ca9e6be6 08-Nov-2022 Nan Zhou <nanzhoumails@gmail.com>

power subsystem: fix header

Added the logging header.

Tested: code compiles.

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: Ie707780e195766b37a3d307818615c6be36d424e


# 77b36437 05-Feb-2021 Chicago Duan <duanzhijia01@inspur.com>

Implements PowerSubsystem schema

This commit implements the Redfish PowerSubsystem schema and collects
default property values.
PowerSupplies will be implemented in the next commit.

ref:
https://ww

Implements PowerSubsystem schema

This commit implements the Redfish PowerSubsystem schema and collects
default property values.
PowerSupplies will be implemented in the next commit.

ref:
https://www.dmtf.org/sites/default/files/standards/documents/
DSP0268_2022.2.pdf (6.86 PowerSubsystem 1.1.0)
https://redfish.dmtf.org/schemas/v1/PowerSupply.v1_1_0.json

Tested: Validator and UT passes
1. curl -k -H "X-Auth-Token: $token" -X GET
https://${bmc}/redfish/v1/Chassis/chassis/PowerSubsystem
{
"@odata.id": "/redfish/v1/Chassis/chassis/PowerSubsystem",
"@odata.type": "#PowerSubsystem.v1_1_0.PowerSubsystem",
"Id": "PowerSubsystem",
"Name": "Power Subsystem",
"Status": {
"Health": "OK",
"State": "Enabled"
}
}

2. bad chassisID
curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}
/redfish/v1/Chassis/badchassisID/PowerSubsystem/
PowerSupplies/powersupply0
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The requested resource of type Chassis named
badchassisID was not found.",
"MessageArgs": [
"Chassis",
"badchassisID"
],
"MessageId": "Base.1.13.1.ResourceNotFound",
"MessageSeverity": "Critical",
"Resolution": "Provide a valid resource identifier
and resubmit the request."
}
],
"code": "Base.1.13.1.ResourceNotFound",
"message": "The requested resource of type Chassis named
badchassisID was not found."
}
}

Signed-off-by: Chicago Duan <duanzhijia01@inspur.com>
Change-Id: I6885b1777082538eceaf7ea85a8f69966459ee43

show more ...