summaryrefslogtreecommitdiffstats
path: root/obmc/dbuslib
Commit message (Collapse)AuthorAgeFilesLines
* Enable pycodestyleBrad Bishop2018-03-292-13/+13
| | | | | | | Apply fix-ups and run pycodestyle during CI testing. Change-Id: I1005495b11e228abdc8d40a51dbf81c4a6e6c92c Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Port to python 3CamVan Nguyen2018-03-123-12/+17
| | | | | | | | Port code to python 3 yet remain backward compatible to python 2. This port is in preparation for yocto 2.4 upgrade. Change-Id: I564824b00c106a2c7ebd2f4a9607cd01eabf1322 Signed-off-by: CamVan Nguyen <ctnguyen@us.ibm.com>
* Revert "Port obmc to python3.5"Brad Bishop2018-01-313-12/+12
| | | | | | | | | | Parse error with this change: TypeError: iter() returned non-iterator of type 'PathTreeItemIterator' This reverts commit f99783be6592130bbad2d0f69ada2b7ac61618f3. Change-Id: Id2b7f4af5284d25d59e19905c7b873726b02f700 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Port obmc to python3.5Balaji B Rao2018-01-303-12/+12
| | | | | Change-Id: I1ed6c6bd914635485a697369048a8be9e5919fc6 Signed-off-by: Balaji B Rao <balajibapu@gmail.com>
* dbuslib: Fix UnknownInterface errorAdriana Kobylak2017-12-142-3/+5
| | | | | | | | | | | | | The string "org.freedesktop.UnknownInterface" is not an existing dbus error string, all errors are of format *.DBus.Error.* so change this error string to the right one. Also fix the error responses when dbus errors are raised. Part of openbmc/openbmc#2463 Change-Id: I384393a6f81c5057173e2941cd109e2f952e1311 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* dbuslib: Add decorator for property only ifacesBrad Bishop2017-11-021-0/+35
| | | | | | | | | | | The built-in Introspect method in dbus-python doesn't find interfaces if the @method or @signal decorators aren't used (property-only interfaces). Use this decorator on classes derived from dbus.service.Object to help the dbus-python provided Introspect method find these interfaces. Change-Id: Icaf6fc3a32ce44a653a440ae5ca531cf67a4e1cf Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* dbuslib: Point OBJ_PREFIX at new xyz namespaceBrad Bishop2017-07-291-1/+1
| | | | | | | Resolves: openbmc/openbmc#1314 Change-Id: I20e1a64ceb9928c17cbd4217fa93941cf2912aa1 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* dbus-binding: Fix 'pop' error when no validator givenPatrick Williams2016-09-281-1/+1
| | | | | | | Fixes openbmc/openbmc#606. Change-Id: Id39435f8177d053c317ebe2e48c1c3fd9d3a2385 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Callback input validator function on property setVishwanatha Subbanna2016-09-271-0/+5
| | | | | | | | | | This will provide a way for subclasses to register a callback handler which will then be called into whenever a property update is attempted. The callback will validate the user inputs and then either throw exception or return success. On an exception, its rethrown. Change-Id: I4c1920adb7e4873f2c530752313dd3ebc2230dc2 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* bindings: cooperative multiple inheritanceBrad Bishop2016-09-121-5/+4
| | | | | | | | | | | | | Update Properties and ObjectManager constructors such that they cooperate in a multiple inheritance hierarchy. For details, see this blog post referenced by the official python documentation: https://rhettinger.wordpress.com/2011/05/26/super-considered-super Change-Id: I586e6fa9f1a369693c73b9307786d3c8a05dd9a3 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* bindings: Add missing module importsBrad Bishop2016-09-121-0/+2
| | | | | Change-Id: I498d6e2437b91263de825456125e3b805efa0179 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* bindings: remove unused methodsBrad Bishop2016-09-121-15/+2
| | | | | Change-Id: I99eb622d963d9bb8df6fd9072c482f71c8e881c2 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* propertycacher: context manager for file openBrad Bishop2016-08-101-10/+8
| | | | | Change-Id: Ib75f3f5ccbd35d7e70d9c171c0642077930c4741 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* propertycacher: make parent directoriesBrad Bishop2016-08-101-1/+4
| | | | | Change-Id: I4557ddab56f4cbea5b177e3b05ef28c367c6e602 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Remove find_dbus_interfacesBrad Bishop2016-07-251-103/+0
| | | | | | | | | Waffling yet again on where this should be located. Move back to the mapper to discourage other applications from introspection and encourage use of the mapper. Change-Id: I78dc815baeb46d6b2d155d02318fba230d7420d2 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Allow control of signal generationBrad Bishop2016-07-101-7/+37
| | | | | | | | | Typically ObjectManager signals should remain masked until a service has grabbed a well-known bus name to avoid pointless dbus signal generation. Change-Id: I26703ec7a8b946128fe5aa8ed1c830a2e8f23c21 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Improve short-lived object handlingBrad Bishop2016-06-281-8/+46
| | | | | | | | | Its expected that services will appear on the bus and may or may not be around log enough for introspection to take place. Catch those exceptions and continue. Change-Id: I77963d5af9d8267d1813bd2197ff287f06f7d2cd Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Remove unnecessary variableBrad Bishop2016-06-281-9/+9
| | | | | Change-Id: I64847ffa6a0078ce66c3117a51df0fd6188a0f8c Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Remove name mangling from find_dbus_interfacesBrad Bishop2016-06-281-17/+17
| | | | | | | | | | | | | | | | Double underscore in Python mangles names and sometimes is used as a way to make things private; however, in general this isn't considered best practice and there isn't a compelling reason for it here. Rather, the convention for denoting a private interface is to use a single leading underscore. For more information: http://www.artima.com/weblogs/viewpost.jsp?thread=211430 Change-Id: Id42b0dc670dc1f90ed52f38ac98a82ff8214ee47 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add find_dbus_interfaces to introspection utilsBrad Bishop2016-06-281-2/+67
| | | | | | | This is a straight copy from phosphor-objmgr. Change-Id: I4792be46b755774af4a29cb1d603253738db3e4a Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add alias for org.freedesktop.DBus.Error.NoReplyBrad Bishop2016-06-281-0/+1
| | | | | Change-Id: If112ed9db5c7fb8935daf2245736e039209d0798 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Remove org.openbmc.Object.Enumerate interfaceBrad Bishop2016-06-211-21/+1
| | | | | | Everyone should be using the freedesktop ObjectManager for this. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Merge pull request #4 from bradbishop/sensors-propertycacherPatrick Williams2016-06-061-0/+64
|\ | | | | Move sensors.py and propertycacher.py frm skeleton
| * Move sensors.py and propertycacher.py frm skeletonBrad Bishop2016-05-171-0/+64
| | | | | | | | | | | | | | | | These skeleton module are somewhat general purpose so move them here. This is just a straight copy plus a pep8 run. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* | Merge pull request #2 from bradbishop/set-multiple-bugPatrick Williams2016-06-061-1/+1
|\ \ | | | | | | Fix bug injected during skeleton port
| * | Fix bug injected during skeleton portBrad Bishop2016-05-161-1/+1
| |/ | | | | | | | | This library method originally came from the skeleton project. While running pep8 after porting it I injected a logic bug.
* / Add enum for Freedesktop unknown service errorBrad Bishop2016-05-161-0/+1
|/
* Introducing pyobmcBrad Bishop2016-04-154-0/+337
We have openbmc python utilities scattered all over the place. To facilitate reuse, bring them together in a single python package. None of this is new code, it was all simply ported and re-arranged from other projects. Ran everything through pep8.
OpenPOWER on IntegriCloud