Update to Quantum Client 2.2.0

This patch updates tools/pip-requires to use the python-quantumclient 2.2
It also limits the version to <3.0.0 to prevent breaking something accidently
when 3.0.0 is released.

Fixes bug 1152695

Change-Id: Ic47deccac1df5a1b6b5171f1f7d80b250b57ebc9
Compile BigInteger to INTEGER for sqlite

Ensure BigInteger does not map to BIGINT for an auto-created
sqlite registry DB, as this type is not supported by sqlite.

Refactoring a test to use generic unsupported column type

Fixes bug 1147879

Change-Id: I590c798dd470def286802bc6e00bb4b621332b8d
Fix OS-DCF:diskconfig XML handling

Removes string to bool conversion for the OS-DCF:diskconfig
attribute during XML deserialising as the diskconfig extension
expects a string (MANUAL or AUTO) not a bool.

Fixes bug 1152439

Change-Id: Id9a5c2559a2891c2a21c437c9a5a534b9885c9bf
Fixes nbd device can't be released error

When the 'mount' operation is successful but stderr is not empty during
injecting key/file into image, there may be some warning messages output to
stderr, so we need to discard them and continue to inject files into image.

Fixes bug #1152519

Change-Id: Icc7d15196f3ee67674f9d815ddeef4378f363e2c
Remove instance['instance_type'] relationship from db api

This removes the entire relationship between an instance and the flavor
it was created from. As such, it removes two tests entirely which
examined the old behavior.

This is one change in a series aimed at removing the use of instance-linked
instance_type objects, in favor of the decoupled type data in
system_metadata. See bug 1140119 for more details.

Change-Id: I8b525a900bf2dc6b193e54aae35fc32248e4cff4
Rename LLC to Foundation

Looks like we missed one file

Change-Id: I556488923f892ce45334e18d3a089514fccd2d2d
xenapi: Fix reboot with hung volumes

If a volume becomes inoperable (e.g. the ISCSI connection is severed)
and the user goes to reboot, the instance may enter a permanently halted
state.

The root cause is that a VBD that points to 'bad' volume prevents VM
operations ('reboot', 'start') from completing under XenServer.

The work around is to detect which volumes are bad, detach in the
virt-layer, retry the operation (or in the case of reboot, just 'start'
the halted instance), and then notify the compute manager via a
callback so it can detach the volume in Cinder.

Fixes bug 1148614

Change-Id: Id4e8e84bb5748cfa267c2a418f9405fd86829e8f
Return XML message with objectserver 404.

Resolves bug 1076534 by adding a XML formatted message to HTTP
requests which result in a status of 404.

Change-Id: I4afbdc0f6bd5f3a78729351cee570c50952a6843
Prepare services index method for use with cells

Move the api.openstack.compute.contrib.services' index method's logic
out of the openstack api layer and into the compute api layer.

The addition of the availability_zone information is already done by the
host api. For this reason it was removed from the openstack api layer.
The behaviour of the call remains the same, only the functionality has
been moved.

This patch makes the functionality automatically work in cells.

Work towards: bug #1150499

Change-Id: Ia9489f11608167aed5168ccb3b670f395f7de5f7
Force resource updates to update updated_at

When there's no changes in resources, compute_node_update (and other
DB update calls) won't modify 'updated_at'.

'updated_at' is what is used to invalidate the cache in the scheduler's
host_manager.  Because of a race with the compute manager, the scheduler
could be out of sync with the compute_nodes table but have a newer time
on its cache.

By always updating 'updated_at' on resource updates, the periodic task
will be sure to invalidate any bad cache the scheduler has.

Fixes bug 1153778

Change-Id: I19b51a5b84f472cd0f4de6460a4edb540cc62da2
Fixes instance task_state being left as migrating

In a cross-hypervisor environment, such as KVM + Hyper-v. After negative test
which live migrate a KVM instance to Hyper-v host, there will be an exception
InvalidHypervisorType. As a result, the instance task_state is being
left as migrating. That leaves the instance in a broken state and most of the
requests on the instance will fail.

Actually, there are some other exceptions will cause this issue as well, such
as UnableToMigrateToSelf, DestinationHypervisorTooOld. All of them are thrown
from the driver of scheduler during live migration. But obviously, if the live
migration fails at the schedule stage, the task_state of the target instance
should be updated to None.

Fixes Bug: 1153283

Change-Id: Ide4b48653268c8dbe31de6964814830d2e82a5ba
Fix quota issues with instance deletes.

In order to keep quotas in sync as much as possible, only commit quota
changes for delete when:

1) An instance's vm_state is updated to be SOFT_DELETED.
2) The DB record is marked as deleted (and the instance's vm_state is
   not SOFT_DELETED)

If a host is down and we delete the instance in the API, this means
quotas are committed within the API.  Otherwise, quotas are committed
on the manager side.

Fixes bug 1098380

Also needed for proper testing: Fixed compute cells tests so that pseudo
child cells use NoopQuotaDriver.  This uncovered inconsistencies in the
NoopQuotaDriver wrt the DBQuotaDriver.  Those issues were fixed as well.

Change-Id: Ib72de1a457f0c5056d55a5c7dd4d8d7c69708996
Fix behaviour of split_cell_and_item

If you try to split a cell and item, with no path!to!cell@ in it, it'll
now return None for the cell, instead causing a ValueError when trying
to split the result.

Change-Id: I228b9f3b0f63f8c7a6004b3206f5312ed2a878bc
Fixes: bug #1153841
Remove the usage of instance['extra_specs'].

Instance type extra specs is remove from instance dict, so use inst_type['extra_specs']
instead of instance['extra_specs'].

fix bug #1146253

Change-Id: I1d3542e5142f490269607b779daa507f9d7b36e4
Deprecate CONF.fixed_range, do dynamic setup

Do dynamic fixed_range setup by pulling the networks that should
exist on the host and making the appropriate calls to set up the NAT
entries for each network. This allows for non-contiguous subnets to
be configured in the fixed_ip space and only configures the NAT rules
as they are needed. This also restricts the NAT range to the smallest
range required preventing the NAT from impacting subnets that might
exist on the external network.

DocImpact: For backwards compatibility, Grizzly will still support
the CONF.fixed_range option and if set will perform the default logic
from Folsom and earlier releases. To use the new dynamic fixed_range
setup in Grizzly, set fixed_range='' in your nova.conf. The intention
is to remove the CONF.fixed_range option entirely early in the Havana
cycle and use the dynamic fixed_range setup from Havana going
forward.

Change-Id: I4ec111079f7a1d253190e6a6008048f992a53f68
Fixes: bug #741626 bug #966175
Pin SQLAlchemy to 0.7.x

0.7.10 has been released and is compatible with 0.7.x. Instead
of pinning to 0.7.9, simply pin to 0.7.x to avoid SQLAlchemy 0.8

Change-Id: Iea57598698b4faf906e82a2974497221d07f4d16
Fix nova-manage --version

Fixes bug #1138844

Pass the version kwarg to cfg.CONF() so that --version shows the
version number.

Change-Id: I589ebffec67ef00f8ba24f553bf3e81806aa50b6
Fix: Managers that incorrectly derive from SchedulerDependentManager

Change conductor and network managers to be ordinary managers. Also
remove some unnecessary imports from managers already declared with
base manager classes in nova/manager.py.

Resolves bug 1154070.

Change-Id: I6b87cd5d7d5ef66425d084db667a6eff247cf0b1
Fix more OS-DCF:diskConfig XML handling

Add handling in the deserialisation code to handle the
OS-DCF:diskConfig attribute in the rebuild and resize actions so
the diskConfig extension can handle it properly. Formerly only
the older auto_disk_config attribute was managed (and incorrectly so).

Fixes bug 1153133

Change-Id: I68479d258cf23083274dd21b1f9eabab2feeb093
Fix: nova-manage throws uncaught exception on invalid host/service

Add a test case for this too.

Fix bug 1154089.

Change-Id: I3a60e581a9fac945fddf72c4f037ca5cae0005fc