Fix root disk not be detached after deleting lxc container

Add teardown_container action when cleanup lxc instance to make
sure root disk be detached and no resource leak.

Fixes: bug #1208387
       bug #1203927

Change-Id: I063fd3a9856bba089bcde5cdefd2576e2eb2b0e9
Fix incorrect root partition size and compatible volume name

When using rbd backend, it needs to resize volume size if size presents. Else
we will get wrong image size.

Rbd volume always uses uuid as the main pattern of volume name, now change to
it is necessary.

Fix bug 1219658

Change-Id: I3dc8d639b066eac35d190b8d4687c41c9f4d5824
Fixes Hyper-V issue with VHD file format

The VHD format cookie signature needs to be checked in the footer
instead of the header as fixed format VHDs don't have a copy of the
footer at the beginning of the file.

Fixes bug: #1233853

Change-Id: Ibe44f0d895cde2edbc03dcd6ecebac24b0936660
Remove compute_api_class config option

This option was deprecated in Havana and can now be removed.  Its only
use was for changing out the API class if cells was in use.
Technically, it used to be possible to configure an arbitrary compute
API class.  However, that would have been an unsupported setup, and has
been completely broken since 9f902c7e17249cf5af1504f31d80c0247a02fe20
anyway.

As a part of this change, the cell_type configuration option needed a
default value.  I set it to 'compute'.  My reasoning was that you would
have more compute cells than API cells, so might as well set it to the
more common case.

Change-Id: I5ec44f84267a700da16b350e686eee886e0d1183
Check for None when cleaning PCI dev usage

The PCI manager needs to check for instance UUIDs mapped to
None when cleaning up it's internal claims/allocations maps.

Also adds a check so the claims dict doesn't map to None in
the first place.  There was already a check like this when
setting a value in the allocations dict.

Closes-Bug: #1238374

Change-Id: I7ac010f7d50ad85c145e536cfd48e07c8f4602d3
Sanitize passwords when logging payload in wsgi

adminPass (or admin_pass) can be either part of a json object or
an xml element or xml attribute. The patch includes
regexps to support all these cases and adds tests
as well

Change-Id: Ic119f986a03863c1d13b566b4c005f3bc77d83d0
Closes-Bug: 1231263
Handle MarkerNotFound better in Flavor API

When the specified marker is not found, we should catch the
MarkerNotFound exception and respond with a HTTP 400 Bad
Request with sufficient information back to the user. This
will avoid spilling unwanted tracebacks in the logs as well.

Change-Id: I90a658384f8814096271a193a0f3abd028062b5d
Partial-Bug: 1238519
populate local-ipv4 address in config drive

Currently the ec2 metadata in config drive does not include the
local-ipv4 address, because the address is not passed in when using
config drive.

This change uses the fixed_ips in network_info to populate the address
if the address was not passed in.

Fixes bug 1221664
Change-Id: I1b289bbbd7ebe103342909079d2488cf1dfbf472
xenapi: stop agent errors stopping build

We should still report agent errors, but they should not stop a server
from building, because that server still may be ready to use.

Once this change is in place, we can look to selectively add back in
certain errors that fail the build, as we decide what makes sense on a
case by case basis.

Fixes bug 1233548
Change-Id: I32b9e8dbc6e28a045ac8ef159afe1cf74b7ac6fb
Use `versionutils.is_compatible` for Nova Objects

Oslo's check is designed to support version checking for a number of different
existing use-cases, including this one.

Related-Oslo-Commit: d7d74a752e34d5249fa47c8e8252da491d46012a
Change-Id: I8e03c7781330b02deb7af815d68538b5c0245c4d
Send notifications on keypair create/delete

A service external to Nova may wany to know when users add or delete
keypairs.  This patch adds create and delete notifications to the
KeypairAPI.

Implements blueprint keypair-notifications

Change-Id: I8e0d74e73b1980689c11d9e3567b9883018951cc
Fix scheduler rpcapi deprecated method comment

A comment was added for 2.10 about deprecating a method.  It's not
necessary to bump the version... and the manager side wasn't bumped.
It's still at 2.9.

Just remove the reference to the 2.10 version.

Change-Id: I52857f5a2e472dbdf13b9b6a51a9e8f401ea6452
Fix i18n issue for nova/virt/baremetal/virtual_power_driver.py

There are some log messages in virtual_power_driver.py does not
support i18n, we need to update code to support it.

Closes-bug: #1228449

Change-Id: I6642309bd0e08e356a13d134ac0c743159af2520
Adds V3 API samples for attach-interfaces

Adds api sample tests and api samples for attach interfaces

Partially implements blueprint v3-api-unittests
Partially implements blueprint v3-api-specification

Change-Id: I54088cca1b83a8b92620062840606f2340a528c9
libvirt: add missing i18n support

There were some log messages that did not support the i18n
format.

Change-Id: Id75de9fb7be2924b431562b6bd527ede399c3d37
Closes-Bug: #1240022
Make XenAPI use Aggregate object

This makes the XenAPI driver use the Aggregate object for its work,
and avoids the need to call back through virtapi to conductor
directly. It also allows us to convert the two aggregate-related
compute manager methods fully to new-world objects.

Related to blueprint compute-manager-objects
Related to blueprint virt-objects

Closes-bug: #1232179
Change-Id: Ib38ab0e4d6feefebda37888f150752167474b693
Remove aggregate metadata methods from conductor and virtapi

The aggregate_metadata_add() and aggregate_metadata_remove()
methods are no longer needed in virtapi and conductor. This
patch removes them from the former and deprecates them in the
latter. Also, aggregate_get_by_host() is no longer needed in
virtapi, so remove it from there.

Related to blueprint compute-manager-objects

Change-Id: Ia057dcc43c555187a4a1466a9e748b978c46d4a4
Fix DB API mismatch with sqlalchemy API

We added a sqlalchemy columns_to_join argument to the
security_group_get_by_name() method, but didn't punch it through
the toplevel DB API. This patch adds that so that they match.

Change-Id: I6fe8d876834036e6fbd79d60f3d7d696d7cf4b83
Make SecurityGroup receive context

This fixes the SecurityGroup._from_db_object() method to take and set
a context, like most everything else.

Change-Id: Ie86df2cf264a1e75353599a8f9f693ef5fb15bc5
Merge "Fixes Hyper-V issue with VHD file format"