#
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 ...
|
#
ae9031f0
|
| 27-Sep-2022 |
Willy Tu <wltu@google.com> |
Update CollectionMembers to use UrlFromPieces
Refactor getCollectionMembers to make sure all Url created with dbus paths are generated via UrlFromPieces helper function. This allow us to manage all
Update CollectionMembers to use UrlFromPieces
Refactor getCollectionMembers to make sure all Url created with dbus paths are generated via UrlFromPieces helper function. This allow us to manage all URL generated from dbus in one place and allow us to make future changes to affect all resources.
We can make changes to all resources easier if they are all managed by one function.
Tested: Redfish Validator Passed. All Collections working as expected and match previous implmentation.
Change-Id: I5d3b2b32f047ce4f20a2287a36a3e099efd6eace Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
#
22d268cb
|
| 19-May-2022 |
Ed Tanous <edtanous@google.com> |
Make routes start matching Redfish
This is preliminary patch to set up the route handling such that it's ready for the addition of multiple hosts, multiple managers in the future. Routes previously
Make routes start matching Redfish
This is preliminary patch to set up the route handling such that it's ready for the addition of multiple hosts, multiple managers in the future. Routes previously took the form of
/redfish/v1/Systems/system
which essentially hardcoded the name "system" into a number of places. As the stack evolves to support multiple systems, this needs to change.
This patchset changes all the ComputerSystem resources to the form: /redfish/v1/Systems/<str>
and adds 404 checks to each route such that they will be handled properly still. This means that as we evolve our multi-host support, each individual route can be moved one at a time to support multi-host.
In the future, moving these to redfish-spec-defined routing would likely mean that we could generate this code in the future at some point, which reduces the likelihood that people do it incorrectly.
This patch currently sets the resource id and resource type in the resourceNotFound message to empty string (""). This handling is still arguably more correct than what we had before, which just returned 404 with an empty payload, although this will be corrected in the future.
Tested: None yet. RFC to see if this is a pattern we'd like to propogate
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: If9c07ad69f5287bb054645f460d7e370d433dc27
show more ...
|
#
656472d9
|
| 13-Sep-2022 |
Nikhil Namjoshi <nikhilnamjoshi@google.com> |
Memory: Fix the missing fields in Dimm Response
The Dimm response has some missing fields i.e. Manufacturer and FirmwareRevision, due to some properties not being unpacked. This commit fixes that is
Memory: Fix the missing fields in Dimm Response
The Dimm response has some missing fields i.e. Manufacturer and FirmwareRevision, due to some properties not being unpacked. This commit fixes that issue.
Tested:
Redfish validator passed
Dimm Response before fix shows missing Manufacturer and FirmwareRevision fields
``` wget -qO- http://localhost:80/redfish/v1/Systems/system/Memory/dimm0
"@odata.id": "/redfish/v1/Systems/system/Memory/dimm0", "@odata.type": "#Memory.v1_11_0.Memory", "AllowedSpeedsMHz": [], "BaseModuleType": "...", "BusWidthBits": ..., "CapacityMiB": ....., "DataWidthBits": .., "ErrorCorrection": ".....", <<<======= Missing FirmwareRevision field "Id": "dimm0", "Links": { "Chassis": { "@odata.id": "...." } }, "Location": { "PartLocation": { "LocationType": "Slot", "ServiceLabel": "DIMM6" } }, <<<<==== Missing Manufacturer field "MemoryDeviceType": "...", "MemoryType": "....", "Model": "", "Name": "DIMM Slot", "OperatingSpeedMhz": ...., "PartNumber": "......", "RankCount": ...., "SerialNumber": "....", "SparePartNumber": "..", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" } } ```
Dimm Response after fix shows Manufacturer and FirmwareRevision fields present
``` wget -qO- http://localhost:80/redfish/v1/Systems/system/Memory/dimm0 { "@odata.id": "/redfish/v1/Systems/system/Memory/dimm0", "@odata.type": "#Memory.v1_11_0.Memory", "AllowedSpeedsMHz": [], "BaseModuleType": "....", "BusWidthBits": ..., "CapacityMiB": ...., "DataWidthBits": ..., "ErrorCorrection": "...", "FirmwareRevision": "...", "Id": "dimm0", "Links": { "Chassis": { "@odata.id": "...." } }, "Location": { "PartLocation": { "LocationType": "Slot", "ServiceLabel": "DIMM6" } }, "Manufacturer": "....", "MemoryDeviceType": "...", "MemoryType": "...", "Model": "", "Name": "DIMM Slot", "OperatingSpeedMhz": ..., "PartNumber": "...", "RankCount": ..., "SerialNumber": ".....", "SparePartNumber": "...", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" } } ```
Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com> Change-Id: I4de83a5038fe77e19a1b8b16e479348677fb30c1
show more ...
|
#
ce34d514
|
| 13-Sep-2022 |
Tyson Tuckerbear <ttucker@google.com> |
memory.hpp: Add High Bandwidth Memory v3 (HBM3)
This follows the addition in phosphor-dbus-interfaces.
Signed-off-by: Tyson Tuckerbear <ttucker@google.com> Change-Id: I8a448b8fa02b7d657d55e1cc35506
memory.hpp: Add High Bandwidth Memory v3 (HBM3)
This follows the addition in phosphor-dbus-interfaces.
Signed-off-by: Tyson Tuckerbear <ttucker@google.com> Change-Id: I8a448b8fa02b7d657d55e1cc35506cd9ca1d5961
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 ...
|
#
11ba3979
|
| 11-Jul-2022 |
Ed Tanous <edtanous@google.com> |
Remove usages of boost::starts/ends_with
Per the coding standard, now that C++ supports std::string::starts_with and std::string::ends_with, we should be using them over the boost alternatives. Thi
Remove usages of boost::starts/ends_with
Per the coding standard, now that C++ supports std::string::starts_with and std::string::ends_with, we should be using them over the boost alternatives. This commit goes through and updates all usages.
Arguably some of these are incorrect, and instances of common error 13, but because this is mostly a mechanical it intentionally doesn't try to handle it.
Tested: Unit tests pass.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ic4c6e5d0da90f7442693199dc691a47d2240fa4f
show more ...
|
#
fbe4fb6e
|
| 19-Jun-2022 |
Jiaqing Zhao <jiaqing.zhao@intel.com> |
memory: Use dbus::utility::DBusPropertiesMap::value_type
Both dimmPropToHex() and getPersistentMemoryProperties() uses a custom type for DBusPropertiesMap entry, use the value_type instead.
Tested:
memory: Use dbus::utility::DBusPropertiesMap::value_type
Both dimmPropToHex() and getPersistentMemoryProperties() uses a custom type for DBusPropertiesMap entry, use the value_type instead.
Tested: Build pass.
Change-Id: Iffce0bec160d1bae684164db13994bf34ef8594f Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
show more ...
|
#
76686dcc
|
| 17-Jun-2022 |
Nan Zhou <nanzhoumails@gmail.com> |
memory: match DIMM ID even more precisely
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/53791 attemps to fix the common error #12 in memory resource. However, it's still not perfect. There is an edg
memory: match DIMM ID even more precisely
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/53791 attemps to fix the common error #12 in memory resource. However, it's still not perfect. There is an edge case that Partition objects have wrong paths like /xyz/openbmc_project/Inventory/Item/dimm1, where this partition will still be parsed as a partition of dimm1.
This commit corrects this by making path checking explicitly different for DIMM and Partition objects: one check filename, the other check filename of the parent path.
Tested: 1. /redfish/v1/Systems/system/Memory/dimm0 ``` { "@odata.id": "/redfish/v1/Systems/system/Memory/dimm0", "@odata.type": "#Memory.v1_11_0.Memory", "AllowedSpeedsMHz": [], "BaseModuleType": "RDIMM", "BusWidthBits": 0, "CapacityMiB": 1024, "DataWidthBits": 0, "ErrorCorrection": "NoECC", "FirmwareRevision": "0", "Id": "dimm0", "Name": "DIMM Slot", "OperatingSpeedMhz": 0, "RankCount": 0, "Regions": [ { "MemoryClassification": "Volatile", "OffsetMiB": 0, "PassphraseEnabled": false, "RegionId": "", "SizeMiB": 1024 }, { "MemoryClassification": "Volatile", "OffsetMiB": 0, "PassphraseEnabled": false, "RegionId": "", "SizeMiB": 1024 } ], "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" } } ``` 2. No validator errors on Memory Resource.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: Ic078b5046ac3397e398f050ed7b54ebadcb2aa32
show more ...
|
#
d7f04fd9
|
| 30-Apr-2022 |
Nan Zhou <nanzhoumails@gmail.com> |
memory: refactor JSON assembling codes
This commit does nothing but a refactoring around the translation codes that translate data from dbus objects to JSON.
Existing codes assumes that the |AsyncR
memory: refactor JSON assembling codes
This commit does nothing but a refactoring around the translation codes that translate data from dbus objects to JSON.
Existing codes assumes that the |AsyncResponse| is always at a specific DIMM. This doesn't work if we are doing a efficient level=1 expand, as introduced initially in https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/52418, where the |AsyncResponse| now points to the MemoryCollection.
In order to reuse codes in future changes, this commits refactors many functions to take a JSON pointer, so any attributes added to a specific DIMM go to the JSON pointer, rather than always to the root.
1. Tested on my mock environment, ``` URI: /redfish/v1/Systems/system/Memory/dimm0 { "@odata.id": "/redfish/v1/Systems/system/Memory/dimm0", "@odata.type": "#Memory.v1_11_0.Memory", "AllowedSpeedsMHz": [], "BaseModuleType": "RDIMM", "BusWidthBits": 0, "CapacityMiB": 1024, "DataWidthBits": 0, "ErrorCorrection": "NoECC", "FirmwareRevision": "0", "Id": "dimm0", "Name": "DIMM Slot", "OperatingSpeedMhz": 0, "RankCount": 0, "Regions": [ { "MemoryClassification": "Volatile", "OffsetMiB": 0, "PassphraseEnabled": false, "RegionId": "", "SizeMiB": 1024 } ], "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" } } ``` 2. No new Redfish Validator failures on MemoryCollection on real hardware: /redfish/v1/Systems/system/Memory (response time:0:00:00.116538) MemoryCollection Pass /redfish/v1/Systems/system/Memory/dimm0 (response time: 0:00:00.201940) Memory Pass
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I61e6c76ca6dd6f129c5d382dcc46a4292a4e1bb7
show more ...
|
#
3ba00073
|
| 06-Jun-2022 |
Carson Labrado <clabrado@google.com> |
Expose AsyncResp shared_ptr when handling response
For Redfish Aggregation, we need a common point to check the D-Bus for satellite configs. If they are available then we perform the aggregation op
Expose AsyncResp shared_ptr when handling response
For Redfish Aggregation, we need a common point to check the D-Bus for satellite configs. If they are available then we perform the aggregation operations. The functions in query.hpp are used by all endpoints making them the logical location. The aggregation code requires a shared_ptr to the AsyncResp so these functions need to be able to supply that.
This patch is broken out of a future patch for routing Redfish Aggregation requests https://gerrit.openbmc.org/c/openbmc/bmcweb/+/53310
The follow commands can be used to perform most of the replacements: find . -type f | xargs sed -i 's/setUpRedfishRoute(app, req, asyncResp->res/setUpRedfishRoute(app, req, asyncResp/g' find . -type f | xargs sed -i 's/setUpRedfishRouteWithDelegation(app, req, asyncResp->res/setUpRedfishRouteWithDelegation(app, req, asyncResp/g'
Signed-off-by: Carson Labrado <clabrado@google.com> Change-Id: I4f4f9f22cdcfb14a3bd94b9a8f3d64aae34e57bc
show more ...
|
#
7267c21d
|
| 17-May-2022 |
Sui Chen <suichen@google.com> |
memory: Precisely match DIMM ID
Currently, getDimmData uses std::string::find to determine if a DBus path contains a dimmId. The result is if we have the following paths:
/xyz/openbmc_project/inven
memory: Precisely match DIMM ID
Currently, getDimmData uses std::string::find to determine if a DBus path contains a dimmId. The result is if we have the following paths:
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm1 /xyz/openbmc_project/inventory/system/chassis/motherboard/dimm10 /xyz/openbmc_project/inventory/system/chassis/motherboard/dimm11 ... /xyz/openbmc_project/inventory/system/chassis/motherboard/dimm19
They will all be considered to match dimmId "dimm1" with string::find.
This change switches to sdbusplus::message::object_path::filename(), so partial matches may be prevented.
This change also considers partition data and works for partitions.
Tested: 1. No new Redfish Validator errors 2. In my mock environment URL: /redfish/v1/Systems/system/Memory/dimm0 { "@odata.id": "/redfish/v1/Systems/system/Memory/dimm0", "@odata.type": "#Memory.v1_11_0.Memory", "AllowedSpeedsMHz": [], "BaseModuleType": "RDIMM", "BusWidthBits": 0, "CapacityMiB": 1024, "DataWidthBits": 0, "ErrorCorrection": "NoECC", "FirmwareRevision": "0", "Id": "dimm0", "Name": "DIMM Slot", "OperatingSpeedMhz": 0, "RankCount": 0, "Regions": [ { "MemoryClassification": "Volatile", "OffsetMiB": 0, "PassphraseEnabled": false, "RegionId": "", "SizeMiB": 1024 } ], "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" } }
Signed-off-by: Sui Chen <suichen@google.com> Change-Id: I122774be1f81da6e5c3a833b83d2bd81b437c298
show more ...
|
#
002d39b4
|
| 31-May-2022 |
Ed Tanous <edtanous@google.com> |
Try to fix the lambda formatting issue
clang-tidy has a setting, LambdaBodyIndentation, which it says: "For callback-heavy code, it may improve readability to have the signature indented two levels
Try to fix the lambda formatting issue
clang-tidy has a setting, LambdaBodyIndentation, which it says: "For callback-heavy code, it may improve readability to have the signature indented two levels and to use OuterScope."
bmcweb is very callback heavy code. Try to enable it and see if that improves things. There are many cases where the length of a lambda call will change, and reindent the entire lambda function. This is really bad for code reviews, as it's difficult to see the lines changed. This commit should resolve it. This does have the downside of reindenting a lot of functions, which is unfortunate, but probably worth it in the long run.
All changes except for the .clang-format file were made by the robot.
Tested: Code compiles, whitespace changes only.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ib4aa2f1391fada981febd25b67dcdb9143827f43
show more ...
|
#
1a1d5d6d
|
| 27-May-2022 |
Nan Zhou <nanzhoumails@gmail.com> |
memory: set @odata attributes only if the object is found
The existing code returns a JSON payload with @odata attributes even if it is a 404 not found.
This commit corrects that by moving @odata a
memory: set @odata attributes only if the object is found
The existing code returns a JSON payload with @odata attributes even if it is a 404 not found.
This commit corrects that by moving @odata after the object is found.
Tested: 1. before ``` { "@odata.id": "/redfish/v1/Systems/system/Memory/dimm5", "@odata.type": "#Memory.v1_11_0.Memory", "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The requested resource of type Memory named 'dimm5' was not found.", "MessageArgs": [ "Memory", "dimm5" ], "MessageId": "Base.1.11.0.ResourceNotFound", "MessageSeverity": "Critical", "Resolution": "Provide a valid resource identifier and resubmit the request." } ], "code": "Base.1.11.0.ResourceNotFound", "message": "The requested resource of type Memory named 'dimm5' was not found." } } ``` after ``` { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The requested resource of type Memory named 'dimm5' was not found.", "MessageArgs": [ "Memory", "dimm5" ], "MessageId": "Base.1.11.0.ResourceNotFound", "MessageSeverity": "Critical", "Resolution": "Provide a valid resource identifier and resubmit the request." } ], "code": "Base.1.11.0.ResourceNotFound", "message": "The requested resource of type Memory named 'dimm5' was not found." } } ``` 2. Service Validator on MemoryResource passes.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: Id0f912015b0ecf25cacb22e919ebe88708187677
show more ...
|
#
ef00d7d4
|
| 20-May-2022 |
Nan Zhou <nanzhoumails@gmail.com> |
memory: move Partition codes from callbacks into separate functions
Another change to move codes from callbacks to functions in the memory resource.
It is a bit cleaner to have separate functions r
memory: move Partition codes from callbacks into separate functions
Another change to move codes from callbacks to functions in the memory resource.
It is a bit cleaner to have separate functions rather than keep codes in the callback, as callback normally have deeper indent.
The main reason is that this helps code review of later changes that make Expand at MemoryCollection efficient.
Tested: 1. on my mockup environment; added partition data into the fake dimm; URL /redfish/v1/Systems/system/Memory/dimm0 ``` { "@odata.id": "/redfish/v1/Systems/system/Memory/dimm0", "@odata.type": "#Memory.v1_11_0.Memory", "AllowedSpeedsMHz": [], "BaseModuleType": "RDIMM", "BusWidthBits": 0, "CapacityMiB": 1024, "DataWidthBits": 0, "ErrorCorrection": "NoECC", "FirmwareRevision": "0", "Id": "dimm0", "Name": "DIMM Slot", "OperatingSpeedMhz": 0, "RankCount": 0, "Regions": [ { "MemoryClassification": "", "OffsetMiB": 0, "PassphraseEnabled": false, "RegionId": "", "SizeMiB": 1024 } ], "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" } } ``` 2. No new Redfish Validator failures on MemoryCollection on real hardware.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I27b251ff32bab026d6fa919abf7b6dcf2905e4a3
show more ...
|
#
9a5aceac
|
| 17-May-2022 |
Nan Zhou <nanzhoumails@gmail.com> |
memory: move long code blocks in callbacks into separate functions
It is a bit cleaner to have separate functions rather than keep codes in the callback, as callback normally have deeper indent.
Th
memory: move long code blocks in callbacks into separate functions
It is a bit cleaner to have separate functions rather than keep codes in the callback, as callback normally have deeper indent.
The main reason is that this helps code review of later changes that make Expand at MemoryCollection efficient.
Tested: 1. Tested on my mock environment, ``` URI: /redfish/v1/Systems/system/Memory/dimm0 { "@odata.id": "/redfish/v1/Systems/system/Memory/dimm0", "@odata.type": "#Memory.v1_11_0.Memory", "AllowedSpeedsMHz": [], "BaseModuleType": "RDIMM", "BusWidthBits": 0, "CapacityMiB": 1024, "DataWidthBits": 0, "ErrorCorrection": "NoECC", "FirmwareRevision": "0", "Id": "dimm0", "Name": "DIMM Slot", "OperatingSpeedMhz": 0, "RankCount": 0, "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" } } ``` 2. No new Redfish Validator failures on MemoryCollection on real hardware.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I7693388049aeffa6ebd285b958e5ca6622e5d3b6
show more ...
|
#
da8ba403
|
| 03-May-2022 |
Nan Zhou <nanzhoumails@gmail.com> |
memory: correct type of MemorySizeInKB
This is needed for this code to work on both 32 and 64 bits system. According to the interface, https://github.com/openbmc/phosphor-dbus-interfaces/blob/388b58
memory: correct type of MemorySizeInKB
This is needed for this code to work on both 32 and 64 bits system. According to the interface, https://github.com/openbmc/phosphor-dbus-interfaces/blob/388b58f9a878f45b8ec243152cac5eb44ec90ced/yaml/xyz/openbmc_project/Inventory/Item/Dimm.interface.yaml#L9, MemorySizeInKB is of type size_t.
Tested: On real hardware, the memory resource is working as expected.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: Ie81d2610c245a08a22c3ea891495f34cc0bdc075
show more ...
|
#
45ca1b86
|
| 25-Mar-2022 |
Ed Tanous <edtanous@google.com> |
Add setUpRedfishRoute to all nodes in redfish
For better or worse, the series ahead of this is making use of setUpRedfishRoute to do the common "redfish specified" things that need to be done for a
Add setUpRedfishRoute to all nodes in redfish
For better or worse, the series ahead of this is making use of setUpRedfishRoute to do the common "redfish specified" things that need to be done for a connection, like header checking, filtering, and other things. In the current model, where BMCWEB_ROUTE is a common function for all HTTP routes, this means we need to propagate this injection call into the whole tree ahead of the requests being handled.
In a perfect world, we would invent something like a REDFISH_ROUTE macro, but because macros are discouraged, the routes take a variadic template of parameters, and each call to the route has a .privileges() call in the middle, there's no good way to effect this change in a less costly manner. This was messaged both in the prior reviews, and on discord sourcing improvements on this pattern, to which none arose.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Id29cc799e214edad41e48fc7ce6eed0521f90ecb
show more ...
|
#
1e04f3b2
|
| 18-Mar-2022 |
Jiaqing Zhao <jiaqing.zhao@intel.com> |
Memory: Fix OperatingMemoryModes and MemoryMedia properties
OperatingMemoryModes and MemoryMedia properties of Memory should be of array type, and removes the extra whitespace in OperatingMemoryMode
Memory: Fix OperatingMemoryModes and MemoryMedia properties
OperatingMemoryModes and MemoryMedia properties of Memory should be of array type, and removes the extra whitespace in OperatingMemoryModes.
Tested: Redfish validator passed.
Change-Id: I1b697db93e87dc791ce90a61be41da913fe61a36 Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
show more ...
|
#
b9d36b47
|
| 26-Feb-2022 |
Ed Tanous <edtanous@google.com> |
Consitently use dbus::utility types
This saves about 4k on the binary size
Tested: Redfish service validator passes.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I9546227a19c691b1aecb
Consitently use dbus::utility types
This saves about 4k on the binary size
Tested: Redfish service validator passes.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I9546227a19c691b1aecb80e80307889548c0293f
show more ...
|
#
80badf7c
|
| 18-Mar-2022 |
Jiaqing Zhao <jiaqing.zhao@intel.com> |
Memory: Remove extra loop in getPersistentMemoryProperties()
getDimmDataByService(), the caller of getPersistentMemoryProperties(), has already looped over the properties returned by DBus GetAll, bu
Memory: Remove extra loop in getPersistentMemoryProperties()
getDimmDataByService(), the caller of getPersistentMemoryProperties(), has already looped over the properties returned by DBus GetAll, but this function loop these properties again, bringing extra overhead. This patch removes this unwanted loop.
Tested: Added a log in getPersistentMemoryProperties(), it only prints once when GET /redfish/v1/Systems/system/Memory/{ID}.
Change-Id: Iac86770678e29ce5f530ceb23be5ce2013bc4658 Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
show more ...
|
#
866e4862
|
| 17-Feb-2022 |
Ed Tanous <edtanous@google.com> |
Detemplateify intToHexString
The routine of intToHexString is mostly common between all the various implementations, the only difference is in selecting a reasonable default size for the type. This
Detemplateify intToHexString
The routine of intToHexString is mostly common between all the various implementations, the only difference is in selecting a reasonable default size for the type. This commit moves to a common method, so the templates don't get created for each and every instantiation of intToHexString, and simplifies our code.
This saves a trivial amount (428 bytes) of compressed binary size.
Tested: Unit tests passing, and have good coverage of this.
Memory resources return the values as were there previously.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I6945a81a5e03c7a64d6a2a0629b24db941271930
show more ...
|
#
e05aec50
|
| 25-Jan-2022 |
Ed Tanous <edtanous@google.com> |
Add readability-redundant-* checks
There's a number of redundancies in our code that clang can sanitize out. Fix the existing problems, and enable the checks.
Signed-off-by: Ed Tanous <edtanous@go
Add readability-redundant-* checks
There's a number of redundancies in our code that clang can sanitize out. Fix the existing problems, and enable the checks.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ie63d7b7f0777b702fbf1b23a24e1bed7b4f5183b
show more ...
|
#
168e20c1
|
| 13-Dec-2021 |
Ed Tanous <edtanous@google.com> |
Move to common variant
This saves approximately 34kB in the compressed binary size of bmcweb due to reduced template instantiations. This amounts to a 2.5% reduction in the overall size.
Note, the
Move to common variant
This saves approximately 34kB in the compressed binary size of bmcweb due to reduced template instantiations. This amounts to a 2.5% reduction in the overall size.
Note, there were a few places where we broke const-correctness in the form of pulling a non-const reference out of a const variant. This new variant now requires const correctness, so some consts are added where required.
Tested: Code compiles.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I6a60c8881c1268627eedb4ffddf16689dc5f6ed2
show more ...
|
#
0fda0f12
|
| 15-Nov-2021 |
George Liu <liuxiwei@inspur.com> |
Update clang-format
refer: https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format `Don't break long string literals`
Tested: built bmcweb successfully and RedfishValidator Passed.
Sig
Update clang-format
refer: https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format `Don't break long string literals`
Tested: built bmcweb successfully and RedfishValidator Passed.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ib58f7c942fd3838592e043c57e0b6ffcdc3d963b
show more ...
|