Fix more OS-DCF:diskConfig XML handling

Add handling in the deserialisation code to handle the
OS-DCF:diskConfig attribute in the rebuild and resize actions so
the diskConfig extension can handle it properly. Formerly only
the older auto_disk_config attribute was managed (and incorrectly so).

Fixes bug 1153133

Change-Id: I68479d258cf23083274dd21b1f9eabab2feeb093
Return error details to users in "dns-create-private-domain"

Fixes bug 1135539
When SysLogHandler is configured in UDP socket mode, the user
who doesn't have the admin privilege got the unexpecting internal
server error(HTTP 500) in "nova dns-create-private-domain" command.
This bug occurs as the call graph drew below:

|--ProxyCallback._process_data():amqp.py
                          |--LOG.exception()
                          |    :
                          |    |--BaseHub.switch():hub.py
                          |                 |-- clear_sys_exc_info()
                          |
                          |--ctxt.reply(None, sys.exc_info(),..)
                                       |
                                       :
                                       |
                         |--serialize_remote_exception():common.py
                                       |--failure_info#(None,None,None)

The sys.exc_info() is cleared by the clear_sys_exc_info(), but it is
called again by the ctxt.reply().
This patch prevents the internal error and returns the details of
the forbidden error(HTTP 403) which is expected.

Change-Id: I76d4a938e66bfaf44423f7586e00db2caf9f5dde
LibvirtGenericVIFDriver update for stp

Fixes bug 1129055

The patch will set the stp status as 'off' and the bridge
forwarding delay to 0.

Change-Id: Ie9c96caa797de623ef0b357c61f1b7233a7d869e
Make ssh key injection work with xenapi agent

If there's 'key_data' on an instance, and instance is not Windows, use
file injection to inject /root/.ssh/authorized_keys.  If a user
specifies their own /root/.ssh/authorized_keys via 'injected files',
that will take precedence.

Fixes bug 1152713

Note: Images for Xen that use nova-agent will need to have /root/.ssh
pre-created with modes 0700 on those directories.

DocImpact

Change-Id: I190c6b3f67099061b5316baa45b8bfcd1a5e53f6
Fix issues with cells and resize

There are cases where compute API resizez() is called with 'flavor_id'
as a positional argument, so we need to fix up the cells_api version of
resize() to more closely match the super class.

Also: A recent change for storing instance_type info in system_metadata
happened to make an incorrect change, assuming cells_api was for child
cells.. which it's for the API cell.  It needs to pull the instance type
from the DB just like the super class does.

Fixes bug 1154843

Change-Id: Ifdf2a68c3bff6d27d5f192e2eb73f9b79804c2c7
Check keypair destroy result operation

This checks the result of delete operation over keypairs to see if it
affected any row (this is what delete returns), if not raises
KeyPairNotFoundException.

Also adds tests for keypair db api.

Fix bug 1086980

Change-Id: I7e822c0661c563db01040ae2d57aacfe677d72b0
Update migration 153 for efficiency.

Currently migration 153 inserts 10 rows per instance in the database.
For new/small installations this is relatively quick, but for large
installations this can take some time.

This change modifies the migration to only insert records for
non-deleted instances and makes bulk inserts (10 rows are inserted
with each query, instead of 1 per query) for added speed.

Fixes bug 1155371

Change-Id: I88a6cec2c117368fda6eefd82150106a1542027d
Reset migrating task state for more Exceptions

There are a number of exceptions that can occur during pre
live-migration checks, and they should reset the task state to None when
they occur since they prevent the migration from beginning.  This adds
two more exceptions to the list of exceptions that just need to reset
the task state rather than set the instance to error.

Bug 1100462

Change-Id: I95e09f49908fbc3a79f5d2eb490d5a0b3296a6ed
Fix use of libvirt_disk_prefix

The code supporting libvirt_disk_prefix was dropped during the
refactoring work in commit 7be531fe.  This patch re-enables
support for this option, along with a test case to verify it.

Change-Id: I84f059e2b35d9237b799236032de5c272a03a451
rstrip() strips characters, not strings

Fixes bug 1155761

This use of rstrip() could end stripping off more than just the ".gz"
suffix if the filename contains any of the ".gz" characters at the end
of the string.

Change-Id: Id75388453f286ca7b05bab51c9826c43c10ef516
Store project_id for instance actions

When packing values to store for an instance action, include the project
id from the request context.  This allows tracking which tenant has
performed an action.

Bug 1155801

Change-Id: I07b986655581fd6fbfdced90eb3151019f18ada7
Add standard methods to the Limits API

- Added create, delete, detail, show, and update
  stubs to the Limits API
- Added unit test cases
Fixes bug 869877

Change-Id: I112a8016ff2cf83009b3bcfe2fe6307568ce7334
Revert "Remove the usage of instance['extra_specs'

This reverts commit 76c47c1c3057d5ee479cf1e55b803f5ac9faba1d.

Fix libvirt vif get_config interface breakage.

In 76c47c1 we added a new arg to the libvirt vif driver get_config
interface (instance_type=None). We did not update all the libvirt
drivers to use it however which can break things badly (instances
fail to spawn, etc). We clearly need more test coverage here as well.

This should fix SmokeStack.

Fixes LP Bug #1155950.

Change-Id: I073d119ea2bfd5c314d2d8c8bbf2f6d7d649753a
Imported Translations from Transifex

Change-Id: Ibb55a14b6ec8b30f7c478d7b999ea93c825aebe4
Remove unused virt.disk.api methods bind/unbind

The bind and unbind methods were only used by the old LXC
attach/detach volume code which was removed in
https://review.openstack.org/17861 (commit
b8831091a8d097bb55a0e65c3af254a8bfa88811). Remove them.

Fixes bug 1156127

Change-Id: I37b0344970415fe93faabd955b4b4db88de269db
Merge "Make ssh key injection work with xenapi agent"
Merge "Update migration 153 for efficiency."
Merge "rstrip() strips characters, not strings"
Merge "Store project_id for instance actions"
Merge "Fix use of libvirt_disk_prefix"