Refactor work with TaskLog in sqlalchemy.api

Add _task_log_get_query() private method
It is used to remove from task_log_get() and task_log_get_all() session.
parametr and save performance.

task_log_get() method
Remove session parameter from public method.

task_log_get_all() method
Remove session parameter from public method.

task_log_begin_task()
Remove session parameter from public method.
Remove unused return value.

task_log_end_task()
Remove session parameter from public method.
Use 1 db request instead of 2.
Remove unused return value.

blueprint db-session-cleanup

Change-Id: I2c8252de7978e8fddd800e903f18a73ee9a95034
Remove baremetal-compute-pxe.filters

The baremetal PXE driver doesn't seem to run dnsmasq at all, so remove
the rootwrap filter which allows it to do so. This was introduced by
commit a2f260f.

Change-Id: I4cc1127222b73af218a6a8808d0ad54478878af1
Implement Quantum support for addition and removal of fixed IPs

Fixes bug 1099378

Change-Id: I696d1f702cf99ef15af47c261844febd8a6e7ffc
Correcting improper use of the word 'an'.

Change-Id: I032509539c61f2f5fda2001e2db5a3298e30c561
correcting for proper use of the word 'an'.

Change-Id: Ib6180284d806a00c520df378e651fba947e2397a
Use common rootwrap from oslo-incubator

Make Nova use common rootwrap code from oslo-incubator.
Implements bp nova-common-rootwrap

Change-Id: I3282d65940375589fceb8485829097380d84d946
PXE driver should not accept empty kernel UUID.

Baremetal PXE driver was aborting only if the kernel and ramdisk
specified in image metadata were None, but not if they were another
non-true value, such as "". Now, exception is raised if they are any
non-true value.

Fix bug 1100589.

Change-Id: I9783a14cc242e1b9db04d797c61d54b06d52c680
Clean up db network db calls for fixed and float

Use a join instead of a subquery for fixed_ip_get_by_floating_address
and floating_ip_get_by_fixed_address. Adds test to verify behavior
is the same.

Change-Id: Iab00142d477308c354777a2c64b6d03a21184585
Remove restoring soft deleted entries part 1

There is no need to reuse deleted entries, because they will be archived after
db-archiving implementation. And restoring soft deleted entries produce some
problem with db-unique-keys implementation. So the best way is to remove it.

instance_type_access_add() method
Remove restoring soft deleted instance_type_access entries

instance_type_extra_specs_update_or_create() method
Remove restoring soft deleted instance_type_extra_specs entries
Add missing transaction

aggregate_host_add() method
Remove restoring soft deleted aggreagate_hosts entries
Add missing transaction

blueprint db-session-cleanup

Change-Id: Ida7db95233c40faacac55105650f52d42ad360c2
Remove restoring soft deleted entries part 2

There is no need to reuse deleted entries, because they will be archived after
db-archiving implementation. And restoring soft deleted entries produce some
problem with db-unique-keys implementation. So the best way is to remove it.

instance_type_access_add() method
Remove restoring soft deleted instance_type_access entries

Add missing tests for instance_type_access_add

blueprint db-session-cleanup

Change-Id: I82ee56b50a8422a4b620f4e58967258bac7c01c6
Directly copy a file URL from glance.

That patch allows nova to use shutil to copy a file directly from the
glance store.  For this to work glance needs to enable direct_url
descriptions in the image metadata.  This is done by setting
show_image_direct_url to True in glance-api.conf.  The path used to back
glance also must match the path used to back nova instance storage.  This
should be a large performance increase for the cases where both glance
and nova instance storage are backed by a shared file system like gluster
or ceph.

A new option has been added to nova: allowed_direct_url_schemes
This option is set to a list of schemes that can be directly accessed.
For this first simple patch only file:// is valid, and the
implementation is simple and inline.  In the future it would be better
to make this into propagation modules which are dynamically loaded
according to the scheme.

DocImpact
Implements: blueprint direct-file-copy
Change-Id: I041b5524f8a0ea59e89ece0202f0503abf2f9d8e
Refactor EC2 keypairs exception

According to the following document:

http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/api-error-codes.html

The EC2 API sends specific error codes when keypair listing or
keypair generation fails, specifically the error codes are

InvalidKeyPair.Duplicate - duplicate keypair
InvalidKeyPair.Format - keypair format invalid
InvalidKeyPair.NotFound - keypair not found
ResourceLimitExceeded - keypair quota exceeded

Refactored create_key_pair and describe_key_pair so that
it throws the correct EC2 error codes according to the
public EC2 API specs.

Also removed some duplicate exceptions as well.

Fixes LP: 1072318

DocImpact

Change-Id: Ib7045e49211d9300e9cb6ca0bfe80e569d635c9b
Signed-off-by: Chuck Short <chuck.short@canonical.com>
libvirt: Fix typo in configdrive implementation

libvirt configdrive implementation
references 'instane' instead of 'instance'.
Also, add a test for adding configdrive block device
that would catch such an error

fixes bug 1101352

Change-Id: I36cba4487ad9d78d4e0366c8c2550603ba155c47
pick up eventlet backdoor fix from oslo

eventlet backdoor had a misnamed variable in it (found by pyflakes).
The fix was already in oslo, sync to pick up this new fix.

Change-Id: Iede6443fd1a3f04d99607278d9afbb41bc9acdbf
fix service_ref undefined problem.

Change-Id: I361c240a314a8f5ab41d4047780f7d385e360019
Fixes: bug #1102346
Refactor compute_utils to avoid db lookup

This simple change passes bdms into the following compute_utils function
to avoid it doing a database lookup:

  get_device_name_for_instance()

Related to bp/no-db-compute

Change-Id: I1475b184d8e88b700d606aaf77cc7cd21e83efbb
Avoid testtools 0.9.25

Fixes bug 1102400

testtools 0.9.25 introduces a new dependency on the 'extras' package, but
it does so in a way to prevents itself from being installed without the
'extras' package already installed.

Work around the problem for now by avoiding the problematic release.

Change-Id: Ib42ffc67f00db62f9b829069c00476632daae94f
Merge "pick up eventlet backdoor fix from oslo"
Merge "Refactor work with TaskLog in sqlalchemy.api"
Merge "Refactor compute_utils to avoid db lookup"