Use a fake coverage module instead of real one.

Actually loading the coverage module was leading to odd concurrency
conditions where it was interfering with mocked calls. This changes
to stub out the coverage class with a fake one so that we don't have
to worry about collisions. It also modifies the coverage class to be
created lazily so it isn't automatically started at import time.
Finally it removes the hack in run_tests.sh ignoring the coverage
tests.

Fixes bug 1131023

Change-Id: I39de434454f8b0903f6311e731e215a93027bc91
Add API Sample tests for Snapshots extension.

Partially implements blueprint nova-api-samples
Modifies fakes to produce a real timestamp
Fixes bug 1126211

Change-Id: I8973d50fa67abbf6f96684ff8a0b898912f09caf
Sync nova with oslo DB exception cleanup.

DB exceptions have moved to openstack/common/db/exception module so that
they can be shared with multiple DB implementations.

Deadlock checking was also added to oslo to consolidate with
DuplicateKey checking.  This allows us to clean up our
_retry_on_deadlock decorator in sqlalchemy/api.py

Fixes unrelated pep8 issue with duplicate test in test_compute also.

Change-Id: I7e985b384d1ef345e0d67c919b84b4faff869699
Migration 147: Prevent duplicate aggregate_hosts

If an aggregate_host record is already present, then the `upgrade`
shouldn't attempt to add it again.

Change-Id: Ib7ab10fa7c166ccaa3df6a96eb08c7ebcd0af38c
Fix redefinition of function test_get_host_uptime

First test_get_host_uptime was missing a parameter that the
second test contains.  So remove first test.

Fixes bug 1133062

Change-Id: Id886f4e52f45505117fd8e7bf30bc4d77cacd47b
Fix hacking.py to handle parenthesise in from import as

Fix bug 1133070

Support 'from os import (path as p)'

Change-Id: Ie2e5b3150efb6f47b16978f3de64fca37e1717a6
Minor code optimization in _compute_topic

In cases where a valid host is passed, the if
statement is always executed twice, not once like it should

Change-Id: I6a24bb4f85bfb94d2fdc5d1652ee371f296a10ef
Migration 148: Fix drop table dependency order

The downgrade of 148 was broken because instance_actions_events has a FK
dependency on instance_actions but was attempted to be deleted first,
which caused the sqlalchemy to complain.

The fix is to reorder the table deletes in the downgrade.

Additional cleanups:

* Remove unecessary exception handling which masked errors

Change-Id: Iaac77ba0e81071f6bb39e5cc3b599a4138eb3cd2
Add missing import to fakelibvirt.

This module calls time.sleep(1), but was not importing the time module.
This fixes it.

Fix bug 1133056.

Change-Id: Ifbba2a98ccdd8d5e26ce466831618ccab9e0b462
Retry floating_ip_fixed_ip_associate on deadlock.

Update the floating_ip_fixed_ip_associate method of the sqlalchemy db
API to retry if it fails because of a deadlock.  The decorator that
handles this was introduced in e53e22271ed7e7a9b919d817a8eb50a1ecce16f8.
The related bug report shows that this method could benefit from the use
of this decorator.

Fix bug 1090016.

Change-Id: I0159470e6eb2f8017bcb3e659e7b119194dda920
Allow zk driver be imported without zookeeper

The zookeeper python module isn't widely available (e.g. not available
on Fedora), so allow the zk servicegroup driver be imported even if the
module isn't found.

This helps allow the generate_sample.sh script generate a sample config
file even without zookeeper installed.

Change-Id: Ic3b3bb75bcd2003150909ebd2c5724fa5093c346
Unpin Cheetah dependency version

Fixes bug #1133216

We've been pinned to the same version of Cheetah since May 2011:

  Cheetah==2.4.4

this was released in December 2010 and there hasn't been a release since:

  https://pypi.python.org/pypi/Cheetah/2.4.4

There's no particular reason to believe a future release of Cheetah will break
us (only 6 commits since 2.4.4 and they all look like bugfixes), so we should
change to:

  Cheetah>=2.4.4

Change-Id: Id3b22b84d2d693776f89ccb1d0c99d4e42fcab62
Unpin suds dependency version

Fixes bug #1133247

suds is used by the vmware driver and the dependency has always been
pinned to 0.4:

  67e63ba8 (Sateesh Chodapuneedi 2011-03-07 18:10:48 +0530 17) suds==0.4

0.4 was released in September 2010 and there hasn't been a release
since. In fact, there has only been 16 commits since then and none of
them look to break the existing API.

If there's no reason to expect the next version to break us, we should
unpin. Indeed, we want to know early if upstream does break its API.

Change-Id: Icd2bdd021093293b2e4261a00d063239a3c42ce6
Merge "Minor code optimization in _compute_topic"
Merge "Allow zk driver be imported without zookeeper"
Additional tests for safe parsing with minidom

For nova, forbid_dtd is going to be true always, however
if someone picks up this code and tries forbid_dtd = False
then the existing code is not good enough. we need to protect
against external entities/dtd and not allow notations as well.
Added a few more handlers and test cases to cover that use
case.

Change-Id: If50f690e015f2bf837b403edf552e35d7af8c907
Revert IP Address column length to 39

In change I35d4565389d03fce86103289cf6447f824efeba0 we changed the cidr/ip
address column size to 43 to be able to support ipv6 cidr values, although ips
doesn't need that much space so we're reverting it to keep it consistent.

Change-Id: Icd2d727fd0733ee0db23c1fa431df4b982cae7b4
Merge "Sync nova with oslo DB exception cleanup."
Update OpenStack LLC to Foundation

Update all references of "LLC" to "Foundation".

Change-Id: I009e86784ef4dcf38882d64b0eff484576e04efe
Merge "Add missing import to fakelibvirt."