summaryrefslogtreecommitdiffstats
path: root/redfish-core/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* update ASIO interfacesEd Tanous2019-03-291-1/+8
| | | | | | | | | | | | 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>
* 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-256-36/+75
| | | | | | | | This reverts commit 6ea007a2faec52ad62680015d2a3f00371a1e351. Reason for revert: Reports of bmcweb seg faults. Change-Id: I408f1bb29c2f8e427a6621cdaac8c31b847ebf06
* bmcweb: Fix a bunch of warningsEd Tanous2019-03-226-75/+36
| | | | | | | | | | | | 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>
* 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
* 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>
* 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>
* 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>
OpenPOWER on IntegriCloud