summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-08-27openbmc_dbus_rest: Add numeric_limits range checkAdriana Kobylak1-3/+68
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>
2019-08-27Network : Fix the Service Validator FailureManojkiran Eda1-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
2019-08-22[bmcweb]: Bump to latest sdbusplus versionRichard Marian Thomaiyar1-1/+1
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>
2019-08-20Avoid populating StaticNameServers propertyManojkiran Eda1-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
2019-08-17Fix an Intel copyright that was missed in CREd Tanous1-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
2019-08-17Add 5 bits of entropyJoseph Reynolds1-3/+3
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>
2019-08-16Redfish: Add TrustStore certificate supportMarri Devender Rao3-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>
2019-08-16Redfish: Extend GenerateCSR action for LDAP certificate collectionMarri Devender Rao1-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>
2019-08-16Redfish: GenerateCSR action for HTTPS certificateMarri Devender Rao2-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>
2019-08-16Redfish: Move power supplies to Power schemaShawn McCarney2-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>
2019-08-15Register redfish logChen,Yugang1-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>
2019-08-09Don't return a 500 error for entries without priority metadataJason M. Bills1-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>
2019-08-09Fix getting individual journal entries with an underscoreJason M. Bills1-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>
2019-08-09Add CPU core count propertyRAJESWARAN THILLAIGOVINDAN1-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>
2019-08-09Fix "MemorySummary" status: Disabled on IBM systemsAlpana Kumari1-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>
2019-08-03Fix Regression in PATCH on system nodeSantosh Puranik3-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
2019-08-02Change the permission of the session databaseRatan Gupta1-2/+12
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
2019-08-02Fixed Accelerator StateSantosh Puranik1-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
2019-08-02Add support to request a single Journal Event Log EntryJason M. Bills2-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>
2019-08-02Don't store LogEntry IDs across requestsJason M. Bills1-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>
2019-08-02Fix for Download dump file with original file nameRamesh Iyyar1-0/+24
Issue: The downloaded dump file name is having dump id instead of actual dump file name. Solution: Added "Content-Disposition" header into http response packet with filename as actual dump file name. So, The downloaded dump file will be saved in actual dump file name when downloading the dump file by using dump id. Tested By: - curl -O -J -c cjar -b cjar -k -H "X-Auth-Token: $bmc_token" https: //$bmc_ip/download/dump/DUMP_ID Change-Id: Id4726da20081e7d57d62038f672169f440edecfd Signed-off-by: Ramesh Iyyar <rameshi1@in.ibm.com>
2019-08-02Ignore charset for /login attemptsEd Tanous1-1/+3
bmcweb fails when attempting to login with a Content header of application/json; charset=utf8. This is because of an exact string compare. This commit changes the check to only check the begining of the string, and adds some logging to make it more clear when we hit this in the future. Signed-off-by: Ed Tanous <ed.tanous@intel.com> Change-Id: I972a80c174a18295205340271b781c9d6693ee17
2019-08-01Redfish(Network): IPV4 DHCP ipaddreses dont show gateway when in DHCP modeRavi Teja1-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
2019-07-31Add power restore policy applied messageJason M. Bills1-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>
2019-07-31Add SetPointOffset To RefishJames Feist3-6/+87
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>
2019-07-31redfish-doc: Add details on EventLog implementationsAndrew Geissler1-0/+36
Was struggling a bit reviewing the code and options in the LogServices area so wrote this up quickly. The main goal being to give a brief overview and link to some documentation to help with reviewing the options. Change-Id: I337490157ffdb188be812031311694f6cb83b8fa Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
2019-07-30Redfish:Support to Delete a single event logChicago Duan1-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
2019-07-27Add ManagerInChassis link in Managers/bmcJason M. Bills1-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>
2019-07-25Add message entry for IPMI watchdog eventYong Li1-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
2019-07-19Fix Error on Missing interfaceJames Feist1-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>
2019-07-18Redfish: Raise resource not found (404) if path does not existMarri Devender Rao1-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
2019-07-18Change Name of PSU Event LogCheng C Yang1-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
2019-07-18redfish-doc: Move Redfish doc to its own fileAndrew Geissler2-461/+462
Redfish support has been growing exponentially within bmcweb. Lets get a separate document for it all. Change-Id: Ibe895c7ab4bf4d2e1d51fce7136c0a6f8ca4119d Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
2019-07-18Revert "Redfish: Add PATCH operation support for RemoteRoleMapping"Ed Tanous1-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
2019-07-18Redfish: Add PATCH operation support for RemoteRoleMappingNagaraju Goruganti1-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>
2019-07-18Redfish: Populate the RemoteRoleMapping prop under AccountService schemaNagaraju Goruganti1-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>
2019-07-18Fix ProcessorSummary Count and StatusAlpana Kumari1-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
2019-07-12pcie: Don't return error if no PCIe presentAndrew Geissler1-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>
2019-07-11Ignored Trust-Chain related errors when validating certificateRamesh Iyyar1-10/+81
Currently, bmcweb is generating self signed certificate when uploaded certificate is not in trust-chain while validating that certificate. As per design direction, bmcweb and Certificate Manager should ignore trust chain related errors and same feature addressed in certificate manager. Reference change id from Certificate Manager: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-certificate-manager/+/13875 With this change, the user can upload self signed CA certificate without Root CA-Certificate in certificate store and bmcweb won't generate self signed certificate when uploaded certificate is not in trust-chain. Trust chain error info: X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY X509_V_ERR_CERT_UNTRUSTED X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE Change-Id: Ieedd602541d6d5284be3e22ffd5db3ee875065fe Signed-off-by: Ramesh Iyyar <rameshi1@in.ibm.com>
2019-07-11Redfish(Authorization): Map the user role with the Redfish privilegesRatan Gupta4-33/+64
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>
2019-07-11Add Redfish PCIe informationJason M. Bills3-0/+352
This adds the capability to get PCIe device information from D-Bus and display it in the appropriate Redfish PCIeDevice and PCIeFunction objects. Tested: Passed the Redfish validator for the new PCIeDevice and PCIeFunction objects. Change-Id: I06f3b0e7d283e48d2235b7d34f78f603b22de79f Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2019-07-10Included sdbusplus/bus/match.hpp to fix compilation errorRAJESWARAN THILLAIGOVINDAN1-0/+1
Tested: with this change, CI for the commit https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/20134 passes. Signed-off-by: RAJESWARAN THILLAIGOVINDAN <rajeswgo@in.ibm.com> Change-Id: I983494e4e42bb4cce31482918c01c9e81a51132e
2019-07-09Addressed certificate read issueRamesh Iyyar1-0/+6
Certificate reading is failed if Key and Certificate in different order Git Issue ID: - https://github.com/openbmc/bmcweb/issues/91 Root Cause: In uploaded certificate the order is in CSR and then RSA, due to this certificate reading is failed when same file pointer are used for read key and certificate. Solution: Setting file pointer to point beginning of the file to avoid key and certificate order error and it will support both order. Tested By: - Uploaded the certificate by changing component order. 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/NetworkProtocol/HTTPS/Certificates Change-Id: I6f6d41e7b8a7c2f7c5ce53c5d1bbdf69189119b2 Signed-off-by: Ramesh Iyyar <rameshi1@in.ibm.com>
2019-07-09bmcweb implementation of NMI (soft reset) control codeLakshminarayana R. Kammath1-1/+31
Tested : Verified following 1) Redfish validator result is Negative 2) verified following command triggered NMI on host curl -k -H "X-Auth-Token: $bmc_token" -X POST https://9.5.180.47/redfish/v1/Systems/system/Actions/ComputerSystem.Reset -d '{"ResetType":"Nmi"}' Response : OK 2) Host rebooted and crash dump is collected Signed-off-by: Lakshminarayana R. Kammath <lkammath@in.ibm.com> Change-Id: I09efa1e3d94437c89afbe1a1b9d148cc4f577ebe
2019-07-09Fix Redfish Validator Errors in EventLogGunnar Mills1-4/+4
/redfish/v1/Systems/system/LogServices/EventLog ERROR - LogService.v1_0_0.LogService:Actions : Could not get details on this property (This item should not be a List) ERROR - Actions: Item is present, but no schema found Before: 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", "@odata.type": "#LogService.v1_1_0.LogService", "Actions": [ { "#LogService.ClearLog": { "target": "/redfish/v1/Systems/system/LogServices/EventLog/Actions/LogService.ClearLog" } } ], After: 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", "@odata.type": "#LogService.v1_1_0.LogService", "Actions": { "#LogService.ClearLog": { "target": "/redfish/v1/Systems/system/LogServices/EventLog/Actions/LogService.ClearLog" } }, LogService.ClearLog currently does not work on master on Witherspoon, see https://github.com/openbmc/bmcweb/issues/97 Change-Id: Id2cea926b4f5248782c751f3da247c4dc5662cf3 Tested: No longer see the Errors. Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2019-07-09Add __FILE__ and __LINE__ to log printsJames Feist1-7/+12
Some error prints are nondescriptive and this helps tell where the error happened Tested: Compiled with debug and saw error prints with filename and line number. Jul 08 18:52:26 intel-obmc bmcweb[1348]: (2019-07-08 18:52:26) [INFO "webserver_main.cpp":95] bmcweb (Jul 8 2019: 19:24:43) Jul 08 18:52:26 intel-obmc bmcweb[1348]: (2019-07-08 18:52:26) [INFO "webserver_main.cpp":34] attempting systemd socket activation Jul 08 18:52:26 intel-obmc bmcweb[1348]: (2019-07-08 18:52:26) [INFO "webserver_main.cpp":38] Starting webserver on socket handle 3 Jul 08 18:52:28 intel-obmc bmcweb[1348]: (2019-07-08 18:52:28) [INFO "http_server.h":182] Building SSL Context file="/etc/ssl/certs/https/server.pem" Jul 08 18:52:28 intel-obmc bmcweb[1348]: Checking certs in file /etc/ssl/certs/https/server.pem Jul 08 18:52:28 intel-obmc bmcweb[1348]: Found an EC key Jul 08 18:52:28 intel-obmc bmcweb[1348]: (2019-07-08 18:52:28) [INFO "app.h":186] app::ssl context use_count=2 Jul 08 18:52:28 intel-obmc bmcweb[1348]: (2019-07-08 18:52:28) [INFO "http_server.h":157] iBMC server is running, local endpoint [::]:443 Jul 08 18:52:28 intel-obmc bmcweb[1348]: (2019-07-08 18:52:28) [DEBUG "http_connection.h":267] 0xb43b48 Connection open, total 1 Change-Id: I9838d1863bcdd2d8401d3237729a8e7f134bfd07 Signed-off-by: James Feist <james.feist@linux.intel.com>
2019-07-09Redfish(Authorization): Add the privilege in the user session object.Ratan Gupta2-6/+262
This commit fetches the user privilege during creation of the session by making D-bus call and add the privilege in the user session object. Change-Id: I0e9da8a52df00fc753b13101066ce6d0be9e2ce3 Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
2019-07-08Return active bmc fw versionAndrew Geissler1-43/+3
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>
2019-07-08Move PowerLimit to correct locationGunnar Mills2-6/+35
See the following Redfish Validator errors and warning: /redfish/v1/Chassis/chassis/Power ERROR - PowerLimit not defined in schema Power.v1_5_2 (check version, spelling and casing) /redfish/v1/Chassis/chassis/Power#/PowerControl/ ERROR - Decoded object no longer a dictionary /redfish/v1/Chassis/chassis/Power ERROR - @odata.id of ReferenceableMember does not properly resolve: /redfish/v1/Chassis/chassis/Power#/PowerControl/ WARNING - No @odata.type present, assuming highest type Power.v1_0_0.PowerControl Power.v1_4_0.PowerControl If you look at the specification/mockups, PowerLimit is under PowerControl. From the https://redfish.dmtf.org/redfish/mockups/v1/893 mockup: PowerControl": [ { "@odata.id": "/redfish/v1/Chassis/1U/Power#/PowerControl/0", "MemberId": "0", ... "PowerAvailableWatts": 0, "PowerCapacityWatts": 800, ... "PowerLimit": { "LimitInWatts": 500, "LimitException": "LogEventOnly", "CorrectionInMs": 50 } , ... } ], Added an odata.type and fixed the odata.id for PowerControl. Put all power control sensors under the same PowerControl like we do for PowerSupplies. Tested: No longer see the errors. If no total_power (happens when a Open Power system is off): curl -k https://${bmc}/redfish/v1/Chassis/chassis/Power ... "PowerControl": [ { "@odata.id": "/redfish/v1/Chassis/chassis/Power#/PowerControl/0", "@odata.type": "#Power.v1_0_0.PowerControl", "MemberId": "0", "Name": "Chassis Power Control", "PowerLimit": { "LimitInWatts": null } } ], "Redundancy": [], ... curl -k https://${bmc}/redfish/v1/Chassis/chassis/Power/ { "PowerControl": [ { "@odata.id": "/redfish/v1/Chassis/chassis/Power#/PowerControl/0", "@odata.type": "#Power.v1_0_0.PowerControl", "MemberId": "0", "Name": "Chassis Power Control", "PowerConsumedWatts": 232.0, "PowerLimit": { "LimitInWatts": null }, "Status": { "Health": "OK", "State": "Enabled" Change-Id: I8ca47bd6c7dedf5d0685886e2e45e6f964f69060 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2019-07-03bmcweb: Clear up event log entry class namesAnthony Wilson2-5/+6
It wasn't immediately clear what some of the classes did without digging through the implementation. This should clear up any confusion between the Journal and DBus implementations of the event log entry classes. Tested: Verified changes were present in both implementations of event log enttry. Change-Id: Id0d6bad5c73feb93608ac1ad457235a1d31fe018 Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>