| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
This was an automatic change made by clang-tidy. It moves all uses of
NULL to nullptr, which are equivalent, but nullptr is prefered.
Tested: Code compiles.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I9526599b222693c9723a69934b599c7a5b5d1fbf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Read the core objects for the given CPU Id and
report the count of core objects having the
property "Present" set as true.
Testing:
1.Ran Redfish schema validator - no issues
2.Ran GET request for cpu0 and cpu1 to get the
total cores for verification.
The total cores that are present reported by
the Redfish output matches with the total
cores reported by the inventory Rest API.
curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/redfish/v1/Systems/system/Processors/cpu0
{
"@odata.context": "/redfish/v1/$metadata#Processor.Processor",
"@odata.id": "/redfish/v1/Systems/system/Processors/cpu0",
"@odata.type": "#Processor.v1_3_1.Processor",
"Id": "cpu0",
"InstructionSet": "PowerISA",
"Manufacturer": "IBM",
"Model": "",
"Name": "Processor",
"ProcessorArchitecture": "Power",
"ProcessorType": "CPU",
"Status": {
"Health": "OK",
"State": "Enabled"
},
"TotalCores": 18
}
Change-Id: I3d65daed42fafd85ae2e4659e764ac061f1b1626
Signed-off-by: RAJESWARAN THILLAIGOVINDAN <rajeswgo@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes a bug in getAcceleratorDataByService
when looking up the Present and Functional properties
on D-Bus.
The properties are booleans, but the code was trying
to read them as strings.
Tested:
-- Redfish validator comes out clean
-- Tested various combinations of present and functional
properties on the GPU inventory objects:
xyz.openbmc_project.Inventory.Manager
/xyz/openbmc_project/inventory/system/chassis/motherboard/gv100card0
xyz.openbmc_project.State.Decorator.OperationalStatus Functional b "false"
/xyz/openbmc_project/inventory/system/chassis/motherboard/gv100card0
xyz.openbmc_project.Inventory.Item Present b "true"
$ curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Systems/system/Processors/gv100card0
{
"@odata.context": "/redfish/v1/$metadata#Processor.Processor",
"@odata.id": "/redfish/v1/Systems/system/Processors/gv100card0",
"@odata.type": "#Processor.v1_3_1.Processor",
"Id": "gv100card0",
"Name": "Processor",
"ProcessorType": "Accelerator",
"Status": {
"Health": "OK",
"State": "UnavailableOffline"
}
Set functional but not present:
$ curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Systems/system/Processors/gv100card0
{
"@odata.context": "/redfish/v1/$metadata#Processor.Processor",
"@odata.id": "/redfish/v1/Systems/system/Processors/gv100card0",
"@odata.type": "#Processor.v1_3_1.Processor",
"Id": "gv100card0",
"Name": "Processor",
"ProcessorType": "Accelerator",
"Status": {
"Health": "OK",
"State": "Absent"
}
Set functional and present:
$ curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Systems/system/Processors/gv100card0
{
"@odata.context": "/redfish/v1/$metadata#Processor.Processor",
"@odata.id": "/redfish/v1/Systems/system/Processors/gv100card0",
"@odata.type": "#Processor.v1_3_1.Processor",
"Id": "gv100card0",
"Name": "Processor",
"ProcessorType": "Accelerator",
"Status": {
"Health": "OK",
"State": "Enabled"
}
Set not functional and not present:
$ curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Systems/system/Processors/gv100card0
{
"@odata.context": "/redfish/v1/$metadata#Processor.Processor",
"@odata.id": "/redfish/v1/Systems/system/Processors/gv100card0",
"@odata.type": "#Processor.v1_3_1.Processor",
"Id": "gv100card0",
"Name": "Processor",
"ProcessorType": "Accelerator",
"Status": {
"Health": "OK",
"State": "Absent"
}
Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
Change-Id: Ic5ccc9bcd3b2b245ffdd714105d5b4fed3ca4ea4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this commit the GET request on any dimm object returns
few additional properties.The following are the properties
that are added as a part of this commit.
- PartNumber
- SerialNumber
- Manufacturer
Tested by:
1. Redfish-Service-Validator - Pass
2. GET https://<ip:port>/redfish/v1/Systems/system/Memory/dimm<number>
Change-Id: I75ad8188e53dc8e08add6f5c7bebb6a5056afd35
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Interface- phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/
Inventory/Item/Accelerator.interface.yaml
Redfish schema Status/state is mapped to two properties-
Functional and Present
xyz.openbmc_project.State.Decorator.OperationalStatus
xyz.openbmc_project.Inventory.Item
Tested:
-- ran Redfish-Service-Validator, All 6 GPUs shows Success
-- ran GET on Processors Collection
curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Systems/system/Processors
{
"@odata.context": "/redfish/v1/$metadata#ProcessorCollection.ProcessorCollection",
"@odata.id": "/redfish/v1/Systems/system/Processors/",
"@odata.type": "#ProcessorCollection.ProcessorCollection",
"Members": [
{
"@odata.id": "/redfish/v1/Systems/system/Processors/cpu0"
},
{
"@odata.id": "/redfish/v1/Systems/system/Processors/cpu1"
},
{
"@odata.id": "/redfish/v1/Systems/system/Processors/gv100card0"
},
{
"@odata.id": "/redfish/v1/Systems/system/Processors/gv100card1"
},
{
"@odata.id": "/redfish/v1/Systems/system/Processors/gv100card2"
},
{
"@odata.id": "/redfish/v1/Systems/system/Processors/gv100card3"
},
{
"@odata.id": "/redfish/v1/Systems/system/Processors/gv100card4"
},
{
"@odata.id": "/redfish/v1/Systems/system/Processors/gv100card5"
}
],
"Members@odata.count": 8,
"Name": "Processor Collection"
curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Systems/system/Processors/gv100card0
{
"@odata.context": "/redfish/v1/$metadata#Processor.Processor",
"@odata.id": "/redfish/v1/Systems/system/Processors/gv100card0",
"@odata.type": "#Processor.v1_3_1.Processor",
"Id": "gv100card0",
"Name": "Processor",
"ProcessorType": "Accelerator",
"Status": {
"Health": "OK",
"State": "Absent"
}
Change-Id: I5315df80d88d3a04de4b62435a200a718a10cd4c
Signed-off-by: Alpana Kumari <alpankum@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I9d7069668f91f2ac72d2f4a440f63e0e85dd5269
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
If Processor Manufacturer is IBM set ProcessorArchitecture and
InstructionSet.
This works the same as if the Manufacturer is Intel.
Change-Id: I61df182a12db6601004f1717471b4b34cdcf961b
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update Schema versions for:
* ComputerSystem
* Processor
* Memory
Tests:
* Service Validator did not have any regression
Change-Id: I3fb900b464013588ac0b08c0157404c8ababddb2
Signed-off-by: Rapkiewicz, Pawel <pawel.rapkiewicz@intel.com>
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit makes Memory Size an optional parameter.
On X86 platforms, MemorySizeInKB is coming from the MDR daemon.
For other platforms it is undefined. Still some work to do here,
but this commit fixes the internal error in
/redfish/v1/Systems/{ComputerSystemId}/Memory/{MemoryId} on non-X86
systems.
Resolves: openbmc/bmcweb#19
curl -k -H "X-Auth-Token: $bmc_token" -X GET \
https://${bmc}/redfish/v1/Systems/motherboard/Memory/dimm9
{
"@odata.context": "/redfish/v1/$metadata#Memory.Memory",
"@odata.id": "/redfish/v1/Systems/motherboard/Memory/dimm9",
"@odata.type": "#Memory.v1_2_0.Memory",
"Id": "dimm9",
"Name": "DIMM Slot",
"Status": {
"Health": "OK",
"State": "Enabled"
}
}
Change-Id: Ib2b558ba2299674edab0132a21dc6109e4b81732
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #18
This commit makes CPU core count an optional parameter. Previously it
was used to determine if a slot was populated, which was a bad idea in
the first place. This just makes the implementation a little less bad.
The best implementation would likely be to implement the state interface
in all the processor daemons to tell if the processor is present or not.
Because the processor not being present isn't very common, this is
likely low priority.
Change-Id: I42e49ef5ae7d6184d7f854069fd9a18c7c606dd3
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
| |
Now that sdbusplus variant supports std::get_if, we can remove our
custom, mapbox namespaced implementation that does the same thing.
Change-Id: I854c473003e28e41dd45dba08ca683433f1c1774
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the original incarnation of bmcweb, route registration was done
automatically. This has proved to be a terrible idea, wraught with
corner cases and issues.
The route registration is currently the only user of the
redfish::Node::json element. Unfortunately, as written, this structure
consumes a lot of memory that's duplicated and not very useful. From a
performance perspective, there is almost no difference between
rebuilding the structure for each GET request, and having the "cache"
that needs to be copied into the response and modified before it can be
useful.
In the programming tradeoffs for bmc, lower memory usage is more important
than latency, especially at these levels.
Change-Id: I785e8352123e5e886acf05cd59cb23648f93839d
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
This is an initial implementations of GET methods for
several schemas:
* ProcessorCollection
* Processor
* MemoryCollection
* Memory
It fetches data from Smbios service.
Tested:
* Compiance report
* Manual walk through selected schemas.
Change-Id: I11e00d0982248f2307e24b9a246ac60672dda8a1
Signed-off-by: Rapkiewicz, Pawel <pawel.rapkiewicz@intel.com>
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|