Logging detail when attach interface failed

When attach interface failed, there isn't any detail for
error info. Change the log level to exception to get more detail.

Change-Id: If531c32357dbb002a3e92e4ca559eeb7f6ab6d2d
Closes-Bug: #1373761
Make unit test floating ips bulk faster

The unit test is only used to test whether the code branch is
executed with pre-defined logic, so it does make sense to create
as less as dataset if we can achieve that goal.

Currently the unit test for floating ip bulk operation in nova
create a rather a big data set to run the test. This patch adjust
it with smaller one.

the results shows (ignore the first one because env setup)
                                                   [former] [current]
test_create_bad_cidr_fail                       OK  4.27     8.30
test_create_duplicate_fail                      OK  8.01     1.20
test_create_invalid_cidr_fail                   OK  0.10     0.14
test_create_ips                                 OK  0.77     0.18
test_create_ips_pool                            OK  7.65     0.17
test_delete_ips                                 OK  10.01    0.35
test_list_ip_by_host                            OK  0.14     0.27
test_list_ips                                   OK  0.15     0.25

Change-Id: I2ee5b5186f0c88b80ed20a0dbc16af9360e28332
Remove havana compat from nova.consoleauth.rpcapi

Since we only support upgrading from N-1 to N, there's no need to keep
around this older upgrade related code.

Change-Id: I253db2fe161add62cb248665c7920126f0d7455f
Remove havana compat from nova.console.rpcapi

Since we only support upgrading from N-1 to N, there's no
need to keep around this older upgrade related code.

Change-Id: I663b77230cb0ca87c31a4dfd6cddaf10c588a000
libvirt: pin emulator threads to union of vCPU cpuset

Ensure that the emulator threads run on the same host CPUs as
the vCPU threads do, by setting the emulator pinning to be the
union of vCPU pin cpuset

Closes-bug: #1386162
Change-Id: I5273fc323849cb6c9ca199f3e9921007a845d2ac
Remove native security group api class

There are native security group api classes define in the v2 and
v2.1 security_groups extension. Those classes in two extensions
are same. So remove the duplicated code, move those exception raising
into the base class.

Change-Id: I5e62ec8236e9d0e9601be652df7b8abf1828fbad
VMware: remove unused parameter (mountpoint)

A mountpoint parameter was passed to the volume attach and detach
methods. This parameter is not used. This patch cleans that up.
In addition it also cleans log messages where this parameter was used.

TrivialFix

Change-Id: I2eafea22c58553ac58fcccf6d199db6f8b595fb2
Better error message when check volume status

When debug the code, the cinder volume status checking code return
the error message, but without which volume is wrong and detail.
This patch add volume uuid and detail in the message.

Change-Id: I043f7b956b7e56ea5eb7e4ff9c9023fd607f2358
Use Instance.get_flavor() in more places

This helper was introduced a while back, but not everything is using it.
In order to make the transition in the next patch easier, this cleans
up those cases to use the helper. Unfortunately, there was a lot of
cruft in the tests where non-objects were being passed to these areas,
so this change looks larger than it really is.

Related to blueprint flavor-from-sysmeta-to-blob

Change-Id: I456fd94e21c71f10dff63997046a842345078071
Refactor more compute tests to use Instance objects

Change-Id: If501760085a2110fedb8bd5e2fd863af25bc6f8e
Use session in cinderclient

Use the common session loading parameters and the session object for
talking to cinder.

There are some related changes in this patch.

Firstly auth_token middleware now provides an authentication plugin that
can be used along with the session object to make requests under the
user's authentication. This will largely replace the information
required on the context object.

This authentication plugin is not serializable though and so it cannot
be transferred over RPC so we introduce a simple authentication plugin
that reconstructs the required information from the context.

When talking to cinder we now create a global session object (think of
this like keeping open a connection pool object) and use the
authentication plugin to send requests to cinder.

I also condense the cinder tests as they are largely copied and pasted
between v1 and v2 and this solves fixing them in two places.

DocImpact: Renames cinder's timeout, insecure and CA certificates
parameters to the parameters used by the common session object. Adds
options for using client certificates with connection.

Change-Id: I7afe604503b8597c16be61d2a66a10b94269a219
Port assisted-volume-snapshots extension to v2.1

This patch ports assisted-volume-snapshots to v2.1 and make v2 and v2.1
share unit test cases.
This patch addes a schema to do the input validation for snapshots_create
The differences between v2 and v3 are described on the wiki page
https://wiki.openstack.org/wiki/NovaAPIv2tov3 .
Partially implements blueprint v2-on-v3-api

Change-Id: I5b7be1de8ac2628a287897dcc5ca0eaf7a8957a2
Imported Translations from Transifex

For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: Ieb4c87f942db10ebe27665b499ba1c020adba32c
Add support for fitting instance NUMA nodes onto a host

This commit adds the methods needed to enable fitting instances onto
NUMA nodes. It adds fit_instance_to_host() method to the
VirtNUMAHostTopology class that will do the fitting returning the
instance topology with it's cells assigned to the cells of a given host.

This method will be used in the scheduler and claims and will obsolete
the need for claim_test method which will be removed in subsequent
commits.

It is worth noting that after we transition filter and claims to use the
methods added to this patch - it will no longer be possible for an
NUMA-aware instance to be over-committed against itself no matter what the
over-subscription ratios are.

Change-Id: I5fb6814778c2790cdd8892f756a33763b8f4a712
Partial-bug: #1386236
objects: Makes sure Instance._save methods are called

This patch makes sure that _save hooks are called for Instance object's
related objects even when they are set to None (if they are at all
nullable)

We will need this for numa_topology, as we need to be able to update it
on save, and make sure it's gone if the new one is None.

Change-Id: Ied9e760b40446661a6269e41df6091aa16fbfc82
VMware: remove ESX support for getting resource pool

The ESX driver is no longer supported. We should only return the
resource pool for the cluster.

In order to test this the patch had to update the test_vmops to
ensure that a cluster was used.

The patch also drops the method get_mo_id_from_instance which is
no longer used.

Change-Id: I9d99a5be58ef5a2a7d41dfd488ac24f38d2c79d3
Move test_hostops into nova/tests/unit

After rebasing patch 127279 one test file, test_hostops,
was left behind in tests/virt/hyperv. This patch simply moves
that file to the proper place.

Change-Id: I5a5a56f0b195f8b290986d86cc47b292e610348f
Compute: improve usage of Xen driver support

Commit 69564763960cddc249138469811a0a771db16e19 added a check,
which was called twice, in get_next_device_name.

This is called once now.

Change-Id: I45c918bc64ed8049179fc01a7cd3ad81e4682fe1
Compute: improve test_compute_utils time

Make use test.NoDBTestCase instead of test.TestCase. This improves
the test times.

The tests that have been update do not use the DB.

Change-Id: I2a39f635552175117609dbbe6b328ead166345ea
Merge "Imported Translations from Transifex"