Fix reserve_block_device_name while attach volume

The block device name will not be reserved in current implementation
due to missing volume_id in block_device_mapping. This will cause
block_device.instance_block_mapping does not return the ebs device
which should be reserved.

This patch adds the volume_id to block_device_mapping while reserving
block device name and changes the rpcapi to send the volume_id.

Fixes bug 1062033

Change-Id: I8f08b568619fefa99850de0bee7d605749d53b0a
Add Multiple Create extension to API sample tests.

Change-Id: Ifa5cf31cc61e4269502ff692508866948670e46f
Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
Update kernel_id and ramdisk_id while rebuilding instance

While rebuilding an instances if kernel_id and ramdisk_id associated
with new image_ref then update instances table for instance_id
with the new kernel and ramdisk.

Fixes bug 1060925

Change-Id: I07dfdbed8580411adea14fd6c5be1a9569a7a021
handle IPv6 race condition due to hairpin mode

bug 1011134

When using IPv6 an instance sees its own neighbour advertisement,
because of the reflective property of the hairpin mode.

Because of this the trigger-happy duplicate address detection in
the instance's kernel deconfigures the IPv6 address on the interface,
resulting in no IPv6 connectivity.

Approach of this commit is to to add an nwfilter to libvirt which
identifies this particular scenario and filters it.

Change-Id: I28f9b49cee4b2ab6ff591fae4feee623955f845f
Add api-samples to Used limits extension

Change-Id: I67069637db35eeb5a87026bf62252d006ed11b98
Proxy floating IP calls to quantum

Fixes bug 1023169. Also fixes bug 1031119.

In Folsom, floating IP support is moved to Quantum. By this commit floating IP
calls to nova are proxied to Quantum and nova command can be used to manage
floating IPs.

pip-requires is also updated and now requires python-quantumclient >=2.1 which
supports floating IP feature in Quantum.

Change-Id: I2c32948a8fe291601216dc62d546da64a8fb8428
Use paramiko.AutoAddPolicy for the smoketests.

Updates the Nova smoketests so that we use Paramiko's auto
add ssh key policy. This should help quiet down warnings like
this which we previously got when running the EC2 smoketests
with Nova:

/usr/lib/python2.7/site-packages/paramiko/client.py:95: UserWarning:
Unknown ssh-rsa host key for 172.20.0.3:
adb1c2f1fe461a35cd01283eac03d6fb

Fixes LP Bug #1064550.

Change-Id: I1611a3f6b54563b6a1d64c4f8e193a636ccb1c69
Tell SQLite to enforce foreign keys.

Fixes bug 1021023.

This requires SQLite version 3.6.19 or greater.  Older versions of
SQLite have no support for enforcing foreign keys.  However, SQLite
ignores unknown PRAGMA commands rather than treating them as errors,
so this change should be harmless with old versions of SQLite.

SQLAlchemy events require SQLAlchemy 0.7 or greater.  But other code
in this module already uses events, so this change should impose no
new SQLAlchemy version requirements.

Change-Id: Ic3eeeddbe012af65fe18c884674699cf16725d8d
Merge "Tell SQLite to enforce foreign keys."
Merge "Fix reserve_block_device_name while attach volume"
Merge "Update kernel_id and ramdisk_id while rebuilding instance"
Merge "handle IPv6 race condition due to hairpin mode"
Merge "Add Multiple Create extension to API sample tests."
Merge "Proxy floating IP calls to quantum"
Merge "Add api-samples to Used limits extension"
Merge "Use paramiko.AutoAddPolicy for the smoketests."
Avoid RPC calls while holding iptables lock.

This exhibitied itself as very slow instance starts on a Canonical
test cluster. This was because do_referesh_security_group_rules()
was making rpc calls while holding the iptables lock. This refactor
avoids that while making no functional changes (I hope).

This should resolve bug 1062314.

Change-Id: I36f805bd72f7bd06082cfe96c58d637203bcffb7