Remove outdated docstring for XenApi driver's options

XenAPI's driver options's help strings can explain how to
use these options, so remove these duplicated and outdated
docstring.

Change-Id: I3de257e75ba13352e9460070f5bb2a6d7cf36a4e
VMware: add tests for spawn with config drive enabled

Add tests for test_vmops where config driver is enabled.

TrivialFix

Change-Id: I6ca9bfb32672d42987892ee4e95c0d33c3ef2685
VMware: fix compute node exception when no hosts in cluster

Commit 4033c0c9c16d2844b36fd5627717e7ce206887f6 casues the
regression. The result was a empty string and not None.
That is suds returns a Text object and not None.

Change-Id: I79e70e300f40eb3561cf56478d578f0f8cda273e
Closes-bug: #1383305
Use wsgi.response for v2.1 API

Now a decorator @wsgi.response() can be used for specifying success
status code. Most v2.1 APIs use the decorator and it makes the code
more readable. This patch replaces webob.Response with the decorator
for the other APIs.
In addition, this patch changes some orders of decorators for showing
success code and expected error codes clearly.

Even if applying this patch, some webob.Response() calls still exist
under the path nova/api/openstack/compute/plugins/v3/ because these
cases need to contain some information in a response header.

Partially implements blueprint v2-on-v3-api

Change-Id: I419819b8e55427979e8d82b972cd237952a5b06b
Read flavor even if it is already deleted

Currently libvirt code has some references to Flavor
as objects.Flavor.get_by_id. because the flavor might be
deleted before it's referenced, so most code need to
read deleted flavor in libvirt driver. This patch
makes the _prepare_args_for_get_config which is used for
sriov feature consistent to other Flavor get functions.

Related-Bug: #1352668

Change-Id: Ia4a03467720f1fed18cabe1b78bdd4488f316e34
Use common get_instance call in API plugins

Cleanup API to use common get_instance call which
automatically does exception handling. Not all cases
are handled in this patch as some require more
significant testcase rework and are done in future
patches to make it easier to review.

Change-Id: Id27350e6562636f81347b490db649744b6b41186
Split out num instances filter unit tests

Break out the unit tests for num instances filters from
test_host_filters.py into its own file. In the process, we mock out the
database calls for getting aggregate information instead of creating
database records.

Change-Id: I71516cee8b1660e8e8f76eae4ae831b34232289e
Split out IO Ops filter unit tests

Break out the unit tests for IO Ops filters from test_host_filters.py
into its own file. In the process, we mock out the database calls for
getting aggregate information instead of creating database records.

Change-Id: I8395ba7c09ca5c85ecd94d2cc670f3cd0880a373
Split out core filter unit tests

Break out the unit tests for core filters from test_host_filters.py
into its own file. In the process, we mock out the database calls for
getting aggregate information instead of creating database records.

Change-Id: I9c602b9832632ad84b4b0941c5254a283d278b69
Split out aggregate disk filter unit tests

The aggregate disk filter unit tests remained in test_host_filters.py,
and this patch moves them to the test_disk_filters.py file. This was the
last occurrence of aggregate database calls from test_host_filters.py.

Change-Id: Ic47c41474dce8bf3936910be5feee081445193de
Ignore DiskNotFound error on detaching volumes

When volume_api.terminate_connection RPC calls fail due to timeout,
detaching volume will be impossible because it is already detached but
still have the volume mapping entry. To make it detachable completely
by retrying volume detach, this patch make it ignore DiskNotFound error
while detaching volumes and go through removing the mapping.

Change-Id: I95077179160a2eb35436db2a5f7a5fbca64ec323
Closes-Bug: #1367964
Delay STOPPED lifecycle event for Xen domains

When using libvirt, a reboot from inside of a kvm VM doesn't trigger
any libvirt lifecycle event. That's fine. But rebooting a Xen VM leads
to the events VIR_DOMAIN_EVENT_STOPPED and VIR_DOMAIN_EVENT_STARTED.
Nova compute manager catches these events and tries to sync the power
state of the VM with the power state in the database. In the case the VM
state is ACTIVE but the power state is something that doesn't fit, the
stop API call is executed to trigger all stop hooks. This leads to the
problem that a reboot of a Xen VM without using the API isn't possible.
To fix it, delay the emission of the STOPPED lifecycle event a couple of
seconds. If a VIR_DOMAIN_EVENT_STARTED event is received while the STOPPED
event is pending, cancel the pending STOPPED lifecycle event so the VM
can continue to run.

Closes-Bug: #1293480
Change-Id: I690d3d700ab4d057554350da143ff77d78b509c6
remove use of explicit lockutils invocation in tests

Instead of passing lockutils loading explicitly in the test run
command line, provide the support for individual test classes to ask
that lock_path is setup with the REQUIRES_LOCKING = True class
parameter.

Augment all classes that currently fail without this with
REQUIRES_LOCKING = True. Hopefully many of those can be individually
removed in the future so we can get out of needing external locking in
any of our unit tests.

Change-Id: I56229e93ad61ac823646a4119a035d36c3400173
Update docstring for check_instance_shared_storage_local

The check_instance_shared_storage_local method is getting
a nova instance object so update the docstring to reflect
that.

Part of blueprint kilo-objects

Change-Id: I2fe671f47bc73e5bf292abce7ba678e1cf59e6d9
Merge "Delay STOPPED lifecycle event for Xen domains"
Merge "VMware: add tests for spawn with config drive enabled"
Merge "VMware: fix compute node exception when no hosts in cluster"
Merge "Use wsgi.response for v2.1 API"
Merge "Use common get_instance call in API plugins"
Merge "remove use of explicit lockutils invocation in tests"