summaryrefslogtreecommitdiffstats
path: root/redfish-core
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* Add BMCWEB_ENABLE_REDFISH_ONE_CHASSIS build optionGunnar Mills2019-03-135-10/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define a new build option named BMCWEB_ENABLE_REDFISH_ONE_CHASSIS that is not set by default. When this build option is set, bmcweb will always return a single chassis named "chassis". Setting this option will also cause all sensors to be shown under this chassis. This is a short-term solution. Long term, inventory-manager needs to be enhanced to allow sensors to be under a chassis, or the rest of the project needs to move to EntityManager. Currently IBM does not use EntityManager, but EntityManager is called directly in sensors.hpp. This results in an HTTP 500 Internal Server Error. Tested: The URLs /redfish/v1/Chassis/ and /redfish/v1/Chassis/chassis show correct data on a Witherspoon. /redfish/v1/Managers/bmc/ now has a link to the single chassis. /redfish/v1/Chassis/chassis/Power and /redfish/v1/Chassis/chassis/Thermal no longer result in an HTTP 500 Internal Server Error. Ran Redfish Service Validator. Change-Id: Iec8f4da333946f19330f37ab084cd9787c52c8ea Signed-off-by: Gunnar Mills <gmills@us.ibm.com> Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
* Redfish(Network): Allow empty list item for ipv4 address.Ratan Gupta2019-03-121-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tested by: Assuming there are two IP addresses in the IPv4Addresses for the following PATCH request. 1) PATCH {"IPv4Addresses": [{},{}]} =>No change in the existing list. 2) PATCH {"IPv4Addresses": [{},{},{}]} Following error for the third list item. "IPv4Addresses/0/Address@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "The property IPv4Addresses/2/Address is a required property and must be included in the request.", "MessageArgs": [ "IPv4Addresses/2/Address" ], "MessageId": "Base.1.4.0.PropertyMissing", "Resolution": "Ensure that the property is in the request body and has a valid value and resubmit the request if the operation failed.", "Severity": "Warning" } Change-Id: I24d11ca82cf6843611f72912499878bcbe1aecac Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
* Redfish(Ethernet): Fix to not convert the json index into stringRatan Gupta2019-03-121-6/+5
| | | | | | | | | | | | | | | | | During Property Update for the Ipv4address, Index was getting converted into string which was causing the bmcweb to crash. This commit fixes this problem. TestedBy: Assumption: There is already three IP address and updating the third one. PATCH -D patch.txt -d '{"IPv4Addresses": [{},{},{"Address": "x.x.x.x","AddressOrigin": "Static","SubnetMask": "255.255.0.0","Gateway":"x.x.x.x"}]} Change-Id: Ic055649b75aaa36e16bda5d8dc4e4e9c87dcb315 Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
* Redfish(Ethernet): Don't init the vlanID and vlanEnableRatan Gupta2019-03-121-2/+4
| | | | | | | | | | | | | | | | | | These variables are of type std::optional,The values should be filled by the readJSON function,as further decision to handle the patch for the vlan is dependent on whether the value for vlanID and vlanEnable is not null. Due to this issue, control goes to handle the vlan patch and the readJSON inside the handleVlanPatch doesn't find the values for vlanID and vlanEnable so set the resp result to forbidden. After that if any other readJSON would be called it would return failure and due to that no other PATCH operation on the ipv4Address can be completed. Change-Id: I3ebab18ae4adfa7c871ecab862a2865dc14f154d Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
* Redfish(AccountService): Send the correct error message for the read only ↵Ratan Gupta2019-03-121-1/+17
| | | | | | | | | | | property MinPasswordLength and MaxPasswordLength is a readOnly property in the account service schema, so send the correct message if the user tries to PATCH these properties. Change-Id: If231ca13ef97fc05928435ac14a8190a186beb06 Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
* Support for overriding multiple sensorRichard Marian Thomaiyar2019-03-121-61/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support added for overriding multiple sensor, in single patch method. Can accept Thermal (Temperatures/Fans) and Power (Voltages) collections. Unit-Test: 1. Verified sensor values are getting updated by doing PATCH method to a known sensor. Verified the value got updated using ipmitool sensor list. 2. Verified negative cases of making PATCH call on invalid chasisId, Invalid MemberId etc. Testedeby: Used Postman tool to issue the PATCH call to the 1. https://xx.xx.xx.xx/redfish/v1/Chassis/XXYYZZ/Thermal with content { "Temperatures": [ { "MemberId" : "SensorNameXX", "ReadingCelsius" : valueXX } ] "Fans": [ { "MemberId" : "SensorNameYY", "Reading" : valueYY } ] } 2. https://xx.xx.xx.xx/redfish/v1/Chassis/XXYYZZ/Power with content { "Voltages": [ { "MemberId" : "SensorNameXX", "ReadingVolts" : valueXX }, { "MemberId" : "SensorNameYY", "ReadingVolts" : valueYY } ] } Change-Id: Ie30a7dff421f1a459dfe7bac262ae29e98754810 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Redfish: Send the success message in PATCH requestRatan Gupta2019-03-121-0/+2
| | | | | | | | | Currently during successfully PATCH operation, implementation doesn't send the success message. This commit fixes this problem. Change-Id: Iade15ed2b3efa73578f4b2710e0005b84419cc21 Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
* Fix IndicatorLED "Blinking" valueGunnar Mills2019-03-111-3/+2
| | | | | | | | | | | | | | Blink is not a valid value for Redfish IndicatorLED. Blinking is though. Changed. See: https://redfish.dmtf.org/schemas/ComputerSystem.v1_6_0.json http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/IndicatorLED LED D-Bus interface has the value "Blink". Updated. https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Led/Physical.interface.yaml#L40 Tested: Limited. Change-Id: I183b72f06f2dddf6a37592893e841d810d06a0d6 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Fix: Power & Thermal patch method role updateRichard Marian Thomaiyar2019-03-112-2/+2
| | | | | | | | | | | | | Power & Thermal patch method role is updated to ConfigureComponents instead of ConfigureManager, as PATCH method can be executed by ConfigureComponents role. Tested-by: Verified the PATCH method works with ConfigureComponents role user itself. Change-Id: I4de06233dd3eebdeadf160d790ccac853a4972da Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Fix typelist for fan in Thermal schemaRichard Marian Thomaiyar2019-03-111-1/+1
| | | | | | | | | | | should be fan_tach instad of fan Tested-by: Did a Get method on thermal profile, and made sure, fans are listed as expected. Change-Id: Ic5ac321b8f998136b646d6cfd3c7bb5946fe9194 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Redfish: Add the PATCH support for user locked property.Ratan Gupta2019-03-111-45/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this commit PATCH operation on the Locked property of ManagerAccount schema would allow the user/admin to unlock an account,however admin would not be allowed to lock an account as account can be locked automatically by configured consecutive authentication failures. TestedBy: Run the following patch request to test the locked property. GET https://${BMC_IP}/redfish/v1/AccountService/Accounts/esalinux0 { "@odata.context": "/redfish/v1/$metadata#ManagerAccount.ManagerAccount", "@odata.id": "/redfish/v1/AccountService/Accounts/esalinux0", "@odata.type": "#ManagerAccount.v1_0_3.ManagerAccount", "Description": "User Account", "Enabled": true, "Id": "esalinux0", "Links": { "Role": { "@odata.id": "/redfish/v1/AccountService/Roles/Administrator" } }, "Locked": true, "Locked@Redfish.AllowableValues": [ false ], "Name": "User Account", "Password": null, "RoleId": "Administrator", "UserName": "esalinux0" } PATCH https://${BMC_IP}/redfish/v1/AccountService/Accounts/esalinux0 -d '{"Locked" : false}' { "@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: I5d7a3d8f6330bbf01292ed4079542a1c65c9cc35 Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
* Patch support for sensor overrrideRichard Marian Thomaiyar2019-03-113-24/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support added for overriding sensor, which can be used for validation / ad-hoc debugging. This provides option to make PATCH call to redfish/v1/<chassisId>/Thermal or power id. Based on schema, will accept Temperatures / Voltages collection with properties MemberId and ReadingCelsius / ReadingVolts. TODO: 1. Need to make a dynamic way of enabling / disbaling this command. Unit-Test: 1. Verified sensor values are getting updated by doing PATCH method to a known sensor. Verified the value got updated using ipmitool sensor list. 2. Verified negative cases of making PATCH call on invalid chasisId, Invalid MemberId etc. Testedeby: Used Postman tool to issue the PATCH call to the 1. https://xx.xx.xx.xx/redfish/v1/Chassis/XXYYZZ/Thermal with content { "Temperatures": [ { "MemberId" : "SensorNameXX", "ReadingCelsius" : valueXX } ] } 2. https://xx.xx.xx.xx/redfish/v1/Chassis/XXYYZZ/Power with content { "Voltages": [ { "MemberId" : "SensorNameXX", "ReadingVolts" : valueXX } ] } Change-Id: Idf2d891ac0d10b5d20f78c386232cae8a6896f1a Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Support for boot propertiesSantosh Puranik2019-03-111-14/+526
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for DBUS properties BootMode and BootSource in the Redfish ComputerSystems schema. These properties reside on the BMC in two DBUS objects: /xyz/openbmc_project/control/host0/boot contains settings that apply on each boot /xyz/openbmc_project/control/host0/boot/one_time contains settings that apply for one boot only The interface definition can be looked up in phosphor-dbus-interfaces/tree/master/xyz/openbmc_project/Control/Boot BootMode and BootSource are together mapped into the Redfish property BootSourceOverrideTarget. Specifically, we only support the following BootSource's: None (default source), Pxe, Hdd, Cd, Diags and BiosSetup Diags and BiosSetup get mapped to the BootMode property, whereas the other values get mapped to the BootSource property. In addition, we map the BootSourceOverrideEnabled redfish property to the Enabled property in /xyz/openbmc_project/control/host0/boot/one_time to indicate if the override applies for just this boot or all future boots. Tested: -- Ran the Redfish schema validator - no errors. -- Ran GET and PATCH requets on the ComputerSystem node to test setting of each property individually as well as together. Ex: curl -k -H "X-Auth-Token: $bmc_token" -XGET https://${bmc}:${port}/redfish/v1/Systems/system .... .... "Boot": { "BootSourceOverrideEnabled": "Disabled", "BootSourceOverrideMode": "Legacy", "BootSourceOverrideTarget": "None", "BootSourceOverrideTarget@Redfish.AllowableValues": [ "None", "Pxe", "Hdd", "Cd", "Diags", "BiosSetup" ] } .... curl -k -H "X-Auth-Token: $bmc_token" -X PATCH https://${bmc}:${port}/redfish/v1/Systems/system -d '{"Boot": {"BootSourceOverrideEnabled": "Once", "BootSourceOverrideTarget": "Diags"}}' curl -k -H "X-Auth-Token: $bmc_token" -XGET https://${bmc}:${port}/redfish/v1/Systems/system .... .... "Boot": { "BootSourceOverrideEnabled": "Once", "BootSourceOverrideMode": "Legacy", "BootSourceOverrideTarget": "Diags", "BootSourceOverrideTarget@Redfish.AllowableValues": [ "None", "Pxe", "Hdd", "Cd", "Diags", "BiosSetup" ] } .... curl -k -H "X-Auth-Token: $bmc_token" -X PATCH https://${bmc}:${port}/redfish/v1/Systems/system -d '{"Boot": {"BootSourceOverrideEnabled": "Disabled"}}' curl -k -H "X-Auth-Token: $bmc_token" -XGET https://${bmc}:${port}/redfish/v1/Systems/system' .... .... "Boot": { "BootSourceOverrideEnabled": "Disabled", "BootSourceOverrideMode": "Legacy", "BootSourceOverrideTarget": "None", "BootSourceOverrideTarget@Redfish.AllowableValues": [ "None", "Pxe", "Hdd", "Cd", "Diags", "BiosSetup" ] } .... Change-Id: If8850428422de822cd0e220ceaff4168f4b50391 Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
* redfish: chassis: add property of physical securityQiang XU2019-03-111-0/+71
| | | | | | | | | | | | | | | | | | | | Get intrusion status from dbus and display property of physical security Related patches to run test: - meta-phosphor: dbus-sensors: Enable new service of intrusion sensor https://gerrit.openbmc-project.xyz/#/c/openbmc/meta-phosphor/+/17063/ - Add chassis intrusion sensor daemon https://gerrit.openbmc-project.xyz/#/c/openbmc/dbus-sensors/+/17064/ Tested-by: - Verified redfish/v1/Chassis/<ChassisId> when intrusion status is true "PhysicalSecurity": { "IntrusionSensor": "HardwareIntrusion", "IntrusionSensorNumber": 1 }, Change-Id: Ib231ccb847d48641eac363f578de9f930035db89 Signed-off-by: Qiang XU <qiang.xu@linux.intel.com>
* Redfish: Fix incorrect data of NetworkProtocolJennifer Lee2019-03-111-8/+11
| | | | | | | | - Protocol HTTPS was missing the property "Port" - The property "ProtocolEnabled" was showing incorrect data for each protocol Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com> Change-Id: Ibaa7b81845714ad13b2b44d6af033df98da236e2
* Redfish Chassis: Fix @odata.id, remove BuildDateShawn McCarney2019-03-081-7/+18
| | | | | | | | | | | | | | Fixed the following errors when obtaining the Redfish properties of a Chassis: * @odata.id URI did not contain the chassis name * Non-Redfish DBus properties like BuildDate were returned Tested: Verified the URL /redfish/v1/Chassis/<chassis>/ returns the correct properties on a Witherspoon system. Ran Redfish Service Validator. Change-Id: I73280990db0b468aea1b12b2b919dabb2e20ca89 Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
* bmcweb: /s/boost::string_view/std::string_view/gEd Tanous2019-03-061-20/+20
| | | | | | | | | | | | | | | | | | | | | | | With boost 1.69, we get the new option, BOOST_BEAST_USE_STD_STRING_VIEW which allows us to use std::string for all beast interfaces, instead of boost string_view. This was originally intended to try to reduce the binary size, but the comparison shows only a minor improvement. boost::string_view: 7420780 bytes std::string_view: 7419948 bytes 832 bytes saved ! ! ! ! ! So instead, we will use the argument that it's more standard and easier for people to grok. Tested By: Pulled down some bmcweb endpoints, and observed no change. Because the two objects are essentially drop in replacements for one another, there should be no change. Change-Id: I001e8cf2a0124de4792a7154bf246e3c35ef3f97 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Move some include headers to a less specific folderEd Tanous2019-03-062-3/+3
| | | | | | | Tested by: Code still compiles Change-Id: I95d443f5c21e9839b6338fb72c5a940d0d91d479
* Redfish(Network): Support the PATCH operation of HostName propertyraviteja-b2019-03-061-0/+36
| | | | | | | | | TestedBy: PATCH '{"HostName": "bmcbmc"}' Tested with validator and no errors. Change-Id: I610dcda7b8c56486f22214e177b4dc6ad7018e7c Signed-off-by: raviteja-b <raviteja28031990@gmail.com>
* Redfish remove buildDate property from systembeccabroek2019-03-051-8/+15
| | | | | | | | | | | | | BuildDate does not exist in the Redfish ComputerSystem schema. Checks for the appropriate properties for system and adds them, rather than adding all properties returned. Tested: Verified /redfish/v1/Systems/system/ returns the correct properties on a Witherspoon system, and buildDate is no longer returned. Change-Id: I83e8f637b17868eda810cbe342d1569d534a6d1b Signed-off-by: beccabroek <beccabroek@gmail.com>
* Don't set result to success when calling successJames Feist2019-03-011-1/+2
| | | | | | | | | | | res.success is the default, if one async call sets failure, and another later sets success, we don't want to overwrite the failure with sucess. Tested-by: still got success on good patch Change-Id: Iee76892f7517d508ed98929d9ecd127dd83b1329 Signed-off-by: James Feist <james.feist@linux.intel.com>
* pid: add direction to stepwiseJames Feist2019-03-011-8/+33
| | | | | | | | | | We now have upper and lower clipping curves, add direction so we can tell which is which. Tested-by: GET and PATCH work Change-Id: I0cdfa159a3a27355a8e67c65e42e765f191f7719 Signed-off-by: James Feist <james.feist@linux.intel.com>
* s/MinThermalRpm/MinThermalOutputJames Feist2019-03-011-5/+5
| | | | | | | This variable was changed in pid-control. Change-Id: I377057910214085043704af4e076f688212113e2 Signed-off-by: James Feist <james.feist@linux.intel.com>
* pid: fix patching with regex inputsJames Feist2019-03-011-55/+88
| | | | | | | | | | | | | | We now allow regexes to define the inputs for things like CPU 0 Core \d+, however the inputs were being used to define the chassis. Change to using the key and or the zone to define the chassis to put the configuration on so this isn't an issue. Tested-by: Created new pid and patched regex pids and it was successful Change-Id: I7c054259e9c9118af1dde63fd798a57ca6830678 Signed-off-by: James Feist <james.feist@linux.intel.com>
* bmcweb: move ethernet VLAN to readJsonEd Tanous2019-02-271-124/+64
| | | | | | | | This commit moves the various vlan interfaces to use the existing std::vector based implementations, and not the existing implementations. Change-Id: Id2503d5e2f1503b61ec7dbdb25098611382b24c5 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Fixes in System schema PATCH handlingSantosh Puranik2019-02-221-5/+3
| | | | | | | | | | | | | | | | | | -- Fixed typo: "IndicatorLed" ==> "IndicatorLED" -- Fixed readJson call which was taking in an empty std::string This caused PATCH to send back a warning if Indicator LED was missing from the incoming JSON. -- Fixed a segfault due to accessing an invalid shared_ptr (The shared_ptr being accessed was previously moved to an async callback) Tested: -- Limited testing done. I tried PATCH'ing the IndicatorLED property on QEMU. -- Made sure no segfault anymore. Change-Id: If47dbacdeee791dd3cc2ac0e37c0b74bb3920df0 Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
* bmcweb: fix compiler warningsEd Tanous2019-02-215-32/+21
| | | | | | | | | | | | This patchset attempts to fix all compiler warnings in bmcweb owned files. There are 2 warnings left, both in sdbusplus, which will be resolved in a patchset there. Tested By: Recompiled, observed warning count went from 30, to zero. Change-Id: Ife90207aa5773bc28faa8b04c732cafa5a56e4e4 Signed-off-by: Ed Tanous <ed@tanous.net>
* pid: Add hysteresisJames Feist2019-02-201-1/+7
| | | | | | | | | Add hysteresis support into the pid controllers. Tested-by: Get and Patch worked. Change-Id: I89f1c128a234ebdf4d69aec35956f11b9e189263 Signed-off-by: James Feist <james.feist@linux.intel.com>
* Move the CPU LogService to SystemsJason M. Bills2019-02-201-20/+19
| | | | | | | | | | | The CPU LogService doesn't belong under BMC LogServices, so moving it to Systems LogServices. Tested: Verified that the CPU LogService shows up under Systems and passed the Redfish Service Validator. Change-Id: Ic04157b966dc0395db94046f37c33590a4e20553 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
* Add missing Entries fields for CPU and BMC LogServicesJason M. Bills2019-02-201-2/+7
| | | | | | | | | | | The CPU and BMC LogServices were missing their Entries fields, so adding them back. Tested: Checked for presence of Entries fields and passed the Redfish Service Validator. Change-Id: I3caa251dd8acf05d4c37c2b30bb0374500849e84 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
* Update the CPU Log Timestamp locationJason M. Bills2019-02-201-7/+12
| | | | | | | | | | | | The CPU Log timestamp was moved to a new location in the schema, so this looks in the new place to get the timestamp for the Created field. Tested: Verified that the Created field is correctly populated in the LogEntry. Change-Id: Ie90e169aa999284ebc009867634beb35a4e74587 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
* bmcweb: Implement single Redfish "system" endpointEd Tanous2019-02-197-416/+333
| | | | | | | | | | | | | | | | | | | | | | This commit changes the redfish behavior to move to a single, known name under the /redfish/v1/Systems/system path. This is advantageous for a lot of reasons. 1. Lots fewer dbus calls to determine the system name for every path. This could be optimized in other ways, like checking the system name on startup, but because redfish paths are not intended to be informative, this patchset takes the opinion that less code is better. 2. Lots of lowered complexity, given that each endpoint underneath /system doesn't need an individual "does this system exist, and is the name right" check. 3. This makes it possible to correctly implement the "Links" property in Chassis, which is required for the OCP base server profile Tested By: Very minimal testing done, but it seems to pass the validator. Change-Id: Iea3cb5081b92a3843b6877decd009936de00561c Signed-off-by: Ed Tanous <ed.tanous@intel.com> Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* bmcweb: Fix some errors in Redfish SessionsEd Tanous2019-02-132-1/+4
| | | | | | | | | | | | | | | | | Two errors were identified in the Redfish sessions implementation. 1. All user "roles" return a description containing Adminstrator, instead of containing the name of the role. 2. The SessionService implementation was missing the link to sessions collection. These are resolved in this commit. Tested By: Ran service validator, no errors. Change-Id: Ib48ab1756d78724b4bab124c8cf135c8a61d94a6 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* bmcweb: move variant usage to std namespaceEd Tanous2019-02-0911-185/+136
| | | | | Change-Id: I9d7069668f91f2ac72d2f4a440f63e0e85dd5269 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Use Chassis interfaces to determine if chassisGunnar Mills2019-02-071-4/+7
| | | | | | | | | | | | | | | | | | | Use the same interfaces used to determine members of /redfish/v1/Chassis/ as to determine if a chassis exists, /redfish/v1/Chassis/<ChassisId>. Using something different, Inventory.Item.Asset, means a /redfish/v1/Chassis/<ChassisId> could return found when it does not belong to members of /redfish/v1/Chassis/ and vice versa. Changed the search depth of both commands to infinite. Tested: Verified /redfish/v1/Chassis/ and /redfish/v1/Chassis/<ChassisId> on a Witherspoon Change-Id: I45cfbadfb5199224039df2d894a599e1e237cf15 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Delete socket adaptersEd Tanous2019-02-041-1/+2
| | | | | | | | | | | | | | Boost beast, ASIO, and networking TS already have mechanisms for injecting unit tests, using template parameters. We already use this to some extent, although we pass through socket_adapters. Now that we have constexpr if, we have the ability to simplify this code quite a bit. Tested by: Pulled down phosphor-webui, ran redfish service validator. Observed no errors. Change-Id: Ib8734aeb4c9139b56705060f6196e8ae16458fe9 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Add IBM Processor PropertiesGunnar Mills2019-02-021-0/+6
| | | | | | | | | | If Processor Manufacturer is IBM set ProcessorArchitecture and InstructionSet. This works the same as if the Manufacturer is Intel. Change-Id: I61df182a12db6601004f1717471b4b34cdcf961b Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* [redfish] Display missing field in PidControllersJames Feist2019-01-231-0/+1
| | | | | | | | | PidControllers should display setpoint. Tested-by: Saw setpoint in web-browser Change-Id: I76ee50d832200e39f55312c0a41c91aa13e65af9 Signed-off-by: James Feist <james.feist@linux.intel.com>
* Redfish: Chassis: Remove Inventory.Item.SystemGunnar Mills2019-01-221-4/+2
| | | | | | | | | | | | | | | | To determine /redfish/v1/Chassis/<ChassisID> don't look for xyz.openbmc_project.Inventory.Item.System which is currently implemented at /xyz/openbmc_project/inventory/system. Inventory.Item.System (/xyz/openbmc_project/inventory/system) is not a Chassis. Inventory.Item.System is used to determine /redfish/v1/Systems/<SystemID>. https://gerrit.openbmc-project.xyz/#/c/openbmc/bmcweb/+/16528/ Change-Id: I6b7be374ea997d22598c0e7144a65428fba2fdbc Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* redfish: oem: add stepwise configuration SETJames Feist2019-01-141-220/+324
| | | | | | | | | | Add ability to set stepwise controllers through redfish. Also convert all pid control to use readJson. Tested-by: Set different values using python requests api Change-Id: Ifa31db7dce3338ec033426641a0185dd3d56b4bc Signed-off-by: James Feist <james.feist@linux.intel.com>
* redfish: oem: add stepwise configuration GETJames Feist2019-01-141-48/+158
| | | | | | | | | | | | | | Add stepwise configuration information into the oem redfish configuration. Also move the basic configuration information into the above loop to not set it multiple times. Only implemented GET thus far, PATCH will be in follow-on commit. Tested-by: Navigated to redfish/v1/Managers/bmc/ and saw Stepwise configuration. Change-Id: Id4fdf7b6c6708edc56c1ede717b79c50de2b1c94 Signed-off-by: James Feist <james.feist@linux.intel.com>
* Fix host state checking logicAndrew Geissler2019-01-101-1/+1
| | | | | | | | | | | | | | | | | | | Resolves openbmc/bmcweb#12 Testing: Verified this with system booted against redfish/v1/Systems/motherboard: "PowerState": "On", "Status": { "State": "Enabled" }, and this with system powered off: "PowerState": "Off", "Status": { "State": "Disabled" }, Change-Id: I0acbf0992d730e4a5189d9af962370277f59eaaa Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* Move filesystem from experimental namespaceJames Feist2019-01-081-2/+2
| | | | | | | Splice it into standard for gcc8 Change-Id: I584206dd737c9d90cf93bfa8541980fdd8f6d39b Signed-off-by: James Feist <james.feist@linux.intel.com>
* bmcweb: Update schema versions to latestRapkiewicz, Pawel2019-01-072-3/+3
| | | | | | | | | | | | | | Update Schema versions for: * ComputerSystem * Processor * Memory Tests: * Service Validator did not have any regression Change-Id: I3fb900b464013588ac0b08c0157404c8ababddb2 Signed-off-by: Rapkiewicz, Pawel <pawel.rapkiewicz@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Use the unpacking mechanisms for hostnameEd Tanous2019-01-041-42/+15
| | | | | | | | | The ethernet interface previous hardcoded error handling patterns for the interfaces shown. This commit moves it to the generic ReadJson mechanisms for error handling Change-Id: I710188c808ee62c5797059d7ee8f9876bf872a11 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Redfish: Added RoleCollection and Role supportAppaRao Puli2019-01-021-23/+115
| | | | | | | | | | | | Added RoleCollection by retriving information from dbus user object and Role properties support. Test: Tested RoleCollection and Role redfish URI's by cross validaing with dbus user object properties. Change-Id: I519972f645c7a4d0486e64ae5a403a3009aa26f5 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
* Redfish:Get and Set AccountService root propertiesAppaRao Puli2018-12-291-16/+119
| | | | | | | | | | | | | | Getting and Setting AccountService properties like MinPasswordLengh, AccountLockoutThreshold, AccountLockoutDuration. Test: Tried get and set of redfish requests on above specified properties and cross validated with dbus calls. Change-Id: I68f110b706109a1083f38158c09e9e13032ec401 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
* Redfish: Adding bool support in readJsonAppaRao Puli2018-12-291-1/+2
| | | | | | | | | | | Adding boolean support in json_utils. Test: Validated by sending redfish POST/PATCH request with boolean value in data. Change-Id: Iddc7daebb3507a468cbb2187806908f821bd6da7 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
OpenPOWER on IntegriCloud