nova-manage: remove redundant 'dest' args

Includes a hack to calculate 'dest' from the argument name. This hack is
removed in a later commit.

Change-Id: I60567ff232ab7699f3234b3bfc1618a17a648976
Prevent nova services' coverage data from combining into nova-api's

Now if combining a coverage report once, nova services' coverage
data are combined into nova-api's.
This renames nova-api coverage datafile to .nova-coverage.api and
creates a new coverage instance to combine when reporting.

Fixes bug: 1152475

Change-Id: I90b6535d490cf0123a127f8752986edd782ef37e
nova-manage: remove unused import

Unused since commit 9ff3121b

Change-Id: I76bb49669d1cdfc3bf5b1c20087b4bd77420cd91
Prevent volume-attach/detach from instances in rescue state

Rescue is supposed to just be a way to log into a wayward instance
if something goes wrong with the base image that may have had some data
(logfiles etc.) and make it possible to grab that  - block devices are
assumed to be accessible by re-attaching them, and are considered
persistant so no need for rescue there.

Since there is no need to attach a volume in rescue mode, and detaching a
volume that was previously attached doesn't work, just ban volume
attach/detach in rescue state.

Fixes bug 1126187

Change-Id: Ifdf164155942cdeb2bbdfcd1dce0dd2e125b507c
Pass project id in quantum driver secgroup list

The quantum driver is always returning security groups from every tenant
a user has access to, even when the "project" filter is supplied.

Make sure we pass along the project value when we call
quantum.list_security_groups() so it's properly filtered.

Fixes bug 1155381.

Change-Id: I682c66a1f3f9db18b5f9924a37b45c759ff259f7
Enable tox use of site-packages for libvirt.

Enable the use of site-packages in tox which will allow the use of the
system install of libvirt while testing.

Hardcode the libvirt host UUID for tests that check this UUID when
system libvirt is being used. Without this hardcoding eight tests
would fail when using the system libvirt install.

Partially fixes bug #1113181

Change-Id: I59c5fbd45639962c0963298203c39759b6ca2d11
Ensure that headers are returned as strings, not integers.

The 'Retry-After' header was set as an integer, and it was causing that
mod_wsgi failed with a 500 error, instead of the actual error. This
ensures that the headers are converted to str.

Fixes bug 1155585
Change-Id: If1b1de2308ccdc6f0588c8df5dc896fe5f767dbe
Add missing tests for db.service_* methods

There was no tests in test_db_api for service_* methods.

Add tests to ensure that all works. Also these tests allow us to refactor
work with session in these methods.

blueprint db-api-tests

Change-Id: I0c3b233e1290f08ea01a8c64eacb95af1eae6f24
Fix multiple fixed-ips with quantum.

This patch fixes a bug in the quantum suppot where multiple requested
fixed-ips did not work.  Every network interface would be given the last
fixed IP that was specified.  The problem was just the lack of putting
the right fixed ip in a local variable.

Fix bug 1154093.

Change-Id: Ie7e034e19a38c8431540c81b023ff4800aa6ec50
Add missing tests for db.virtual_interface_* methods

There was no tests in test_db_api for virtual_interface_* methods.

Add tests to ensure that all works.

This allow us to refactor these methods to use soft_delete instead of
delete.

Found bug 1156227 in sqlite we have lost UC on virtual_interfaces.address
after 152_* migration. To fix it we should add new db migration, so it will be
fixed in Havana-1.

blueprint db-api-tests

Change-Id: Ide03163b230762d65bf3cd7b5fe8f0a303fea5ae
Fix missing argument to QemuImageInfo

set the default value for cmd_output to None. _parse
does work fine with None or empty string

Fixes LP# 1157412

Change-Id: Ib63f2fd227633b96db613ce29563d1929536819a
Fix console support with cells

The (relatively recent) security fixes for consoleauth do not work
with cells because consoleauth and the compute manager for the instance
talk to different rabbit servers.  consoleauth is in the API cell and
the compute manager is in a child cell.

This patch adds code to proxy the following via cells:

1) compute -> consoleauth's delete_tokens_for_instance()
2) consoleauth -> compute's validate_console_port()

Also: On instance deletion when the compute manager tells consoleauth to
delete tokens for the instance, it's not necessary to do an rpc.call and
block.  The only purpose it could serve would be log a traceback on failure
on the compute manager side, but that seems unnecessary.  There's no
return value.  This patch changes it to an rpc.cast instead.

Fixes bug 1154755

Change-Id: Ic763f2a5c0dcff7b7ccfac5927680e7881605f61
Refactor db.service_destroy and db.service_update methods

Remove session parameter from db.service_get method

Optimize db.service_destroy:
Was:
1 request with join to get service with compute_node
1 request to delete service
1(0) to delete compute_node
Now:
1 request (without join) to delete service
1 request to delete compute_node

Optimize db.service_update:
Remove unused join.

Fixes bug 1157442

blueprint db-session-cleanup

Change-Id: Ifcc8fdebfc95daec736464cbc9e16301116540aa
Merge "Ensure that headers are returned as strings, not integers."
Merge "Prevent volume-attach/detach from instances in rescue state"
Merge "Fix console support with cells"
List InstanceNotFound as a client exception

get_instance_nw_info() in nova.network.manager should list
InstanceNotFound as a client exception for rpc. This to prevent the
rpc layer from logging a traceback when this exception is raised.
This is an expected type of exception that should be left to the
client to handle.

Resolves bug 1157411.

Change-Id: I6735fb8a386f2256ac8af0ce7fdb36ef7a00b6ce
Update the network info when using quantum.

The network info cache in quantum was not updated with floating ips.
Also it wasn't updated properly updating the network info cache
during some operations that changed it. This adds floating ips and
updates the cache properly.

Fixes bug 1108975

Change-Id: I9e9c211d014f9671d724cded1fb9a74313c458b6
fix add-fixed-ip with quantum

bug 1157439

code was ignoring existing IPs on a port when adding a new IP.

Change-Id: I11f3c81eafc6c7d44772c3c8aea3b14f4b6bc815
Merge "Add missing tests for db.service_* methods"