Fix scheduler_available_filters help

The help speaks about nova.scheduler.filters.standard_filters which does
not exist anymore. The default has been changed to all_filters with
commit 0d9ce831 but the help text was not updated so far.

Change-Id: I38dfadabe02489d8d40986e7f4d06c0c68097516
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
Optimize 'fixed_ip_bulk_create' function

1) All single 'insert' operations were changed by
single 'multiline insert' operation

2) Explicit flush() was removed

3) Using code from oslo.db provides
getting error value from DBDuplicateEntry exception

Change-Id: Ib3d99b950bcf5e97ac5d6099d5ccfbe98906b339
Clearer default implmentation for dhcp_options...

'pass' is less clear than 'return None' for the base implementation.

Change-Id: Iff53d5eb7e88e18849696d858b3d910b6ea71e63
Config drive: delete deprecated config var config_drive_tempdir

Commit 6e15d787fffcef8c4299fbaf1d5c715af1a34fa2 removed the use
of this configuration variable.

Change-Id: Ifd5baa8b7d579b0959cdb57b1335380a4129d652
Remove flush_operations in the volume usage output

flush_operations is not used by upper layer code and also
according to
ftp://libvirt.org/libvirt/java/javadoc/org/libvirt/DomainBlockStats.html
http://libvirt.org/ruby/api/Libvirt/Domain/BlockStats.html

seems the last value should be errs instead of flush_operations
so remove it from libvirt driver layer.

Change-Id: I438b6fa40e9d97e3ffddda03919c5d577e91c155
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
image cache clean-up to clean swap disk

Currently swap backing files are never removed from the system.
The image clean-up code should recognise at least obsolete unused files
need to be removed.

Change-Id: I09519a73c7233f2dc6f46f6cd094a3e1cc3dc395
Partial-Bug: 1253991a
Add virtual interface before add fixed IP on nova-network

nova allow user to add fixed IP to an instance when the instance
is running. This action will fail due to no virtual interface
will be created before create fixed ip.
TypeError: 'NoneType' object is unsubscriptable will be reported.

Change-Id: I5885806d1965022816633d0105606e7aaf763b3a
Closes-Bug: #1294939
Use real disk size to consider a resize down

When resize an instance, we don't allow a resize down operation.
Currently, a flavor ephemeral size will be used to do the check,
but usually we might create ephemeral size less than flavor
ephemeral size. This patch use the real disk size to do the resize
instead of the flavor ephemeral size.

Also, the test cases are updated to change from dict to objects,
if we change the flavor from dict to objects will benefit from it.

Change-Id: I03006a2ee8edf310a3ad374ebb7e4cd4034f8250
Closes-Bug: #1324005
Don't touch info_cache after refreshing it in Instance.refresh()

We were touching info_cache to force it to be marked dirty in the
instance object after refreshing it. However, it isn't dirty, because
it has just been refreshed and the relationship to instance hasn't
been altered. Also, the dirty state on the instance object is
unconditionally reset immediately after this anyway.

Change-Id: Ibc8e9d95210d14c946f6f820492da2331c0d7fab
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
VMware: fix regression for 'TaskInProgress'

Commit 73d4a7c1b4681accd993c1109a9eff837ff612f4 caused a regression
with the snapshot deletion. That is, the snapshot deletion will retry
if the resource is busy. The fact that the exception was not supported
in olso caused the problem.

Version 0.6.0 supports this exception.

Change-Id: I12fcc7d039a123e681c51978b9cf632af8f9644b
Closes-bug: #1369463
Add API schema for aggregates set_metadata API

This patch adds API schema for aggregates set_metadata API.

Partially implements blueprint v2-on-v3-api

Change-Id: I2d1e454f87870554cdeff50cc2de522c34fe81d4
VMware: pass vm_ref to _get_and_set_vnc_config

In the spawn refactor we get the vm_ref when the instance is created.
Passing it to the method _get_and_set_vnc_config saves a function
call. We are able to do this as we already have the vm_ref for the
instance in question.

Change-Id: I7b8d056af7f49ebd31beff2876edb9e6115d0a2c
VMware: pass vm_ref to _set_machine_id

Save a method call to get the vm_ref. In spawn this value exists so
we can pass it to the method if necessary.

Change-Id: Ied43fb09fb2eec2d2c22fce17b4f98ae3f58860e
VMware: Fix problem transferring files with ipv6 host

Need to protect the host name with '[' and ']' before
we create a http/https connection

Change-Id: I9320c47f446d1e6b6b088802c3916a88b118d9cf
Closes-bug: #1390906
Fixed quotas double decreasing problem

When we delete vm with status "soft-delete" we shouldn't change
quota values because they were changed during soft-deleting.

Closes-bug: #1333145
Change-Id: I3ed7b3245b8908faa02903c74503918f061016bd
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