Avoid reading real config files in unit test

When we call oslo.config.cfg.CONF(), it will do basic setup and
search configuration files under certain directories, by default,
they are [/etc, /etc/ceilometer, ~/, ~/.ceilometer]. However, we
should avoid such behaviour when we run unit test code, because that
if the system has run devstack or installed ceilometer services,
then /etc/ceilometer/ceilometer.conf will exist, then unit test result
can be different.

So we should mock the default searching directories of cfg in the
begining of all unit tests, which will call cfg.CONF() at somewhere
during the test. The best place to mock the default directories
can be ceilometer.test.base.BaseTestCase, which should be used as
parent class of all other test classes.

Note: since this patch sets default searching directory to
{repo}/etc/ceilometer, you can run the unit test with different settings
which are set in etc/ceilometer/ceilometer.conf (not tracked by git).

Note: mock.patch.stopall has compatibility problem with oslo.fixture,
so this patch slightly refactors the
tests.compute.pollsters.base.TestPollsterBase.setUp method.

Change-Id: I533ffb2ba2c9be0223cecbcf04176312e4a96369
Closes-Bug: #1328550
clean up sample index

- ensure foreign key columns are indexed (InnoDB adds these
indices implicitly so make sure index doesn't already exist)

Change-Id: Ia40c226ffea54cb07980864f0df1cb186dafd352
use urlparse from six

- six provides compatibility support for urlparse. lets use it.
- cleanup import lines to be consistent.

Change-Id: I655b64888a29dc1f34e51216f06b83e84fe25970
Fixed various import issues exposed by unittest

Tried running the unit test stand-alone(e.g. using testtools.run), and
it exposed various 'import' issues about the oslo.config options and the
modules, in both the test cases themselves and the ceilometer module.
This patch fixed those import issues.

Change-Id: I68f30d335ee8d0d63c451116274632287a9ec77f
Closes-Bug: #1328796
Fix F402 violations and re-enable gating

F402 got stricter in hacking 0.9, so fix new violations and
re-enable gating.

Change-Id: I81a1b14311ea6dc7f01353aa27d1f18f1aec8e81
Remove meter hardware.network.bandwidth.bytes

The metering is just the speed of nic, if the nic is Gigabit-NIC,
the value will always be Gigabit:) and it is better to shown in
the metadata.

Change-Id: Iaf95f4e9a0ff0a36fe1e8d03d5c87bf5b24bd24b
Closes-Bug: #1331001
Merge "Avoid reading real config files in unit test"
Merge "Remove meter hardware.network.bandwidth.bytes"
Merge "clean up sample index"
Merge "Fixed various import issues exposed by unittest"
Added osprofiler notifications plugin

As a default osprofiler notification driver in OpenStack
we are going to use notifier based on oslo.messaging.

These messages will send notification with event_type
"profiler.*" so we will be able to manage them separately
from other messages in "notifications.*"

Actually 1 osprofiler trace has a lot of notifications, so to be able
to retrieve them via ceilometer API in one request, we are using specific
specific resource_id, "profiler-<base_id>". We are using base_id in resource_id
case base_id is common id for all notifications related to one trace.

Implements bp osprofiler-plugin

Change-Id: Iefa98d479fc355343c96cdfa09f713a3ec0f47dd
Merge "Added osprofiler notifications plugin"
Merge "use urlparse from six"
Fix the section name in CONTRIBUTING.rst

The name of the section "If you're developer, start here"
has changed in the wiki, now is "If you're a developer".
This commit updates it to correctly refer to the
proper section.

Change-Id: Ida0406aab1af92687b9e8087a328a5f0e8ce1d9a
Merge "Fix F402 violations and re-enable gating"