Remove © and remove unnecessary encoding lines

The word "Copyright" alone is sufficient to claim copyright, the ©
need not be present.[1]

As per PEP 263, a Python file with non-ASCII characters must have a
line with "coding: <some-encoding>". Python files containing only
7-bit ASCII characters need no such line.[2]

This commit removes unnecessary Unicode copyright symbols and
unnecessary encoding lines.

[1]: http://www.copyright.gov/circs/circ03.pdf
[2]: http://legacy.python.org/dev/peps/pep-0263/

Change-Id: I6b43cc5ecfd0440e06b0aebd91ebb574b7f37a91
Fix alarm-threshold-update --query option

Currently, alarm-threshold-update command can not update its query
field, because the dest value is removed accidently so the query is
not put under threshold_rule dict. This patch simply adds it back.

Change-Id: I2eeaf8cbb26f506e097dafdcb6d0eae4ad7fec3e
Closes-Bug: #1313676
Updated from global requirements

Change-Id: Id7f6b00b6bc26e0c5f9ecd76ece5ff670675b8aa
Fix hacking rules: H302,H305,H307,H402

Currently, OpenStack Proposal Bot tries to update requirements with
global requirements, while the upgraded hacking has introduced some
new rules which are not fully handled by current code.

This patch fixes some simple rules which are quite straight-forward.

Change-Id: If8334f69fb1ad34fbbd6ad898e0e92eb3f81e95a
Merge "Remove © and remove unnecessary encoding lines"
Merge "Updated from global requirements"
Merge "Fix hacking rules: H302,H305,H307,H402"
Improve a bit query API

Make QueryManager.query arguments optional.

At this point we are forced to speicify all filter, orderby, limit
arguments as well to save order. So for example if I would like to get
only 20 records I have to write something like:

ceilometer.query_sample.query(None, None, 20)

instead of

ceilometer.query_sample.query(limit=20)

As this doesn't break backward compatibility it shouldn't be a
big deal to merge it.

Change-Id: I5d589b27cafabd22204585a76f107125b2f3c7bd
Add methods to resource classes

Resource classes of managers should have methods
like delete() and get(). Basicly base.Resource
class has method get(), which uses id attribute,
but classes Alarm, Event, etc. have no this attribute.
Added intercept getting of id in the resource classes.
Also added catch of HTTPNotFound for alarm get()
because it affects correct functionality of
scenario tests.

Closes-Bug: #1312146
Change-Id: Ie598b73c64dece2185955467936dc6544a8a3dc7
Provide explicit help string of resource-metadata

Currently, the "--resource-metadata" in ceilometer sample-create command
is not easy to use. For compatibility, this patch just provides an
explicit help string for the parameter.

Change-Id: I6d68d5b653c3b33808cba6f9a781301fba9b44e3
Closes-Bug: #1324759
Fix the alarm history order shown to user

In the Ceilometer storage backends implementation we are specially
sorting the alarm history points in the following way:
the first one by the timestamp should be the last one in the list.
The Python client itself provides the information in this way, but
the table printed had the opposite one, so this was fixed.

Change-Id: If39bb5868e360f37ed76c12b55fc71eade331f47
Merge "Provide explicit help string of resource-metadata"
Updated from global requirements

Change-Id: Ic2fd2ffb3d5c464d51933e97c6715f8608770487
Merge "Add methods to resource classes"
Merge "Fix alarm-threshold-update --query option"
Update python-ceilometerclient to support Keystone V3 API

Keystone is now deprecating the V2 API in favor of the V3 API.
The ceilometer client is now using the keystone session to
delegate the discovery of the version that is going to be used,
this eliminates the need of updating the client every time there
is a new API version.

DocImpact

blueprint support-keystone-v3-api

Change-Id: I6ebacce7adf70f24bdede9b920853ab9851071cf
Merge "Update python-ceilometerclient to support Keystone V3 API"
Use suitable assert

Replace assertTrue(a in b) with assertIn(a, b)
Replace assertFalse(a in b) with assertNotIn(a, b)
Replace assertTrue(a is None) with assertIsNone(a)

Change-Id: I981c81908a823d9dbecbb2e139a86fbf589ce55e