use REDIRECT to forward local metadata request

VMs can not get metadata when metadata_host is set to 127.0.0.1 because
packet's destination address will be changed into 127.0.0.1 by iptables.
However, linux kernel will reject packets to 127.0.0.0/8 if packets do not
come from that range. We can use REDIRECT to resolve this problem because
REDIRECT will rewrite the destination address to our own host.

Fixes bug 1015853.

Change-Id: I162fc57510ef9c8e84130b2d11eb53e10dcc5cb0
Uniqueness checks for floating ip addresses.

Fixes bug 1003392.

Change-Id: I3f4554659c68476539c82d359cc080b34088b3ae
update python-quantumclient dependency to >=2.0

Nova should depend on a version of quantum client that includes
API v2.0 support.  That means the client version should be 2.0+ .

This was just pushed to PyPi today:

http://pypi.python.org/pypi/python-quantumclient/2.0

Change-Id: Ib9d997ceff92f2da6986d184b7b0da9e564800aa
Add PowerVM compute driver and unit tests.

part of bp:powervm-compute-driver

Change-Id: I9e55964b5260417d15b5def814ee305fce28c40b
Allow XML payload for volume creation.

Fixes nova-volume aspect of LP 1030330

Tolerate volume size attribute of type string as opposed to int.

Change-Id: I7cccb760a246d562792dec1669d634803bb9bc57
Implement get_host_uptime in libvirt driver.

Updates the libvirt compute driver to support the
host uptime call.

Change-Id: Ife6aad55c5544177b4172487b4cae02f02dc247f
Revert to prior method of executing a libvirt hard_reboot.

Fixes bug 1036826.

Using reset for hard_reboot is not reliable, even where it is supported
by libvirt. Hard reboots are one of the only ways to recover a VM in a
broken state. The reset command assumes the domain is running in some
capacity and will fail if it is not.

Hard reset is the current sledgehammer for fixing issues and it really
needs to stay that way.

Change-Id: I84705b72d79cf71adad066b18267fdfb199bc9cb
Added several operators on instance_type_extra_specs.

The following operators on instance_type_extra_specs were added in
compute_capabilities_filter.py:

    = (equal to or greater than as a number; same as vcpus case)
    == (equal to as a number)
    != (not equal to as a number)
    >= (greater than or equal to as a number)
    <= (less than or equal to as a number)
    s== (equal to as a string)
    s!= (not equal to as a string)
    s>= (greater than or equal to as a string)
    s> (greater than as a string)
    s<= (less than or equal to as a string)
    s< (less than as a string)
    <in> (substring)
    <or> (find one of these)

If the first word in the instance_type_extra_spec is not one of the
keywords above, it is ignored.

E.g.: ">= 5", "s== 2.1.0", "<in> gcc", and "<or> fpu <or> gpu"

For more information, please refer:
    blueprint instance-type-extra-specs-extension.

Change-Id: Ief23d00449798577c6910aaef85f0cba26323c61
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
Remove assigned, but unused variables from nova/db/sqlalchemy/api.py

model_query already create session if it's not supplied in kwargs.
So there was no point in creating session and even not passing it to model_query.
Also, nobody even cares about 'specs' in volume_type_create.

Change-Id: Ic60dca9bbfcf908fa50a43424e7d93319b2f210b
Add support for NFS-based virtual block devices

This code is required in Nova to support the new NFS-based
volume drivers in Cinder.

blueprint nfs-files-as-virtual-block-devices

Change-Id: Ib815817939628275c04634e8b9cabffa1c419f23
Adding port attribute in network parameter of boot.

Example is (network:[{‘port’:<uuid>}] )
The specified port will be used.
A port who have already device_id can not be used to be boot.
This fix is for isolating functionalities between Quantum and Nova.
There are no need update nova side if port model will be changed
in future quantum model.  This function is for QuantumV2 api use only.
Added port attribute in requested_network attribute. Fixes bug 1031096.

Change-Id: Id2c86228edb0c22f536f8b36a955c87870e9d98b
Merge "Allow XML payload for volume creation."
Merge "Add support for NFS-based virtual block devices"
Merge "Remove assigned, but unused variables from nova/db/sqlalchemy/api.py"
Merge "Implement get_host_uptime in libvirt driver."
Merge "Uniqueness checks for floating ip addresses."
Merge "update python-quantumclient dependency to >=2.0"
Port pre_block_migration to new image caching

This resolves bug 1036419, which was a missed call to _cache_image
when that method was refactored away.

Change-Id: I68f6aced5382e378dc707fd003d27dbfdd24aded
Merge "Added several operators on instance_type_extra_specs."