Fixes Hyper-V Inspector network metrics values

The Hyper-V inspector is currently returning the wrong metric values. The
current values are the aggregated ones, which is not correct in scenarios
in which instances have more than one nic.
Furthermore, values were taken from the
Msvm_EthernetPortAllocationSettingData, instead of
Msvm_EthernetSwitchPortAclSettingData.

(cherry picked from commit 01190ccee364dc061038ef7d8f3cc701c8d447ba)

Change-Id: I669ff52a1be2ee56bf69aa3b680ab42fdcaf1cb7
Closes-bug: #1289014
Ensure user metadata mapped for instance notifications

Fixes bug 1284073

For pollster-originated samples related to instances, we apply a
mapping to the user metadata so as to ensure that there are no
embedded periods in metadata keys and also to exclude any metadata
not matching the configured reserved namespace.

Now this logic is also applied to user metadata for samples derived
from instance-related notifications in order to avoid failures when
persisting these data in mongodb.

(cherry picked from commit ddeb54bb0d2c4203332a5ecc09a4aedfce353a4c)
Change-Id: I77eab59023fa23c5879b05c948bd4cb1db7fa177
Use known protocol scheme in keystone tests

With the recent introduction of the identity_uri in keystoneclient,
there is a small backward incompatible change which means that weird
protocols like the ones we use during tests aren't support properly
anymore. The patch replaces "foottp" and "barttp" by "file" hopefully
keeping testing coverage the same.

Change-Id: Idb30ff3ee0ca50911e453899ad32e630f9b18724
Closes-Bug: #1309092
(cherry picked from commit e5b7606eaa94033256eb1aca5f6a6eed4f9e54a0)
(cherry picked from commit a1ec218d683e27434a5b085f1fbc7e3c13b60684)
Bump stable/havana next version to 2013.2.4

Change-Id: I417ebd3e87ae9d4e2c207c59298a205554536fa0
Merge "Bump stable/havana next version to 2013.2.4" into stable/havana
Allow alarm threshold value set to 0

Currently, if we set alarm threshold value to 0, it will return 400
with threshold_rule/threshold is mandatory, which is not suitable.
This patch corrects the check to only fail if mandatory field is
not set or is None.

Change-Id: Id141937337435f41fa7c246d8f0485fdd3bb118b
Closes-Bug: #1313492
Fix testing gate due to new keystoneclient release

As new keystoneclient version was released, token now
requires 'expires' field to be set.

Change-Id: I57a7746d24b82763824a02ac3d02049b055288c7
(cherry picked from commit 5a78832251e8cdf2dfbcc8b3a24ad8c4e7e3439c)
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
(cherry picked from commit de8176fa736ffa9c4d6b0a57a8db2f58083f124a)
Ensure routing key is specified in the address for a direct producer

This change is already merged in oslo-incubator.  Note that for
Ceilometer this is an Icehouse-specific patch since master has already
been updated to use the oslo.messaging library.

Original commit message body includes:

    Porting this fix from oslo.messaging.  This fixes the impl_qpid.py
    driver to allow it to work with the latest stable upstream QPID broker
    (version 0.28).  See the Apache Qpid Jira bug
    https://issues.apache.org/jira/browse/QPID-5557

Change-Id: If71f78e50f8a9b3acfd1e9d02c8271f17c4ebee7
Related-Bug: #1300318
(cherry picked from commit 096106f72fad5975bd0cb8ffa3447931c8fee9f5)
remove token from notifier middleware

oslo-incubator sync to address the security bug
in middleware (as below).

notifier middleware is capturing token and sending it to MQ. this
is not advisable so we should filter it out.

Change-Id: Ia1bfa1bd24989681db1d2f385defc12e69a01f8d
Closes-Bug: #1321080
Use swift master

Swift is not available on PyPI, so use the tarball from master instead.

Change-Id: I1721804890423c242bb69697d2c42ca57d0871a4
(cherry picked from commit 28f6bee013c55ac9f4b4545293fd8849da45c961)
Merge "Ensure routing key is specified in the address for a direct producer" into stable/havana
Updated from global requirements

Change-Id: I2e0056a9c0514ed8697166827e5623e4cd3d913e
Sync RPC module from oslo

This change syncs the following patches from stable/havana oslo RPC:
- I67923cb024bbd143edc8edccf35b9b400df31eb3
- Ia148baa6e1ec632789ac3621c85173c2c16f3918

RabbitMQ: advance thru the list of brokers on reconnect

In RabbitMQ implementation, when using multiple rabbit_hosts, we don't want to
immediately retry failed connection for the same failed broker. This was not
the case in existing implementation though, where we've always attempted to
reconnect starting from the first broker in the list of candidates. So if the
first broker failed, we initiated reconnect to the same failed broker.

This change makes reconnect() implementation to select the next broker in the
list. This also means that non-failure reconnect attempts will also switch the
current broker. All in all, users should not rely on any particular order to
use brokers from the list, so this should not constitute an issue.

Qpid: advance thru the list of brokers on reconnect

In Qpid implementation, when using multiple qpid_hosts, we don't want to
immediately retry failed connection for the same failed broker. This was not
the case in existing implementation though, where we've always attempted to
reconnect starting from the first broker in the list of candidates. So if the
first broker failed, we initiated reconnect to the same failed broker.

This change makes reconnect() implementation to select the next broker in the
list. This also means that non-failure reconnect attempts will also switch the
current broker. All in all, users should not rely on any particular order to
use brokers from the list, so this should not constitute an issue.

Partial-Bug: #1261631
Change-Id: Icde6b3a1fa173be2a3ccc729b7ed739dd4f4aa11
Update ensure()/reconnect() to catch MessagingError

The error handling code that gets connections reset if necessary
caught ConnectionError. It really needs to catch MessagingError,
which ConnectionError inherits from. There are other types of
MessagingErrors that may occur, such as InternalError, and they need
to cause the connection to reset, as well.

This fix has already been merged into oslo.messaging.

--

Cherry-picked from oslo-incubator 234f64d608266f43d8856ff98c89ceba6699d752
See also https://bugzilla.redhat.com/show_bug.cgi?id=1086077

Closes-bug: #1303890
Change-Id: Ic5082b74a362ded8b35cbc75cf178fe6e0db62d0
Set python hash seed to 0 in tox.ini

New tox (>=1.7.0) sets a random python hash seed by default. This is
generally good for testing because it will help keep projects working
regardless of the hash seed, but ceilometer unittests don't currently
pass with a random hash seed so set it to the python default seed.

This change will allow us to use new tox again and remove the
restriction on tox<=1.6.1 to run unittests.

Redundant setenvs for specific test envs are removed to prevent them
from overriding the PYTHONHASHSEED value.

Note this change will need to be backported to the stable branches to
keep unittests there working with new tox as well.

Conflicts:
	tox.ini

Change-Id: Ibc613d77ad52d5f7d8d613f3dd66ffba4117ff72
(cherry picked from commit 860a2852ca92df20fa886cec2e75d753ac6e18bb)
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
(cherry picked from commit f55e3510bbee39d3101fcbf2283fc037c7a42c99)

Change-Id: If4950d05213a345900b3450c83450345e04560fc
Merge "Fixes Hyper-V Inspector network metrics values" into stable/havana
Merge "Fixes Hyper-V metrics units" into stable/havana
Merge "Disable specifying alarm itself in combination rule" into stable/havana