Re-instate security group delete test case

While fixing lp#956366, we realized that it's fine to delete a security
group referenced by an ingress rule of another security group because
the ingress rule gets deleted.

Re-instate the test for this specific case, but test that the ingress
rule gets deleted rather than an exception being thrown.

Change-Id: I81ad16431f5f8f13561dfcb320213366e1e8864e
Tweak security port validation for ICMP

Horizon allows for ICMP to be type:code.
Type and code can be from -1 to 255.

API refers to both EC2 and Nova APIs

This patch attempts to resolve:
1. API code throws exceptations when 0 is passed for either field
2. API code validates type:code like from->to range.  type and code
   are independent
3. Update unit tests for this new set of operations.

A side effect is that the following are allowed type:code.
-1:X
X:-1

The code assumes that -1 is a wildcard for the field.

bug 956967

Change-Id: Ieb6989815afc6986b72e0efc7611c2cc353ab5d8
Make sqlite in-memory-db usable to unittest

Move migrate monkey patch from nova.tests.test_migrations to
nova.db.sqlalchemy.migration

Change-Id: I018e44903558cad6311fd368787583322f962d0c
Implement quota classes.

Allows entire classes of quotas to be associated with projects, which
makes it easier to set specific quotas across multiple projects.

TODO:

* (?) Adding a mapping between projects and quota classes

Change-Id: I6b6477481187d16af225d33c1989430e4071d5a8
Don't send snapshot requests through the scheduler

 * If there is more than one volume host, snapshots need to be
   created on the host that has the volume.  Sending the request
   through the scheduler means that the snapshot will sometimes
   be created on the wrong host and fail.
 * Fixes bug 960437

Change-Id: If8562bd533226cf9aee1d3be522f799d233581a9
Fix unplug_vbd to retry a configurable number of times

Fixes bug 960655

A previous cleanup ended up changing the exception raised by unplug_vbd
which caused vbd_unplug_with_retry to fail to retry. Since it's common
to retry, bake that functionality straight into unplug_vbd for other
users too.

Change-Id: I3370c560a1997459ab37b9d5f1181464fa5b0f0c
Merge "Implement quota classes."
Merge "Don't send snapshot requests through the scheduler"
Modify nova.wsgi.start() should check backlog parameter.

Fixes bug 883292.

Forward ported from
https://github.com/ntt-pf-lab/nova/tree/openstack-qa-nova-883292

Change-Id: I8839851a72fcf0910a532d558ffe66a39a7db1e8
Only shutdown rescue instance if it's not already shutdown

Fixes bug 961507

Change-Id: Ib48d6ea3ad7c89e922cde8e0c0952d1bee2ca7bf
Fail-fast for invalid read_deleted values

Fixes bug 961588

Change-Id: Ib02d89485cdf4626698b959a2136841109cdc51f
Strip auth token from log output.

Fix bug 956777.

This patch updates _safe_log, which is used for rpc debug logs, to not
include auth tokens.

Change-Id: I36bb4233acd356f85b0e6006a6b812a67605b393
Clarify HACKING's shadow built-in guidance.

Change-Id: Icf38d3ec3254e83d2289b7b17966ec44d9757b8c
Fixed status validation. Fixes bug 960884.

Fixed the status value validation in os-hosts extension and added a negative
scenario in unit test for os-hosts extension.

Change-Id: Ib4166757561e531494a1a4d3070d7c8971b57dc5
Capture SIGTERM and Shut down python services cleanly.

This is the first step in clean shut downs. Does not yet support eventlet threads.

Change-Id: Ibcd26ed61cf56947a8bdbe291d87cb211fc1ccd8
Merge "Strip auth token from log output."
Merge "Capture SIGTERM and Shut down python services cleanly."
Rollback create_disks handles StorageError exception.

Fixes bug 961762

Change-Id: I146cecdd801a92b84adb4cc40bdf0a8c43950dd5
Imported Translations from Launchpad

Change-Id: Ia0c5a38248ca86809d8b22e4642049537da3a7b7
Avoid unplugging VBDs for rescue instances

Fixes bug 961524

Unplugging can only happen if the instance is running and that might
not be the case. So instead of unplugging the root disk VBD, just
ignore it when it comes to deleting VDIs.

Change-Id: Id6c01527befed7775fdd7a4d30d0d3bee1178c51