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
Fixes bug 957708.

Work around bug in netaddr 0.7.5
https://github.com/drkjam/netaddr/issues/2

Change-Id: I3e064860c3865d5029481e6d63c5284d275a0081
Open Folsom

Switch version to 2012.2 to formally open Folsom.

Change-Id: If2e9e624a13444e4cb6a08f3bb76ca3027d7ef46
Fixes bug 949038

Make the api calls better fit the standard pattern where
read_deleted can be changed using context.read_deleted

I have retained the ability to pass read_deleted
explicitly. If that is not specified, it uses the value in
the context.

Note: read_deleted defaults to "no" in the context.

The two exceptions are:
 aggregate_host_get_all
 aggregate_get_all

In this case, it is better for read_deleted=yes to be the default
So in this case the context cannot be used, as that would default
to read_deleted=no. In this case you must explicity override
read_deleted, the context is totally ignored, as before.

Change-Id: Idb048a592d8c6b788651d131a3345e70989c0ec4
Merge "Fixes bug 957708."
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
Merge "Fixes bug 949038"
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