Replace datetime of time_constraints by aware object

Error occurs in alarm evaluation when timezone in time_constraints is specified,
because astimezone() cannot be applied to a native datetime.

Making datetime to non-native (aware object) will solve the problem.

Change-Id: Ic0de4a5b32865bbe330c2936f14adf59168eefe5
Closes-bug: #1342676
Fix two out-dated links in doc

Change-Id: Ie5f7fa53d334f09332661dc21ee27aff35be1c21
Use None instead of mutables in test method params defaults

Mutables in the method params defaults might cause errors and
that's why it's anti-pattern in most of the cases and should be
removed.

Change-Id: Ie9897aae6e95962e0991ac9d9fc5c175f2da12a4
Fix make_test_data tools script

Method get_connection has been renamed to
get_connection_from_config.

Resource is object not dictionary, so attributes needs to be
accessed that way.

Change-Id: I19e09f3e9077d3346b4361fa6975a3e696e2e765
Related-Bug: #1349791
Extracting make_resource_metadata method

Dividing this method into multiple helps to reuse it in
some tools scripts for generating data.

Change-Id: I45230cd43d82e946fab394c4b6a1fe6b64cd8937
Related-Bug: #1349791
Enhancing the make_test_data script

-Adding random boundaries rather than exact value for samples
-Allowing to pass datetime object or string
-Extracting make_test_data func, so it can be imported elsewhere
-Converting the integer time span to datetime

Change-Id: Iffbc8d9711b2f301a1f28b49980691ab34d17c20
Related-Bug: #1349791
Add notifications for identity CRUD events

This patch adds support for notifications for the following
resources:

  user, group, project, role, trust

on the following events:

  create, delete, update

For more information on what events keystone supports visit:
http://docs.openstack.org/developer/keystone/event_notifications.html

Change-Id: I4ff07803537daf6937fba02e9ae8fe2afec938e5
Sahara integration with Ceilometer

Added ability for Ceilometer to parse notifications from Sahara

Partially implement: blueprint ceilometer-integration

Change-Id: I8845500082a6a6892fb1e714c75884a7dd9fff02
Fix listener for update.start notifications

When listening for update.start, ceilometer-notification-agent
will raise a KeyError exception. This is because, the "id" in notification
message is in message['payload'] not the message['payload'][resource].

Change-Id: I6dd56fbf31c29e26670068004f6fc935b91266f0
Closes-Bug: #1325172
Fix dict and set order related issues in tests

There are several tests where the expected output
relies on order of strings generated from the arbitrary
ordering of dictionaries or sets. The new version of
tox causes that ordering to be different between tests
runs so tests must be resilient and test either the
content of the dicts or sets or their sorted output.

Note: These fixes are only of those cases where a failure
was generated. If there are issues in skipped tests, this
patch has not found nor fixed them. The vast majority of
skipped tests are related to availability of functionality
so there's little that can be done about that with the
current testing setup. The best we can do is be on the
lookout for failures that could be related PYTHONHASHSEED
down the road and fix them as they happen.

Closes-Bug: 1348818
Change-Id: I6b27ca2597c51b0656f441f325f9ffd0e31a606d
Use auth_token from keystonemiddleware

auth_token middleware in python-keystoneclient is deprecated and has
been moved to the keystonemiddleware repo.

test_keystone_middleware_conf and
test_keystone_middleware_parse_conffile were removed. These tests
were relying on undocumented behavior (how the config options turn
into attributes). This doesn't work anymore since the
keystonemiddleware version doesn't provide any public API other than
calling it as a wsgi app, and then doesn't document what internal
operations it will do when called so isn't safe to be called in
unit tests. Tests verifying that the auth_token middleware can read
its config options should be done in keystonemiddleware.

Closes-Bug: #1342274

Change-Id: I1aadbe24db63eb2507b088cd53886d7f2e192cab
Merge "Fix dict and set order related issues in tests"
Add data generators.

+ Sample generator. It uses pika+rabbitmq and create samples with unconfigurable data.
+ Make test data. Written by Ladislav Smola generator. It writes configurable samples with
record_metering_data of backend.
+ Send sample messages. It uses make tests data for create samples and send it with oslo messaging.
Merge branch 'master' of https://github.com/ityaptin/ceilometer into performance-tests
Merge "Use None instead of mutables in test method params defaults"
Change spelling mistakes

Change-Id: I2439ce264bd9a8566a2b88c1d8af5d3537814ecc
Debug env for tox

Running a test with pdb was difficult because tox captures
output and causes pdb prompt to quit.

Tips for how to run with debug are provided here:
 https://wiki.openstack.org/wiki/Testr#Debugging_.28pdb.29_Tests

This change puts these commands into a debug env in tox.ini so
you can do a command like:

tox -e debug pycadf.tests.test_cadf_spec

and when it hits your breakpoint you'll get the debug prompt.

Change-Id: Ic53a888e4e305d51159d1d6a2f962786a532e089
Co-Authored-By: Brant Knudson <bknudson@us.ibm.com>
Closes-Bug: #1350424
Merge "Change spelling mistakes"
Fix unit for vpn connection metric

Unit for vpn connections should use connection
instead of vpn. The docs show the right value.

Change-Id: I45482ca173347a351fcf0de5e9ee3faa8976600f
Merge "Fix two out-dated links in doc"