Skip central agent interval_task when keystone fails

There is a chance when ceilometer-agent-central try to trigger interval_task
but keystone is not available, then an exception is raised but not caught, the
outside oslo.loopingcall will stop calling the task function, finally leading
to the agent-central service is no longer available forever, even the keystone
is available again.

We can skip the particular interval_task when keystone is not available.

Change-Id: I0849cafadac8fb8a7670aaa4cc76dc708bdb25a1
Closes-Bug: #1287613
Fix updating alarm can specify existing alarm name

when creating an alarm, we cannot specify an existing name of the
project. but when updating an alarm, we can specify an existing name.

Change-Id: Ia24347ee647e7755b50d0d5d2ff033f4c5cbeb19
Closes-bug: #1288155
Refactored the way how testscenarios tests are run

Instead of using custom loader we now use a base class from
testscenarios. This allows us to retain compatibility with
unittest test runner and run a single test if needed.

Change-Id: Id5ae4fd0edfa868aaf6a57bd2e5f212b51b722e1
Fixes duplicated names in alarm time constraints

Currently, an alarm can have multiple time constraints
with the same name. Consequently the constraints aren't
uniquely identifiable and cannot be edited correctly.

This patch adds duplicate checking.

Change-Id: I6654e13b249db53c2107b43fe36ddacedf67be67
Closes-bug: #1293994
Fix order of arguments in assertEquals

Part 5

Related to: bug #1277104

Change-Id: I44fda94aeea972cf43482bf3c39537904477938b
Ensure intended indices on project_id are created for mongo

Fixes bug 1291666

Previously, despite the clear intent of the code, the mongodb
driver failed to create indices on project_id for the meter
and resource collections, due to a index name clash.

Now, we ensure a different index name is used for the user_id
and project_id indices on each collection.

The previously missing index is created in the background to
avoid blocking other DB operations when upgrading against an
existing mongo instance with large collections.

Change-Id: Ia3c6765445f16ab9beafbd7fd9265a045814003f
Install global lazy _()

The patch installs the lazy _() function, which returns translatable
Message objects, globally via the enable_lazy() method such that
translation works in all modules.

Since Messages objects can't be str()'d and native exceptions str()
their messages the patch also removes passing Messages to native
exceptions.

Change-Id: I8a4ecd904e393c4bd0308cdeafa3cf1d8f0e70fe
Closes-Bug: #1275901
spawn multiple workers in services

the collector service only ever grabs one connection to the
database at a time. this causes a massive backlog on the message
queue. enable ability to spawn multiple workers for notification
and collector services.

Change-Id: Ie85c4a6eace52c771c3eb8425839d253f8dd74cd
Closes-Bug: #1291054
Merge "Ensure intended indices on project_id are created for mongo"
Fix hardware pollster to inspect multiple resources

Closes-bug: #1292790
Change-Id: I9082131bb8c59b8a9e1a15073b7b32edb83e2552
Merge "Skip central agent interval_task when keystone fails"
Avoid swallowing AssertionError in test skipping logic

The logic designed to skip testcases when NotImplementedError
is raised by a storage driver can inadvertantly swallow a
failed assertion if the string representation happens to
include 'not implemented'.

Change-Id: I1c9e617a5dcb545941d92ed7a0d7cc702c407506
Merge "Fix order of arguments in assertEquals"
Merge "Fix hardware pollster to inspect multiple resources"
Merge "Install global lazy _()"
fix create_or_update logic to avoid rollbacks

check if entry exists rather than blindly adding entries to table.
this will avoid unnecessary rollback overhead.

Closes-Bug: #1295504
Change-Id: I923cc35ed4c9155ffa04ac189555cdbcb38bcbcf
Fix validation error for invalid field name in simple query

The field name validation code runs only in case of the operator that is
specified for the invalid field name, is 'eq'. Otherwise the validation
ends with an invalid operator error. The field name validation code was
modified to check the field name first and only checks the operators for
valid field names.

Closes-bug: #1294628
Change-Id: Id34ae882940b36dec3ea81043b0d29b996a38426
Disable oslo.messaging debug logs

ioslo.messaging debug logs are too verbose, turn them off. A similar
patch dropped nova-conductor logs in the gate down from 7MB to under 300K.

Cherry-Pick from oslo-incubator since we are in feature freeze:
Ia12c003dae196e2220a5f6ea768758a75f2ede23 and
Icc61964c6a2b002ac1c8566f174e6a5230674c75

Change-Id: I48733823e178afd2f22d81d584bb73f95ec9a7cd
Merge "Fixes duplicated names in alarm time constraints"
Use swob instead of webob in swift unit tests

While we are at it, don't bother importing webob and not using it if
we are going to end up using swob.

Change-Id: Ibb8cd23a6e8eb7bed11704b2dcee5bcdb9c3278a