Remove the deprecated quantum v1 code and directory.

The code in this directory is the v1 to integrate quantum with nova. at
that time, quantum hasn't a client and keystone support. At the nova side
, there is a quantum manager that connect to quantum server. now, all code
has been removed execept the nova_ipam_lib which is unused too. this patch
removes the nova_ipam_lib.py.

Change-Id: I05146d47fb57f215f8d010dbde8fdc0b2de55301
Add the missing replacement text in devref doc.

Add AggregateInstanceExtraSpecsFilter's replacement text in
doc/source/devref/filter_scheduler.rst

Change-Id: I5b74c5f51eb85f79f79a2d2c556d6522d97f1497
Fixed deleting instance booted from invalid vol

1. Translated the exception (NotFound) raised from Cinder client to
Nova's native exception (VolumeNotFound).
2. Added unit test coverage.

Fixes LP: #1087214.

Change-Id: I3cee31a9fd068b65a4097f3f3054aebb69d9ba61
Update command on devref doc

Update the apt-get command to build mysql dependency for ubuntu.
It currenly says apt-get install build-dep python-mysqldb
which should just be apt-get build-dep python-mysqldb

Change-Id: I541f7b80802a6b7191f2fe0338965ef425e7c2fd
Move DNS manager options into network.manager

The instance_dns_manager, instance_dns_domain and
floating_ip_dns_manager options are only used in nova.network.manager.

blueprint: scope-config-opts
Change-Id: Ic4dfe01ec87e0b9a4ba244f85cf0a81568f3f9bf
Move network_driver into new nova.network.driver

Add a new load_network_driver() function which constrains the use of the
network_driver option and move the option into nova.network.driver.

blueprint: scope-config-opts
Change-Id: I0a839765890093dc871b48435cfd113e0f8e46c4
Remove the WillNotSchedule exception.

Removes the WillNotSchedule from the Nova exception module. It
is no longer being used.

Change-Id: I865402ec30f9fa1de31c443db51e7f53004d6817
Added conf support for security groups

Modified the way nova.compute.api.API loads the security group API.
Previously it would accept a named-parameter and if that was None, default
to SecurityGroupAPI. It still accepts a named-parameter but if that is
None, then it will attempt to load the API from CONF, and then default
to SecurityGroupAPI. The basic use-case should not be altered by these
changes.

Implements: blueprint nova-securitygroups-expansion
Change-Id: Ib252a0755f320289c3c7cb6518d55e63d3392789
Move TimeOverride to the general reusable-test-helper place.

Change-Id: Ife5355252813f9b14d5b3f8b543649b88a92acb9
Fix API samples generation.

In Change: Ie46b24a65145c407d46974b63a97a84911223547 a check
was added to _verify_response() to verify the samples.

However, when trying to generate new samples this blocks
_write_sample() because it attempts to read a non-existent file.

This change ensures that the sample is created before the
verification and still retains the behavior that the samples are
only updated on changes.

Change-Id: I1527ba71676b2e1e10bd334f2a7878404d12600c
Properly remove the time override in quota tests.

Using set_time_override directly makes it easy to forget to call
clear_time_override, and forgetting to call it will break tests
that rely on time being sensible, advancing normally etc. Using
useFixture(TimeOverride()) ensures that clear_time_override is
automatically called when the test ends.

Change-Id: I8753524324fb9a20c30b41a114b265b336b3d54c
Imported Translations from Transifex

Change-Id: I86a8f90017429f23b8f212679fe5dd97a3a905ea
fix test_nbd using stubs

test_nbd was assigning object methods to fakes during
tests, however the method name changed, and assigning
to a new method doesn't cause an error. Change this
to a stubs approach instead.

Change-Id: I7f9bb0237bcea2a15505fe1ed0b0be438cdaefc2
Reset the IPv6 API backend when resetting the conf stack.

This fixes test isolation errors where tests were running with
the wrong ipv6 backend and failing. The failures occured because
Python discovers tests in filesystem order rather than a sorted
order, and the test that was changing the backend had previously
always run later under nose, which does not use filesystem order.

Change-Id: Ife4370d0747b269c9bc9aabb50c531cb6c9fec13
Use service fixture in DB servicegroup tests.

It was possible that the services created by the DB servicegroup tests
hung around and conflicted with other tests. Move the services used by
these tests into a fixture so that they can be cleaned up properly.

To ensure cleanup happens call Service.kill() on the service.

Change-Id: I38aafc6b6d3a17f104db9d8f13b1ab3b4632d470
Add DBDuplicateEntry exception for unique constraint violations

Unique constraint violation is wrapped by IntegrityError in SqlAlchemy.
SqlAlchemy doesn't unify errors from different DBs so we must do this in nova.
Also in some tables (for example instance_types) there are more than one unique
constraint. This means we should get names of columns, which values violate
unique constraint, from error message.

Unique constraint violations messages are different for different DB backedns:

1) sqlite:
    1 column - (IntegrityError) column c1 is not unique
    N columns - (IntegrityError) column c1, c2, ..., N are not unique

2) postgres:
    1 column - (IntegrityError) duplicate key value violates unique
                   constraint "users_c1_key"
    N columns - (IntegrityError) duplicate key value violates unique
                   constraint "name_of_our_constraint"

3) mysql:
    1 column - (IntegrityError) (1062, "Duplicate entry 'value_of_c1' for key
                   'c1'")
    N columns - (IntegrityError) (1062, "Duplicate entry 'values joined
                   with -' for key 'name_of_our_constraint'")

There is no information about table and columns in `N columns` messages for
mysql and postgres. So we should make name convention for UniqueConstraints
name: "uniq_c1_x_c2_x_c3" means that columns c1, c2, c3 are in
UniqueConstraint.
Also there is another way to get columns name from unique constraint:
    1) Get table name.
    2) Load table = Table(table_name, meta, autoload=True).
    3) Find unique constraint that is in table.constraints by name.
    4) Get columns names from unique constraint object.
But I think that it is a bad approach because:
    1) We must do table autoload in exception handling
    2) There is no easy way to get table name in wrap_db_error() method.

Remove Duplicate exception handling from models.save() method.

Add new DBDuplicateEntry exception to exceptions module.

Add new wrapper in sqlalchemy get_session() for handling Integrity Error.

blueprint db-unique-keys

Change-Id: Ic8fd8e0613f10d06c1d7d90f76a436099e8bfef2
Merge "fix test_nbd using stubs"
Merge "Remove the deprecated quantum v1 code and directory."
Merge "Add the missing replacement text in devref doc."
Merge "Add DBDuplicateEntry exception for unique constraint violations"