7 Commits

Author SHA1 Message Date
Sylvain Bauza
0ea24438d3 Fix issues coming from oslo-incubator update
Logging was enabled while it shouldn't (probably a miss) and
config options were not updated correctly as CONF is a global object.

Closes-Bug: #1290365

Change-Id: I7293e943d15e6f908248b0573f1c9a1914235f04
2014-03-10 15:04:29 +01:00
Cristian A Sanchez
69b0497ab9 Update openstack.common with latest oslo-incubator
openstack.common was updated with the latest oslo-incubator changes.
rpc and notif were manually removed. DB layer was modified to adapt
to the changes done in Oslo. '# noqa' was also removed from imports.

Also after new release of oslo.messaging appeared, we also needed
to update openstack.common to make Climate work with oslo.

Change-Id: I1b5ce64f8d4906d1fcfea9379d115b7bb2ec3f7b
Closes-Bug: #1237896
Closes-Bug: #1284749
Partial-bug: #1253497
Co-Authored-By: Pablo Fernando Cargnelutti <pablo.fernando.cargnelutti@intel.com>
Co-Authored-By: Dina Belova <dbelova@mirantis.com>
2014-03-06 16:30:42 -03:00
sbauza
8443312186 Policy management for Climate
Implements policies in Climate with unittests based on Oslo.
Tight integration with Context as it will populate to Context
if user is admin or not based on policy.json

In order to make that work, please add policy.json to /etc/climate

Decorator @policy.authorize allows enforcing policy checks on
controllers.

Implements bp:climate-policy

Change-Id: I94e8fa142e5c5d830b0bea9278e5a47f9904db4c
2014-01-07 12:31:39 +01:00
Dina Belova
03f2cb5037 Remove config parsing call from test setup
Change-Id: Ib30e45d87fc85052114e5727a200e2102c4face6
Fixes: bug #1256027
2013-11-28 20:02:20 +04:00
Yuriy Taraday
ea0c144b13 Refactor context module to make it more flexible
- context data is stored in a dictionary now, so any key is allowed;
- list of allowed key for certain context is stored in special class
  variable;
- methods "current" and "elevated" of ClimateContext class are
  accessible from module level;
- moved to usage of threading.local instead of emulating one in code (as
  long as we use eventlet's monkey-patching, it's specific local() will
  be used).

Change-Id: I3c79c9cd0d16dfb5c61208f2aa71b5c59f3f40f3
2013-11-25 14:10:23 +04:00
Nikolaj Starodubtsev
671eb6a515 Add unit tests to api functionality
Change-Id: Iae5d8a69d9fb0fa272aa0535f84c0ceeba6dd4d9
2013-11-20 11:40:14 +04:00
Nikita Konovalov
a9e564b13f Test module refactoring
Tests moved inside climate module

Change-Id: I619960bd9dc6293980171b510873ef32a5df3ad6
2013-11-19 11:38:32 +04:00