Change resource.resource_metadata to text type

The existing resource.resource_metadata column size is 5k chars,
which is not enough for some large JSON metadata payload,
so change to as Text column to make sure store all JSON string
without truncating.

Fixes bug #1220683

Change-Id: Ide8c6b94f1ae56d76fe3d5b6238d44e498e67c03
Ensure combination alarm evaluator can be loaded

Fixes bug 1237578

Previously combination alarms were always skipped as the evaluator
was missing from the loadable stevedore extensions.

Change-Id: I9d164fb2a89ee9931fc032d93ad4a26ba6887f0b
Ensure combination alarms can be evaluated

Fixes bug 1237589

Previously the retrieval of state for the constituent alarms always
failed for combination alarms, due to an incorrect attribute of
ceilometerclient being used. As a result combination alarms could
never be successfully evaluated.

Now the correct pluralized attribute is used.

Change-Id: Id58a5d185854367e5a08011048774ab5aed93d4e
Set python-six minimum version

missing python-six minimum version from the requirements.txt
set the min version to 1.4.1

fixes bug: #1237205

Change-Id: I6b821e4500178f4ca50e05c4893c8bbaacfc238e
Merge "Change resource.resource_metadata to text type"
Avoid leaking admin-ness into threshold-oriented alarms

Fixes bug 1237567

Previously when an admin created a threshold-oriented alarm on
behalf of an non-admin identity, this had the effect of leaking
visibility onto statistics for resources that would not normally
be visible to the non-admin tenant.

Now we ensure that an additional implicit threshold rule query
constraint is added on the project ID of the non-admin indentity
that will ultimately own the alarm.

This is acheived by splitting the query validation from the
construction of the kwargs from the query. The addition of the
implicit query constraint to the threshold rule can then be
delayed to a later point in the dispatch path where the full
context of the alarm is known (so that we can check for the case
where the alarm is created by an admin on behalf of another tenant).

Change-Id: I1adae8c899112e7c3eb4e94f3f68262c84a98574
Merge "Set python-six minimum version"
Merge "Ensure combination alarms can be evaluated"
Avoid leaking admin-ness into combination alarms

Previously when an admin created a combination alarm on
behalf of an non-admin identity, this had the effect of leaking
visibility onto alarms that would not normally
be visible to the non-admin tenant.

Now we validate all alarm ids with the project ID of the non-admin
identity that will ultimately own the alarm instead of the project ID
of the API caller.

Fixes bug #1237632

Change-Id: I5d1cf41c9182f09bc37b93deb14dda58f1d6dcd6
Add support for keystoneclient 0.4.0

Keystoneclient auth_middleware changed the way it parses the datetime
returned from the cache, breaking the Ceilometer unit tests. This patch
fixes the fake cache system that's used in unit test, so it works with
all keystoneclient versions.

This also update the sample configuration files to include the new
options provided by keystoneclient 0.4.0.

Fixes-Bug: #1238529

Change-Id: Iecfd50d9e9801aeb919f2c09a728e4ea15245a5e
Change alarm_history.detail to text type

The existing alarm_history.detail column size is 255 chars,
which is not enough for some large JSON payloads.

Change to Text column to make sure we store all detail.

Change-Id: I1b4ebee33954acc1f41a4cf0d0b991055b7d4fe9
Closes-Bug: #1236861
Signed-off-by: Stephen Gran <stephen.gran@guardian.co.uk>
Merge "Avoid leaking admin-ness into threshold-oriented alarms"
Merge "Change alarm_history.detail to text type"
Merge "Avoid leaking admin-ness into combination alarms"