Shrink devref.unit_tests, since info is in wiki.

Don't keep a copy of the run_tests.sh flag list here since it
inevitably will get out of sync with the real list.

No need to go into detail on how unit testing is set up, since we already have a wiki
on how to run tests that applies for all OpenStack projects. Keep
section with tox examples since that is the most commonly used command.

Change-Id: Ia8eb059be164d9df3edfd69aedcebfd028da45ff
Related-Bug: 1219040
VMware: remove unused parameters in imagecache

Trivial patch to remove some unused parameters in
timestamp_cleanup().

Change-Id: Id3c6e8c6c504591fdf09e8871cf3358d265a678c
Add testing for hooks

Partially implements: bp instance-network-info-hook

Change-Id: Ie7cfcf70ff39f1273d97b17788c2e4e0f9fc437f
Make get_console_output() use objects

This changes the get_console_output() method in compute manager to take
objects.

Related to blueprint compute-manager-objects-juno

Change-Id: Ia8cb2168313903d5255fa2c9616ee2a56aebdb68
Network: ensure that ports are 'unset' when instance is deleted

Commit a141206e9dfd31955b9b31d9e5a7f73bbd8510ca ensured that user defined
ports were not deleted when an instance is deleted or rescheduled. The
problem with this commit is that it did not reset the 'device_id' and
'device_owner' of the port. This leads to port leakage and eventually a tenant
is unable to launch any instances as their port quota has exceeded the
allocated amount.

The solution is for the deallocation to reset the 'device_id' and the
'device_owner' of the port. This is allocated when the port is actually assigned
to an instance.

In the case of minesweeper (which runs on OpenStack), the tenant was leaking ports.
The root cause was that the user defined ports were assigned to a specific instance,
which was deleted, as a result of a failed reschedule (which is legitimate).

When an instance is deleted all artificats of that instance should be reset on the
port.

Change-Id: Ie1516c299ce6d79faf2d5103a14d6d8931d3ede2
Closes-bug: #1321381
Revert "Allow admin user to get all tenant's floating IPs"

This reverts commit 6478554f531f6ee2fa86226fbc79dd31e556bc06.

This API change merged as a bug fix and introduced bugs and our API
change policy is more or less to go through the blueprint/nova-specs
review process:

http://lists.openstack.org/pipermail/openstack-dev/2014-June/037536.html

So reverting this so it can go through the blueprint/nova-specs
review process.

There should be minimal impacts to removing this (broken) API since
it merged not too long ago and was added strictly for Ceilometer's
usage, not an external deployer that would be (more) broken by this
API removal.

Closes-Bug: #1328694

Change-Id: I22a711795ea616aabc155a71703c9c794e84a5dc
Test force_config_drive as a boolean as last resort

The force_config_drive help clearly states that only possible option is
'always' but folks are setting it to 'True'/'False' etc and expecting
it to work. So let's enable that as well. In the worst case scenario
mentioned in the bug, it was set to 'False' and since the check for
force_config_drive took any string as true, we were enabling the flag
to true. With the change in this review, we force a conversion of the
string to true. Additional check for the flag to be set as 'always' is
treated as true as well. The test case checks for all the variations

Closes-Bug: #1319180
DocImpact

Change-Id: Ifa6348fa7dfd9de063eb13d30e3ddf94fa530b57
Check the network_info obj type before invoke wait function

When instance schedule to host and it isn't first time schedule,
the instance may already allocated network. And then the code
will return an NetworkInfo object, not an NetworkInfoAsyncWrapper.
The checking code only assume it is NetworkInfoAsyncWrapper object.

Change-Id: I987902fc47e509e4fd08f762d66b16c09eaf5008
Partial-Bug: #1326207
Sync "Prevent races in opportunistic db test cases"

This sync change Id82090743e8b93f6c960de066fd05d8a2f9fb934 from
oslo-incubator

Opportunistic db test cases create schemas on demand, so that each
test case which inherits the base test case class, will get its own
db schema (i. e. races between tests are not possible).

In order to do schema provisioning we have to connect to RDBMS server
first. So far we've been connecting to the openstack_citest database,
which is guaranteed to exist on CI nodes. It turns out, there are a
few test cases in Nova (maybe in other projects as well), that drop
and recreate the openstack_citest database. If they happen to do that
when the opportunistic db fixture is in the middle of provisioning a
schema, those tests will fail (as there is an open session to the
database and thus it can't be dropped).

This can be solved easily by changing the way we provision new
schemas in opportunistic db test cases as actually, we don't have to
connect to the openstack_citest database at all:

 - for MySQL we can use an empty db name to connect to MySQL server,
   but not to a particular database
 - PostgreSQL requires us to specify the database name. We can use
   the service postgres database here (PostgreSQL shell utils such
   as createdb, createuser, etc use it for the very same reason)

Partial-Bug: #1328997

Change-Id: Idc62b24b6ae51ea14f10e39d7b14115e36069637
Merge "Revert "Allow admin user to get all tenant's floating IPs""
Merge "Test force_config_drive as a boolean as last resort"
Merge "Make get_console_output() use objects"
Merge "Shrink devref.unit_tests, since info is in wiki."
Merge "Add testing for hooks"
Merge "VMware: remove unused parameters in imagecache"
Merge "Network: ensure that ports are 'unset' when instance is deleted"
Merge "Sync "Prevent races in opportunistic db test cases""
Merge "Check the network_info obj type before invoke wait function"