Age | Commit message (Collapse) | Author | Files | Lines |
|
This commit adds the support for "DateTimeLocalOffset" property under
"/redfish/v1/Managers/bmc/" Redfish URI.
And it also adds the support for "DateTime" & "DateTimeLocalOffset"
properties under "/redfish/v1/Systems/system/LogServices/<id>/" &
"/redfish/v1/Managers/bmc/LogServices/<id>/" Redfish URI's.
These properties shows the current Date, Time & the UTC offset that the
current DateTime property value contains.
Tested:
- Redfish Validator Test passed.
curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X GET https://${bmc}/redfish/v1/Managers/bmc/
{
"@odata.id": "/redfish/v1/Managers/bmc",
"@odata.type": "#Manager.v1_11_0.Manager",
"Actions": {
"#Manager.Reset": {
"@Redfish.ActionInfo": "/redfish/v1/Managers/bmc/ResetActionInfo",
"target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset"
},
"#Manager.ResetToDefaults": {
"ResetType@Redfish.AllowableValues": [
"ResetAll"
],
"target": "/redfish/v1/Managers/bmc/Actions/Manager.ResetToDefaults"
}
},
"DateTime": "2021-06-04T12:18:28+00:00",
"DateTimeLocalOffset": "+00:00",
"Description": "Baseboard Management Controller",
"EthernetInterfaces": {
"@odata.id": "/redfish/v1/Managers/bmc/EthernetInterfaces"
},
"FirmwareVersion": "2.11.0-dev-114-gc1989599d",
"GraphicalConsole": {
"ConnectTypesSupported": [
"KVMIP"
],
"MaxConcurrentSessions": 4,
"ServiceEnabled": true
},
"Id": "bmc",
"LastResetTime": "2021-06-04T12:07:02+00:00",
"Links": {
"ActiveSoftwareImage": {
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/419c86fb"
},
"ManagerForServers": [
{
"@odata.id": "/redfish/v1/Systems/system"
}
],
"ManagerForServers@odata.count": 1,
"SoftwareImages": [
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/419c86fb"
}
],
"SoftwareImages@odata.count": 1
},
"LogServices": {
"@odata.id": "/redfish/v1/Managers/bmc/LogServices"
},
"ManagerType": "BMC",
"Model": "OpenBmc",
"Name": "OpenBmc Manager",
"NetworkProtocol": {
"@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol"
},
"Oem": {
"@odata.id": "/redfish/v1/Managers/bmc#/Oem",
"@odata.type": "#OemManager.Oem",
"OpenBmc": {
"@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc",
"@odata.type": "#OemManager.OpenBmc",
"Certificates": {
"@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates"
}
}
},
"PowerState": "On",
"SerialConsole": {
"ConnectTypesSupported": [
"IPMI",
"SSH"
],
"MaxConcurrentSessions": 15,
"ServiceEnabled": true
},
"ServiceEntryPointUUID": "1832ebbb-0b54-44e9-90d7-b49108f6863c",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"UUID": "7fe3d13d-4ae7-4a4f-add1-2d60308124b4"
}
curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X GET https://${bmc}/redfish/v1/Systems/system/LogServices/EventLog/
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog",
"@odata.type": "#LogService.v1_1_0.LogService",
"Actions": {
"#LogService.ClearLog": {
"target": "/redfish/v1/Systems/system/LogServices/EventLog/Actions/LogService.ClearLog"
}
},
"DateTime": "2021-06-04T12:11:10+00:00",
"DateTimeLocalOffset": "+00:00",
"Description": "System Event Log Service",
"Entries": {
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries"
},
"Id": "EventLog",
"Name": "Event Log Service",
"OverWritePolicy": "WrapsWhenFull"
}
Signed-off-by: Tejas Patil <tejaspp@ami.com>
Change-Id: I416d13ae11e236cf4552f817a9bd69b48f9b5afb
|
|
2020.3 moved SerialConsole and GraphicalConsole to ComputerSystem.
More information can be found on:
http://www.dmtf.org/sites/default/files/Redfish_Release_2020.3_Overview.pdf
These Consoles are readonly properties and were recently added.
Figured no clients are looking for them, but the OCP profile does
require SerialConsole so left them in Manager.
The OCP profile has not released a new version in 18 months.
Filed the following issue with the profile:
https://github.com/opencomputeproject/OCP-Profiles/issues/23
After we remove from manager the following validator warning
will go away:
"SerialConsole: The given property is deprecated by revision:
This property has been deprecated in favor of the SerialConsole
property in the ComputerSystem resource."
Tested: Passes Validator.
"GraphicalConsole": {
"ConnectTypesSupported": [
"KVMIP"
],
"MaxConcurrentSessions": 4,
"ServiceEnabled": true
},
"SerialConsole": {
"IPMI": {
"ServiceEnabled": true
},
"MaxConcurrentSessions": 15,
"SSH": {
"HotKeySequenceDisplay": "Press ~. to exit console",
"Port": 2200,
"ServiceEnabled": true
}
},
Change-Id: I1cc41c0da67e0d4123678f645828dfe1856d7a8f
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Signed-off-by: Abhishek Patel <Abhishek.Patel@ibm.com>
|
|
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
|
|
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
|
|
"After setting response to internal error you should stop adding more content to response. Try to return instead of continuing a loop"
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/39970/9/redfish-core/lib/pcie_slots.hpp#169
Signed-off-by: Chicago Duan <duanzhijia01@inspur.com>
Change-Id: Iadd3062ba7fef31ba61eea1e79eb3a903716b9e9
|
|
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
|
|
The nlohmann::json::dump call needs to be called with specific arguments
to avoid throwing in failure cases. http connection already does this
properly, but a bunch of code has snuck in (mostly in redfish) that
ignores this, and calls it incorrectly. This can potentially lead to a
crash if the wrong thing throws on invalid UTF8 characters.
This audits the whole codebase, and replaces every dump() call with the
correct dump(2, ' ', true, nlohmann::json::error_handler_t::replace)
call. For correct output, the callers should expect no change, and in
practice, this would require injecting non-utf8 characters into the
BMC.
Tested:
Ran several of the endpoints/error conditions in question, including
some of the error cases. Observed correct responses. I don't know of a
security issue that would allow injecting invalid utf8 into the BMC, but
in theory if it were possible, this would prevent a crash.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I4a15b8e260e3db129bc20484ade4ed5449f75ad0
|
|
This commit adds the following inventory properties for the
BMC resource:
a) LocationCode, a free form, implementation-defined string
to provide the location of the BMC. This is needed so an
implementation can identify the BMC via system diagrams and such.
b) Model, maps to a CCIN/Card ID for IBM's implementation,
is a string for the manufacturer's part model. For IBM's
implementation, it is a four-digit value assigned for each
possible FRU.
c) SparePartNumber, also field-replaceable unit (FRU) Part Number,
is a part number that identifies the FRU for replacement
specifically ordering of a new part.
For some manufacturers the BMC is soldered down, this is not the
case for all manufacturers. For our systems, the BMC can be
replaced and these properties are essential to locate and replace
the BMC.
Redfish validator has been executed on this change and no new
error was found.
Sample Output:
{
"@odata.id": "/redfish/v1/Managers/bmc",
"@odata.type": "#Manager.v1_11_0.Manager",
"Actions": {
"#Manager.Reset": {
"@Redfish.ActionInfo": "/redfish/v1/Managers/bmc/ResetActionInfo",
"target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset"
},
"#Manager.ResetToDefaults": {
"ResetType@Redfish.AllowableValues": [
"ResetAll"
],
"target": "/redfish/v1/Managers/bmc/Actions/Manager.ResetToDefaults"
}
},
"DateTime": "2020-12-18T07:37:34+00:00",
"Description": "Baseboard Management Controller",
"EthernetInterfaces": {
"@odata.id": "/redfish/v1/Managers/bmc/EthernetInterfaces"
},
"FirmwareVersion": "fw1020.00-12.1-10-g60fee5936",
"GraphicalConsole": {
"ConnectTypesSupported": [
"KVMIP"
],
"MaxConcurrentSessions": 4,
"ServiceEnabled": true
},
"Id": "bmc",
"LastResetTime": "2020-12-09T17:21:20+00:00",
"Links": {
"ActiveSoftwareImage": {
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/e7522a84"
},
"ManagerForChassis": [
{
"@odata.id": "/redfish/v1/Chassis/Nisqually_Backplane"
}
],
"ManagerForChassis@odata.count": 1,
"ManagerForServers": [
{
"@odata.id": "/redfish/v1/Systems/system"
}
],
"ManagerForServers@odata.count": 1,
"ManagerInChassis": {
"@odata.id": "/redfish/v1/Chassis/Nisqually_Backplane"
},
"SoftwareImages": [
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/e7522a84"
}
],
"SoftwareImages@odata.count": 1
},
"Location": {
"PartLocation": {
"ServiceLabel": "U78DA.ND1.1234567-P0-C5"
}
},
"LogServices": {
"@odata.id": "/redfish/v1/Managers/bmc/LogServices"
},
"ManagerType": "BMC",
"Manufacturer": "",
"Model": "",
"Name": "OpenBmc Manager",
"NetworkProtocol": {
"@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol"
},
"Oem": {
"@odata.id": "/redfish/v1/Managers/bmc#/Oem",
"@odata.type": "#OemManager.Oem",
"OpenBmc": {
"@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc",
"@odata.type": "#OemManager.OpenBmc",
"Certificates": {
"@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates"
}
}
},
"PartNumber": "PN12345",
"PowerState": "On",
"SerialConsole": {
"ConnectTypesSupported": [
"IPMI",
"SSH"
],
"MaxConcurrentSessions": 15,
"ServiceEnabled": true
},
"SerialNumber": "YL6B58010000",
"ServiceEntryPointUUID": "280c3750-fa95-42cd-96aa-7834853bd922",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"UUID": "35d98d20-cf67-4575-8aaa-0c40c398efdf"
}
Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
Change-Id: I53044fb0173be8fce7a13aadc2cf5c2903529486
|
|
Implement Manufacturer,PartNumber and SerialNumber in /redfish/v1/Managers/bmc
The Redfish manager defines these new properties:
https://redfish.dmtf.org/schemas/v1/Manager.v1_10_0.json
Tested:
Validator passes
curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Managers/bmc
{
"@odata.id": "/redfish/v1/Managers/bmc",
"@odata.type": "#Manager.v1_9_0.Manager",
"Actions": {
"#Manager.Reset": {
"@Redfish.ActionInfo": "/redfish/v1/Managers/bmc/ResetActionInfo",
"target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset"
},
"#Manager.ResetToDefaults": {
"ResetType@Redfish.AllowableValues": [
"ResetAll"
],
"target": "/redfish/v1/Managers/bmc/Actions/Manager.ResetToDefaults"
}
},
... ...
"Manufacturer": "testManufacturer",
... ...
"PartNumber": "testPartNumber",
... ...
"SerialNumber": "testSerialNumber",
... ...
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"UUID": "d80b997e-d7eb-4773-b375-ed18e87a4ed4"
}
Signed-off-by: Chicago Duan <duanzhijia01@inspur.com>
Change-Id: Id3765cfb8d80b5958fb0f82ecd7f5d89f90f893a
|
|
Already in the log macro.
Change-Id: Ia4d2c801d8ec7dcef5141db1ef6a6eda1df24183
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
- This commit improves certain while loops to range based for loops.
- This commit also fixes the cppcheck warning that mentions about
performance issues when using postfix operators on non-primitive
types.
Tested By:
- A function is unittested.
- GET on both EthernetInterfaces & certificate service
looks good without any issues.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I85420f7bf9af45a97e1a93b916f292c2516f5802
|
|
1st, alphabetize the tidy-list for good housekeeping.
Next, enable all the clang-tidy performance checks, and resolve all the
issues. most of the issues boil down to:
1. Using std::move on const variables. This does nothing.
2. Passing big variables (like std::string) by value.
3. Using double quotes on a find call, which constructs an intermediate
string, rather than using the character overload.
Tested
Loaded on system, logged in successfully and pulled down webui-vue. No
new errors.
Walked the Redfish tree a bit, and observed no new problems.
Ran redfish service validator. Got no new failures (although there are
a lot of log service deprecation warnings that we should look at).
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I2238958c4b22c1e554e09a0a1787c744bdbca43e
|
|
(In the voice of the kid from sixth sense) I see string copies...
Apparently there are a lot of places we make unnecessary copies. This
fixes all of them.
Not sure how to split this up into smaller patches, or if it even needs
split up. It seems pretty easy to review to me, because basically every
diff is identical.
Change-Id: I22b4ae4f96f7e4082d2bc701098a04f7bed95369
Signed-off-by: Ed Tanous <ed@tanous.net>
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
|
|
Now that CI can handle clang-tidy, and a lot of the individual fixes
have landed for the various static analysis checks, lets see how close
we are.
This includes bringing a bunch of the code up to par with the checks
that require. Most of them fall into the category of extraneous else
statements, const correctness problems, or extra copies.
Tested:
CI only. Unit tests pass.
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I9fbd346560a75fdd3901fa40c57932486275e912
|
|
Tested:
Code compiles in clang
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: Ib7377d05441328197e1de59fabc0ca9bfa0b703b
|
|
SoftwareImages was added in Manager in 1_6_0 and Bios in 1_1_0.
Use the existing getActiveFwVersion function but rename to
populateFirmwareInformation. Changed the mapper call from a GetObject to a
GetSubTree. Added some debug to the function.
Tested: Validator passes.
curl -k https://$bmc/redfish/v1/Managers/bmc
....
"Links": {
"ActiveSoftwareImage": {
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/e4e1c69d"
},
"ManagerForChassis": [
....
"@odata.id": "/redfish/v1/Chassis/chassis"
},
"SoftwareImages": [
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/730944ed"
},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/e4e1c69d"
}
],
"SoftwareImages@odata.count": 2
},
...
Change-Id: I20798852a2f62575854820bff36175dda38c7dbc
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
Add ForceRestart in Action/#Manager.Reset/ResetType@AllowableValues,
as it is a mandatory parameter in the OCP Redfish Profile v1.0.
Tested:
1. Verified redfish validator passed
2. Verified details from Redfish
GET: https://<BMC-IP>/redfish/v1/Managers/bmc/ResetActionInfo
Response:
{
"@odata.id": "/redfish/v1/Managers/bmc/ResetActionInfo",
"@odata.type": "#ActionInfo.v1_1_2.ActionInfo",
"Id": "ResetActionInfo",
"Name": "Reset Action Info",
"Parameters": [
{
"AllowableValues": [
"GracefulRestart",
"ForceRestart"
],
"DataType": "String",
"Name": "ResetType",
"Required": true
}
]
}
Case 1: ForceRestart:
POST: https://<BMC-IP>/redfish/v1/Managers/bmc/Actions/Manager.Reset
Body:
{
"ResetType": "ForceRestart"
}
Response:
{
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"Message": "Successfully Completed Request",
"MessageArgs": [],
"MessageId": "Base.1.4.0.Success",
"Resolution": "None",
"Severity": "OK"
}
]
}
Case 2: GracefulRestart:
POST: https://<BMC-IP>/redfish/v1/Managers/bmc/Actions/Manager.Reset
Body:
{
"ResetType": "GracefulRestart"
}
Response: Success
Case 3: Negative test case
POST: https://<BMC-IP>/redfish/v1/Managers/bmc/Actions/Manager.Reset
Body:
{
"ResetType": "Test1"
}
Response:
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"Message": "The parameter Test1 for the action ResetType is not
supported on the target resource.",
"MessageArgs": [
"Test1",
"ResetType"
],
"MessageId": "Base.1.4.0.ActionParameterNotSupported",
"Resolution": "Remove the parameter supplied and resubmit the
request if the operation failed.",
"Severity": "Warning"
}
"code": "Base.1.4.0.ActionParameterNotSupported",
"message": "The parameter Test1 for the action ResetType is not
supported on the target resource."
}
}
Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: I84f4942ddabc564a267d7db8e582ad8c11b5399b
|
|
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>
|
|
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
|
|
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>
|
|
ActiveSoftwareImage was added to Manager in v1_6_0.
It is a Readwrite property.
This supports only switching the BMC running image.
This assumes the BMC updater is
xyz.openbmc_project.Software.BMC.Updater.
This assumes the switch is Immediate and calls a BMC
reboot after setting the priority to 0.
Patch set 1 had a new Redfish.Settings for the Manager at
/redfish/v1/Managers/bmc/Settings and a new setting,
ActiveSoftwareImageApplyTime.
This was removed due to complexity.
A future commit could add support to allow this Setting to be
exposed and PATCHed.
From https://redfish.dmtf.org/schemas/v1/Manager.v1_9_0.json
"ActiveSoftwareImage": {
...
"description": "The link to the software inventory resource that
represents the active firmware image for this manager.",
"longDescription": "This property shall contain a link to a resource
of type SoftwareInventory that represents the active firmware image for
this manager.",
"readonly": false,
"versionAdded": "v1_6_0"
Tested: Validator passes
curl -k -X PATCH -d \
'{ "Links": { "ActiveSoftwareImage": { "@odata.id":"/redfish/v1/UpdateService/FirmwareInventory/82d3ec86"}}}' \
https://$bmc/redfish/v1/Managers/bmc
{
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"Message": "Successfully Completed Request",
Change-Id: Id9d29af5332f9e76ec172e1e4351980a6772477c
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
ActiveSoftwareImage was added to Bios in v1_1_0 and Manager in v1_6_0.
What Redfish calls active is the functional or running image in
OpenBMC.
Reused getActiveFwVersion which means less D-Bus calls when
calling from Manager.
From https://redfish.dmtf.org/schemas/v1/Manager.v1_9_0.json
"ActiveSoftwareImage": {
...
"description": "The link to the software inventory resource that
represents the active firmware image for this manager.",
"longDescription": "This property shall contain a link to a resource
of type SoftwareInventory that represents the active firmware image for
this manager.",
"readonly": false,
"versionAdded": "v1_6_0"
PATCH support will come later.
Tested: Validator passes
Manager:
...
"FirmwareVersion": "2.9.0-dev-515-g92efac612-dirty",
...
"Links": {
"ActiveSoftwareImage": {
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/82d3ec86"
},
"ManagerForChassis": [
{
"@odata.id": "/redfish/v1/Chassis/chassis"
}
],
...
System:
"BiosVersion": "IBM-witherspoon-OP9-v2.3-rc2-3.28",
Bios:
"ActiveSoftwareImage": {
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/9f75c5ad"
}
},
Change-Id: Ia3583b4cb513bf36942a9dcbc4588615275bb2ad
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
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>
|
|
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>
|
|
Manager LastResetTime was added in Redfish release 2020.2.
It maps to LastRebootTime on D-Bus.
LastRebootTime on D-Bus is in epoch time, in milliseconds.
Redfish uses the ISO 8601 standard for dates.
Will be used on the OpenBMC GUI.
Tested: Validator passes.
curl -k https://$bmc/redfish/v1/Managers/bmc
...
"LastResetTime": "2020-06-23T19:43:24+00:00",
Took the epoch time at state/bmc0/attr/LastRebootTime and verified
when converted it was the same.
GMT: Tuesday, June 23, 2020 7:43:24 PM
Change-Id: I55da7ad87ccd6021e4a8e7d522333941afe4084d
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
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>
|
|
ResetToDefaults, called factory reset in OpenBMC, was added in
2020.1.
Calls BMC code updater factory reset since BMC code updater factory
reset wipes the whole BMC read-write filesystem which includes things
like the network settings.
OpenBMC only supports ResetToDefaultsType "ResetAll".
Depends on
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-bmc-code-mgmt/+/32989
Tested: Along with 32989, validator passes and was able to
factory reset.
curl -k https://$bmc/redfish/v1/Managers/bmc
{
"@odata.id": "/redfish/v1/Managers/bmc",
"@odata.type": "#Manager.v1_8_0.Manager",
"Actions": {
"#Manager.Reset": {
"ResetType@Redfish.AllowableValues": [
"GracefulRestart"
],
"target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset"
},
"#Manager.ResetToDefaults": {
"ResetType@Redfish.AllowableValues": [
"ResetAll"
],
"target": "/redfish/v1/Managers/bmc/Actions/Manager.ResetToDefaults"
}
},
...
curl -k -X POST \
https://${bmc}/redfish/v1/Managers/bmc/Actions/Manager.ResetToDefaults \
-d '{"ResetToDefaultsType": "ResetAll"}'
{
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"Message": "Successfully Completed Request",
"MessageArgs": [],
"MessageId": "Base.1.4.0.Success",
"Resolution": "None",
"Severity": "OK"
}
]
}
Change-Id: Ia830fd05dc15fd6311f84dff191a3718c645c040
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
Updated comment and var name to follow camelCase.
Moved doBMCGracefulRestart to common function so could be used
by factory reset in later commit. Moved to BMCWEB_LOG_DEBUG.
Tested: Passed validator. BMC reboot worked.
Change-Id: I019c174c3db625666ab6601d08cd4fa13e9e0274
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
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: I1a229e996b30b4223036c58a111e4c3ab4b749c6
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
Code added that deleted configurations was needed to
get the chassis data. Instead just count the number
of configurations to not allow posting more.
Tested: Creating new PIDs worked again
Change-Id: Ieb7ff7d16967402da64faf6a5cb2d0989af36d23
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
Right now there is no limit, so someone could attack
the bmc by adding a very large number of controllers.
Create a limit so this isn't possible.
Tested: Add / Remove functionality still works
Change-Id: Ib408293431250d93b0af71616a1668f6a3d0904a
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
This puts a block in to return early if we are asked
to delete something we can't find on D-Bus. This code
path was creating a segfault, but theres no reason to
continue after we can't find an object we are asked to
delete, so we can just avoid it. Also clean up the end
iterator dereference so it doesn't happen in any other
path.
Tested: Segfault goes away
Change-Id: I33622e5e8ab09fba0681e4f86f4a7068f6ef0be7
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
This change adds VirtualMedia scheme to Redfish.
Implementation is based on input from virtual-media module
and nbd proxy which is a bmcweb part. The code is used
only in case ndb-proxy is supported in bmcweb
(BMCWEB_ENABLE_VM_NBDPROXY compilation flag).
Tested:
* Manual tests together with nbd proxy and virtual media app
- For requests: Postman and/or HTTPie, started with logs
enabled and Valgrind
- Manual result validation
* Tests ran:
- GET on collection with manual validation
- PUT/POST/DELETE on collection
- GET on item/nonexistent item
- PUT/POST/DELETE on item
* Redfish Service Validator tested, no new issues found.
Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
Change-Id: I5415dc0ffe52069fd35bc614b0378bbc4ad41ff6
|
|
Typo correction: 'refish' to "redfish"
Tested:
Checked chassis URI and observed correct spelling.
Change-Id: Ic09ab11acd47fdf45fadc485df9c1fd03c0ee4fb
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
|
|
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
|
|
Now we support up to 4 concurrent KVM sessions so this commit fixes
'MaxConcurrentSessions' property of 'GraphicalConsole'.
Change-Id: Id225247dcb2d0b884a8a41253863294385268585
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
|
|
GraphicalConsole
This is required feature
Tested:
1. Verified by Readfish Service Validator.
2. https://IP_ADDR/redfish/v1/Managers/bmc
"GraphicalConsole": {
"ConnectTypesSupported": ["KVMIP"],
"MaxConcurrentSessions": 1,
"ServiceEnabled": true
}
"SerialConsole": {
"ConnectTypesSupported": ["IPMI", "SSH"],
"MaxConcurrentSessions": 15,
"ServiceEnabled": true
}
Change-Id: I01700085f4d9d7f3a4aa80fa4240ed201e948159
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
|
|
1) Implements CertificateCollection schema to upload
CA certificates and to list existing CA certificates
2) Modified CertificateLocatons schema to list CA
certificates
3) Modified ReplaceCertificate action of CertificateService
schema to cater for replacing existing CA certificate
Tested:
1) No validation failure
2) Truststore CertificateCollection
curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Managers/bmc/Truststore/Certificates/
{
"@odata.context":
"/redfish/v1/$metadata#CertificateCollection.CertificateCollection",
"@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates/",
"@odata.type": "#CertificateCollection.CertificateCollection",
"Description": "A Collection of TrustStore certificate instances",
"Members": [],
"Members@odata.count": 0,
"Name": "TrustStore Certificates Collection"
}
3) Upload certificate
curl -c cjar -b cjar -k -H "X-Auth-Token: $bmc_token" -H "Content-Type:
application/octet-stream" -X POST -T cert.pem
https://${bmc}/redfish/v1/Managers/bmc/Truststore/Certificates
{
"@odata.context": "/redfish/v1/$metadata#Certificate.Certificate",
"@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates/1",
"@odata.type": "#Certificate.v1_0_0.Certificate",
"CertificateString": ----\n",
"Id": "1",
"Issuer": {
"CommonName": "localhost",
"Organization": "openbmc-project.xyz"
},
}
4) Certificate Locations
curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/CertificateService/CertificateLocations/
{
"@odata.context":
"/redfish/v1/$metadata#CertificateLocations.CertificateLocations",
"@odata.id": "/redfish/v1/CertificateService/CertificateLocations",
"@odata.type": "#CertificateLocations.v1_0_0.CertificateLocations",
"Description": "Defines a resource that an administrator can use in order
tolocate all certificates installed on a given service",
"Id": "CertificateLocations",
"Links": {
"Certificates": [
{
"@odata.id":
"/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/1"
},
{
"@odata.id": "/redfish/v1/AccountService/LDAP/Certificates/1"
},
{
"@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates/1"
}
],
"Certificates@odata.count": 3
},
"Name": "Certificate Locations"
}
5)Replace certificate
curl -c cjar -b cjar -k -H "X-Auth-Token: $bmc_token" -X POST
https://${bmc}/redfish/v1/CertificateService/Actions/Certificateervice.ReplaceCertificate/
-d @data_auth.json
{
"@odata.context": "/redfish/v1/$metadata#Certificate.Certificate",
"@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates/1",
"@odata.type": "#Certificate.v1_0_0.Certificate",
"CertificateString": "-----BEGIN CERTIFICATE--------\n",
"Id": "1",
"Issuer": {
"CommonName": "localhost",
"Organization": "openbmc-project.xyz"
},
6)List CertificateCollection
curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Managers/bmc/Truststore/Certificates/
{
"@odata.context":
"/redfish/v1/$metadata#CertificateCollection.CertificateCollection",
"@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates/",
"@odata.type": "#CertificateCollection.CertificateCollection",
"Description": "A Collection of TrustStore certificate instances",
"Members": [
{
"@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates/1"
}
],
"Members@odata.count": 1,
"Name": "TrustStore Certificates Collection"
}
Change-Id: Ic9644fadfe6fe89b529e16336cc6bcd804810b3a
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
Commit d573bb2a regressed the PATCH operation
on the system redfish node. By initializing
result to no_content, the commit broke the subsequent
json_util::readJson, which checks if the result is "ok"
at the end of the function.
This commit fixes it by making readJsonValues() and its
descendants return a bool status. readJson() no longer
relies on the response object result to indicate success/
failure.
Tested:
-- Verified that PATCH operations on the system node now work.
-- Verified PATCH operations work on manager, accountservice and
ethernetinterfaces nodes.
-- No new errors from the Redfish validator.
Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
Change-Id: I54080392297a8f0276161da8b48d8f9518cbdcfe
|
|
This allows adding a threshold as a setpoint offset
so that dynamic thresholds can be used to modify a
setpoint.
Tested: Get and Patch worked
{
"Oem": {
"OpenBmc": {
"Fan": {
"PidControllers": {
"CPU1_DIMM_ABC": {
"SetPointOffset": "UpperThresholdCritical"
}
}
}
}
}
}
Change-Id: If515971778a8041aba0ab51da87ec5b29ebc359d
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
Tested:
"Links": {
"ManagerInChassis": {
"@odata.id": "/redfish/v1/Chassis/R2000_Chassis"
}
}
Passed the Redfish Service Validator.
Change-Id: I8f57a9a2aca0878c44ecdefc613c9cfecbdc130c
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
Utilize the new utility interface to return the actively running BMC
firmware image. The current code just returns the first instance it
finds which is incorrect.
Tested:
cat /etc/os-release
ID="openbmc-phosphor"
NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro)"
VERSION="2.7.0-dev"
VERSION_ID="2.7.0-dev-1010-gb417d47"
Before Change:
curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/Managers/bmc | grep Firmware
"FirmwareVersion": "2.7.0-dev-999-gfbdb73f"
After Change:
curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/Managers/bmc | grep Firmware
"FirmwareVersion": "2.7.0-dev-1010-gb417d47",
Resolves openbmc/bmcweb#38
Change-Id: I50388c7adfaed8938e3a927becbebd801f0f7673
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
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>
|
|
Query d-bus broker, and if the state is less than
100%, set the bmc state to "Starting".
Tested: Had application that was failing on system,
queried broker and saw Progres was set to 0.97, bmcweb
reported "State": "Starting". Disabled that app, and
state went to "Enabled".
Change-Id: I4123d2f4a6388aff6891a5a02aa98b7a89777d5f
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
- Manager: Added SerialConsole, Links/ManagerForChassis and Links/ManagerForChassis@odata.count
- System: Added Links/Chassis, Links/ManagedBy, Status, BiosVersion
- Power: Added placeholder for PowerControl
Tested:
GET /redfish/v1/Systems/system HTTP/1.1
Response:
{
"@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem",
"@odata.id": "/redfish/v1/Systems/system",
"@odata.type": "#ComputerSystem.v1_6_0.ComputerSystem",
......
"BiosVersion": "SE5C620.86B.01.00.0361.120520162351",
......
"Description": "Computer System",
"Id": "system",
"IndicatorLED": "Off",
"Links": {
"Chassis": [
{
"@odata.id": "/redfish/v1/Chassis/R1000_Chassis"
}
],
"ManagedBy": [
{
"@odata.id": "/redfish/v1/Managers/bmc"
}
]
},
......
"Processors": {
"@odata.id": "/redfish/v1/Systems/system/Processors"
},
"Status": {
"Health": "OK",
"State": "Enabled"
},
"SystemType": "Physical",
"UUID": "13876882-7708-4200-bcf2-2c5681218bc8"
}
GET /redfish/v1/Managers/bmc HTTP/1.1
Response:
{
"@odata.context": "/redfish/v1/$metadata#Manager.Manager",
"@odata.id": "/redfish/v1/Managers/bmc",
"@odata.type": "#Manager.v1_3_0.Manager",
......
"Description": "Baseboard Management Controller",
"Linkn"fces": {
"@odata.id": "/redfish/v1/Managers/bmc/EthernetInterfaces"
},
"FirmwareVersion": "2.7.0-dev-266-g111d297-d14e857",
"Id": "bmc",
Links: {
"ManagerForChassis": [
{
"@odata.id": "/redfish/v1/Chassis/R1000_Chassis"
}
],
"ManagerForChassis@odata.count": 1,
"ManagerForServers": [
{
"@odata.id": "/redfish/v1/Systems/system"
}
],
"ManagerForServers@odata.count": 1
},
......
"SerialConsole": {
"ConnectTypesSupported": [
"IPMI",
"SSH"
],
"ServiceEnabled": true
},
"Status": {
"Health": "OK",
"State": "Enabled"
},
"UUID": "067b4e8d-6c29-475c-92a1-6590d4e5818c"
}
GET /redfish/v1/Chassis/R1000_Chassis/Power HTTP/1.1
Response:
{
"@odata.context": "/redfish/v1/$metadata#Power.Power",
"@odata.id": "/redfish/v1/Chassis/R1000_Chassis/Power",
"@odata.type": "#Power.v1_2_1.Power",
"Id": "Power",
"Name": "Power",
"PowerControl": []
}
Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com>
Change-Id: I61d8ba493ad689d7062e1f8bfd26d9a0d80230da
|
|
This commit sets GraphicalConsole's ServiceEnabled property to true.
The ConnectTypesSupported is set to KVMIP.
Tested:
-- Ran redfish service validator. No errors seen.
Manager.v1_0_0.Manager:GraphicalConsole
value: OrderedDict([('ConnectTypesSupported', ['KVMIP']),
('ServiceEnabled', True)]) <class 'collections.OrderedDict'>
has Type: Manager.v1_0_0.GraphicalConsole complex
is Optional
***going into Complex
Manager.v1_0_0.GraphicalConsole:ConnectTypesSupported
value: ['KVMIP'] <class 'list'>
has Type: Collection(Manager.v1_0_0.GraphicalConnectTypesSupported)
enum is Optional
permission OData.Permission/Read
is Collection
Success
-- GET on the manager shows the newly added properties.
curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}:${port}/redfish/v1/Managers/bmc
{
"@odata.context": "/redfish/v1/$metadata#Manager.Manager",
"@odata.id": "/redfish/v1/Managers/bmc",
....
....
"GraphicalConsole": {
"ConnectTypesSupported": [
"KVMIP"
],
"ServiceEnabled": true
}
....
....
Change-Id: I169b581b7dd6b2cef96a2a3eb5f2ce3b1089c8b4
Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
|
|
This adds fan profiles to redfish. This uses the
Thermal Mode interface to allow switching between
different fan profiles. Only the selected fan profile
will be seen. When adding a new controller, they will
also be added to the configuration item for that profile.
Patching of the profile to switch between supported
profiles is also supported.
Tested: Could change profiles in redfish.
Python test script:
def testProfile():
a = {
"Oem": {
"OpenBmc": {
"Fan": {
"Profile" : "Acoustic"
}
}
}
}
return a
def dopatch():
resp = requests.patch(address, json=testProfile(), verify=False,
auth=("root", "0penBmc"))
resp.raise_for_status()
Change-Id: Ie2d8582616ed5bde58e3328b21ba8c59437e88ce
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
In redfish, there are 3 UUIDs.
1. Service root. This is unique to Redfish, and not needed outside the
service. It is generated on first startup, and persisted to
nonvolatile in the bmcweb_persistent_data.json file. This is the one
that is present in the ServiceRoot schema, as well as in the Systems
schema under the ServiceEntryPointUUID.
2. Managers. This UUID needs to match the UUID avaialble in IPMI, using
the Get Device GUID command. This is generated via the systemd
sd_id128_get_machine_app_specific call, with a matching application ID
in ipmi.
3. System. This UUID is generated from teh host system. In the case of
Power, it comes from settingsd. In the case of x86, it comes from
MDRv2.
This patchset corrects a few properties to pull from the correct place,
after some regressions in the last few weeks that weren't caught right
away.
Vernon has an oncoming patch to IPMI to correct the IPMI side of this.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I98f3a06ba552c84142aaa749cfd199541a0ae1fd
|
|
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>
|
|
/redfish/v1/Managers/{ManagerId}schema
- Created a common utiity file called, systemd_utils.hpp to hold the function getUuid.
- Added json field support for ServiceEntryPointUUID field to retrieve it from system_utils.hpp.
- Amended the header file, service_root.hpp to get the uuid from the newly created system_utils.hpp file.
Changes tested with QEMU emulator and Witherspoon image => Passed
Redfish Validator => Passed
Change-Id: If7f2aba49942a0b315fb012da29af194ebd0ea6f
Signed-off-by: Bernard Wong <trials13@hotmail.com>
|