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
Prevent alarm_id in query field of getting history

The ceilometer CLI support alarm_id in query field of getting alarm
history.
But it will raise error when invoking the db function get_alarm_changes.
Getting history of an alarm, the alarm id is required, so we needn't allow
the alarm_id in query field of getting alarm history.

Change-Id: I968b5bbcbc5af18a737b63598b63c1caa78d187e
Closes-bug: #1290809
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
Fix order of arguments in assertEquals

Part 3

Related to: bug #1277104

Change-Id: Ia31f8f90b4b5f8edfa04091cc7e987c7e1f24383
Fix order of arguments in assertEquals

Part 4

Related to: bug #1277104

Change-Id: I8aea7478afe209096d55ded9966d45a3684248dc
Fix order of arguments in assertEquals

Part 2

Related to: bug #1277104

Change-Id: If2aa8f43d1a9f788e805abe0119f4715a7e14c24
Eventlet monkeypatch must be done before anything

This patch ensure eventlet have patched modules before they are loaded
and used.

Closes-bug: #1288878

Change-Id: Ieb1fc252bde94a19fdba14a87c9f97848208bdc5
Use the list when get information from libvirt

If the libvirt adds new elements to the domain info struct or others,
when use the new libvirt, there will be a valueError (too many values
to unpack). When we get information from libvirt, we should use the
original variable format. This change is for compatibility with upcoming
versions of libvirt which change this signature.

Change-Id: I885a48b730acd618e7cefc93cee3d69226575b7c
Closes-Bug: #1291805
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
Ensure alarm rule conform to alarm type

Threshold_rule or combination_rule must be set to an Alarm object,
and they cannot be set at the same time.
Alarm's type must be one of threshold and combination.
Threshold_rule and combination_rule should be validated according alarm's
type.

Change-Id: I97bf82defeaf0dc1a0e897e10886fd736361041d
Closes-bug: #1288677
Fix order of arguments in assertEquals

Part 5

Related to: bug #1277104

Change-Id: I44fda94aeea972cf43482bf3c39537904477938b
Change the sample_type from tuple to string

The Collector can not persistence compute node CPU metrics when set
‘compute_monitors = ComputeDriverCPUMonitor’ in nova.
The root cause of that issue is the counter_type is the 'tuple',
In actually the type of the counter_type should be String,
so it can not persistence to DB success, please refer to the SQL,
the counter_type value is [u'cumulative'] that is a 'tuple'.

Change-Id: I8d1218f813d081e1031c331c59a17c227c9a8958
Closes-Bug: #1295004
Fix the type of the disk IO rate measurements

The type of the following measurements should be Gauge:
disk.write.requests.rate
disk.write.bytes.rate
disk.read.bytes.rate

Closes-bug: #1295088
Change-Id: Ia11f8ca36a02ca2e5f74de275df80faeaa5b7d39
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
Fixes Hyper-V metrics units

Changes the units of the values returned for the network and disks data to
bytes as expected.

Closes-Bug: #1289015
Change-Id: If4950d05213a345900b3450c83450345e04560fc
Merge "Fix order of arguments in assertEquals"
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
Merge "Ensure alarm rule conform to alarm type"
Merge "Fix the type of the disk IO rate measurements"