summaryrefslogtreecommitdiffstats
path: root/utils.hpp
Commit message (Collapse)AuthorAgeFilesLines
* ipmid: replace std::experimental::optional with std::optionalVernon Mauery2019-01-111-3/+3
| | | | | | | | Now that the project is using c++17, std::optional can be used directly instead of via the std::experimental way. Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com> Change-Id: I7087f58bd3d9fd90b8b31e6902554351a3db2d0f
* add .clang-formatPatrick Venture2018-09-071-90/+78
| | | | | Change-Id: I7c2a527b4751a560703a61fcbe9638b150546af5 Signed-off-by: Patrick Venture <venture@google.com>
* Use visitor instead of pulling values directlyJames Feist2018-08-091-0/+21
| | | | | | | | | | | Sensor thresholds pull out an int64_t and immediately assign it to a double. Use a visitor instead to avoid the intermediate and add flexibility / saftey to type readings. Tested-By: Verifed sensor list still worked. Change-Id: If49bf54ec1c0636b3549d433b86ecdbd1ea99b0d Signed-off-by: James Feist <james.feist@linux.intel.com>
* Add empty default match argument for getAllDbusObjectsVernon Mauery2018-08-011-1/+1
| | | | | | | This is parallel to other functions defined in utils.hpp Change-Id: I8f40e27d1a179258df5059c27066c8cd1b37a260 Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
* utils/ServiceCache: Make isValid publicWilliam A. Kennington III2018-05-111-7/+7
| | | | | | | | | Some of our apps may want to know if the ServiceCache was determined to be valid prior to using it, so that they can retry their request in case the cache was stale. Change-Id: I106f11a18cd2290df9c18f29a8e779aacb5ef552 Signed-off-by: William A. Kennington III <wak@google.com>
* utils: Add a class to cache service lookupsWilliam A. Kennington III2018-04-021-1/+60
| | | | | | | | | | | Currently we are doing interface + path -> service lookups for each ipmi command sent to the daemon. For many types of commands this is not ideal as the daemon is unlikely to change often at runtime. Implement a basic cache with the ability to invalidate the service name at any time. This is used by code in a future commit. Change-Id: I85b04dd17ac19e31d49070f289704b429bd1e577 Signed-off-by: William A. Kennington III <wak@google.com>
* Support Get Sensor Thresholds CommandDhruvaraj Subhashchandran2018-02-061-0/+11
| | | | | | | | | Adding support for sensor thresholds command Resolves openbmc/openbmc#2624 Change-Id: I904c1b18c8709bceb7ecb7eec6e8e42e1f51525a Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
* multiple channel configuration supportPatrick Venture2017-12-121-1/+0
| | | | | | | | | | | | | | Previously, the ipmi daemon only supported eth0 and hard-coded it to channel 1. This allows one to map via a configuration. The channel number provided is checked against a configuration to retrieve the ethernet device identifier, e.g. eth0. Tested: Ran on a quanta-q71l and was able to properly set MAC, IP, Netmask, Gateway IP, and then verified the data was set for the eth1 via `ip addr show eth1`. Change-Id: I92f63188297304e9454fd0d6fe32bc6cf84bb181 Signed-off-by: Patrick Venture <venture@google.com>
* Fix the getLan configRatan Gupta2017-11-281-6/+6
| | | | | | | | | | | | | | | We did the filtering during IPAddress parameter to avoid link local address but left it for subnetMask and vlan parameter. With the introduction of zeroconfig IP we have multiIPaddress can exist on the interface. This commit introduces the filtering for subnetmask and vlan parameter also. Resolves openbmc/openbmc#2664 Change-Id: I244bfe8b9d7efbf55fc1b7051489a8a204182906 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Spelling fixesGunnar Mills2017-10-311-1/+1
| | | | | | | | | Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2. Change-Id: I78e9d126f19fd9fb2e3f2fa9fe8c2404dc505f82 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Don't set/get zeroconfig address if other IP address is presentNagaraju Goruganti2017-10-111-0/+16
| | | | | | | Resolves openbmc/openbmc#2265 Change-Id: I65b54358f13231c78b3c6488a59b94bc9323484c Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* GetLan: Support for get/set of ipsrc parameterRatan Gupta2017-09-081-0/+11
| | | | | Change-Id: Id9c52bb0963c5924f80f9e273b53ed5556b16a2c Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Add support for vlan(set lan command)Ratan Gupta2017-08-131-2/+21
| | | | | | | Resolves openbmc/openbmc#1899 Change-Id: I3c436045676bc96e5d91fd9420509bc991549a13 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Move LAN handling commands to the new xyz interfacesRatan Gupta2017-08-131-4/+83
| | | | | Change-Id: I4631c79c171883e5f0d531cfb5957a09496e4b3a Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Take bus as input parameter in util functionRatan Gupta2017-08-111-4/+12
| | | | | Change-Id: I2de92a1d82939a539e19aca69561ad58a171a5d0 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Move dbus utility function to utilsRatan Gupta2017-08-111-0/+66
| | | | | Change-Id: Ief3d9ab2311a597670767cf9931913e5afef4fee Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Modify set sensor reading commandTom Joseph2017-03-151-0/+21
The Set Sensor handling code is modified to use generated code for CPU, Core & DIMM sensors with Presence & Functional offset. Change-Id: I3b7fa4da870b745873da4732d457d793f5549ada Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
OpenPOWER on IntegriCloud