summaryrefslogtreecommitdiffstats
path: root/redfish-core
Commit message (Collapse)AuthorAgeFilesLines
...
* Add Power Unit Redundancy LogCheng C Yang2019-09-231-0/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add message entry for physical security eventQiang XU2019-09-231-0/+47
| | | | | | | | | | | | | | | | | | | 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>
* Handling of adding certificates the Redfish wayKowalski, Kamil2019-09-231-3/+51
| | | | | | | | | | | | | | | | | | | | 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>
* Fix: Only return error info in invalid URI caseAyushi Smriti2019-09-232-16/+17
| | | | | | | | | | | | | | | 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
* Read AllGroups property from user managerAyushi Smriti2019-09-231-31/+59
| | | | | | | | | | | | 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
* Define MaxConcurrentSessions property for Manager.SerialConsole and ↵Kuiying Wang2019-09-191-1/+4
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Remove a lame clang-format offEd Tanous2019-09-181-6/+2
| | | | | | | | | | 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
* Revert "Fix remove callback user privilege access to login"Ed Tanous2019-09-182-8/+2
| | | | | | | | | | 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
* Add CPU and voltage regulator thermal messagesJason M. Bills2019-09-181-0/+21
| | | | | | | | | 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>
* Fix remove callback user privilege access to loginanil kumar appana2019-09-162-2/+8
| | | | | | | | | | | | | | | | | | | 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
* Redfish: Make NIC HW reflect PATCH changesJohnathan Mantey2019-09-131-459/+388
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 EventCheng C Yang2019-09-101-10/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Redfish: Permit Usb and CD boot overridesJohnathan Mantey2019-09-051-151/+87
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix readJson to allow null as a complex typeEd Tanous2019-09-041-1/+2
| | | | | | | | | | | | | | | | | 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
* cleanup: Move a pointer to a referenceEd Tanous2019-09-041-15/+7
| | | | | | | | | | 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
* Redfish: Make PATCH NTP Servers operate correctlyJohnathan Mantey2019-09-031-20/+25
| | | | | | | | | | | | | | 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>
* Redfish: Prevent IndicatorLED PATCH from breaking Boot PATCHJohnathan Mantey2019-08-301-10/+8
| | | | | | | | | | | | | | | | | | 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>
* Add messages for power supply and system power good failuresJason M. Bills2019-08-281-0/+24
| | | | | | | | | 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>
* Add Service Failure to registryJames Feist2019-08-271-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Network : Fix the Service Validator FailureManojkiran Eda2019-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | 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
* Avoid populating StaticNameServers propertyManojkiran Eda2019-08-201-1/+9
| | | | | | | | | | | | | | | | | | 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
* Fix an Intel copyright that was missed in CREd Tanous2019-08-161-1/+1
| | | | | | | | | | 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
* Redfish: Add TrustStore certificate supportMarri Devender Rao2019-08-163-0/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Redfish: Extend GenerateCSR action for LDAP certificate collectionMarri Devender Rao2019-08-161-0/+29
| | | | | | | | | | | | | | | | | | | | 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>
* Redfish: GenerateCSR action for HTTPS certificateMarri Devender Rao2019-08-162-5/+279
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Redfish: Move power supplies to Power schemaShawn McCarney2019-08-152-242/+515
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Register redfish logChen,Yugang2019-08-151-0/+21
| | | | | | | | | | | | 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>
* Don't return a 500 error for entries without priority metadataJason M. Bills2019-08-081-3/+1
| | | | | | | | | | | | | | 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>
* Fix getting individual journal entries with an underscoreJason M. Bills2019-08-081-2/+13
| | | | | | | | | | | | | | | | | 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>
* Add CPU core count propertyRAJESWARAN THILLAIGOVINDAN2019-08-081-56/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix "MemorySummary" status: Disabled on IBM systemsAlpana Kumari2019-08-081-22/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "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>
* Fix Regression in PATCH on system nodeSantosh Puranik2019-08-023-32/+50
| | | | | | | | | | | | | | | | | | | | | | 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
* Fixed Accelerator StateSantosh Puranik2019-08-021-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add support to request a single Journal Event Log EntryJason M. Bills2019-08-022-1/+79
| | | | | | | | | | | | | 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>
* Don't store LogEntry IDs across requestsJason M. Bills2019-08-021-4/+30
| | | | | | | | | | | | | | | | Because the previous timestamp is stored across Entries requests, a single entry will increment the ID on every refresh since the previous timestamp will always match. This change clears the previous timestamp on the first entry of each request. Tested: Refreshed a single LogEntry many times and confirmed that the ID does not change. Change-Id: I8bf81b6c2eb6ac4037a17008ba54ebfccb42e0dd Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
* Redfish(Network): IPV4 DHCP ipaddreses dont show gateway when in DHCP modeRavi Teja2019-08-011-2/+3
| | | | | | | | | Tested by: configuring DHCP, GET https://${BMC_IP}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0 Signed-off-by: Ravi Teja <raviteja28031990@gmail.com> Change-Id: Ic7067db41fbb8327ef55cc7552f9153d1ecfb63a
* Add power restore policy applied messageJason M. Bills2019-07-301-0/+10
| | | | | | | | | Tested: Checked '/redfish/v1/Registries/OpenBMC/OpenBMC' and confirmed that the message is listed. Change-Id: I2ecc00dca46f51cae73db71167cba04c9a7be746 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
* Add SetPointOffset To RefishJames Feist2019-07-301-5/+77
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Redfish:Support to Delete a single event logChicago Duan2019-07-301-0/+41
| | | | | | | | | | | | | | | Tested:Use redfish to delete a single event log Before: curl -k -H "X-Auth-Token: $bmc_token" -X DELETE https://${bmc}/redfish/v1/Systems/system/LogServices/EventLog/Entries/2 -d '{"[]"}' Method Not Allowed After: curl -k -H "X-Auth-Token: $bmc_token" -X DELETE https://${bmc}/redfish/v1/Systems/system/LogServices/EventLog/Entries/2 -d '{"[]"}' No error response,and the entry 2 is deleted. Signed-off-by: Chicago Duan <duanzhijia01@inspur.com> Change-Id: I31e4470d73b72012b8727d466530202e2609000d
* Add ManagerInChassis link in Managers/bmcJason M. Bills2019-07-261-0/+2
| | | | | | | | | | | | | 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>
* Add message entry for IPMI watchdog eventYong Li2019-07-251-0/+15
| | | | | | | | | | | | | | | | | | | | | | Log the IPMI watchdog event into redfish. Tested: Set a hard reset watchdog: ipmitool raw 0x06 0x24 0x5 0x1 0x0 0x0 0x64 0x00 Start the timer: ipmitool mc watchdog reset Check the below log message in https://$bmcip/redfish/v1/Systems/system/LogServices/EventLog/Entries "Message": "Host Watchdog Event: Hard Reset – System reset due to Watchdog timeout", "MessageArgs": [ "Hard Reset – System reset due to Watchdog timeout" ], "MessageId": "OpenBMC.0.1.IPMIWatchdog", Signed-off-by: Yong Li <yong.b.li@linux.intel.com> Change-Id: I652faf3b92489b2dd3216eb0cbaaf375e643c749
* Fix Error on Missing interfaceJames Feist2019-07-191-1/+1
| | | | | | | | | | Missing interface != 500 error, just means less data we can show. Tested: No 500 error on systems with missing interface Change-Id: Ifaecd67f8f4f6faed26c7a24ab79dfbd82462291 Signed-off-by: James Feist <james.feist@linux.intel.com>
* Redfish: Raise resource not found (404) if path does not existMarri Devender Rao2019-07-181-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During replace/querying for certificates, if the path specified does not exist InternalError is thrown, the same is modified to throw ResourceNotFound error. Fixes: https://github.com/openbmc/bmcweb/issues/88 Tested: 1) Resource not found error is thrown during replace certificate 2) Resource not found error is thrown during querying for certificate. bash-4.2$ curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/redfish/v1/AccountService/LDAP/Certificates/1 { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "The requested resource of type LDAP Certificate named 1 was not found.", "MessageArgs": [ "LDAP Certificate", "1" ], "MessageId": "Base.1.4.0.ResourceNotFound", "Resolution": "Provide a valid resource identifier and resubmit the request.", "Severity": "Critical" } ], "code": "Base.1.4.0.ResourceNotFound", "message": "The requested resource of type LDAP Certificate named 1 was not found." } } bash-4.2$ curl -c cjar -b cjar -k -H "X-Auth-Token: $bmc_token" -X POST https://${bmc}/redfish/v1/CertificateService/Actions/CertificateService.ReplaceCertificate/ -d @data_https.json { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "The requested resource of type HTTPS certificate named 2 was not found.", "MessageArgs": [ "HTTPS certificate", "2" ], "MessageId": "Base.1.4.0.ResourceNotFound", "Resolution": "Provide a valid resource identifier and resubmit the request.", "Severity": "Critical" } ], "code": "Base.1.4.0.ResourceNotFound", "message": "The requested resource of type HTTPS certificate named 2 was not found." } } Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com> Change-Id: I88b90cbca88fd5a23929f7e7e0d4e32948d9713b
* Change Name of PSU Event LogCheng C Yang2019-07-171-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally PSU Event Log use PSU number as the parameter, change to PSU name as the parameter. Tested: Plug out AC cable on PSU2, we can see below in Redfish Log Entries. { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", data.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/ Entries/#1562158096", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2019-07-03T12:48:16+00:00", "EntryType": "Event", "Id": "1562158096", "Message": "Power supply PSU2 AC power lost.", "MessageArgs": [ "PSU2" ], "MessageId": "OpenBMC.0.1.PowerSupplyACLost", "Name": "System Event Log Entry", "Severity": "Critical" }, Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com> Change-Id: I2fc32606bef334c9c5db8b8883ea14bb1e653579
* Revert "Redfish: Add PATCH operation support for RemoteRoleMapping"Ed Tanous2019-07-171-252/+4
| | | | | | | | | | This reverts commit 2a21b9db6fcfe477f9ef31453df93e3f6c442a44. Reason for revert: Merged accidentally. Tested locally, and seems to work as designed. Needs fixed to match the comments below, then should be good to go. Change-Id: I95c19e47a09ca5afa343fd7590bc39f750cd81e0
* Redfish: Add PATCH operation support for RemoteRoleMappingNagaraju Goruganti2019-07-171-4/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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" } ], Change-Id: Idc80cee94b8b55d036c2514d50c147a72ed4c7f2 Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com> Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* Redfish: Populate the RemoteRoleMapping prop under AccountService schemaNagaraju Goruganti2019-07-171-150/+192
| | | | | | | | | | | | | | | | | | | | Get request on account service gets the RemoteRoleMapping info. Tested: 1.Ran redifsh validator and there are no errors 2.GET Request on AccountService would add below given info if RoleMapping data is configured on the system. GET "RemoteRoleMapping": [ { "LocalRole": "<configured role>", "RemoteUser": "<configured user>" }, ], Change-Id: Ie22f0bb520de795d31a9aba76a56fe88886ed50b Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com> Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* Fix ProcessorSummary Count and StatusAlpana Kumari2019-07-171-24/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ProcessorSummary State is always Disabled and Count shows 0. Fixed it by using correct interface to get these values. Doing GET on Interface xyz.openbmc_project.State.Decorator.OperationalStatus instead of xyz.openbmc_project.Inventory.Item.Cpu to get the State of CPU Tested: -- Ran GET request on the ComputerSystem node --when 2 CPUs are present and functional "ProcessorSummary": { "Count": 2, "Status": { "State": "Enabled" } }, --when 2 CPUs are present but only 1 is functional "ProcessorSummary": { "Count": 2, "Status": { "State": "Enabled" } }, --when only 1 CPU present and functional "ProcessorSummary": { "Count": 1, "Status": { "State": "Enabled" } }, --when only 1 CPU present and Not Functional "ProcessorSummary": { "Count": 1, "Status": { "State": "Disabled" } }, --Ran Redfish-Service-Validator ComputerSystem.v1_0_0.ProcessorSummary:Count value: 2 <class 'int'> has Type: Edm.Int64 Edm.Int64 is Optional permission OData.Permission/Read Success ComputerSystem.v1_0_0.ProcessorSummary: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 ProcessorSummary.Count PASS ProcessorSummary.Model Optional ProcessorSummary.Status complex ProcessorSummary.Status.State PASS Change-Id: I953db79da965b4493d7bd0005820945383b1377c Signed-off-by: Alpana Kumari <alpankum@in.ibm.com> Change-Id: I1d5f76adf2ed8a66d8b27aeca59e0d1a5730e6a8
* pcie: Don't return error if no PCIe presentAndrew Geissler2019-07-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolves openbmc/bmcweb#98 Tested: Before the fix: curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/Systems/system { "@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem", "@odata.id": "/redfish/v1/Systems/system", "@odata.type": "#ComputerSystem.v1_6_0.ComputerSystem", ... "SystemType": "Physical", "error": { "@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "The request failed due to an internal service error. The service is still operational.", "MessageArgs": [], "MessageId": "Base.1.4.0.InternalError", "Resolution": "Resubmit the request. If the problem persists, consider resetting the service.", "Severity": "Critical" } ], "code": "Base.1.4.0.InternalError", "message": "The request failed due to an internal service error. The service is still operational." } After the fix: curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/Systems/system { "@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem", "@odata.id": "/redfish/v1/Systems/system", "@odata.type": "#ComputerSystem.v1_6_0.ComputerSystem", ... "SerialNumber": "1318ECA", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Disabled" }, "SystemType": "Physical" } Change-Id: I0cc2a86decdea47164103c901ce7bd631f8adaf2 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* Redfish(Authorization): Map the user role with the Redfish privilegesRatan Gupta2019-07-111-0/+23
| | | | | | | | | This commit gets the role of the user from the session object and map it with the redfish privileges and then allow/reject the asked operation depending on the userprivileges and the entity privileges. Change-Id: I40be06c28e80b47fe76891cacf863f8495bace88 Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
OpenPOWER on IntegriCloud