summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Parse Message Registry header info from the fileJason M. Bills2019-05-084-14/+56
| | | | | | | | | | | | This extends the Message Registry parsing to include header details that are part of the redfish resource. Tested: Verified that the MessageRegistry info all returns correctly in the redfish response. Change-Id: I6179c07f4067cd4520fce3e774d18530fede0a95 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
* Remove the static Base Message Registry fileJason M. Bills2019-05-088-579/+1268
| | | | | | | | | | | | | | | | This change removes the static Base Message Registry file and replaces it with a compile-time structure. A script is used to pull the Base Message Registry file from the DMTF and parse it into the .hpp structure. Tested: Verified that after running the script, I can get the same Redfish data back from the existing endpoints without using the static files. Change-Id: Ide3c61ecff62801c06619d5c3edc2229c945d8e7 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
* Fix OemManager schema for profilesJames Feist2019-05-042-41/+97
| | | | | | | | | | Make schema pass validator. Found quite a few missing fields and odata.id issues. Tested: Passes validator Change-Id: Ibba92018d07a2a9f2ba833c295a235fee7845a97 Signed-off-by: James Feist <james.feist@linux.intel.com>
* bmcweb: /s/boost::beast::string_view/std::string_view/gAdriana Kobylak2019-05-024-33/+33
| | | | | | | | | | Follow-on to https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/18891 Tested: Checked that the host console and virtual media endpoints still worked as expected. Change-Id: Ifdc5f21f3668bdf9bd24189504aaeb17b232c921 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Redfish: Supporting ServiceRootUUID field for ↵Bernard Wong2019-05-023-23/+58
| | | | | | | | | | | | | | | | | /redfish/v1/Managers/{ManagerId}schema - Created a common utiity file called, systemd_utils.hpp to hold the function getUuid. - Added json field support for ServiceEntryPointUUID field to retrieve it from system_utils.hpp. - Amended the header file, service_root.hpp to get the uuid from the newly created system_utils.hpp file. Changes tested with QEMU emulator and Witherspoon image => Passed Redfish Validator => Passed Change-Id: If7f2aba49942a0b315fb012da29af194ebd0ea6f Signed-off-by: Bernard Wong <trials13@hotmail.com>
* Redfish(Network): Implement IPv6DefaultGateway supportRavi Teja2019-04-301-1/+22
| | | | | | | | | | | | | | Added GET support for IPv6DefaultGateway.its read only property On Patch operation display "PropertyNotWritable" message. Tested by: GET PATCH -D patch.txt -d '{"IPv6DefaultGateway": "fe80::226:88ff:feac:8401"}' Tested with validator and no errors. Change-Id: Ib67234496b70ec53508a9be36cd86c1859b5d895 Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
* Fix empty IPV4 gateway errorGunnar Mills2019-04-261-1/+8
| | | | | | | | | | | | | | | If an IPV4 gateway is empty use "0.0.0.0". The RedfishServiceValidator throws the following error on a Witherspoon system: "IPv4Addresses[0].Gateway: String '' does not match pattern ''^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$''" Tested: Ran RedfishServiceValidator and no longer observe the error. IPV4 addresses with gateways are untouched. Change-Id: I423aeeb0bec46fa5cc0c8cf5a017c16d20314984 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* CMakeLists.txt: Remove BOOST_ASIO_NO_DEPRECATEDAdriana Kobylak2019-04-241-1/+2
| | | | | | | | | | | | | | | | Comment out the BOOST_ASIO_NO_DEPRECATED flag until Yocto moves to Boost 1.70 (currently at 1.69), since it breaks boost/process.hpp which is used for the Virtual Media enpoint. Reference: - https://github.com/boostorg/process/issues/29 - https://github.com/boostorg/process/pull/67 Tested: Verified that the virtual media commit that includes boost/process.hpp compiles and the interface still works as expected. Change-Id: Iffc53c260a44947a0891822ec00a1562849e7ae2 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* crow: websocket: Increase input buffer sizeAdriana Kobylak2019-04-241-1/+1
| | | | | | | | | | Increase the websocket input buffer size to support virtual media. The max network block device buffer size is 128kb plus 16bytes for the message header: https://github.com/NetworkBlockDevice/nbd/blob/master/doc/proto.md#simple-reply-message Change-Id: I6d6a95855f8c86f795532b8294d6189f3b766ece Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Change application and interface names to CrashdumpJason M. Bills2019-04-223-63/+67
| | | | | | | | | | Crashdump is the preferred name, so replace all uses of CPU Log with Crashdump. Tested: On-demand crashdump functions correctly Change-Id: I6cf8fb81bc8f2e85dd4a3561835f3fafbff764e5 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
* Add systemd unit filesBrad Bishop2019-04-223-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add bmcweb.socket, a systemd unit file that enables systemd socket activation of bmcweb. Systemd socket activation defers startup of socket listening applications until something connects to the socket. There are presently no configurable parameters in bmcweb.socket. Add bmcweb.service, a systemd unit file for starting bmcweb. bmcweb.service has one configurable parameter, the installation prefix. Prior these unit files were hosted in the meta-phosphor repository but OpenBMC is moving away from unit-files-in-metadata and trying to do it the way the rest of the world does it - unit files are provided by the projects that contain the application source. The unit files were copied mostly verbatim (minor update for installation prefix in bmcweb.service template) so the only new logic here is in the cmake logic. Tested by: 1 - devtool add bmcweb. 2 - apply this diff to bmcweb_git.bb: -inherit obmc-phosphor-systemd +inherit systemd 3 - bitbake bmcweb. 4 - manual inspection of the image dir in the yocto build tree. Change-Id: I61b49d519f5b4eb06e97a14d4f6707344e544434 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Remove references to experimental filesystemJames Feist2019-04-154-19/+3
| | | | | | | | | | We're at CPP17 everywhere now, no need to keep the experimental refrerence. Tested: It builds Change-Id: I5f6571eb411bf055e9715f7d96d1be5a3cb2e119 Signed-off-by: James Feist <james.feist@linux.intel.com>
* fw-update: Support host image updateAndrew Geissler2019-04-101-50/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per the Redfish schema for the UpdateService, it supports all SoftwareInventory targets. On OpenBMC this is currently the BMC and the Host (BIOS) firmware. Introduced a new fwUpdateInProgress static variable so that the signal subscription could be disabled once the required interface was added. This prevented multiple call backs and multiple activations of the same image. Tested: Verified that a host and BMC image update worked as expected on a witherspoon system. $ curl -k -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/octet-stream" -X POST -T ./obmc-phosphor-image-witherspoon.ubi.mtd.tar https://${BMC_IP}/redfish/v1/UpdateService { "@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "Successfully Completed Request", "MessageArgs": [], "MessageId": "Base.1.4.0.Success", "Resolution": "None", "Severity": "OK" } ] } Change-Id: I7bb9381f1b79bf65604464b628ef98646951d840 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* fw-inventory: Add RelatedItem to inventoryAndrew Geissler2019-04-101-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added TODO reference for BIOS reference. This commit is required: https://gerrit.openbmc-project.xyz/#/c/openbmc/bmcweb/+/16775/ Tested: VERBO - SoftwareInventory.v1_1_0.SoftwareInventory:RelatedItem VERBO - value: [OrderedDict([('@odata.id', '/redfish/v1/Managers/bmc')])] <class 'list'> VERBO - has Type: Collection(Resource.Item) entity VERBO - is Optional VERBO - permission OData.Permission/Read VERBO - is Collection VERBO - Success curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/UpdateService/FirmwareInventory/969635f8 { "@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory", "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/969635f8", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "BMC update", "Id": "969635f8", "Members@odata.count": 1, "Name": "Software Inventory", "RelatedItem": [ { "@odata.id": "/redfish/v1/Managers/bmc" } ], "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": false, "Version": "2.6.0-rc1-312-g8d6abcd6d" } With the TODO code un-commented, this is the output: curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/UpdateService/FirmwareInventory/ace821ef { "@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory", "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/ace821ef", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Host update", "Id": "ace821ef", "Members@odata.count": 1, "Name": "Software Inventory", "RelatedItem": [ { "@odata.id": "/redfish/v1/Systems/system/BIOS" } ], "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": false, "Version": "IBM-witherspoon-OP9-v2.0.10-2.22" } Change-Id: Iae563a938532c6f53f41c8fc5c758693155be1a0 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* PATCH support for DateTimeSantosh Puranik2019-04-101-1/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds PATCH support for the DateTime property. To set the BMC time, it uses the xyz.openbmc_project.Time.EpochTime.Elapsed property. The BMC time can only be set if the BMC owns it's own time *and* the time is not automatically synced with NTP server(s). The input JSON for the PATCH request must speicfy datetime in extended ISO 8601 format. Tested: ======= Precondition: Time owner should be BMC and sync method should be Manual. busctl get-property xyz.openbmc_project.Settings /xyz/openbmc_project/time/owner xyz.openbmc_project.Time.Owner TimeOwner s "xyz.openbmc_project.Time.Owner.Owners.BMC" busctl get-property xyz.openbmc_project.Settings /xyz/openbmc_project/time/sync_method xyz.openbmc_project.Time.Synchronization TimeSyncMethod s "xyz.openbmc_project.Time.Synchronization.Method.Manual" -- Setting date time: curl -k -H "X-Auth-Token: $bmc_token" -X PATCH https://${bmc}:${port}/redfish/v1/Managers/bmc -d '{"DateTime": "2019-03-20T08:47:30.345+00:00"}' { "DateTime": "2019-03-20T08:47:30.345+00:00" } Invalid date time string: curl -k -H "X-Auth-Token: $bmc_token" -X PATCH https://${bmc}:${port}/redfish/v1/Managers/bmc -d '{"DateTime": "2019-03-20T08:47:30.345+ds:00"}' { "DateTime@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "The value 2019-03-20T08:47:30.345+ds:00 for the property DateTime is of a different format than the property can accept.", "MessageArgs": [ "2019-03-20T08:47:30.345+ds:00", "DateTime" ], "MessageId": "Base.1.4.0.PropertyValueFormatError", "Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed.", "Severity": "Warning" } ] } When the time sync method is NTP, the PATCH request fails as expected: busctl get-property xyz.openbmc_project.Settings /xyz/openbmc_project/time/sync_method xyz.openbmc_project.Time.Synchronization TimeSyncMethod s "xyz.openbmc_project.Time.Synchronization.Method.NTP" curl -k -H "X-Auth-Token: $bmc_token" -X PATCH https://${bmc}:${port}/redfish/v1/Managers/bmc -d '{"DateTime": "2019-03-20T08:47:30+00:00"}' { "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." } } When the time sync method is Manual, but the time owner is Host, PATCH fails as expected again: busctl get-property xyz.openbmc_project.Settings /xyz/openbmc_project/time/owner xyz.openbmc_project.Time.Owner TimeOwner s "xyz.openbmc_project.Time.Owner.Owners.Host" busctl get-property xyz.openbmc_project.Settings /xyz/openbmc_project/time/sync_method xyz.openbmc_project.Time.Synchronization TimeSyncMethod s "xyz.openbmc_project.Time.Synchronization.Method.Manual" curl -k -H "X-Auth-Token: $bmc_token" -X PATCH https://${bmc}:${port}/redfish/v1/Managers/bmc -d '{"DateTime": "2019-03-20T08:47:30+00:00"}' { "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." } } Change-Id: Ie4a71e639b9a6577fae8627f0f69b6179506eb58 Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
* tls: Avoid Intel reference in in self-signed certsBrad Bishop2019-04-102-4/+3
| | | | | | | | | | A step towards upstream OpenBMC shipping free of any branding (other than OpenBMC branding) or company references. Tested: Did not test Change-Id: I4fea765949ff3ad94e3cd52fedec597a77db0e79 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Redfish: Local variable overriding member variableMarri Devender Rao2019-04-081-4/+4
| | | | | | | | | | | timer handler local variable defined in run() method is overriding handler member variable. Tested: 1) Verified BMC web is running and able to process requests Change-Id: I6cd80dff16f3a932d8ada4fcf00917488e8ea936 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* Change the name from Immediate to On-Demand for CPU LogJason M. Bills2019-04-052-33/+32
| | | | | | | | | | | | | The name "Immediate" was confusing, so changing the name to "OnDemand" to make it's purpose more clear. Tested: Used Postman to send a POST to "/redfish/v1/Systems/system/ LogServices/CpuLog/Actions/Oem/CpuLog.OnDemand" and verified that the expected On-Demand data was returned. Change-Id: If9b6b30e1c424227601fb6b7381470f571afca9e Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
* fw-inventory: Provide BiosVersion in system objAndrew Geissler2019-04-052-13/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Created a new fw_utils.hpp to reduce more indentation code in systems.hpp and also as a base for some future refactoring for common use cases to access firmware information. Tested: - Verified RedfishServiceValidator.py shows no new errors VERBO - ComputerSystem.v1_0_0.ComputerSystem:BiosVersion VERBO - value: IBM-witherspoon-OP9-v2.0.10-2.22 <class 'str'> VERBO - has Type: Edm.String Edm.String VERBO - is Optional VERBO - permission OData.Permission/Read VERBO - Success - BiosVersion now correctly returned in data $ 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_5_1.ComputerSystem", "Actions": { "#ComputerSystem.Reset": { "ResetType@Redfish.AllowableValues": [ "On", "ForceOff", "GracefulRestart", "GracefulShutdown" ], "target": "/redfish/v1/Systems/system/Actions/ComputerSystem.Reset" } }, "BiosVersion": "IBM-witherspoon-OP9-v2.0.10-2.22", ... } Change-Id: I2d7792c724f88aa13bd7b40c0d7f70dd4aa1c807 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* Add link for "Uri" objectsJason M. Bills2019-04-051-0/+4
| | | | | | | | | | | | | Message Registry File resources contain a "Uri" pointing to the location of the Message Registry. This change makes the "Uri" object a link that can be clicked to jump to the Message Registry. Tested: Verified that the "Uri" field is a link and takes you to the Message Registry. Change-Id: I33a443cffa7ed2f4c92f4a572d7186ef45be17f3 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
* Add SerialConsole to Manager nodeSantosh Puranik2019-04-051-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds SerialConsole property to the response JSON when doing a GET on the manager resource. The supported connection types are hard-coded. Tested: Performed a GET on the manager object to see the newly added properties: curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}:${port}/redfish/v1/Managers/bmc { "@odata.context": "/redfish/v1/$metadata#Manager.Manager", "@odata.id": "/redfish/v1/Managers/bmc", "@odata.type": "#Manager.v1_3_0.Manager", .... .... "SerialConsole": { "ConnectTypesSupported": [ "IPMI", "SSH" ], "ServiceEnabled": "true" }, .... .... } Ran Redfish service validator and ensured no new errors. The newly added properties PASS validation. Snippet of the verbose output from the validator: .... .... Manager.v1_0_0.Manager:SerialConsole value: OrderedDict([('ConnectTypesSupported', ['IPMI', 'SSH']), ('ServiceEnabled', True)]) <class 'collections.OrderedDict'> has Type: Manager.v1_0_0.SerialConsole complex is Optional ***going into Complex Manager.v1_0_0.SerialConsole:ConnectTypesSupported value: ['IPMI', 'SSH'] <class 'list'> has Type: Collection(Manager.v1_0_0.SerialConnectTypesSupported) enum is Optional permission OData.Permission/Read is Collection Success Success Manager.v1_0_0.ManagerService:ServiceEnabled value: True <class 'bool'> has Type: Edm.Boolean Edm.Boolean is Optional permission OData.Permission/ReadWrite Success Manager.v1_0_0.ManagerService:MaxConcurrentSessions value: n/a <class 'str'> has Type: Edm.Int64 Edm.Int64 is Optional prop Does not exist, skip... ***out of Complex .... .... Change-Id: I659501d5537bfb3eedc8cd2204be98fee742324d Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
* Redfish(Network): Implemented PATCH of StaticNameServers arrayRAJESWARAN THILLAIGOVINDAN2019-04-051-3/+38
| | | | | | | | | | | Testing: PATCH -D patch.txt -d '{"StaticNameServers": ["3.3.3.3"]}' PATCH -D patch.txt -d '{"StaticNameServers": ["3.3.3.3","6.6.6.6"]}' PATCH -D patch.txt -d '{"StaticNameServers": []}' Signed-off-by: RAJESWARAN THILLAIGOVINDAN <rajeswgo@in.ibm.com> Change-Id: I3ffb7f5b704437b31ddfeb6a74eae3e6a582164a
* Redfish(Network): VLAN PATCH fixSunitha Harish2019-04-051-64/+46
| | | | | | | | | | | | | | | This patch set fixes the issue at the Patch operation on VLAN resource. Before this for any new value of VLANId , the patch command used to apply value 1 as the new VLANId Tested by : GET https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0/VLANs/eth0_10 PATCH https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0/VLANs/eth0_10 -d '{ "VLANId" : 12, "VLANEnable": true}' PATCH https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0/VLANs/eth0_10 -d '{ "VLANId" : 20, "VLANEnable": false}' Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com> Change-Id: Ia18e58816e6c78c8609e0daa558bc66d6914568e
* bmcweb: fix an issue with /org endpointsEd Tanous2019-04-041-2/+2
| | | | | | | | | | | | | | A recent change to the URL routing broke all /org endpoints, which now return 404 instead of the correct data. This resolves it, and points at the correct object paths again. Tested: Given this is a CI failure, will rely on CI to test the /org endpoints. Resolves #72 Change-Id: I779bb32f1f2bcba45fdb64f5bf510e7fa832e2d2 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Initial redfish logging supportAndrew Geissler2019-04-045-29/+352
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was imported from a fork: https://github.com/ampere-openbmc/bmcweb/commits/ampere-next/redfish-core/lib/logservices.hpp Which had a series of commits from TungVuX and hyche The initial patch is that code verbatim. Follow up patches on top of this make the necessary changes for current bmcweb: - Move to sdbusplus - C++ naming convention changes - Clang format - Some refactoring Tested: Verified new services work correctly when queried e.g. curl -k -H "X-Auth-Token: $bmc_token" -X GET \ https://${bmc}/redfish/v1/Systems/system/LogServices/EventLog/Entries displays the entries properly. RedfishServiceValidator results: /redfish/v1/Systems/system/LogServices pass: 3 passGet: 1 skipOptional: 1 /redfish/v1/Systems/system/LogServices/EventLog pass: 5 passGet: 1 skipOptional: 8 /redfish/v1/Systems/system/LogServices/EventLog/Entries pass: 3 passGet: 1 skipOptional: 1 /redfish/v1/Systems/system/LogServices/EventLog/<str> pass: 6 passGet: 1 skipOptional: 16 Sample Output: curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/redfish/v1/Systems/system/LogServices/EventLog/Entries { "@odata.context": "/redfish/v1/$metadata#LogEntryCollection.LogEntryCollection", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries", "@odata.type": "#LogEntryCollection.LogEntryCollection", "Description": "Collection of System Event Log Entries", "Members": [ { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/1", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2019-02-22T17:11:00+00:00", "EntryType": "Event", "Id": "1", "Message": "example.xyz.openbmc_project.Example.Elog.AutoTestSimple", "Name": "System DBus Event Log Entry", "Severity": "Critical" } ], "Members@odata.count": 1, "Name": "System Event Log Entries" } Change-Id: I422b0d0ec577ea734fecfb6f49101ec5ff45a556 Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
* pid: fix zone string lengthJames Feist2019-04-031-1/+5
| | | | | | | | | | | | | Should be 8 based on comment. Tested: Updated patch script using latest zones and it worked. Example: /redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/FanZones/Left Change-Id: Ia56bc6ed4f02a05e91d3638c5b7f470f90d6eba4 Signed-off-by: James Feist <james.feist@linux.intel.com>
* Bump ManagerNetworkProtocol to fix errorGunnar Mills2019-04-021-1/+1
| | | | | | | | | | | | | The RedfishServiceValidator throws the following error: "ERROR - Verifying property that does not belong to this version: ManagerNetworkProtocol.v1_2_0.ManagerNetworkProtocol:NTP" NTP was added in version 1_2_0. Bumped to latest, 1_4_0. Tested: Ran RedfishServiceValidator and no longer observe the error. Change-Id: Ia9fb2e789593c28f776928d94094204725f5b1ce Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Fix AllowableValues failProp errorGunnar Mills2019-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The RedfishServiceValidator throws the following error: "ERROR - Locked@Redfish.AllowableValues[0]: Expected string value, got type class 'bool'" From http://redfish.dmtf.org/schemas/DSP0266_1.0.html#allowable-values "6.5.4.7.2. Allowable values The property representing the action may be annotated with the "AllowableValues" annotation in order to specify the list of allowable values for a particular parameter. The set of allowable values is specified by including a property whose name is the name of the parameter followed by "@Redfish.AllowableValues", and whose value is a JSON array of strings representing the allowable values for the parameter." Moved AllowableValues[0] to a string. Tested: Ran RedfishServiceValidator and no longer observe the error. Change-Id: I167416fe62449dd428f549c486069db0de7676b0 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Fix DCPowerOff.NumberOfArgs Mandatory propGunnar Mills2019-04-021-3/+5
| | | | | | | | | | | | | | | | | | | | | The RedfishServiceValidator throws the following error: "ERROR - Messages.DCPowerOff.NumberOfArgs: Mandatory prop does not exist" for #MessageRegistry.v1_0_0.MessageRegistry. From https://redfish.dmtf.org/schemas/MessageRegistry.v1_0_0.json "required": [ "Description", "Message", "Severity", "NumberOfArgs", "Resolution" ], Tested: Loaded this change on a Witherspoon, ran RedfishServiceValidator and no longer observe the error. Change-Id: I9ccf3703bc6b06d2bd74f548e1bd4e2badd68c07 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* bmcweb: return 405 when a method is not supportedEd Tanous2019-04-011-0/+12
| | | | | | | | | | | | | | | | bmcweb previously took the crow approach to return codes, returning 200 for many things that didn't provide a VERB definition in its declaration. This patch corrects bmcweb to return an appropriate error code when the verb isn't supported. Tested: Ran test case here: https://github.com/openbmc/bmcweb/issues/69 Observed 405 returned instead of 200. Change-Id: I4c0fb5e68d6163ba6ff30faf1af403015888d475 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* bmcweb: avoid move in error conditionsEd Tanous2019-04-013-36/+19
| | | | | | | | | Moving a response container is a bit non-sensical, and a little wasteful when we're handling errors. This commit moves to simply handling it explicitly using the existing structures. Change-Id: Idacf633741363945b57194730bd7c3427a23b38d Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Allow multiple registrationsTanous2019-04-019-129/+292
| | | | | | | | | | | | | This patchset is the beginings of the infrastructure to allow separate registrations, and map privileges to the actual node in the url table rather than having each registration manage privileges manually. Tested by: Running redfish compliance tool. All things still pass. Change-Id: I72d278cc19c60ba5b6e563fbd705b0551faf9a6a Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Redfish(Network): Implemented GET and PATCH support for NTP serversraviteja-b2019-03-301-2/+156
| | | | | | | | | | | | Testing: GET PATCH {"NTPServers": ["7.7.7.7"]} PATCH {"NTPServers": ["7.7.7.7","4.4.4.4"]} PATCH {"NTPEnabled": true, "NTPServers": ["1.1.1.1"]} PATCH {"NTPEnabled": false} Change-Id: I324e8779d84b368ada78541596946a23f42ef785 Signed-off-by: raviteja-b <raviteja28031990@gmail.com>
* fw-inventory: description of FirmwareInventory objAndrew Geissler2019-03-291-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow one to identify what a firmware inventory object represents. The Purpose was already being pulled from the Dbus data but not put into anything. The description field looks like the best fit for it. Schema Reference: http://redfish.dmtf.org/schemas/v1/SoftwareInventory.v1_2_1.json#/definitions/SoftwareInventory Other Implementations: Not a lot of reference material out there for what other implementers have used for this field. HP: "Description": "SystemBMC" "Description": "SystemRomActive" SuperMicro: <BMC description not available> "Description: "Description of SUPERMICRO BIOS" Tested: - Verified RedfishServiceValidator.py shows no new errors VERBO - Resource.v1_0_0.Resource:Description VERBO - value: BMC update <class 'str'> VERBO - has Type: Resource.Description Edm.String VERBO - is Optional VERBO - permission OData.Permission/Read VERBO - Success - Description now correctly returned in data $ curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/UpdateService/FirmwareInventory/58a9b6db { "@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory", "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/58a9b6db", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "BMC update", "Id": "58a9b6db", "Name": "Software Inventory", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": false, "Version": "2.6.0-rc1-265-gfb721b2" } Change-Id: I55d1b1a5901878da2566713de9dc72e88a8c6359 Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* update ASIO interfacesEd Tanous2019-03-296-49/+112
| | | | | | | | | | | | This commit does 2 things. 1. Upgrades and prepares bmcweb for boost 1.70. 2. Allows us to compile with BOOST_AIO_NO_DEPRECATED Tested: Compiled against 1.69 and 1.70. All changes should be no-op. Change-Id: I557ecd840fe2b88c0fa01978a1b666b40ccccca4 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* sdbusplus bump: Bump to latest sdbusplus shaAndrew Geissler2019-03-291-1/+1
| | | | | Change-Id: Ida0c6046f98f9ddc0c79cdfc27cc5723bda38d04 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* Redfish(Network): Fixes VLAN specific issuesSunitha Harish2019-03-281-97/+60
| | | | | | | | | | | | | | | | | | | | This commit fixes the following issues. Before this fix the VLAN functionality was inconsiststant. 1)Add VLANs property to the EthernetInterface resource 2)Removed VLAN property under EthernetInterface resource 3)Made the property - VLANEnable mandatory for creating vlans (POST command) 4)Fetch the VLANId when GET on the VLAN Interface resource 5)Updated Ethernet schema to EthernetInterface.v1_4_1 6)Changed the propert name "DHCPv4Configuration" to "DHCPv4" as per the schema Tested by: GET https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0 GET https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0/VLANs POST -D headers.txt https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0/VLANs -d '{ "VLANId" : 30, "VLANEnable": true}' GET https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0/VLANs/eth0_30 Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com> Change-Id: I2339f6711cdd56fe42fee030701125492911dc26
* Changing maxPasswordLength to 20AppaRao Puli2019-03-271-1/+1
| | | | | | | | | | | | Changed maxPasswordLength to 20 as per documentation. Tested by: - Checked redfish account properties response and observed change value. Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com> Change-Id: If1a963c29381bb7feb431f7e9b270b4432b72f9d
* Revert "bmcweb: Fix a bunch of warnings"Ed Tanous2019-03-2523-224/+249
| | | | | | | | This reverts commit 6ea007a2faec52ad62680015d2a3f00371a1e351. Reason for revert: Reports of bmcweb seg faults. Change-Id: I408f1bb29c2f8e427a6621cdaac8c31b847ebf06
* bmcweb: Fix a bunch of warningsEd Tanous2019-03-2223-249/+224
| | | | | | | | | | | | bmcweb classically has not taken a strong opinion on warnings. With this commit, that policy is changing, and bmcweb will invoke the best warnings we are able to enable, and turn on -Werror for all builds. This is intended to reduce the likelihood of hard-to-debug situations that the compiler coulve caught early on. Change-Id: I57474410821e82666b3a108cfd0db7d070e8900a Signed-off-by: Ed Tanous <ed@tanous.net>
* Add Redundancy to Thermal SchemaJames Feist2019-03-201-0/+201
| | | | | | | | | | | | | This looks for the FanRedundancy Interface https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Control/FanRedundancy.interface.yaml and an association to type inventory. Using these it adds Redundancy to the thermal schema. Tested: Passes Redfish schema validator Change-Id: Iffa32e445bd57234afeb5c682c9502c5daa227c1 Signed-off-by: James Feist <james.feist@linux.intel.com>
* Redfish: Enhance and fix power/thermal sensorsShawn McCarney2019-03-203-149/+349
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made the following enhancements for Redfish power/thermal sensors: * Now dynamically obtains the DBus object path to pass to GetManagedObjects() when getting sensor values. Was previously hard-coded to "/" which didn't work on some systems. * Added "fan_tach" to list of DBus sensor types returned when thermal sensors are requested. * Added support for one-chassis systems. Made the following fixes: * Fixed @odata.id value when power sensors are requested. Previously returned "/redfish/v1/Chassis/chassis/Thermal". * Renamed "PowerSupply" to "PowerSupplies" to conform to schema. * Removed 6 properties that were being returned for PowerSupplies that were not in the schema. * Added check to make sure no sensors of the wrong type were being returned. Previously if the same connection (service) provided both power and thermal sensors, both types of sensors were always returned. Test Plan: https://gist.github.com/smccarney/79186e8510ba5479e846f2592d44d059 Tested: Verified the URLs /redfish/v1/Chassis/<chassis>/Power and /redfish/v1/Chassis/<chassis>/Thermal return the correct sensor names and values on a Witherspoon system. Verified fixes listed above worked. Ran Redfish Service Validator. Change-Id: I4bae615cb61fc436b3c0a9a5c4d6b4566a3ddaa6 Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
* Redfish(Ethernet): Send the correct JSON response after creating the IPV4 ↵Ratan Gupta2019-03-191-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | object. Before this commit after creating the IPv4 address object,JSON response was having empty string for the newly added object. This commit fixes the problem. Tested By: Assuming there are already two IP addresses configured then the following PATCH request would throw the following output PATCH -D patch.txt -d '{"IPv4Addresses": [{},{},{"Address": "a.a.a.a","Address Origin": "Static","SubnetMask": "255.255.0.0","Gateway":"g.g.g.g"}]} { "@odata.id": "/redfish/v1/Managers/bmc/EthernetInterfaces/eth0", "HostName": "witherspoon", "IPv4Addresses": [ { "Address": "169.254.201.17", "AddressOrigin": "IPv4LinkLocal", "Gateway": "9.3.185.1", "SubnetMask": "255.255.0.0" }, { "Address": "9.3.185.83", "AddressOrigin": "Static", "Gateway": "9.3.185.1", "SubnetMask": "255.255.255.0" }, { "Address": "a.a.a.a", "Gateway": "g.g.g.g", "SubnetMask": "255.255.0.0" } ], Change-Id: I6be340051020839ff7f669296c2077ecfdce78ff Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
* Redfish(Network): Support the PATCH opertration of MACAddress propertyRatan Gupta2019-03-191-2/+29
| | | | | | | | TestedBy: PATCH '{"MACAddress": "x2:xx:xx:xx:xx:xx"}' Change-Id: I6dc421ea509506a2f3062fc0531778ffa2b00310 Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
* Redfish(Network): Support for deletion of IP address through PATCH operationRatan Gupta2019-03-191-76/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit we were reading the IPV4address through readJSON function in vector of json, readJSON doesn't like the null list parameter and throws the error as below "The value null for the property IPv4Addresses is of a different type than the property can accept" This commit fixes that problem and some restructuring the code to make delete work. TestedBy: PATCH {"IPv4Addresses": [{},null,{},{}]} deletes second object PATCH {"IPv4Addresses": [null,{}]} deletes first object Suppose if the IPv4Address has two addresses then the Following PATCH request would give the folowing error. PATCH {"IPv4Addresses": [{},{},null] { "IPv4Addresses/0@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "The value [{},{},null] for the property IPv4Addresses/2 is of a different format than the property can accept.", "MessageArgs": [ "[{},{},null]", "IPv4Addresses/2" ], } Change-Id: Iaefd59de469cb345e86b19349b27567a4fcec3fa Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
* bmcweb: Add JSON response to /logoutAnthony Wilson2019-03-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | When logging out of the API, there was no JSON text response. This implements the requested feature. Tested: Verified appropriate response is generated when /logout is called E.g. curl -c cjar -b cjar -k -X POST \ -H "Content-Type: application/json" \ -H "X-Auth-Token: g3Heq5rYsz1j0iv4MbUp" \ -d '{"data": [ ] }' \ https://${bmc}/logout { "data": "User 'root' logged out", "message": "200 OK", "status": "ok" } Change-Id: I905f5a0855abaa76ae57cf32b8bae758722f6b9f Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
* Redfish: Add Chassis PowerState callGunnar Mills2019-03-181-1/+45
| | | | | | | | | | | | | | Make a call to /xyz/openbmc_project/state/chassis0 to get the chassis PowerState. Very similiar to how we get the System PowerState https://github.com/openbmc/bmcweb/blob/abf2add6a35aaf42ba60c4ae955a4d8925b13b19/redfish-core/lib/systems.hpp#L471 Resolves openbmc/bmcweb#27 Tested: Loaded this on a Witherspoon and power on/off. Saw correct PowerState. Signed-off-by: Gunnar Mills <gmills@us.ibm.com> Change-Id: I9dd008a902098f1872560d985249375a2d317f25
* Refine KVM websock proxyJae Hyun Yoo2019-03-181-26/+30
| | | | | | | | | | | | This commit simplifies input buffer delivering logic by removing a doWrite() call from readDone(). Input events can be delivered through websocket's onmessage handler only and it's enough. Also, it fixes a suspicious weak point of commit/consume pair on outputBuffer. Change-Id: I5b777993a9d6f05375da0422b168c25dacb1b9f9 Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
* Redfish: Populate DHCPv4Configuration Informationmanojkiraneda2019-03-181-0/+58
| | | | | | | | | | | | | | | | | | With this commit the get-request on ethernet interface service gets the DHCPv4Configuration.The following are the properties that are add as a part of this commit. - UseDNSServers - UseNTPServers - UseDomainName - DHCPEnabled Tested By:(On Qemu) GET https://<ip>/redfish/v1/Managers/bmc/EthernetInterfaces/eth0 Change-Id: Ia1f6dbe2c4f1f2ed33adc54f7fd99b61a36c1058 Signed-off-by: manojkiraneda <manojkiran.eda@gmail.com>
* Fix Entries path to point to Systems/systemJason M. Bills2019-03-181-1/+1
| | | | | | | | | | | | The corrected Entries path for the CPU LogService did not get updated with the move from Managers/bmc to Systems/system, so this change fixes it. Tested: Checked that the Entries path points to Systems/system and that it correctly leads to the Entries resource. Change-Id: I1897d43a428408c7a9f16d06747f3654bc8a7e35 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
OpenPOWER on IntegriCloud