9 Commits

Author SHA1 Message Date
Mark McLoughlin
5181724ece Use oslo-config-2013.1b3
The cfg API is now available via the oslo-config library, so switch to
it and remove the copied-and-pasted version.

Add the 2013.1b3 tarball to tools/pip-requires - this will be changed
to 'oslo-config>=2013.1' when oslo-config is published to pypi. This
will happen in time for grizzly final.

For each testenv in tox.ini which overrides the base testenv deps list,
explicitly include {pip,test}-requires in the list so that oslo-config
doesn't fail to install later when easy_install attempts to install
the tarball when doing 'python setup.py install'.

Retain dummy cfg.py file until keystoneclient middleware has been
updated (I18c450174277c8e2d15ed93879da6cd92074c27a).

Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
2013-02-18 12:38:10 +00:00
Julien Danjou
a5bc34d932 Simplify ceilometer-api and checks Keystone middleware parsing
This adds some test to be sure options passed to the middleware are read and
user properly.

This fixes bug #1099739

Change-Id: I491db4d2c7387cc2848ebefbbb579597234a82b0
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-01-25 13:45:06 +01:00
Julien Danjou
092aad40bd Fix keystoneclient auth_token middleware changes
Things changed, and the configuration wasn't read anymore. This patch fixes
that. It also remove duplicated code in acl.py, so the problem is fixed only
in one place. Finally, it uses prepare_service() to find the right
configuration file for ceilometer.

This fixes bug #1098204

Change-Id: I0d6c30ad443a4d0db201e60d12b275625a4bee6e
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-01-11 11:47:40 +01:00
Julien Danjou
29f5edad8e Move back api-v1 to the main api
API v2 is not finished and should only be optionnal. Move the binary as
api-v2 and remove the dep on pecan, only use it for tests.

This also fixes bug #1092227.

Change-Id: Ifaf0ad3918460bc2107e1563f0539695467a1856
Signed-off-by: Julien Danjou <julien@danjou.info>
2012-12-20 14:53:57 +01:00
Doug Hellmann
3173ab4c4b Implement V2 API with Pecan and WSME
This changeset reimplements the API
using Pecan and WSME instead of Flask.

Pecan uses "object dispatch" instead of
declared routes. The controller classes
are chained together to implement the
API.  Most of what we have are simple
REST lookups, but a few cases required
custom methods.

WSME is used to define types of inputs
and outputs for each controller method.
The WSME layer handles serizlization and
deserialization in several formats. In
our case, only JSON and XML are
configured.

There are a few small changes to the
return types in the API, as well as to
error handling. Now all errors are
returned as JSON messages made up of a
mapping containing the key
'error_message' and the text of the
error. This will later be enhanced to
include XML support for XML requests.

This change also moves the script for
starting the V1 API to a new name and
replaces it with a script that starts
the V2 API. There is an open
bug/blueprint to fix that so both
versions of the API are loaded.

blueprint api-server-pecan-wsme

Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Change-Id: I1b99a16de68f902370a8999eca073c56f9f14865
2012-12-04 12:57:58 -05:00
Doug Hellmann
42f1f02077 Move v1 API files into a subdirectory
Move all of the files for the v1 API together into a
single directory to make room for the v2 files.

blueprint api-server-pecan-wsme

Change-Id: Ic794581c677a0277924459ad8a34fd7daf2bc365
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
2012-12-04 12:08:13 -05:00
Julien Danjou
445d711dd0 Allow no configured sources, provide a default file
This fixes bug #1073654

Change-Id: I7cfb5016ab8a70bf9738baa497f6fe173f307242
Signed-off-by: Julien Danjou <julien@danjou.info>
2012-11-04 22:04:07 +01:00
Doug Hellmann
085fa79ec0 Fix auth middleware configuration
Initialze the configuration object before initializing
the middleware, and pass the resulting config in to
the middleware so it can get the configuration settings.

addresses bug #1071047

Change-Id: I2a487d2a2f2d3467e522868ac78dc4645bf7d643
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
2012-10-31 15:46:54 -04:00
Angus Salkeld
731d3fce5e Add bin/ceilometer-api for convenience
This is a bit more obvious than running the module.
I have basically just moved api/__main__.py into bin/ceilometer-api.

Change-Id: I50d614ea98b278563b576e0b3b9df03b391e2152
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-09-03 13:51:12 +10:00