Add test for get_instance_disk_info to test_virt_drivers

Commit 2bed16c89356554a193a111d268a9587709ed2f7 added
get_instance_disk_info to the base ComputeDriver class
but didn't add a test for it in test_virt_drivers, so
it's added here.

This also fixes the wrong method signature in the fake
virt driver.

Note that this wouldn't have found the problem for the
hyperv or vmware drivers due to bug 1209421.

Change-Id: I5765720d8c3e0a7962b493fa49359514f3136544
Related-Bug: #1358719
Fix 'os-interface' resource name for Nova V2.1

V2 and V3 diff for this resource name is below-
V2 - '/servers/os-interface'
V3 - '/servers/os-attach-interfaces'

V3 resource name needs to be changed to work that for V2.1

Change-Id: I37bd7cee7e8879b01a8aee739d74c2dd6e033dc4
Closes-Bug: #1368035
Fix `confirmResize` action status code in V2

In server`s action `confirmResize` status code in @wsgi.response
decorator is set as 202 but this is overridden/ignored by return
statement (return exc.HTTPNoContent()) which return 204 status code.

This is very confusing and we should have expected status code in
@wsgi.response decorator as consistence with other APIs.

NOTE- There is no change in API return status code. API returns the
same 204 return code as previously.

Change-Id: Id8033fb8880306babebc14b319bce5b3b8798774
Closes-Bug: #1368597
Fix test_create_instance_invalid_key_name

In test_create_instance_invalid_key_name, there were the duplicated
negative factors. One is nonexistent image-id, the other one is non-
existent keypair.
This patch removes nonexistent image-id for the test purpose.

Change-Id: I90ff4e9ca0eeb149aa0db7be2d171561586724e9
Increase sleeps in baremetal driver

The current sleeps are not long enough in some cases, increasing them
very simply makes the driver far more reliable.

Change-Id: Ida5591f9e4d1eb61e229096d541a8285803efeb5
Closes-Bug: #1316350
postgresql: use postgres db instead of template1

In PostgreSQL template1 database is kind of special, as all new databases are
copied from it, when you do CREATE DATABASE. This implies a few restrictions:
e.g. you can't have more than one active session to template1, if one of them
tries to create a database. It will fail with:

    ERROR: source database "template1" is being accessed by other users

Using of postgres database instead of template1 resolves this issue.

Closes-Bug: #1355929

Change-Id: I8b1a36163984fbef6be66964456072d32da6a9d0
Add plan for kilo blueprints: project priorities

At the nova mid-cycle we agreed that while specs have made our blueprint
process significantly better, we think the current approach still leaves
much to be desired. This document is the outcome of the discussion at
the mid-cycle on how we want to manage blueprints in Kilo.

This proposal is being placed in devref, as we want to use gerrit's
workflow (two core reviews, inline comments, revisions etc) and this is
a document for developers.

Introduce the idea of project priorities.

Change-Id: I7075a130c01be22f3ee5315d4a65b8e524b5a1ad
Give context to the warning in _sync_power_states

The "Found x in the database and y on the hypervisor"
warning in the logs doesn't give any context to what
is happening when that is logged, this adds the context.

Change-Id: I8800006508b2e18de657aa0a8d135bcd17cb89f1
VMware: Use vm_mode constants

Address missing changes for the vm_mode type from
commit 8fcd1b2c73dad8e2a7b4d299da270934fd5328cc.

Change-Id: Id03dc089af064969501ee2fc9d965a2028f901e4
Co-authored-by: Gary Kotton <gkotton@vmware.com>
Undo changes to obj_make_compatible

Commit 7cdfdccf1bb936d559bd3e247094a817bb3c03f4 attempted to make
the obj_make_compatible calls consistent, but it actually changed
them the wrong way. This fixes them to unwrap nova_object.data
and updates the test that was testing the reverse.

Change-Id: I1a5db4e9817390ba3c2423d33387f780c890de64
Closes-Bug: #1373535
Fix SecurityGroupExists error when booting instances

Make sure we properly handle the case when multiple threads check
and create the default security group, if it hasn't existed yet.
One thread will succeed and others will fail (we have a unique
constraint in db to prevent a race condition), so just handle the
exception to let instance boot proceed.

Steps to reproduce:

1) install OpenStack with Rally using DevStack:

    https://github.com/stackforge/rally/tree/master/contrib/devstack

2) fetch the Rally task:

    http://boris-42.github.io/boot.yaml

3) run it

    rally -v task start boot.yaml

Closes-Bug: #1370782

Change-Id: I414637a31b0b540fefa6c1314be6e973e2d4a178
Updated from global requirements

Change-Id: Ib184ffa042aa85b52eede765d1eb94ede96f36fa
Fixes missing ec2 api address disassociate error on failure

Fixes ec2 api address disassociate so that the ec2 error
InvalidAssociationID.NotFound is returned when it is passed an
invalid association rather than returning success. Note this is
slightly different than the original bug report but the type
of failure has changed since the bug was originally filed.

Change-Id: I10034a2fed62d4e93bc384aef3ff594b66e285f2
Closes-Bug: 1179816
Fix Typo in method name - parse_Dom

Silly typo

Closes-Bug: #1374158

Change-Id: Icccfb1a606bc9e14188d9f5c5f5667e35f2cb413
Retry on closing of luks encrypted volume in case device is busy

We're seeing races in the gate on detach of an encrypted volume where
the device is busy so the detach fails, which causes the delete of the
volume on the cinder side to fail because the volume is still in use and
then Tempest times out waiting for the volume to be deleted.

This simply adds a retry to close the encryption device.  I use
attempts=3 since that's what we use for lvremove.

Closes-Bug: #1374458

Change-Id: Ia0667da7dee247ba8c3338b296244b2a71d1045d
Log original error when attaching volume fails

We have a race in the gate to attach an encrypted volume and the only
thing we see in the logs is the DeviceIsBusy error which makes this hard
to debug.

This change logs the original error so we can dig deeper into the root
cause.

Related-Bug: #1348204

Change-Id: I7d0f2571e80a4e55133f823d2a04feaf4dddf2e5
Merge "Undo changes to obj_make_compatible"
Merge "Increase sleeps in baremetal driver"
Merge "postgresql: use postgres db instead of template1"
Merge "Retry on closing of luks encrypted volume in case device is busy"