Restore libvirt block storage connections on reboot.

Fixes bug 1036902.

There are a number of cases where block storage connections are not
properly restored, impacting libvirt in particular. The most common
case is a VM which has block storage attached via iSCSI, whereby the
physical system is rebooted. When the system comes back up and
starts nova-compute, the iSCSI connections are NOT recreated for the
instances slated to be resumed (assuming
resume_guests_state_on_host_boot is set).

The patch changes the compute manager to pass block_storage_info via
driver.reboot() and driver.resume_state_on_host_boot(). The fix is
actually only present in the libvirt driver. However, all the other
drivers were updated to accept the additional, optional function
arg.

With the changes in place, iSCSI connections for libvirt are
re-established after a hypervisor reboot with
resume_guests_state_on_host_boot=True and on every hard_reboot.
The latter is intended so that users have a last ditch option for
recovering their VMs without administrative involvement.

Change-Id: Idf5d53f21991a359bec6ce26ae9fe3bd61800ce3
Move volume size validation to api layer.

As per the discussion on this patch:

  https://review.openstack.org/10540

Change-Id: I5d3031a08aa1e2d17b5fb233ebaec938c66fa88b
Remove unused function in console api

Remove _translate_id_if_necessary from nova.console.api since its
now using instance_uuid and this function is not used anymore.
Complete fix for bug 1014796.

Change-Id: I1350497541ca6571b38a05d66ca3c5498d63a9b5
Fix spelling typos

Fixes for:
* nova/*py
* nova/scheduler/
* nova/compute/*py
* nova/api/ec2/

Change-Id: I7bec89b3551eda84d596e55eeba9ccb9d944a5cb
Fix PEP8 issues

Fix some PEP8 issues in doc/ext/nova_todo.py and doc/source/conf.py
and make the code look more clearly.

Change-Id: I2b0ce1b09a4a707cffaa565747aabd5346eb9f41
Refactor extra specs matching into a new module

We want AggregateInstanceExtraSpecsFilter to have the same extra specs
matching semantics as ComputeCapabilitiesFilter, so split the code out
so that it can be reused.

Change-Id: I6938c70f7272956eb27a6609546c3e20ec0dd99e
Disable I18N in Nova's test suites

Messages translated into other language like Chinese cause some
unit tests to fail.

Fixes LP bug #1037946.

Change-Id: I01d04333d28bab52d6f424432524b206f3845fba
Make missing imports flag in hacking settable.

Change-Id: Ib1ada320588eb42370c9fa2c0eff4eb888258ea5
OpenStack capitalization added to HACKING.rst

Along with capitalization fixes to comments in code

Change-Id: I72ddc582001f80d954ca5a121903c689f40d08d1
Makes sure instance deletion ok with deleted data

Commit 5ad1dea4 added changed the network deallocation code to
work with deleted instances. This was done by setting the context
to read deleted records. Unfortunately this was done a little too
broadly, leading to a new bug where a deleted floating_ip will
cause an instance to not be able to be deleted.

This fixes the issue by limiting the use of read_deleted context
to only the places it is trying to access the instance record. It
adds a test  to verify that the code works with a duplicate
deleted floating_ip and updates the existing test for a deleted
instance to exercise the entire code path.

Fixes bug 1038266

Change-Id: I1aef94369e5bcf951e78e89b1eded5305cf36b53
Return HTTP 422 on bad server update PUT request.

This patch updates the /servers API and the disk config
extension so that they properly handle incorrectly formatted
server update/PUT requests.

Includes a new test cause that verifies (with extensions enabled)
that a poorly formatted PUT request to /servers returns HTTP 422
instead of a 500.

Also updated the previous test_create_missing_server test to use
test.TestException instead of Exception.

Fixes LP Bug #1038227.

Change-Id: I6b11602790778465348647bb5825b7326d50065a
Remove hard-coded 'admin' role checking and use policy instead

bug 1037786

This change removed hard-coded 'admin' role checking, and use policy check to
decide is_admin at the time of context construction. And also set
default admin role to 'admin', in policy template, to keep backward
compatibility.

Change-Id: I56b45bfdfba1b8e1391bde7fec3d4cf26c66324c
Merge "Restore libvirt block storage connections on reboot."
Merge "Make missing imports flag in hacking settable."
Merge "Disable I18N in Nova's test suites"
Merge "Refactor extra specs matching into a new module"
Merge "Remove unused function in console api"
Merge "Fix spelling typos"
Merge "Move volume size validation to api layer."
Fix is_admin check via policy

When we create an admin context internally, we need to make sure
that all of the policy actions that are available to that context
are still available. This wasn't working in some cases because
we were looking for a hard-coded role called 'admin'.

Fixes bug 1039093

Change-Id: I939f834a63c9e6e6e7c87b115bd469466da66a69