summaryrefslogtreecommitdiff
path: root/ceilometermiddleware
Commit message (Collapse)AuthorAgeFilesLines
* retrieve project id to ignore from keystone0.5.2Mehdi Abaakouk2017-06-264-5/+767
| | | | | | | | | | | | | | | | | | | | | | | | | We currently allows only project uuid, but this is a pain for deployer. Also the default is a project name which doesn't work... This change queries keystone to retrieve project ids when the ignore_projects list are names. By default, if auth_type is not set, we keep the previous behavior to not query keystone. This change also vendors keystoneauth1.loading.adapter that wasn't exists in newton version of keystoneauth1. (cherry picked from commit e2bf485044d8f3743da9298a9e461c5808be31f3) Fix default service project to "service" Both devstack and TripleO uses "service" by default. Nothing uses "services". (cherry picked from commit fbd048f4c0041532b81aa6bdbed5d2400b64fc99) Change-Id: I270d080d3e65eb6b0cd823498a4dd37389c49221
* Convert nonblocking_notify value from string to boolean0.5.1Julien Danjou2016-11-071-1/+3
| | | | | | | | | Otherwise just setting it to "False" which is a string and therefore, is True, enables it! (cherry picked from commit 87bd49b62e0e68d8be7c4f77d60eac19c14f9592) Change-Id: I1155e1a16ccd34ffb0cd1e966e0bef91f6257b6d
* Add background thread notifier sending abilityDarren Hague2016-07-112-1/+91
| | | | | | | | | | | | | | Add ability to hand off notifier event sending to a queue processed by a background thread so as not to block swift proxy. This fixes an issue whereby if ceilometer's RabbitMQ went down then the swift proxy would wait for it to come back up, effectively coupling Swift's availabiilty to that of Ceilometer's RabbitMQ. Background sending is activated by setting config item 'nonblocking_notify' to True. Queue size defaults to 1000, which can be overridden by setting config item 'send_queue_size'. If the queue is full, new events are discarded. Change-Id: I3da2b88b2bc9b7fd8c572a0085fa1d78c4f54701
* Remove oslo.context dependencyJulien Danjou2016-05-101-3/+1
| | | | | | There's no point in passing any fake context to the notifier. Change-Id: Ib95776ecf1e3c9041b4268332cd3fb0b720b42f2
* use path as resource id when missing RESELLER prefixgordon chung2016-04-072-2/+13
| | | | | | | | | | | | we don't have an id if RESELLER prefix is not in path. this causes an id to be autogenerated making each request a completely different resource id. this patch changes it so we just default to path as our id if one cannot be computed. Change-Id: I5775406a84b5f2ad0f95f366b7deca210d2f8e87 Closes-Bug: #1566940
* Use assertTrue/False instead of assertEqual(T/F)Swapnil Kulkarni (coolsvap)2016-01-071-1/+1
| | | | | | | | The usage of assertEqual(True/False, ***) should be changed to a meaningful format of assertTrue/False(***). Change-Id: I269fb387648916cc8c7b0e1e474457bd0f37395a Closes-Bug:#1512207
* swift: upgrade messaging to v2Julien Danjou2015-11-061-2/+2
| | | | Change-Id: Ic769ca23937760d4b0120c8abf81b3d413a795f5
* Ignore request with swift.source in env0.3.0Rohit Jaiswal2015-09-152-2/+16
| | | | | | | | | | | | | swift.source in env indicates request that originate in swift middleware as a side effect of another client request. These requests should not be metered, this fix adds a check for swift.source in env and avoids generating a metering event. Change-Id: I2ecbde8667cc366b192a2248abc93d0936956978 Closes-bug: 1485711
* Fixes parsing req path for account HEAD/GETRohit Jaiswal2015-08-282-2/+25
| | | | | | | | | | When path is of the form /v1/AUTH_xyz, the path parsing expects 3 tokens, this fix retries parsing to expect 2 tokens, so that operations at an account level can be metered. Change-Id: I5eb83e39e7902b9410487c98295f12640aeef140 Closes-Bug: 1488682
* HTTP_X_TENANT_ID is deprecated and replaced by HTTP_X_PROJECT_IDClément Contini2015-08-141-1/+2
| | | | Change-Id: I619d9db86ddcb6f3599c2d1c3c37a3628b9c7239
* Drop use of 'oslo' namespace packageDoug Hellmann2015-07-161-20/+20
| | | | | | | | | | | | | | | | | | | | | The Oslo libraries have moved all of their code out of the 'oslo' namespace package into per-library packages. The namespace package was retained during kilo for backwards compatibility, but will be removed by the liberty-2 milestone. This change removes the use of the namespace package, replacing it with the new package names. The patches in the libraries will be put on hold until application patches have landed, or L2, whichever comes first. At that point, new versions of the libraries without namespace packages will be released as a major version update. Please merge this patch, or an equivalent, before L2 to avoid problems with those library releases. Blueprint: remove-namespace-packages https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages Change-Id: I029c3260051aa48cfaae428c096c1ac7b43b2bd2
* Add test which asserts non-empty target_idNadya Privalova2015-06-241-0/+10
| | | | | | | target_id should not be empty because it is used as resource_id. Related-Bug: #1464265 Change-Id: Ibf3552c0f72f267ddd5a0a32a47427548d0b55c1
* Merge "add support to skip event/meter generation for certain projects"Jenkins2015-06-242-0/+37
|\
| * add support to skip event/meter generation for certain projectsgordon chung2015-06-232-0/+37
| | | | | | | | | | | | | | | | | | | | | | gnocchi is unuseable with swift backend because for every meter we capture we are generating an event notification which creates 1+ meters, which creates 1+ event notifications, and so on. this will flood the message queue and it will never catch up. by default, we will configure system to ignore requests from gnocchi project. DocImpact Change-Id: I175c5d59529ebe51c8e5ccb379b54b05e9affe95
* | Set correct config choice for transport urlChris Dent2015-06-221-1/+1
|/ | | | | | The code wants 'url' not 'transport_url' Change-Id: I2f84a21cb2b1f0cc7b7c07db82559180779ed71d
* Drop use of 'oslo' namespace packageDoug Hellmann2015-05-061-4/+4
| | | | | | | | | | | | | | | | | | | | | The Oslo libraries have moved all of their code out of the 'oslo' namespace package into per-library packages. The namespace package was retained during kilo for backwards compatibility, but will be removed by the liberty-2 milestone. This change removes the use of the namespace package, replacing it with the new package names. The patches in the libraries will be put on hold until application patches have landed, or L2, whichever comes first. At that point, new versions of the libraries without namespace packages will be released as a major version update. Please merge this patch, or an equivalent, before L2 to avoid problems with those library releases. Blueprint: remove-namespace-packages https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages Change-Id: I26390dd908769be5f1a5b70be22d3b98e3a45563
* use pycadf helper module to assign actiongordon chung2015-03-091-0/+2
| | | | | | | | action is a required attribute for auditing. there is an action helper in pycadf which can compute the action value corresponding to the HTTP method. Change-Id: I277fd78641963644ee83df7451a3cc7699d3db15
* add options to configure messaginggordon chung2015-02-031-3/+15
| | | | | | | | swift does not use oslo.config so we should allow transport settings to be passed in via paste conf Change-Id: I686e5d94fb72fd2a00973c91673edc417142ee2f Closes-Bug: #1417306
* fix py34 testsgordon chung2015-02-032-3/+3
| | | | | | | tests should use six.iteritems to pass py34 tests. also, encode doesn't work consistently across py2 and py3 Change-Id: I1ec858b61ec3786b139be8736a6e1fd1a47f5845 Closes-Bug: #1417303
* fix gitignoregordon chung2015-01-215-0/+0
|
* initial checkingordon chung2015-01-2010-0/+597