2b5fcd60c4b5ca37e347657879a28af011729dbd
When the server does not have any data matching the requested response_key, it can still return successfully. A subsequent lookup in the returned data throws a KeyError exception. The simple fix for this is to catch the KeyError exception and return an empty list. An empty list, rather than None, is required because the calling code expects an iterable. The exception is caught as early as possible after the server returns from the GET request. The end result is that the CLI user sees an empty result when the requested data doesn't exist on the server. Prior to this fix the keyError exception was propagated all the way to the user, causing a confusing message to be printed. Also added associated unit test. Fixes bug #1111972 Change-Id: I88ba658f8be7e7edf255ef9f7d83ba87f36f4efc
Python bindings to the Ceilometer API
This is a client library for Ceilometer built on the Ceilometer API. It
provides a Python API (the ceilometerclient module) and a command-line tool
(ceilometer).
Development takes place via the usual OpenStack processes as outlined in the
OpenStack wiki <http://wiki.openstack.org/HowToContribute>. The master
repository is on GitHub <http://github.com/openstack/python-ceilometerclient>.
See release notes and more at <http://docs.openstack.org/developer/python-ceilometerclient/>_.
Description