Merge "Refactor test_get_port_vnic_info 2 and 3"
move integrated api client to requests library

The integrated api client previously did the HTTPConnection /
HTTPSConnection url parsing dance. In python 2.x HTTPSConnection
doesn't care about SSL certs at all. While not actually an issue for
these tests, it does mean we keep around an example in the code that
uses HTTPSConnection, which will prevent us from creating a hacking
rule to keep those out once the other 4 actual security issues with
HTTPSConnection are removed.

Change-Id: Idd7d5a055600dda663f9c56b39883510f8688b12
Related-Bug: #1188189
Clarify virt driver test comments & log statement

The current implementation of nova.tests.virt.test_virt_drivers
indicates NotImplementedError should be caught and logged to
dynamically build the hypervisor support matrix. This is not a
realistic / optimal approach for building the support matrix and
thus this patch updates the code comments accordingly for
clarity. This patch also modifies the logging statement outputted
in such scenarios to better clarify which test case method is
executing.

 Partial-Bug: 1209421

Change-Id: I5d80cdc06207071548fdb5f6852ca96fa8d79776
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
libvirt: support live migration with shared instances dir

If instance path is shared between compute nodes (e.g. over NFS) and image
backend uses files placed in the instance directory (e.g. Raw, Qcow2), live
migration should consider block storage of the instances shared.

Change-Id: I913c57152974562765502ab57be63ccb6dfe5208
Closes-Bug: #1351002
Merge "Add decorator expected_errors for ips v3 extension"
Merge "Imported Translations from Transifex"
libvirt: log exception info when interface detach failed

The detach_interface method is catching a libvirtError and logging an
error message but it doesn't include the contents of the root
libvirtError, so log that information as well for debugging.

Closes-Bug: #1374140

Change-Id: I042c2956c7393a2ee1ccd026421c8df537aa1a87
Fallback to legacy live migration if config error

Commit ea7da5152cdca7ba674e2137c3899909995e2287 added a path to using
migrateToURI2 for live migration if the version of libvirt used has the
VIR_DOMAIN_XML_MIGRATABLE flag set.

However, a bug in older versions of libvirt causes the live migration to
fail because it's incorrectly validating the old and new domain xml's
for ABI stability.

Not all distros are running with the patched version of libvirt so add a
check in place such that if we fail live migration on the new path with
VIR_ERR_CONFIG_UNSUPPORTED, assume it's due to this issue and attempt
the legacy migrateToURI call.

Closes-Bug: #1362929
Related-Bug: #1279563

Change-Id: Ie82566121c2ed3a6d55919bc111358f4129cb404
Ironic driver must wait for power state changes

The Ironic virt driver was previously returning from power_on,
power_off, and reboot calls immediately after making the request to
Ironic -- but before Ironic had necessarily acted upon it. This could
lead to Nova acting as though the state change was complete before it
actually was.

This patch introduces a new private method which polls Ironic until it
signals that the power state change is complete. With this, the
power_on, power_off, and reboot methods wait for the action to complete
before returning to ComputeManager.

Closes-bug: #1310135

Change-Id: I0bbdd8bc8807a0df43a420825f497842b387c4d5
the value of retries is error in _allocate_network

the variable 'retries' stands for the times retried by allocate
network ,but it makes a mistake

Change-Id: Ia4c046641619f619f8bf6205f841b3a332d31260
Closes-Bug: #1363326
Port extended_ips/extended_ips_mac extension to V2.1

This patch port extended_ips/extended_ips_mac extension to V2.1

There are difference between V2 and V3 server show/index &
server address index API response listed below-

'address' field of V2->V3 API response-
"OS-EXT-IPS:type" -> "type"
"OS-EXT-IPS-MAC:mac_addr" -> "mac_addr"

Reverting those attribute same as V2 to work with V2.1

Closes-Bug: #1368495
Partially implements blueprint v2-on-v3-api

Change-Id: I44902b0402115d1b6e833975e6c2f020ac5ab7c3
Merge "libvirt: convert CacheConcurrencyTestCase to avoid DB usage"
Updated from global requirements

Change-Id: Ib184ffa042aa85b52eede765d1eb94ede96f36fa
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
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
Merge "Fix unset extra_spec for a flavor"
VMware: Remove class orphaned by ESX driver removal

HostState was only used by the ESX driver, which was removed in
change I718fc0ee67dbd625af00c20fa4e34b8a35015437.

Also remove LOG, which is no longer used following previous removals.

Change-Id: I22e30c01e5b5219df858219dc1fda335a83ad225
Merge "Add plan for kilo blueprints: when is a blueprint needed"