Reject EC2 CreateImage for instance-store

For fidelity with AWS, we explicitly do not support the EC2 CreateImage
API for the analogue of instance-store-backed instances.

Change-Id: I266a021ce53dbb1f521201f1cdc614b08c31bf8d
Fix EC2 CreateImage no_reboot logic

Previously the call to restart the imaged instance was incorrect.

This is now fixed and unit tested.

Change-Id: Ifde193e084ecdbc37a57150f28d833ae276f49c6
Add git commit message validation to hacking.py

Adds N801: git commit title should provide a description

Change-Id: Ic6334b20f5f06631b7a5579a4d1b2303685463eb
Adds non_inheritable_image_properties flag.

Some image-properties should not be inherited from the instance when
taking a snapshot because we want that functionality to only available
for the base-image, not subsequent snapshots.

As an example, we would like 'cache_in_nova' fast-cloning to be
available just for base-images and not customer snapshots created off a
base-image.

This patch adds a new configuration which allows operators to, at
runtime, select which image-properties should not be inherited by newly
created snapshots.

Change-Id: I8d7781b05ffd71a59ba69fb7c3df4616cba94cce
fixes for nova-manage not returning a full list of fixed IPs

This fix correct the problem reported in bug 930193
nova-manage does not return a full list of fixed IPs. The reason
is that the call to fixed_ip['instance_id'] can throw exception
when fixed_ip does not have instance_id as its member. The changes
in this fix corrects the problem.
rebase to resolve the automatic merge issue.

Change-Id: Ic15a0a0f43f53b82f9d88a03803c96b44a8ddcb9
Updates migration 111 to work w/ Postgres.

Updates migration 111 so that we drop the aggregate_hosts_host_key
unique constrain by name.

Fixes LP Bug #1027453

Change-Id: Ibe36eace6a2d5d5a8d8d03d2cb170cbe0056320e
Avoid unrecognized content-type message

Fixes bug #904473

If the client does not include a Content-type header in its request
(which is normal for e.g. GET and DELETE) then eventlet will pass us
'text/plain'.

Because 'text/plain' isn't one of our supported request content types
we log:

  Unrecognized Content-Type provided in request

This can be an annoying red-herring for people debugging issues.

The reason that eventlet defaults to text/plain is because it uses
the mimetools.Message.gettype() method:

  Message.gettype()
    Return the message type [..] as specified in the Content-Type
    header. If no such header exists, return 'text/plain'.

The wsgiref web server has the same behavior, whereas mod_wsgi will
pass no content-type and twisted will pass an empty string.

Make our code more robust by treating the empty string or text/plain
as if no content-type header was supplied.

Change-Id: Ide117c807db0dc0f5cbe974788b604b5e236800a
Adding networking rules to vm's on compute service startup

Fixes bug 1027105

Restarting nova-compute resulted in a new empty iptables chain
"nova-compute-FORWARD" being create. This commit adds a single
call to plug_vifs which ensures the appropriate filters (and
bridge) are present on service startup.

Change-Id: I51cbb56acbb244ddddd951a26d3168cf5a9c0314
Remove unused add_network_to_project() method

This method was added here:

  https://code.launchpad.net/~tr3buchet/nova/multi_nic/+merge/64767

but appears never to have been used.

We can safely remove it and the 'force' parameter to network_associate()
which only it uses.

This removal from the network service RPC API would not warrant a
major version number bump since nothing ever used this part of the
API.

Change-Id: Iba3cf7b61b629ba513a58a38886c9322818accb5
Make it clear subnet_bits is unused in ipam case

In NetworkManager.create_networks(), the subnet_bits variable is unused
where 'ipam' is passed as a parameter - i.e. when the method is called
from QuantumNovaIPAMLib. This is because in the ipam case we never
carve up the IP range into multiple networks.

Move the variable around so that its usage scope is more obvious.

Change-Id: I2a1a2cb63f9864c15b33b30f1bf995a50a6ec067
Add image_name to create and rebuild notifications

Fixes bug 1027197

Without image_name in notifications, one has to use the image_ref
and hit glance again.
The create and rebuild functions already contain image_metadata, hence
adding the image_name in their notification can prevent additional
call to glance.

Change-Id: I3813eafa24b125575bcdceac8d30ab6bd909cfe4
Migrations for deleted data for previously deleted instances.

These migrations undelete metadata, system metadata, and block device mappings
that were deleted when instances were deleted before the change:
0598db0a6c66eb2b6d2e0e3f0b3b2b921ebe8621

Before that change; metadata, system metadata, and block device mappings were
deleted when and instance was deleted, this is no longer the behavior.
These migrations undelete all of the data that was deleted within two
seconds of the instance being deleted in order for old deleted instances
to be consistent with the new behavior.

Fixes bug 1022592

Change-Id: I36c66913abcb231f23e409f1f71c00ef0f6e69e5
Merge "Reject EC2 CreateImage for instance-store"
Merge "Fix EC2 CreateImage no_reboot logic"
Merge "fixes for nova-manage not returning a full list of fixed IPs"
Merge "Migrations for deleted data for previously deleted instances."
use boto's HTTPResponse class for versions of boto >=2.5.2

Fixes bug: 1027984

Change-Id: I2101ddaa78ede90f39b55d28aab73e7f5a816af5
Merge "Avoid unrecognized content-type message"
Return 404 when attempting to remove a non-existent floating ip

This fixes bug 993774 and returns 404 instead of 202 when trying to
delete a floating ip from an instance to which it is not allocated.

Change-Id: I9538a8a71cbbb9d19e9ebb76f93b180dbf619764
Merge "Adds non_inheritable_image_properties flag."