summaryrefslogtreecommitdiff
path: root/include/dbus_utility.hpp
AgeCommit message (Collapse)AuthorFilesLines
2020-12-18Fix .clang-tidyEd Tanous1-2/+2
camelLower is not a type, camelBack is. Changes were made automatically with clang-tidy --fix-errors To be able to apply changes automatically, the only way I've found that works was to build the version of clang/clang-tidy that yocto has, and run the fix script within bitbake -c devshell bmcweb. Unfortunately, yocto has clang-tidy 11, which can apparently find a couple extra errors in tests we already had enabled. As such, a couple of those are also included. Tested: Ran clang-tidy-11 and got a clean result. Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: I9d1080b67f0342229c2f267160849445c065ca51
2020-11-02Improve loops & fix cpp check warningManojkiran Eda1-23/+13
- This commit improves certain while loops to range based for loops. - This commit also fixes the cppcheck warning that mentions about performance issues when using postfix operators on non-primitive types. Tested By: - A function is unittested. - GET on both EthernetInterfaces & certificate service looks good without any issues. Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I85420f7bf9af45a97e1a93b916f292c2516f5802
2020-06-11clang-format: update to latest from docs repoGunnar Mills1-1/+2
This is from openbmc/docs/style/cpp/.clang-format Other OpenBMC repos are doing the same. Tested: Built and validator passed. Change-Id: Ief26c755c9ce012823e16a506342b0547a53517a Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2020-03-03Adding new types to simplify access to ManagedObjectType.Zbigniew Kurzynski1-5/+6
Current implementation of the ManagedObjectType is quite complicate, it has a lot of nested elements and those it is hard to access them. These new definitions makes the definition more readable and used in code will improve operations on nested types of the ManagedObjectType. Tests: This change is just a definition and does not requires additional tests. Signed-off-by: Zbigniew Kurzynski <zbigniew.kurzynski@intel.com> Change-Id: Icadd57653262009e60e3b4391607d22fa4b7be6b
2019-10-11Fix a bunch of warningsEd Tanous1-4/+5
using the list of warnings from here: https://github.com/lefticus/cppbestpractices/blob/e73393f25a85f83fed7399d8b65cb117d00b2231/02-Use_the_Tools_Available.md#L100 Seems like a good place to start, and would improve things a bit type-wise. This patchset attempts to correct all the issues in one shot. Tested: It builds. Will test various subsystems that have been touched Signed-off-by: Ed Tanous <ed.tanous@intel.com> Change-Id: I588c26440e5a97f718a0f0ea74cc84107d53aa1e
2019-05-24Redfish: Move checkDbusPathExist function to dbus utilityRatan Gupta1-0/+17
This function is a utility function which would be needed by other files. TestedBy: ran the redfish validator: PASS Change-Id: I2a0d07f264952f47a724da11f72b15ca5e019d62 Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
2019-05-24PID: Add fan profile supportJames Feist1-0/+5
This adds fan profiles to redfish. This uses the Thermal Mode interface to allow switching between different fan profiles. Only the selected fan profile will be seen. When adding a new controller, they will also be added to the configuration item for that profile. Patching of the profile to switch between supported profiles is also supported. Tested: Could change profiles in redfish. Python test script: def testProfile(): a = { "Oem": { "OpenBmc": { "Fan": { "Profile" : "Acoustic" } } } } return a def dopatch(): resp = requests.patch(address, json=testProfile(), verify=False, auth=("root", "0penBmc")) resp.raise_for_status() Change-Id: Ie2d8582616ed5bde58e3328b21ba8c59437e88ce Signed-off-by: James Feist <james.feist@linux.intel.com>
2019-03-25Revert "bmcweb: Fix a bunch of warnings"Ed Tanous1-4/+3
This reverts commit 6ea007a2faec52ad62680015d2a3f00371a1e351. Reason for revert: Reports of bmcweb seg faults. Change-Id: I408f1bb29c2f8e427a6621cdaac8c31b847ebf06
2019-03-23bmcweb: Fix a bunch of warningsEd Tanous1-3/+4
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>
2019-02-09bmcweb: move variant usage to std namespaceEd Tanous1-4/+5
Change-Id: I9d7069668f91f2ac72d2f4a440f63e0e85dd5269 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
2019-01-15redfish: oem: add stepwise configuration GETJames Feist1-2/+2
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>
2018-10-16Add PID Get To RedfishJames Feist1-0/+87
Add doGet to managers for PID configuration data. Make sure passes schema validation. Change-Id: Ieeb97bf76a3d8a3c06f59f79cc0887aec746675e Signed-off-by: James Feist <james.feist@linux.intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>