| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added the Sensor Threshold properties:
UpperCritical
LowerCritical
UpperCaution
LowerCaution
Sample Output: curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/redfish/v1/Chassis/chassis/Sensors/p1_vdd_current
{
"@odata.context": "/redfish/v1/$metadata#Sensor.Sensor",
"@odata.id": "/redfish/v1/Chassis/chassis/Sensors/p1_vdd_current",
"@odata.type": "#Sensor.v1_0_0.Sensor",
"Id": "p1_vdd_current",
"Name": "p1 vdd current",
"Reading": 0.0,
"ReadingRangeMax": 0.0,
"ReadingRangeMin": 0.0,
"ReadingUnits": "Amperes",
"Status": {
"Health": "Critical",
"State": "Enabled"
},
"Thresholds": {
"LowerCaution": {
"Reading": 0.0
},
"LowerCritical": {
"Reading": 0.0
},
"UpperCaution": {
"Reading": 320.0
},
"UpperCritical": {
"Reading": 360.0
}
}
}
Change-Id: Ia76ff1308653ece90830a06333611960da43cb57
Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added PATCH operation support for RemoteRoleMapping property under
LDAP/ActiveDirectory property in AccountService schema.
1. How to add the Role Mapping?
PATCH {"ActiveDirectory":{"RemoteRoleMapping": [{"RemoteGroup":
"Admingroup15","LocalRole": "User"},{"RemoteGroup": "Admingroup13",
"LocalRole": "Administrator"},{"RemoteGroup": "Admingroup14",
"LocalRole": "Operator"}]}}
With the above PATCH request, all the above role mapping gets added.
2. How to delete a specific role mapping?
After adding the above roles mapping, if user want to delete the second mapping
which is ({"RemoteGroup": "Admingroup13", "LocalRole": "Administrator"})
Following PATCH request would be used.
PATCH {"ActiveDirectory":{"RemoteRoleMapping": [{},null,{}]}}
3. How to update specific role mapping ?
Let's take a case where user want to update the second role mapping
PATCH {"ActiveDirectory":{"RemoteRoleMapping": [{},{"RemoteGroup":"Admingroup25","LocalRole": "User"},{}]}}
or
PATCH {"ActiveDirectory":{"RemoteRoleMapping": [{},{"RemoteGroup":"Admingroup25"},{}]}} and \
PATCH {"ActiveDirectory":{"RemoteRoleMapping": [{},{"LocalRole": "User"},{}]}}
Tested:
1. Did a PATCH operation with below given Data:
' {"ActiveDirectory":{"RemoteRoleMapping": [{"RemoteGroup": "Admingroup215","LocalRole": "User"}, \
{"RemoteGroup": "Admingroup213","LocalRole":"Administrator"},{"RemoteGroup":"Admingroup214","LocalRole":"Operator"}]}}'
2. With GET got below given data:
"RemoteRoleMapping": [
{
"LocalRole": "Operator",
"RemoteGroup": "Admingroup214"
},
{
"LocalRole": "Administrator",
"RemoteGroup": "Admingroup213"
},
{
"LocalRole": "User",
"RemoteGroup": "Admingroup215"
}
],
3. Did a PATCH operation with below given Data:
'{"ActiveDirectory":{"RemoteRoleMapping": [{},null,{}]}}'
4. With GET got below given data:
"RemoteRoleMapping": [
{
"LocalRole": "Operator",
"RemoteGroup": "Admingroup214"
},
{
"LocalRole": "User",
"RemoteGroup": "Admingroup215"
}
],
5. Did a PATCH operation with below given Data:
'{"ActiveDirectory":{"RemoteRoleMapping": [null,null]}}'
6. With GET got below given data:
"RemoteRoleMapping": []
7. Did a PATCH operation with below given Data:
'{"ActiveDirectory":{"RemoteRoleMapping": [{"RemoteGroup": "Admingroup215","LocalRole": "User"}, \
{"RemoteGroup": "Admingroup213","LocalRole":"Administrator"},{"RemoteGroup":"Admingroup214","LocalRole":"Operator"}]}}'
8. With GET got below given data:
"RemoteRoleMapping": [
{
"LocalRole": "Administrator",
"RemoteGroup": "Admingroup213"
},
{
"LocalRole": "Operator",
"RemoteGroup": "Admingroup214"
},
{
"LocalRole": "User",
"RemoteGroup": "Admingroup215"
}
],
9. Did a PATCH operation with below given Data:
'{"ActiveDirectory":{"RemoteRoleMapping": [{"RemoteGroup": "Admingroup25"},{},{}]}}'
10.With GET got below given data:
"RemoteRoleMapping": [
{
"LocalRole": "Administrator",
"RemoteGroup": "Admingroup25"
},
{
"LocalRole": "Operator",
"RemoteGroup": "Admingroup214"
},
{
"LocalRole": "User",
"RemoteGroup": "Admingroup215"
}
],
11. Did a PATCH operation with below given Data:
'{"ActiveDirectory":{"RemoteRoleMapping": [{"LocalRole": "User"},{},{}]}}'
12.With GET got below given data:
"RemoteRoleMapping": [
{
"LocalRole": "User",
"RemoteGroup": "Admingroup25"
},
{
"LocalRole": "Operator",
"RemoteGroup": "Admingroup214"
},
{
"LocalRole": "User",
"RemoteGroup": "Admingroup215"
}
],
13. Did a PATCH operation with below given Data:
'{"ActiveDirectory":{"RemoteRoleMapping": [{},{"RemoteGroup": "Admingroup26","LocalRole": "User"},{}]}}'
14.With GET got below given data:
"RemoteRoleMapping": [
{
"LocalRole": "User",
"RemoteGroup": "Admingroup25"
},
{
"LocalRole": "User",
"RemoteGroup": "Admingroup26"
},
{
"LocalRole": "User",
"RemoteGroup": "Admingroup215"
}
],
15. Try to delete the role map when there was no role map entry and get the following error.
"RemoteRoleMapping/1@Message.ExtendedInfo": [
{
"@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
"Message": "The value null for the property RemoteRoleMapping/0 is of a different type than the property can accept.",
"MessageArgs": [
"null",
"RemoteRoleMapping/0"
],
"MessageId": "Base.1.4.0.PropertyValueTypeError",
"Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed.",
"Severity": "Warning"
}
Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
Change-Id: Iaa37221bd6fdc87dbf51755d9425ecd5b07eee6c
|
|
|
|
|
|
|
|
|
|
|
| |
Add collection of all power and current sensors.
Testing: Verified SensorCollection and Sensor output
on a Witherspoon system.
Verified no errors from RedfishServiceValidator.
Change-Id: Icfdc14d738bf037d5d599a3c6fc0be5ea0919929
Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add Power Unit Redundancy Redfish Log.
Tested:
Tested:
When there are two PSU on the sytem, remove one AC cable on PSU. Then bellow
Redfish log will be created.
{
"@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry",
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/
1568504619_1",
"@odata.type": "#LogEntry.v1_4_0.LogEntry",
"Created": "2019-09-14T23:43:39+00:00",
"EntryType": "Event",
"Id": "1568504619_1",
"Message": "Power Unit Nonredundant but has sufficient resource.",
"MessageArgs": [],
"MessageId": "OpenBMC.0.1.PowerUnitNonRedundantSufficient",
"Name": "System Event Log Entry",
"Severity": "Warning"
},
Plug in the AC cable again, the Redfish log will show
{
"@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry",
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/
1568504628",
"@odata.type": "#LogEntry.v1_4_0.LogEntry",
"Created": "2019-09-14T23:43:48+00:00",
"EntryType": "Event",
"Id": "1568504628",
"Message": "Power Unit Redundancy regained.",
"MessageArgs": [],
"MessageId": "OpenBMC.0.1.PowerUnitRedundancyRegained",
"Name": "System Event Log Entry",
"Severity": "OK"
}
Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com>
Change-Id: I4f2d12e0dbc02f13062ea8e524b37248acf9c662
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Log the LAN link status and chassis intrusion status change.
Tested:
Unplug network cable of dedicate NIC
Check the below log message in
https://$bmcip/redfish/v1/Systems/system/LogServices/EventLog/Entries
{
"Message": "eth0(Dedicated Management NIC) LAN leash lost.",
"MessageArgs": [
"eth0(Dedicated Management NIC)",
],
"MessageId": "OpenBMC.0.1.LanLost",
}
Change-Id: I5c04f0314363de473ff92ff8bd3225c064aba547
Signed-off-by: Qiang XU <qiang.xu@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, bmcweb allows just one KVM session. To make it support
multiple concurrent KVM sessions, this commit adds KVM session class
implementation. It limits the number of sessions to 4 to secure the
connection quality.
Tested: Up to 4 concurrent KVM sessions worked.
Change-Id: I37342ba2e30f840131d6287b4249a298aa17a1f1
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added handling for POSTing certificates the Redfish way (as proper JSON).
Currently it was only possible to add certificate as a RAW certificate in
request body. Now user is able to add it as
{
"CertificateType": "PEM",
"CertificateString": "..."
}
as well as previously in RAW form.
Tested:
- Uploading certificates in RAW form
- Uploading certificates in JSON form
- Uploading invalid certificates
- Uploading invalid JSON requests
Change-Id: Icf0f6b928e63fc3cc5cd089b483b3799fbe715de
Signed-off-by: Kowalski, Kamil <kamil.kowalski@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Collection schemas return some valuable parameter information values
on get query, even when the URI is invalid and 404/400 error code
is returned.
Fix for the same is provided by packing the json response at proper
places and returning only the required error info, for security reasons.
Tested:
Verified by redfish GET query for invalid uri cases.
Only error msg and info is returned.
Signed-off-by: Ayushi Smriti <smriti.ayushi@linux.intel.com>
Change-Id: Iae45da86c2d2adbc39d78f7c267d551d4e6525f2
|
|
|
|
|
|
|
|
|
|
|
|
| |
This bmcweb code is to create users as per the available groups,
and make the code dynamic.
Tested: Created a new user and did redfish post query.
Verified through busctl introspection, available groups were listed
for the new user.
Signed-off-by: Ayushi Smriti <smriti.ayushi@linux.intel.com>
Change-Id: Ifec6d71d9721e4bfef53c9e38b17e9b7864777e6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
Code was tabbed into the wrong spot as a result of shutting clang-format
off for a dubious reason. Turn it back on.
Tested: It builds. Only whitespace changes present
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I08b294ca5ea076f8cb5680b801b507127e091824
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 8e69d148249f6a45cea10e988ec03430a5932784.
Reason for revert: This causes service validator failures.
I missed the fact that despite being asked a couple times, the service validator wasn't run. Please run it, resolve your bug, and resubmit as a new review.
Change-Id: I0bb61ab1a618a96b2ed2c600825ec72b8d020ec0
|
|
|
|
|
|
|
|
|
| |
Tested:
Used a heat gun to heat the CPU and voltage regulator and checked
that the message is logged correctly.
Change-Id: I4d73a9ad12691b364a33faf036a60f36bab0ac93
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a perfect world, we would implement all no-content cases correctly,
and never set a no-content return code, then provide content. In
practice, in an async context, this is difficult to manage, as has been
proven a couple times to be beyond what we're able to review. This
error should be made less fatal, and still return a response to the
user, rather than throwing and closing the connection entirely.
This patchset implements a corrective action where the content is
dropped in the connection if the handler sets the no-content code.
Tested:
Still need to test. In theory, not possible without a unit test for a
buggy handler.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: Ie6fea0c3fef107578b855b7c43a634d51b2064de
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a build error when BMCWEB_INSECURE_DISABLE_SSL is set to
ON.
Tested:
Set BMCWEB_INSECURE_DISABLE_SSL to On and built successfully.
Change-Id: Iabacff92098fff61c902b2c40873d66987811773
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Callback privilege user must not be allowed to login,similar to IPMI.
This user is used for callback purpose from IPMI point of it, and
must be maintained in bmcweb to be consistent with IPMI, Hence
removing the access to login for callback user
Tested:
1.Create a user with username 'test1' and privilege -
"Callback" via Redfish.
2.Using that Callback level credentials, try to do
"Get" at this URI https://<ip-addr>/redfish/v1/Systems/system
3.output: Forbidden
4.use same URL to login from webUI with callback privilege
https://<ip-addr>/redfish/v1/Systems/system
5.output: Forbidden
Signed-off-by: anil kumar appana <anil.kumarx.appana@intel.com>
Change-Id: I86dac565fc874e5d0fe033640ffc3de576a1f693
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PATCH commands only changed the state of the DBus database. The PATCH
did not actually change the state of the NIC settings. IPMITOOL and
"ip addr" both delete the specific hash entry, and then create a new
entry using the requested state. This change aligns Redfish with that
behavior. The requested element is deleted, and subsequently recreated
with the new values. This guarantees the NIC HW is actually updated,
and in sync with the DBus database.
Tested by:
From eth1 modify eth0 state:
IPv4 tests:
Delete all addresses
Create five new addresses
Add a new entry to the end of the collection
Delete the new entry just added
Send a "keep" command that does not modify any state, and "keeps" more
entries than are actually in the IPv4Addresses collection
Keep all entries, and delete entries that do not exist
Delete all entries except self assigned
Send a PATCH with an empty IPv4StaticAddresses array
IPv6 tests:
Delete all entries except SLAAC
Create five static entries
Modify only the prefix for one entry
Modify only the address for one entry
Add an additional entry
Delete the new entry
Keep all entries, plus a few that don't exist
Keep all entries, delete a few that don't exist
Delete all entries except SLAAC
Send a PATCH with an empty IPv6StaticAddresses array
Change-Id: Id5f733f795588ba36b5d3ab3b0017a01ee3f2da7
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add PSU Deassert Event for AC Lost, Predictive Failure, Failure, Fan Fault.
Tested:
Create a Fan Fault and then recover the Fan, check redfish log:
{
"@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry",
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/
1566427122_10",
"@odata.type": "#LogEntry.v1_4_0.LogEntry",
"Created": "2019-08-21T22:38:42+00:00",
"EntryType": "Event",
"Id": "1566427122_10",
"Message": "Power supply PSU1 fan fan1 recovered.",
"MessageArgs": [
"PSU1"
],
"MessageId": "OpenBMC.0.1.PowerSupplyFanRecovered",
"Name": "System Event Log Entry",
"Severity": "OK"
},
Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com>
Change-Id: I224510c56ad87d1a2fc8e7ae5b3546fc34243d12
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implemented corrections to allow booting from removeable media. USB
did not function, and CD was also failing.
Eliminated code that calculated the boot string and boot mode
twice. Always assigned a boot type and boot mode, to simplify the
asynchronous function calls.
Changed the Redfish result to return "204 No Content" when the PATCH
operation is successful. Any async function call that fails overrides
this value.
Tested:
Performed a full set of BootSource/BootMode combinations. Confirmed
the values were set correctly by using "ipmitool raw 0 9 5 0 0" to
read the values that the BIOS will read after a reboot.
Also tested the full set of combinations by issuing hard resets. All
boot combinations worked on a S2600WF within the limits of the S2600WF
BIOS.
Change-Id: If5480e20040d96bc12961125fdbd4ebbb30b0ada
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Given that very few people have actually needed to unpack a null value
with readJson, it's not surprising that there are bugs there.
the simplest case that failed was attempting to unpack an array which
might contain null values, which should be allowed to be unpacked with a
nlohmann::json object, to allow error handling and the new delete cases,
but were rejected.
Tested:
Reran the unit test here, which succeeded.
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/23954/2
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I50ae26645ad16f6a6228c27e6d501c08de4c622b
|
|
|
|
|
|
|
|
|
|
| |
Minor cleanup to a routine that allows us to drop one nullptr check.
Tested:
Will test shortly. Code should be no-op.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I592dc0a9a311d6dd885cdd6289f343dd4b9b0567
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Managers NTP node did not get implemented correctly. The first
level parsing did not search for "NTP" as the base entry, nor did it
correctly attempt to acquire the NTPServers, NTPEnabled sub-nodes.
Removed the data response as it was returning a string vector instead
of a json::array. The original code caused a seg fault. Instead of
returning a carbon copy of the values sent, the return is a 204 code,
indicating success and returning no data.
Change-Id: Ifb82855e1cd143e3cf2cb8979531b01b27d32234
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Preloading an error into res.result causes the readJson function to
return with that same error. This blocks any PATCH actions on the Boot
array. The PATCH command now responds with an OK response instead of a
Missing Data response.
Tested:
Confirmed the Lit action illuminates the ID LED.
Confirmed the Blinking action causes the ID LED to blink.
Confirmed the Off action turns off the ID LED.
Confirmed Blinking overrides Lit.
Confirmed Lit overrides Blinking.
Confirmed Flashing is returns an error message.
Change-Id: I86104e2a1232f1905a7c54eb00e399b634fa69d3
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
curl -k https://${bmc}/redfish/v1/
{
"@odata.context": "/redfish/v1/$metadata#ServiceRoot.ServiceRoot",
"@odata.id": "/redfish/v1",
"@odata.type": "#ServiceRoot.v1_5_0.ServiceRoot",
"AccountService": {
"@odata.id": "/redfish/v1/AccountService"
},
"CertificateService": {
"@odata.id": "/redfish/v1/CertificateService"
},
"Chassis": {
"@odata.id": "/redfish/v1/Chassis"
},
"Id": "RootService",
"JsonSchemas": {
"@odata.id": "/redfish/v1/JsonSchemas"
},
"Links": {
"Sessions": {
"@odata.id": "/redfish/v1/SessionService/Sessions"
}
},
"Managers": {
"@odata.id": "/redfish/v1/Managers"
},
"Name": "Root Service",
"RedfishVersion": "1.6.1",
"Registries": {
"@odata.id": "/redfish/v1/Registries"
},
"SessionService": {
"@odata.id": "/redfish/v1/SessionService"
},
"Systems": {
"@odata.id": "/redfish/v1/Systems"
},
"UUID": "fd4374f1-e080-4a1e-84ae-79871bf954e6",
"UpdateService": {
"@odata.id": "/redfish/v1/UpdateService"
}
Change-Id: I672f1559a8d5a48fcb275e8371b9c4243c8beb4e
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Had a mix of <> and {} for the path of the resource.
Moved to the path defined in the Redfish schema.
https://redfish.dmtf.org/redfish/schema_index
E.g. /redfish/v1/AccountService/Accounts/{ManagerAccountId}
from https://redfish.dmtf.org/schemas/v1/ManagerAccount_v1.xml
Corrected a few schemas which were incorrect.
<> does not work since markdown thinks this is an HTML tag.
https://github.com/openbmc/bmcweb/blob/master/Redfish.md#redfishv1chassispowerpowersupplies
Change-Id: I3434952a8adf1a1221f070c04c8c0752e9077a5d
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
curl -k https://${bmc}/redfish/v1/UpdateService/FirmwareInventory/9f75c5ad
{
"@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory",
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/9f75c5ad",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
...
Change-Id: Iaaaa9f3356a16cc5a236c9e75644bb25d7545a05
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
curl -k https://${bmc}/redfish/v1/Systems/system/LogServices/EventLog
{
"@odata.context": "/redfish/v1/$metadata#LogService.LogService",
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog",
...
Change-Id: I7bf85fdb4f46a256982a1ac60bdc8f5fecbad74a
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
curl -k https://${bmc}/redfish/v1/Managers/BMC/EthernetInterfaces
Not Found
curl -k https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces
{
"@odata.context": "/redfish/v1/$metadata#EthernetInterfaceCollection.EthernetInterfaceCollection",
"@odata.id": "/redfish/v1/Managers/bmc/EthernetInterfaces",
"@odata.type": "#EthernetInterfaceCollection.EthernetInterfaceCollection",
...
Change-Id: Id227e09ad7f596c01dd2e73b476c1b87582a00fa
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patchset consists of two primary changes.
1. Content-Security-Policy is adjusted such that the "default" allowed
source is none, then we explicitly enable the few features we actually
use by setting them to self
2. Updates the XSS variables to simply forward back the hostname given
in the AccessControlAllowOrigin flag, which means that webpack dev
server could be running on any port.
Tested:
Tested IE11, Edge, Firefox, and Chrome for CSP errors. Firefox flags
one error that doesn't seem to effect the webui. All other browsers
load without issue.
Tested launching webpack-dev-server with XSS settings enabled.
Launches without warning on any port
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: Id38f607917d19b0106c4c7708c764c45b646891e
|
|
|
|
|
|
|
|
|
| |
Tested:
Confirmed that the messages appear correctly in the registry
under "/redfish/v1/Registries/OpenBMC/OpenBMC".
Change-Id: Id730e6a1c14cbcbd74fc3310a1a41b557f93cb35
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow logging when a service exits.
Tested:
killed an application and saw:
{
"@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry",
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/1565496588",
"@odata.type": "#LogEntry.v1_4_0.LogEntry",
"Created": "2019-08-11T04:09:48+00:00",
"EntryType": "Event",
"Id": "1565496588",
"Message": "Service xyz.openbmc_project.adcsensor.service has exited unsuccessfully.",
"MessageArgs": [
"xyz.openbmc_project.adcsensor.service"
],
"MessageId": "OpenBMC.0.1.ServiceFailure",
"Name": "System Event Log Entry",
"Severity": "Warning"
},
Change-Id: I45c764986f0e99426ee9087245498d020c6508cb
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a range check for numerical values so that they are not truncated.
Tested:
<type>:<interface>:<property>
- bool: RebootPolicy: AutoReboot
Valid: 0, 1
Invalid: null, -1, 2
- int64_t: Ambient Temp Sensor: WarningHigh
Valid: -9223372036854775808, -1, 2500, 9223372036854775807
Invalid: null, -9223372036854775809
- uint8_t: Software: Priority
Valid: 0, 1, 255
Invalid: null, -1, 256
- uint16_t: LED Physical: Period
Valid: 0, 1000, 65535
Invalid: null, -1, 65536
- uint32_t: State PowerOnHours: POHCounter
Valid: 0, 20, 4294967295
Invalid: -1, 4294967296
- uint64_t: State BMC: LastRebootTime
Valid: 0, 1566402464000, 18446744073709551615
Invalid: -1, 18446744073709551616
Closes: openbmc/bmcweb#101
Change-Id: I652333b0042b28ffb0a47b478d1a0a6e7ec994a7
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On a DHCP Enabled System, the StaticNameServer property
is not aligned to the redfish schema rules and the validator
reports the below error:
StaticNameServers: Value of Collection property is null but
Collections cannot be null, only their entries.
Testedby: Redfish Validator
*** /redfish/v1/JsonSchemas/EthernetInterface
Type (#JsonSchemaFile.v1_0_2.JsonSchemaFile), GET SUCCESS (time: 1.134773)
PASS
Note:
- Previously missed this failure, as i verified the validator on
Statically configured setup
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I6119e8d5783571ac75084301b49df1f44a558c8b
|
|
|
|
|
|
|
|
| |
bmcweb needs to utilize latest sdbusplus code, hence
updating the sdbusplus version usage
Change-Id: I82018ca518a76cd60c5558ceed6430618bd82900
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Redfish ethernet schema has two properties for nameservers
1.NameServers - Represents nameservers currently in use on Interface
2.StaticNameServers -Represents only statically defined set of DNS
As we have only one DBUS property `Nameservers` which is used for both
the static and dynamic nameservers, So the idea behind this commit is
to not populate the StaticnameServers property when DHCP mode is
enabled.
Tested By:
GET https://${BMC_IP}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I64f66bde55ec41dc78befbb659a0cbc425bbc24b
|
|
|
|
|
|
|
|
|
|
| |
There's lots of companies implementing OpenBMC, and we don't want the
main MessageRegistry to be Copyright Intel, given its namespace and
heritage. It looks like this snuck in when we moved it to the
std::array based stuff.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I18c0705dc7fea8566bd2627f1d6a8fc0ec7ccd51
|
|
|
|
|
|
|
|
|
|
| |
Some of the alphanumeric characters used to generate session IDs and CSRF
tokens were incorrectly lowercase; that reduced their entropy.
Tested: no; not needed
Change-Id: I383813ea9af77b1393fba516cd7e61570d5b5667
Signed-off-by: Joseph Reynolds <joseph.reynolds1@ibm.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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tested:
1) Tested schema with validator and no issues
curl -c cjar -b cjar -k -H "X-Auth-Token: $bmc_token" -X POST
https://${bmc}/redfish/v1/CertificateService/Actions/CertificateService.GenerateCSR/
-d @generate_ldap_required.json
{
"CSRString": "-----BEGIN CERTIFICATE
REQUEST-----\\nLoyR0IExAw==\n-----END
CERTIFICATE REQUEST-----\n",
"CertificateCollection": {
"@odata.id": "/redfish/v1/AccountService/LDAP/Certificates/"
}
}
Change-Id: Iae0919a2f222c1f85e5428d9140e386f8695370d
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implemented GenerateCSR action of CertificateService
for generating CSR of HTTPS certificate
CSR requests initiated through D-Bus are time-consuming
and might result D-Bus time-out error
GenerateCSR request is performed in child process in
the backend so that caller is returned immediately.
Caller need to register for "InterfacesAdded" signal
generated when a new CSR object is creatd by backend
after completion of the CSR request.
Caller initiates read on the CSR object created to
read the CSR string.
Timer is added to cancel the operation if "Interfaces
Added" signal is not received in a specified time.
Modified to support only 2048 keybit length due to
time taken in private key generation.
Tested
1) Tested schema with validator and no issues
2)
curl -c cjar -b cjar -k -H "X-Auth-Token: $bmc_token" -X POST
https://${bmc}/redfish/v1/CertificateService/Actions/CertificateService.GenerateCSR/
-d @generate_https.json
{
"CSRString": "-----BEGIN CERTIFICATE ..."
"CertificateCollection": {
"@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/"
}
}
3. generate_https.json
{
"City": "Austin",
"CertificateCollection": {
"@odata.id":
"/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/"
},
"CommonName": "www.ibm.com",
"ContactPerson":"myname",
"AlternativeNames":["www.ibm.com"],
"ChallengePassword":"",
"Email":"openbmc@in.ibm.com",
"GivenName":"",
"Initials":"",
"Country": "US",
"KeyCurveId":"",
"KeyUsage":["KeyAgreement"],
"KeyBitLength": 1024,
"KeyPairAlgorithm": "RSA",
"Organization": "IBM",
"OrganizationalUnit": "ISL",
"State": "AU",
"Surname": "",
"UnstructuredName": ""
}
4) Verified Required and Optional parameters
5) Generate EC CSR with curve ID secp224r1
curl -c cjar -b cjar -k -H "X-Auth-Token: $bmc_token" -X POST
https://${bmc}/redfish/v1/CertificateService/Actions/CertificateService.GenerateCSR/
-d @generate_https.json
{
"CSRString": "-----BEGIN CERTIFICATE
REQUEST-----\nMIIBQzCB8wIBATCBmzEUMBIGA1UdEQwLd3d3LmlibS5jb20xDzANBgNVBAcMBkF1\nc3RpbjEUMBIGA1UEAwwLd3d3LmlibS5jb20xDzANBgNVBCkMBm15bmFtZTELMAkG\nA1UEBhMCVVMxDDAKBgQrDgMCDAJFQzEVMBMGA1UdDwwMS2V5QWdyZWVtZW50MQww\nCgYDVQQKDANJQk0xCzAJBgNVBAgMAkFVME4wEAYHKoZIzj0CAQYFK4EEACEDOgAE\n7hyL8FWmeCBRpCxWKjlce9nRghwS0lBrBdslOZ+n9+hFD+0KD8L+BORwm7dfzGlG\nTblh2G6cQ8KgADAKBggqhkjOPQQDAgM/ADA8Ahw1nlGdEFfnb+2zxdfVeTQYgCTw\nNos0t2rsGc/zAhxS9/paXZtVqR+WzdQVsjSLC/BedbXv1EmW52Uo\n-----END
CERTIFICATE REQUEST-----\n",
"CertificateCollection": {
"@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/"
}
}
Change-Id: I2528c802ff3c6f63570cdb355b9c1195797a0e53
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Made the following enhancements related to power supplies in Redfish:
* Moved power supplies from Chassis schema to Power schema
* Added support for multiple power supplies within one chassis
* Added support for multiple sensors associated with one power supply
* Set power supply Name and MemberId to inventory item name (like
powersupply0) rather than sensor name (like ps0_input_power).
* Set power supply VPD fields like Manufacturer and SerialNumber
Also improved support for power sensors that are not related to power
supplies, such as VRM sensors. These sensors are no longer treated as
power supplies, and they will not be included in the Power schema
output. They should instead be included in the SensorCollection output
when that support is completed.
Uses an ObjectMapper association named "inventory" to find the power
supply inventory item associated with a power sensor. For example:
/xyz/openbmc_project/sensors/power/ps0_input_power/inventory ->
/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0
See https://github.com/openbmc/docs/blob/master/sensor-architecture.md
for more information on associations between sensors and low-level
hardware items.
Test Plan:
https://gist.github.com/smccarney/43b2fae304575302af61332a71280d74
Tested: Verified Power and Thermal output on a Witherspoon system.
Tested with power sensors that were/were not associated
with power supplies. Verified power supply properties in
Power output. Verified that power supplies are no longer
returned in Chassis collection output. Ran Redfish
Service Validator.
Change-Id: I50db389b5df011bfb561d31aafb33cc4bf7fcde6
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
need to Log SSB Thermaltrip and NmiDiagInt(NMI Diagnostic Interrupt)
to redfish.
tested:
Press NMI button, host shows NMI BSOD, and see BMC redfish's log.
Trigger SSB Thermaltrip, can see its redfish log.
Change-Id: I8f5b41dd6f381b3a70a45bbb851f2ba1657d2ec0
Signed-off-by: Chen,Yugang <yugang.chen@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change makes an entry with no priority metadata default to
"OK" instead of returning a 500 error.
Tested:
Logged an entry without priority and confirmed that getting the
Entries returns 200.
Passed the Redfish Service Validator.
Change-Id: I5a4633ef8542da6eaacad28953e5c99d992576fa
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The journal entries with an underscore in the ID could not
be accessed individually.
This change tracks the unique ID while searching for the entry
so it can find the correct entry with an underscore.
Tested:
Checked that individual journal entries with and without an
underscore can be accessed.
Passed the Redfish Service Validator.
Change-Id: I4aedbe1cb7d5f3cb896c5a0e766e9a274f0ee076
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Read the core objects for the given CPU Id and
report the count of core objects having the
property "Present" set as true.
Testing:
1.Ran Redfish schema validator - no issues
2.Ran GET request for cpu0 and cpu1 to get the
total cores for verification.
The total cores that are present reported by
the Redfish output matches with the total
cores reported by the inventory Rest API.
curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/redfish/v1/Systems/system/Processors/cpu0
{
"@odata.context": "/redfish/v1/$metadata#Processor.Processor",
"@odata.id": "/redfish/v1/Systems/system/Processors/cpu0",
"@odata.type": "#Processor.v1_3_1.Processor",
"Id": "cpu0",
"InstructionSet": "PowerISA",
"Manufacturer": "IBM",
"Model": "",
"Name": "Processor",
"ProcessorArchitecture": "Power",
"ProcessorType": "CPU",
"Status": {
"Health": "OK",
"State": "Enabled"
},
"TotalCores": 18
}
Change-Id: I3d65daed42fafd85ae2e4659e764ac061f1b1626
Signed-off-by: RAJESWARAN THILLAIGOVINDAN <rajeswgo@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"MemorySummary" Status is always Disabled.Fixed it.
Doing GET on Interface xyz.openbmc_project.State.Decorator.OperationalStatus
instead of xyz.openbmc_project.Inventory.Item.Dimm to get the State of Dimm
Tested:
-- Ran GET request on the ComputerSystem node when Host is Up
curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/redfish/v1/Systems/system
"MemorySummary": {
"Status": {
"State": "Enabled"
},
"TotalSystemMemoryGiB": 0
},
Redfish schema validator.
ComputerSystem.v1_0_0.MemorySummary:Status
value: OrderedDict([('State', 'Enabled')]) <class 'collections.OrderedDict'>
has Type: Resource.Status complex
is Optional
***going into Complex
Resource.Status:State
value: Enabled <class 'str'>
has Type: Resource.State enum
is Optional
permission OData.Permission/Read
Success
MemorySummary.TotalSystemMemoryGiB PASS
MemorySummary.Status complex
MemorySummary.Status.State PASS
Change-Id: I272a2c6c53f39be3dafd62759be4cc65aa0dd74f
Signed-off-by: Alpana Kumari <alpankum@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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bmcweb_persistent_data.json have all the session info,
any user having less privilege can get access to this file
which is having sensitive data(user authentication token)
This commit fixes this bug by allowing the read write permission
to the owner and group and others would not be having either read
or write permission.
TestedBy: -> Create the redfish session
-> check the permission of the file.
-> Stop the bmcweb and remove the session file
restart the bmcweb and check the permission
of the file.
-> Create the session again and perfrom the
GET request on Manager,AccountService to verify the
other operation is working.
Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
Change-Id: I1e69ac147a2cfc3dff150322aee1f430ac552a5a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes a bug in getAcceleratorDataByService
when looking up the Present and Functional properties
on D-Bus.
The properties are booleans, but the code was trying
to read them as strings.
Tested:
-- Redfish validator comes out clean
-- Tested various combinations of present and functional
properties on the GPU inventory objects:
xyz.openbmc_project.Inventory.Manager
/xyz/openbmc_project/inventory/system/chassis/motherboard/gv100card0
xyz.openbmc_project.State.Decorator.OperationalStatus Functional b "false"
/xyz/openbmc_project/inventory/system/chassis/motherboard/gv100card0
xyz.openbmc_project.Inventory.Item Present b "true"
$ curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Systems/system/Processors/gv100card0
{
"@odata.context": "/redfish/v1/$metadata#Processor.Processor",
"@odata.id": "/redfish/v1/Systems/system/Processors/gv100card0",
"@odata.type": "#Processor.v1_3_1.Processor",
"Id": "gv100card0",
"Name": "Processor",
"ProcessorType": "Accelerator",
"Status": {
"Health": "OK",
"State": "UnavailableOffline"
}
Set functional but not present:
$ curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Systems/system/Processors/gv100card0
{
"@odata.context": "/redfish/v1/$metadata#Processor.Processor",
"@odata.id": "/redfish/v1/Systems/system/Processors/gv100card0",
"@odata.type": "#Processor.v1_3_1.Processor",
"Id": "gv100card0",
"Name": "Processor",
"ProcessorType": "Accelerator",
"Status": {
"Health": "OK",
"State": "Absent"
}
Set functional and present:
$ curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Systems/system/Processors/gv100card0
{
"@odata.context": "/redfish/v1/$metadata#Processor.Processor",
"@odata.id": "/redfish/v1/Systems/system/Processors/gv100card0",
"@odata.type": "#Processor.v1_3_1.Processor",
"Id": "gv100card0",
"Name": "Processor",
"ProcessorType": "Accelerator",
"Status": {
"Health": "OK",
"State": "Enabled"
}
Set not functional and not present:
$ curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://${bmc}/redfish/v1/Systems/system/Processors/gv100card0
{
"@odata.context": "/redfish/v1/$metadata#Processor.Processor",
"@odata.id": "/redfish/v1/Systems/system/Processors/gv100card0",
"@odata.type": "#Processor.v1_3_1.Processor",
"Id": "gv100card0",
"Name": "Processor",
"ProcessorType": "Accelerator",
"Status": {
"Health": "OK",
"State": "Absent"
}
Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
Change-Id: Ic5ccc9bcd3b2b245ffdd714105d5b4fed3ca4ea4
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds back support to request a single Journal Event
Log Entry.
Tested:
Requested a single valid entry and got it.
Requested an invalid entry and got the correct error message.
Passed the Redfish Service Validator.
Change-Id: Ibd2defee04510c1b52fe010cf3e2c6aced94537f
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|