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
Disable specifying alarm itself in combination rule

Currently, update combination alarm can specify itself in alarm_ids,
however, that will cause endless loop when evaluating this alarm.

This patch adds a check to disable such behavior.

Change-Id: I63b465c59fe39206ae04b0736482d1ffd7bf59c4
Closes-Bug: #1304419
Removes direct access of timeutils.override_time

The attribute "override_time" is a private attribute which
should only be set through "timeutils.set_time_override()".
There are a number of places in Ceilometer which the override_time
attribute is set directly and such behavior should be prohibited.

However the "set_time_override()" function along with "override_time"
in timeutils is planned to be removed, therefore we no longer
need to use it.

Change-Id: I6f3a5e0bb4e4c448f369dd5ead0e1525fd2262e6
Related-Bug: #1266962
Replace assert statements with assert methods

Some of the test methods were using python assert
statements for making assertions. This patch replaces
those statements with apropriate assert methods.

Change-Id: I3fcf4253560474868a0b32a7994f446e7b4bcc67
Closes-bug: #1303124
Removed useless code from __init__ method

This code is not needed in production code

Change-Id: Ic1e8e94671070a9dea7c50ea914fe4864210c6c1
fix statistics query in postgres

when aggregate functions present, postgres requires all
non-aggregate columns selected to be included in group by clause
to ensure a single value is selected.

Change-Id: Iccbcd8046cca872e8eba472f48fa392114f34426
Closes-Bug: #1256318
Optimize checks to set image properties in metadata

This cleans up the redundant checks we have around
instance.image and ensure we only check if image info
exists once and set the appropriate values and default
to None if missing. Also updated the tests to use the
right default of None instead of empty string and
None assert check for image and new test to validate
image from conductor with no links.

Change-Id: Idb4aa85ae132ec60175ada8a6e304c7eb27f485b
Merge "Removed useless code from __init__ method"
Merge "Optimize checks to set image properties in metadata"
Remove unnecessary escape character in string format

When format string, " quoted in "" pairs should be escaped, but
it is unnecessary when quoted in '' pairs.

Change-Id: Iec8adb7935521b1cd094c8b6e281e0c8e50a7825
Merge "Removes direct access of timeutils.override_time"
Merge "Remove unnecessary escape character in string format"
Merge "Replace assert statements with assert methods"
Fix a response header bug in the error middleware

Coerce the Content-Length of the custom error message to a string, not an
integer.  Some pure Python WSGI servers aren't strict and violate the WSGI
specification by automatically converting the value to a string.  Apache,
however, *is* strict, and considers this a 500 Internal Error

Fixes bug 1306963

Change-Id: I9b82ceee096b00c21c3b230dc67701bc40629968
Merge "Disable specifying alarm itself in combination rule"
Merge "Fix a response header bug in the error middleware"
Merge "Use the list when get information from libvirt"
Replace oslo.rpc by oslo.messaging

The patch replaces oslo.rpc by oslo.messaging.

The important changes:
- On the collector, the queue name and the topic are now the same
  (ie: metering, instead of ceilometer.collector.metering for the queue
  and metering for the topic)
- Same for the alarm partitionner the queue is no more prefixed by
  ceilometer.alarm.

Implements switch-to-oslo.messaging

Change-Id: Ia5e4ff1dd1d419c090b8039627234ae7f07e8660
More accurate meter name and unit for host load averages

Fixes bug 1307482

Previously, the SNMP reported load averages were misleadingly metered
as percentage utilizations.

Now, these samples include a meter name and unit that more accurately
reflect their true meaning - i.e. an exponentially-damped moving average
of the number of running or runnable processes.

Change-Id: I5dbc6f7886ed9a451926b502365ec80322f6b458
Remove duplicate alarm from alarm_ids

Alarm ids in combination rule is a list, and for now, we allow duplicate
alarms, the duplicate alarms are unnecessary to handle when evaluate a
combination alarm, and it is weird when print the combination rule.

This patch will remove duplicate alarm ids when user try to post or put
combination alarm.

Change-Id: Ic9392355e08834b4d01b0e421de1c77fed8ac5e4
Closes-Bug: #1304886