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 some spelling mistakes and a incorrect url

Change-Id: Id122cd98d133496e423847274d7abdbfd54262af
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.

Change-Id: I669ff52a1be2ee56bf69aa3b680ab42fdcaf1cb7
Closes-bug: #1289014
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
Add user-supplied arguments in log_handler

When using PublishErrorsHandler, it will missing user-supplied
arguments. For example, do LOG.info("blabla %s", "foo"),
the payload only contains "blabla %s", but we expect it like
"blabla foo". this bug has been fixed in oslo, just syncs it to
ceilometer.
Sync from Oslo, change-id: I91289cc4a60f5dab89bca852e6f52b4b83831e47

Change-Id: Ic2773035f6899e1ba7ec2813f79bd271dfa36b97
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
Corrected the sample names in hardware pollsters

Closes-Bug: #1291146

Change-Id: Ied60325e073d315f1108c54cd7771c1656816e59
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
Updated doc with debug instructions

This commits adds some info about how you can use debugger in
ceilometer.
Currently testr cannot break into debugger, you have to use
alternative test runner to use it.

Change-Id: Ica68da3da5d8162765a79686d29ffd8d8d9cc85f
Add field translation to complex query from OldSample to Sample

Complex query returns the samples according to the new Sample model, but
it accepts the field names in the query expression only from the OldSample
model during the validation. This patch adds translation between the old
and new field names and translates the field names to the format of the
DB model.

Closes-bug: #1291415

Change-Id: I8ef71b6d43b82cd75f0d7a6ea08cdc8881ca62d3
add host meters to doc

we added meters to capture host stats. this patch adds these
meters to the documentation

Change-Id: I023c130c721ee74e53aa7a21489fe02d4b68a402
Rationalize get_resources for mongodb

Fixes bug 1288372

Previously the performance of the /v2/resources API without
constraints degraded sharply as the size of the meter collection
grows, regardless of the number of known resources.

We rationalize the underpinning storage driver method for mongo
so as to rebase the query on the much smaller resource collection.

This requires a subtle change in the semantic of the first and
last sample timestamps which decorate the resource representation.
These values are now defined respectively as being not later than
youngest sample, and not earlier than the oldest timestamp, known
for each resource.

In order to maintain support for "tight" timestamp constraints
on resource queries, we adopt a hybrid approach. For resource
queries without timestamp constraints, we optimize with a simple
query on the resource collection, but revert to a map-reduce on
the meter collection for timestamp-constrained queries.

The logic being that when one makes a resources query constrained
by timestamp, one is essentially asking a question about samples,
hence prepared to incur the cost of a query on the meter collection.
Whereas for other constraints (user_id, project_id, source etc.)
on the resources queries, one is more asking a question purely
related to the resources themselves.

Change-Id: Ifbf8932b4164f62bfda1cb3b8b9afe181051bc52
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
Ensure insecure config option propagated by alarm evaluator

Fixes bug 1292130

Ensure insecure (i.e. non-cert-verifying) access over SSL to
keystone works from the alarm threshold evaluator for
statistics queries and alarm state transitions.

Change-Id: Idb94fa96a6a8b32bd071af1f73fd3172ae6948ad
VMware vSphere: Bug fixes

- Fixed bugs in meter conversions i.e. converting the stat value queried
from vSphere to the one used for creating ceilometer samples.

- Switched the vSphere networking counters 'bytesTx/bytesRx' to
'transmitted/received'. The counters are synonymous, but the latter ones
are available since ESX 3.5 and former are available only in ESX 5.0
onwards.

- Added a null check in VsphereOperations._init_vm_moid_lookup_map()

Change-Id: I8691ce4ded7bdc824bd56427642f9dd87081727a
Implements: blueprint vmware-vcenter-server
Merge "Updated doc with debug instructions"
Make sure use IPv6 sockets for ceilometer in IPv6 environment

In IPv6 management network environment, ceilometer command will
throw 'Address family for hostname not support' when use WSGI
simple server. The root cause is python TCPServer implementation
is hard-coded to use IPv4, even in IPv6 environments. Python
community want to fix it in Python3.5, so we need to make a
workaround for it.

Change-Id: I3260a346a095b0f3e57093c18b1920dffe5ac55d
Closes-Bug: #1269243
Added documentation for selectable aggregates

Documented available aggregate functions
and added example syntax showing how to use
improved Statistics API, which allows the user to
selectively access aggregate functions. Also
documented the Capabilities API, which allows
the user to find out what functionality is supported
by their storage driver.

Closes-Bug: #1290924
Change-Id: I9739d2102baf6040de017843ae20391c4c9b6fff