summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Use a standard DBus error for not foundBrad Bishop2016-09-201-1/+1
| | | | | Change-Id: I93c086c872aa7ff7d59af366b93fd7948fe8d1bf Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* server: use super for ObjectManager constructionBrad Bishop2016-09-121-3/+2
| | | | | Change-Id: Ia4f99301a344bff29de8a64c0795bc5f8bdbb7ff Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* server: use lambda functions with _invoke_methodBrad Bishop2016-09-121-5/+4
| | | | | | | | | Use lambda functions with _invoke_method to avoid method name lookup and enable additional state. Change-Id: If0b702c4d890d0173883f7b144c2ca8dc9d590ee Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Resolves: openbmc/phosphor-objmgr#14
* server: Remove interpreter from server moduleBrad Bishop2016-09-081-2/+0
| | | | | | | Remove /usr/bin/python as this is not a runnable script. Change-Id: I82d4233c516af45347898ad2c4dbd5f2c93c1906 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Remove a handful of unused variablesBrad Bishop2016-08-301-3/+2
| | | | | Change-Id: Ia580acf32bf6aa7fe205bf67b283926d3cffb0cf Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Ensure all tools are building with -Wall and -WerrorMatthew Barth2016-08-301-1/+2
| | | | | | | Added -Wall to ALL_CFLAGS Change-Id: I0d85c7f333b5e56f144f4a605ea639668fdc5710 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* mapper-cli: rewrite with sdbusBrad Bishop2016-08-167-152/+484
| | | | | | | | There are too many instances of the wait/call applications spawned during BMC startup. Re-write using sdbus. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: Ia6fb3b74cb70f93cfd5cc57c1a8b7a9aa2d944c4
* Mapper ObjectManager instance bug fixBrad Bishop2016-07-271-2/+1
| | | | | | | | | | The mapper adds its freedesktop object manager instance so that other applications can find association objects. Fix a problem with how this is populated. Change-Id: I368553e8930e95227ff8742a19da06814d81df67 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add mapper CLI utilityBrad Bishop2016-07-273-1/+149
| | | | | | | | | | | | A busctl like CLI that removes the foreknowledge requirement of a service name by leveraging the object mapper. Initial applets are call and wait: call: Invoke a method wait: Wait for a list of objects to appear on the bus Change-Id: Ic52f09a634949efe8d5c78e51ba965f2e7150018 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add utils moduleBrad Bishop2016-07-271-0/+96
| | | | | | | | | | The first utility is a class that uses the mapper to wait for a list of dbus objects to appear on the bus. The wait utility is non-blocking; a callback must be provided. Change-Id: I12813b32df90090507c461f03d8c54bb71a7c332 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Move mapper content to server.py moduleBrad Bishop2016-07-272-613/+636
| | | | | | | This is the idiomatic python way. Change-Id: I1f873669494995d87b6565db87f5b2bdaf69fe38 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Promote obmc.mapper to python packageBrad Bishop2016-07-273-2/+9
| | | | | | | Enable additional modules in the mapper package namespace. Change-Id: If2b38eef13b194a6087bb80947884f94bb2a5881 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Move mapper bindings backBrad Bishop2016-07-272-0/+163
| | | | | | | | | Initially these were here. Then they moved to the pyphosphor project. Move them back here - it makes more sense for the bindings to be associated with the project that provides the application. Change-Id: Ib6ef0554d049dce85f8bd3c72d33533087126280 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Introducing libmapperBrad Bishop2016-07-274-0/+110
| | | | | | | | libmapper is a convenience library for sdbus applications that interact with the phosphor object manager. Change-Id: I5a638e0a313d575591055214cb3ac5701b730ae5 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Improve short-lived object handlingBrad Bishop2016-07-251-8/+45
| | | | | | | | | 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: I0a8b42dd8e648f648a16ff7eb05f7559f8962422 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Pemove unnecessary variableBrad Bishop2016-07-251-9/+9
| | | | | Change-Id: If036d653c54c2225bc2f14198b3b08b1f2aca109 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Remove name mangling from find_dbus_interfacesBrad Bishop2016-07-251-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: Ie0dab2118c4d9ad97f47ef83a5b68ad82e5f9dd2 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Merge pull request #13 from bradbishop/perfPatrick Williams2016-06-241-15/+29
|\ | | | | More performance improvements
| * More performance fixesBrad Bishop2016-06-241-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | Sort introspected children nodes to improve the chance of finding ObjectManagers sooner rather than later (systemd does a recursive listing of child nodes). Remove unnecessary dbus calls when processing interfaces for associations. The existing code assumes that only object interfaces are available to it but the new discovery mechanism uses GetManagedObjects which includes the object properties. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
| * Pep8 fixesBrad Bishop2016-06-241-6/+4
|/ | | | | | A few of these slipped by. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Merge pull request #12 from bradbishop/perfPatrick Williams2016-06-061-55/+47
|\ | | | | Performance improvements
| * Performance improvementsBrad Bishop2016-06-051-55/+47
|/ | | | | | | | | | | Prior to this patch, an excessive ( more than zero ) number of dbus calls were made to determine if a signal was something we care about. This patch adds a well-known to unique connection name translation cache eliminating all outgoing dbus calls. Also removed the abstraction layer that obscured this as it isn't used. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Merge pull request #11 from bradbishop/no-introspectionPatrick Williams2016-05-191-13/+77
|\ | | | | Avoid introspection during discovery
| * Avoid introspection during discoveryBrad Bishop2016-05-091-13/+77
|/ | | | | | Speed up discovery by calling GetManagedObjects on any ObjectManagers. Fall back on introspection for parent elements or services that don't implement one.
* Merge pull request #10 from bradbishop/accessornkskjames2016-05-041-10/+18
|\ | | | | Add an accessor function for cache entries
| * Add an accessor function for cache entriesBrad Bishop2016-05-021-10/+18
|/ | | | | | | | | Determining the difference between a directory path element and a path element that doesn't exist with pyphosphor is awkward. Create an accessor function to funnel this weirdness in one spot. Make sure objectmanagers adhere to match rules before adding them.
* Merge pull request #9 from bradbishop/pull-assocPatrick Williams2016-04-294-449/+478
|\ | | | | association support
| * Add ObjectManager interfaces automaticallyBrad Bishop2016-04-131-2/+16
| | | | | | | | | | | | We don't get signals for the ObjectManager itself, so if one is detected (from one of its signals) that we don't know about add it to the cache.
| * Add support for associationsBrad Bishop2016-03-181-1/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | General overview: Monitor objects that implement org.openbmc.Associations. React by creating objects implementing org.openbmc.Association. Include org.freedesktop.DBus.ObjectManager support. Details: Implemented properties changed handler for changes to associations property of org.openbmc.Associations objects. Updated interfaces added/removed handlers to react to org.openbmc.Associations. Required an index to react to endpoint state changes. For additional on associations information check: https://github.com/openbmc/docs/blob/master/dbus-interfaces.md
| * Minor refactoringBrad Bishop2016-03-181-15/+17
| | | | | | | | | | | | No functional changes. Changed any bus name references to "owner". A couple whitespace changes.
| * Add cache access and signal validation wrappersBrad Bishop2016-03-181-57/+82
| | | | | | | | | | | | | | | | | | | | | | Use of the main cache structure will grow so added some wrappers that automate initialization and cleanup. Refactored duplicate signal handler bus/interface validation logic into reusable functions. Updated discovery and signal handlers to make use of all these new functions.
| * Update license year from 2015 to 2016Brad Bishop2016-03-071-1/+1
| |
| * Use pyobmc packageBrad Bishop2016-03-073-379/+16
| | | | | | | | | | No functional changes here. Just module/package namespace updates to use the pyobmc library. Removed code duplicated by pyobmc.
| * Add gitignoreBrad Bishop2016-03-041-0/+87
|/ | | | | Lifted from https://github.com/github/gitignore/blob/master/Python.gitignore
* Merge pull request #6 from bradbishop/discardnkskjames2016-02-093-466/+486
|\ | | | | bug fix and pep8 cleanup
| * Run phosphor-mapper through pep8Brad Bishop2016-02-043-464/+486
| | | | | | | | This is all whitespace adjustments flagged by pep8.
| * Discard existing interfacesBrad Bishop2016-02-041-6/+4
|/ | | | | | | | | Avoid the need for syncronization between the mapper and services emitting interfaces added signals by discarding interfaces that have already been discovered. This can happen when ia service emits the interfaces added signal in quick sucession to the name owner changed signal, and the mapper discovers the new interface while handling the name owner changed signal.
* Merge pull request #5 from bradbishop/deletePatrick Williams2015-11-301-10/+22
|\ | | | | Objectmananger signal handling fixes
| * Objectmananger signal handling fixesBrad Bishop2015-11-251-10/+22
|/ | | | | | Fixed signal name typo. Added get_owned_name helper. Use well known and connection specific name where appropriate.
* Merge pull request #4 from bradbishop/enumeratePatrick Williams2015-11-102-6/+9
|\ | | | | Make MapperNotFound a proper dbus exception
| * Make MapperNotFound a proper dbus exceptionBrad Bishop2015-11-092-6/+9
|/ | | | Set the name to org.openbmc.objectmapper.Error.NotFound
* Merge pull request #3 from bradbishop/enumeratePatrick Williams2015-11-092-206/+309
|\ | | | | Mapper refactoring
| * Use introspect interface enumBrad Bishop2015-11-041-1/+1
| |
| * Mapper performance improvementsBrad Bishop2015-11-042-7/+14
| | | | | | | | | | Don't introspect when calling get_object. Check for bus name match in signal handlers.
| * Add basic error handling to ObjectMapperBrad Bishop2015-11-042-3/+16
| | | | | | | | | | Raise MapperNotFound for invalid paths supplied to the DBUS API.
| * Add ObjectMapper bindingBrad Bishop2015-11-031-0/+16
| | | | | | | | | | Wrapper that allows default parameters to be used with the Mapper DBUS interface.
| * Add enumerate iface alias to OpenBMCMapperBrad Bishop2015-11-031-0/+1
| |
| * Defer mapper name registration to post discoveryBrad Bishop2015-11-031-7/+12
| | | | | | | | | | | | | | | | When systemd units that depend on objectmapper name registration currently get started, they block while objectmapper does all its initial discovery. This change ensures that the mapper is ready to receive requests before registering the service name on dbus.
| * Use PathTree as internal storage structureBrad Bishop2015-11-031-171/+47
| | | | | | | | | | | | PathTree enables more efficient and more idiomatic iterating. Also tweaked the org.openbmc.objectmanager interface methods: removed 'fuzzy' match type and added 'GetObject'.
| * Rename TagListMatch to ListMatchBrad Bishop2015-11-032-6/+6
| | | | | | | | This match functor doesn't have anything to do with 'tags'.
OpenPOWER on IntegriCloud