History log of /openbmc/bmcweb/features/redfish/lib/processor.hpp (Results 51 – 75 of 83)
Revision Date Author Comments
# b1e8a8e3 16-May-2022 Ed Tanous <edtanous@google.com>

Remove messages::operationFailed from processor

A file write error being returned from dbus is by definition, an
internal error that the user can do nothing about, so it should be
returning internal

Remove messages::operationFailed from processor

A file write error being returned from dbus is by definition, an
internal error that the user can do nothing about, so it should be
returning internal error (ie 500) to the user, rather than
OperationFailed. OperationFailed refers to aggregation proxy use cases,
so its use here, while an understandable mistake, because dbus is
arguably a "proxy", is incorrect, and should be fixed.

Tested: Code compiles, no good way to test error cases. Inspection
only.

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

show more ...


# 1476687d 15-Mar-2022 Ed Tanous <edtanous@google.com>

Remove brace initialization of json objects

Brace initialization of json objects, while quite interesting from an
academic sense, are very difficult for people to grok, and lead to
inconsistencies.

Remove brace initialization of json objects

Brace initialization of json objects, while quite interesting from an
academic sense, are very difficult for people to grok, and lead to
inconsistencies. This patchset aims to remove a majority of them in
lieu of operator[]. Interestingly, this saves about 1% of the binary
size of bmcweb.

This also has an added benefit that as a design pattern, we're never
constructing a new object, then moving it into place, we're always
adding to the existing object, which in the future _could_ make things
like OEM schemas or properties easier, as there's no case where we're
completely replacing the response object.

Tested:
Ran redfish service validator. No new failures.

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

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


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


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


# 15ed6780 14-Dec-2021 Willy Tu <wltu@google.com>

json_utils: Add support jsonRead Patch/Action

Added support for readJson for Patch and Action. The only difference is
that Patch does not allow empty json input while Action does. Action with
empty

json_utils: Add support jsonRead Patch/Action

Added support for readJson for Patch and Action. The only difference is
that Patch does not allow empty json input while Action does. Action with
empty input will use the default value based on the implementation and
return 200 OK response code.

readJsonPatch will replace the existing readJson and be used for path
requests. It will not allow empty json input and all requested
keys are required in the json input.

readJsonAction will be used for Action requests where it is possible for
all of the properties to be optional and allow empty request.
The optional properties are determined by the requested values type.

All current Action readJson are replaced with readJsonAction. It does
not change the existing behavior since it needs `std::optional`.
This will have to be updated later as we define the default behavior.

Tested:
Added unit tests and readJsonAction allows empty empty json object.

No Change to Redfish Tree.

Change-Id: Ia5e1f81695c528a20f1dc985aee19c920d8adaea
Signed-off-by: Willy Tu <wltu@google.com>

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


# dcf2ebc0 25-Jan-2022 Ed Tanous <edtanous@google.com>

Enable readability-redundant-control-flow checks

These checks are a nice addition to our static analysis, as they
simplify code quite a bit, as can be seen by this diff being negative
lines.

Signed

Enable readability-redundant-control-flow checks

These checks are a nice addition to our static analysis, as they
simplify code quite a bit, as can be seen by this diff being negative
lines.

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

show more ...


# 5df6eda2 18-Jan-2022 Shantappa Teekappanavar <sbteeks@yahoo.com>

bmcweb: Add/Move common typedefs to dbus utility

The following typedefs that are commonly used by redfish services
to get dbus subtree objects:
MapperServiceMap =
std::vector<std::pair<std::stri

bmcweb: Add/Move common typedefs to dbus utility

The following typedefs that are commonly used by redfish services
to get dbus subtree objects:
MapperServiceMap =
std::vector<std::pair<std::string, std::vector<std::string>>>
MapperGetSubTreeResponse =
std::vector<std::pair<std::string, MapperServiceMap>>

This commit adds the above mentioned typedefs to dbus utility namespace
and removes locally defined typedefs in processor.hpp.

Testing:
Validator: No errors

Few sample outputs from curl command:

$ curl -k -X GET https://{$bmc}/redfish/v1/Systems/system/Processors
{
"@odata.id": "/redfish/v1/Systems/system/Processors",
"@odata.type": "#ProcessorCollection.ProcessorCollection",
"Members": [
{
"@odata.id": "/redfish/v1/Systems/system/Processors/dcm0-cpu0"
},
{
"@odata.id": "/redfish/v1/Systems/system/Processors/dcm0-cpu1"
},
{
"@odata.id": "/redfish/v1/Systems/system/Processors/dcm1-cpu0"
},
{
"@odata.id": "/redfish/v1/Systems/system/Processors/dcm1-cpu1"
}
],
"Members@odata.count": 4,
"Name": "Processor Collection"
}

$ curl -k -X GET
https://{$bmc}/redfish/v1/Systems/system/Processors/dcm0-cpu0
{
"@odata.id": "/redfish/v1/Systems/system/Processors/dcm0-cpu0",
"@odata.type": "#Processor.v1_12_0.Processor",
"Id": "dcm0-cpu0",
"Location": {
"PartLocation": {
"ServiceLabel": "U78DA.ND0.WZS004K-P0-C15"
}
},
"LocationIndicatorActive": false,
"Manufacturer": "",
"MaxSpeedMHz": 0,
"Model": "5C67",
"Name": "PROCESSOR MODULE",
"PartNumber": "03JM290",
"ProcessorId": {
"EffectiveFamily": ""
},
"ProcessorType": "CPU",
"SerialNumber": "YA3936061828",
"Socket": "",
"SparePartNumber": "F210110",
"Status": {
"Health": "OK",
"State": "Enabled"
},
"SubProcessors": {
"@odata.id":
"/redfish/v1/Systems/system/Processors/dcm0-cpu0/SubProcessors"
},
"TotalCores": 8,
"TotalThreads": 0
}

$ curl -k -X GET
https://{$bmc}/redfish/v1/Systems/system/Processors/dcm0-cpu0/SubProcessors
{
"@odata.id":
"/redfish/v1/Systems/system/Processors/dcm0-cpu0/SubProcessors",
"@odata.type": "#ProcessorCollection.ProcessorCollection",
"Members": [],
"Members@odata.count": 0,
"Name": "SubProcessor Collection"
}

Signed-off-by: Shantappa Teekappanavar <sbteeks@yahoo.com>
Change-Id: I297c763af38fa5b13ef297e911b338f406b7c6e6

show more ...


# 914e2d5d 07-Jan-2022 Ed Tanous <edtanous@google.com>

Enforce const correctness

For all async calls, we should be consistently capturing non trivial
objects by const reference. This corrects bmcweb to be consistent and
capture errors by const value, a

Enforce const correctness

For all async calls, we should be consistently capturing non trivial
objects by const reference. This corrects bmcweb to be consistent and
capture errors by const value, and objects by const reference.

Tested: Code compiles. Trivial changes.

This saves about 300 bytes on our compressed binary size.

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

show more ...


# 711ac7a9 20-Dec-2021 Ed Tanous <edtanous@google.com>

Consistently use ManagedObjectType

Some subsystems seem to have invented their own typedefs for this stuff,
move to using the one typedef in dbus::utility so we're consistent, and
we reduce our temp

Consistently use ManagedObjectType

Some subsystems seem to have invented their own typedefs for this stuff,
move to using the one typedef in dbus::utility so we're consistent, and
we reduce our templates.

Tested: code compiles

This saves a negligible amount (104 bytes compressed) on our binary
size.

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

show more ...


# 1e1e598d 11-Jun-2021 Jonathan Doman <jonathan.doman@intel.com>

Using sdbusplus::asio::getProperty

It simplifies a lot of code and after changing sdbusplus implementation
slightly reduces binary size if used together with:

https://gerrit.openbmc-project.xyz/c/o

Using sdbusplus::asio::getProperty

It simplifies a lot of code and after changing sdbusplus implementation
slightly reduces binary size if used together with:

https://gerrit.openbmc-project.xyz/c/openbmc/sdbusplus/+/49467

* Uncompressed size: 3033148 -> 3012164, -20984 B
* gzip compressed size: 1220586 -> 1214625, -5961 B

Tested:
- Redfish validator output is the same before and after the change

Change-Id: Ibe3227d3f4230de2363ba3d9396e51130c8240a5
Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>

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


# 1930fbd4 14-Sep-2021 Brandon Kim <brandonkim@google.com>

redfish-core: processor: Add Model, Microcode, Step

Add implementation of ProcessorId from Processor DMTF Schema.
"EffectiveModel", "MicrocodeInfo" and "Step" are mapped to "Model",
"Microcode" and

redfish-core: processor: Add Model, Microcode, Step

Add implementation of ProcessorId from Processor DMTF Schema.
"EffectiveModel", "MicrocodeInfo" and "Step" are mapped to "Model",
"Microcode" and "Step" from phosphor-dbus-interfaces

Tested:

With some of the information redacted as XX, we can see:
```
{
"@odata.id": "/redfish/v1/Systems/system/Processors/cpu0",
"@odata.type": "#Processor.v1_11_0.Processor",
"Id": "cpu0",
"MaxSpeedMHz": 0,
"Name": "Processor",
"ProcessorId": {
"EffectiveFamily": "X",
"EffectiveModel": "XX",
"MicrocodeInfo": "XXX",
"Step": "X"
},
"ProcessorType": "CPU",
"Socket": "0",
"Status": {
"Health": "OK",
"State": "Enabled"
},
"TotalCores": XX,
"TotalThreads": XXX
}
```

The Redfish-Service-Validator passed for Processors:
```
*** /redfish/v1/Systems/system/Processors
Type (#ProcessorCollection.ProcessorCollection), GET SUCCESS (time: 0.286532)

...
...

*** /redfish/v1/Systems/system/Processors/cpu0
Type (#Processor.v1_11_0.Processor), GET SUCCESS (time: 0.434741)
PASS

...
...

*** /redfish/v1/JsonSchemas/Processor
Type (#JsonSchemaFile.v1_0_2.JsonSchemaFile), GET SUCCESS (time: 0.134821)
PASS
```

Signed-off-by: Brandon Kim <brandonkim@google.com>
Change-Id: Ie770bfcdb8bf9d5efbf90cc9d9c09daaf8447a6f

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


# f201ffb4 09-Oct-2021 Ed Tanous <edtanous@google.com>

Define hex helper utils

This commit attempts to optimize some code and reduce our dependence on
boost libraries, as the coding standard recommends. It does this by
introducing a new method, intToHe

Define hex helper utils

This commit attempts to optimize some code and reduce our dependence on
boost libraries, as the coding standard recommends. It does this by
introducing a new method, intToHexString, which is a greatly simplified
"to hex" converter that doesn't require std::locale, or stream buffers,
and is very efficient. This deletes our need for boost::format, as well
as our need for boost::lexical_cast, both of which are fairly heavy
libraries.

Tested:
Unit tests pass.

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

show more ...


# 4f9637fa 15-Jul-2021 Patrick Williams <patrick@stwcx.xyz>

use non-deprecated dedup_variant_t

sdbusplus changed the preferred template name to follow C++14
STL conventions and be named 'dedup_variant_t'.

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

use non-deprecated dedup_variant_t

sdbusplus changed the preferred template name to follow C++14
STL conventions and be named 'dedup_variant_t'.

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

show more ...


# ed398213 09-Jun-2021 Ed Tanous <edtanous@google.com>

Automate PrivilegeRegistry to code

This commit attempts to automate the creation of our privileges
structures from the redfish privilege registry. It accomplishes this by
updating parse_registries.

Automate PrivilegeRegistry to code

This commit attempts to automate the creation of our privileges
structures from the redfish privilege registry. It accomplishes this by
updating parse_registries.py to also pull down the privilege registry
from DMTF.
The script then generates privilege_registry.hpp, which include const
defines for all the privilege registry entries in the same format that
the Privileges struct accepts. This allows new clients to simply
reference the variable to these privilege structures, instead of having
to manually (ie error pronely) put the privileges in themselves.

This commit updates all the routes.

For the moment, override and OEM schemas are not considered. Today we
don't have any OEM-specific Redfish routes, so the existing ones inherit
their parents schema. Overrides have other issues, and are already
incorrect as Redfish defines them.

Binary size remains unchanged after this patchset.

Tested:
Ran redfish service validator

Ran test case from f9a6708c4c6490257e2eb6a8c04458f500902476 to ensure
that the new privileges constructor didn't cause us to regress the brace
construction initializer.

Checked binary size with:
gzip -c
$BBPATH/tmp/work/s7106-openbmc-linux-gnueabi/obmc-phosphor-image/1.0-r0/rootfs/usr/bin/bmcweb
| wc -c
1244048

(tested on previous patchset)

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

show more ...


# 49e429ca 03-Mar-2021 Jonathan Doman <jonathan.doman@intel.com>

Expose Processor PPIN property

Some Processors may support exposing a globally unique identifier in
addition to a serial number. Redfish supports this via
ProcessorId.ProtectedIdentificationNumber p

Expose Processor PPIN property

Some Processors may support exposing a globally unique identifier in
addition to a serial number. Redfish supports this via
ProcessorId.ProtectedIdentificationNumber property. ("Protected"
indicates it may be a sensitive value due to tracking/privacy concerns -
Intel CPUs allow the customer to mask the PPIN so it can't be exposed.)

cpuinfoapp in smbios-mdr repo is currently implementing this interface.

Tested:
- New property is shown (only for cpus with valid PPIN)
- Passed Redfish Service Validator with no errors.

Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
Change-Id: I233931ac640338e8f50f37ba4cc7298c7a0db9bf

show more ...


# 432a890c 14-Jun-2021 Ed Tanous <edtanous@google.com>

Remove ambiguous privileges constructor

There are a number of endpoints that assume that a given routes
privileges are governed by a single set of privileges, instead of
multiple sets ORed together.

Remove ambiguous privileges constructor

There are a number of endpoints that assume that a given routes
privileges are governed by a single set of privileges, instead of
multiple sets ORed together. To handle this, there were two overloads
of the privileges() method, one that took a vector of Privileges, and
one that took an initializer_list of const char*. Unfortunately, this
leads some code in AccountService to pick the wrong overload when it's
called like this
.privileges( {{"ConfigureUsers"}, {"ConfigureManager"},
{"ConfigureSelf"}})

This is supposed to be "User must have ConfigureUsers, or
ConfigureManager, or ConfigureSelf". Currently, because it selects the
wrong overload, it computes to "User must have ConfigureUsers AND
ConfigureManager AND ConfigureSelf.

The double braces are supposed to cause this to form a vector of
Privileges, but it appears that the initializer list gets consumed, and
the single invocation of initializer list is called. Interestingly,
trying to put in a privileges overload of
intializer_list<initializer_list<const char*>> causes the compilation to
fail with an ambiguous call error, which is what I would've expected to
see previously in this case, but alas, I'm only a novice when it comes
to how the C++ standard works in these edge cases. This is likely due
in part to the fact that they were templates of an unused template param
(seemingly copied from the previous method) and SFINAE rules around
templates.

This commit functionally removes one of the privileges overloads, and
adds a second set of braces to every privileges call that previously had
a single set of braces. Previous code will not compile now, which is
IMO a good thing.

This likely popped up in the Node class removal, because the Node class
explicitly constructs a vector of Privilege objects, ensuing it can hit
the right overload

Tested:
Ran Redfish service validator

Tested the specific use case outlined on discord with:
Creating a new user with operator privilege:
```
redfishtool -S Always -u root -p 0penBmc -vvvvvvvvv -r 192.168.7.2
AccountService adduser foo mysuperPass1 Operator
```

Then attempting to list accounts:
```
curl -vvvv --insecure --user foo:mysuperPass1
https://192.168.7.2/redfish/v1/AccountService/Accounts/foo
```

Which succeeded and returned the account in question.

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

show more ...


# 71b82f26 10-May-2021 Sharad Yadav <sharady@nvidia.com>

Processor: Add UUID property

This commit adds the support for implementing the "UUID" property
as defined in the Redfish Processor schema.

UUID will enable further platform/board specific monitorin

Processor: Add UUID property

This commit adds the support for implementing the "UUID" property
as defined in the Redfish Processor schema.

UUID will enable further platform/board specific monitoring and control.

Redfish validator passed.

Tested:
$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json"
-X GET https://${bmc}/redfish/v1/Systems/system/Processors/GPU1
{
"@odata.id": "/redfish/v1/Systems/system/Processors/GPU1",
"@odata.type": "#Processor.v1_11_0.Processor",
"Id": "GPU1",
"Name": "Processor",
"UUID": "5429d122-cd8a-4ff3-9102-be794ecfb8a7"
}

Signed-off-by: Sharad Yadav <sharady@nvidia.com>
Change-Id: I23633728d965e26d7231dc3f2badc45de1fb268a

show more ...


# 7e860f15 08-Apr-2021 John Edward Broadbent <jebr@google.com>

Remove Redfish Node class

Reduces the total number of lines and will allow for easier testing of
the redfish responses.

A main purpose of the node class was to set app.routeDynamic(). However
now a

Remove Redfish Node class

Reduces the total number of lines and will allow for easier testing of
the redfish responses.

A main purpose of the node class was to set app.routeDynamic(). However
now app.routeDynamic can handle the complexity that was once in critical
to node. The macro app.routeDynamic() provides a shorter cleaner
interface to the unerlying app.routeDyanic call. The old pattern set
permissions for 6 interfaces (get, head, patch, put, delete_, and post)
even if only one interface is created. That pattern creates unneeded
code that can be safely removed with no effect.
Unit test for the responses would have to mock the node the class in
order to fully test responses.

see https://github.com/openbmc/bmcweb/issues/181

The following files still need node to be extracted.

virtual_media.hpp
account_service.hpp
redfish_sessions.hpp
ethernet.hpp

The files above use a pattern that is not trivial to address. Often their
responses call an async lambda capturing the inherited class. ie
(https://github.com/openbmc/bmcweb/blob/ffed87b5ad1797ca966d030e7f979770
28d258fa/redfish-core/lib/account_service.hpp#L1393)
At a later point I plan to remove node from the files above.

Tested:
I ran the docker unit test with the following command.
WORKSPACE=$(pwd) UNIT_TEST_PKG=bmcweb
./openbmc-build-scripts/run-unit-test-docker.sh

I ran the validator and this change did not create any issues.
python3 RedfishServiceValidator.py -c config.ini

Signed-off-by: John Edward Broadbent <jebr@google.com>
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I147a0289c52cb4198345b1ad9bfe6fdddf57f3df

show more ...


# 3cde86f1 02-Dec-2020 Jonathan Doman <jonathan.doman@intel.com>

Handle Processor.AppliedOperatingConfig PATCH

Allow client to PATCH the URI pointing to the active OperatingConfig for
a given processor, in order to dynamically change the processor's
configuration

Handle Processor.AppliedOperatingConfig PATCH

Allow client to PATCH the URI pointing to the active OperatingConfig for
a given processor, in order to dynamically change the processor's
configuration. The OperatingConfig related properties are only available
if a supporting backend daemon is running - currently we have the Intel
cpuinfoapp in the smbios-mdr repo.

This change does basic validation on input data, then sets the D-Bus
property and translates any return errors into Redfish error messages.

Tested:
- PATCH non-existent Processor -> ResourceNotFound
- PATCH with string/int -> PropertyValueTypeError
- PATCH with object w/o @odata.id -> PropertyMissing+Unknown
- PATCH with config from different Processor -> PropertyValueIncorrect
- PATCH with non-existent config -> PropertyValueIncorrect
- PATCH with valid config -> OK, see new config on next GET

- Hack cpuinfoapp backend service to return all possible error codes and
verify that correct Redfish error is returned.

Change-Id: I19d8b461fac25682f1883fe769d840f18f4141a8
Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>

show more ...


# a1649ec6 30-Mar-2021 Chicago Duan <duanzhijia01@inspur.com>

Redfish: Fix the health and state properties of processor

The processor resource needs to look at Present and Functional to determine state and health.
This is how other resources do it.
It should n

Redfish: Fix the health and state properties of processor

The processor resource needs to look at Present and Functional to determine state and health.
This is how other resources do it.
It should not look at totalCores to determine present / State.

HealthPopulate is not used. We use Functional to determine health status.
Functional is a bool that HealthPopulate cannot handle.

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

show more ...


# 8d1b46d7 31-Mar-2021 zhanghch05 <zhanghch05@inspur.com>

Using AsyncResp everywhere

Get the core using AsyncResp everywhere, and not have each individual handler
creating its own object.We can call app.handle() without fear of the response
getting ended a

Using AsyncResp everywhere

Get the core using AsyncResp everywhere, and not have each individual handler
creating its own object.We can call app.handle() without fear of the response
getting ended after the first tree is done populating.
Don't use res.end() anymore.

Tested:
1. Validator passed.

Signed-off-by: zhanghaicheng <zhanghch05@inspur.com>
Change-Id: I867367ce4a0caf8c4b3f4e07e06c11feed0782e8

show more ...


1234