Remove libvirt legacy LVM code

The Change-Id Ib36b962971fd1f66ea9a0818e91fec59e118e686 fixed an
issue which could have caused volumes no longer being able to be
cleaned up due to it's reliance on the instance_name_template
configuration option.

There was code in place to handle both disk formats which are
the legacy format (volume name prefixed by instance name) and
the new one (volume name prefixed by instance uuid).

This commit removes the legacy format which was due to be
removed from the code.

UpgradeImpact - this removes support for really old lvm names that
could have been created in Havana clouds. That means there is a
possible failure to cleanup of lvm volumes that existed uniterupted
since Havana.

Change-Id: I28497a650fbd012643080951f7d86ab8780fd59c
Fix KeyError for euca-describe-images

EC2 describe images crashes on volume backed instance snapshot which has
several volumes.

Change-Id: Ibe278688b118db01c9c3ae1763954adf19c7ee0d
Closes-bug: #1370265
Making nova.compute.api to return Aggregate Objects

nova.compute.api should return Objects and they should be
converted into the REST API expected result in the API extensions

Change-Id: I4bfd83ab92c719b1776da6445e6a4ea78d2ddfd6
Closes-Bug: #1292644
Add missing instance action record for start of live migration

We should add action record for live migration as we did for resize,
start,etc.

Change-Id: I6838727bf51f4bcdba0010c72bd2d5132bcf2cc3
Fixes potential reliablity issue with missing CONF import

Adds missing CONF.import lines for the keys_path
config option in crypto.py. Although the code currently
appears to work fine, missing import options can result
in flakey unittests and so most likely problems in real
Nova setups as well.

Change-Id: I748a47ecf6b6f0a2ff14db2bcd402163fc0b011e
Ironic: Do not try to unplug VIF if not associated

During instance spawn, Ironic attempts to unplug any plugged VIFs from
ports associated with an instance. If there are no associated VIFs
to unplug, this would raise an exeception that would be logged into
n-cpu. This patch fix that behavior by making the driver check if the
port has an VIF associated with it before trying to remove it.

Change-Id: I5608b9eec625452edda9a0c9eb366ece2a95800f
Closes-Bug: #1292733
fix usage of obj_reset_changes() call in flavor

There is a bug where obj_reset_changes() isn't being called with a
list, resulting in a no-op (changes to 'projects' not reset).

Change-Id: Iea14195a55d855bfa2cfc096260cf960e911b219
Fix unsafe SSL connection on TrustedFilter

TrustedFilter was using httplib which doesn't check for CAs.
Here the change is using Requests and verifies local CAs by default (or another
one if provided)
This effort is related to CVE 2013-2255.

SecurityImpact

Closes-Bug: #1373993

Change-Id: I0b8e6319a4cc39876b1e396ef705f0fc5def1e44
libvirt: convert firewall tests to avoid DB usage

The test_firewall.py test suite had alot of code which created
and accessed database objects. This can all be avoided by making
more use of mock to patch out a handful of object access functions.
The test_cidr_rule_nwfilter_xml was deleted entirely since it was
never actually validating any aspect of the nwfilter execution,
so didn't add any benefits over the other test functions that
run.

Partial-bug: #1369516
Change-Id: I7172edace9e568d961fc1dc9f449cd858551bb0d
libvirt: convert LibvirtNonblockingTestCase to avoid DB usage

The LibvirtNonblockingTestCase test case does not do anything DB
related. Convert it to NoDBTestCase to avoid DB setup penalty.
This improves perf from 1.8s to 0.4s

Partial-bug: #1369516
Change-Id: I6ff4f46a2e8c2e436d40dd47134f5ec496ce153f
libvirt: convert volume usage test case to avoid DB usage

Convert LibvirtVolumeUsageTestCase so that it avoids creating an
instance in the database. This allows it to be switched over to
use NoDBTestCase, improving perf from 1.7s to 0.13s.

Partial-bug: #1369516
Change-Id: If2ab915388c2a1ba0565d4aa8bb66b98db535094
libvirt: convert volume snapshot test case to avoid DB usage

Convert the LibvirtVolumeSnapshotTestCase so that it avoids
creating instance objects in the database. This allows it to
be converted to use NoDBTestCase improving perf from 4.2s
to 2.3s

Partial-bug: #1369516
Change-Id: Idf4d29a0df2280c78fe879fa09632c666ff04436
support TRACE_FAILONLY env variable

In order to get similar behavior to the way testr out of the box
works, only displaying failing results, all the user to define
TRACE_FAILONLY environment variable (any value will do). After this
point only failures, and things leaking out of stderr will end up on
the screen.

We also need to remove the suppression of the inline fail dumps for
this to have the impact that you'd expect.

Change-Id: I72911adc8a03450522429c52db661ec0a1bc4678
VMware: Fix deletion of an instance with no files

When a managed object doesn't contain a property, RetrievePropertiesEx
doesn't return None; it doesn't return the property at all. We were
testing for this incorrectly and not handling it in the code.

Change-Id: I77a0ba4eb5a6cc6075db9c67294f30abaa0e474d
Remove keystoneclient requirement

Nova doesn't use keystoneclient for anything anymore it uses keystone
middleware instead.

Change-Id: Id5719e5e816e70311e2377e41b4350afc8dd5b50
Fix the os_networks display to show cidr properly

Converting network_get and network_get_all to use objects broke
the display of the os_networks extension, because IPAddress
fields in Network objects are dumped as lists by the jsonutils
extension. We therefore must explicitly convert these object
field values to string.

The tests are updated to use objects so that we pick up bugs
like this in the future. Incorrect assertEqual parameter order
is fixed in the tests too since these are comparing dicts and
it's not fun debugging a MismatchError when the reference/actual
values are backwards.

Change-Id: I0f05a9b4d7bbe5fe0a3b110c191455ca7edefcb5
Closes-Bug: #1376945
Co-authored-by: Matt Riedemann <mriedem@us.ibm.com>
Merge "VMware: Fix deletion of an instance with no files"
Merge "support TRACE_FAILONLY env variable"
Update rpc version aliases for juno

Update all of the rpc client API classes to include a version alias
for the latest version implemented in Juno.  This alias is needed when
doing rolling upgrades from Juno to Kilo.  With this in place, you can
ensure all services only send messages that both Juno and Kilo will
understand.

Change-Id: Ia81538130bf8530b70b5f55c7a3d565903ff54b4
Merge "Fix KeyError for euca-describe-images"