VMware: remove unused argument from _delete_datastore_file()

The 'instance' argument is not used.

TrivialFix

Change-Id: Iec4f239d86cbd9b4a56713a17e9afa577971b032
Add @_retry_on_deadlock to _instance_update()

This patch adds the @_retry_on_deadlock decorator
to _instance_update(), which has been observed to be
involved in some deadlock scenarios.  As it is the point
of transaction demarcation based on the presence of
get_session(), this is an appropriate point at which the
transaction can be re-attempted in the case of deadlock.

Change-Id: Id2cfdc129ea3cfc787b73f1f3e9aa286a7c0229a
Closes-bug: 1375467
VMWare: Fix nova-compute crash when instance datastore not available

During nova-compute service startup, init_host will try to get_info for
instances. If datastore of certain instances become not reachable, some
VM properties like 'summary.config.memorySizeMB' will not be available.
This will cause nova-compute process exit with error.

Change-Id: I6753ce5658b629c216ebfbaab610c8fd0755466a
Closes-Bug: #1337236
Allow backup operation in paused and suspend state

Snapshot operation allows paused and suspend instance to be
executed, this also should be applied to backup operation.

Change-Id: Ie7bfd4962f0f149c423f71dbc528a2736baeef97
Closes-Bug: #1361487
Break out over-quota calculation code from quota_reserve()

The list comprehension used to create the overs list was really hard to
read, so this moves that code into it's own helper method and breaks out
the logic from the list comprehension, and adds unit tests.

Partial-Bug: #1369605

Change-Id: I44236c7a206b2a9bd3843c9ca2ce56591a66352f
Port cloudpipe extension to v2.1

This patch ports couldpipe extension from v2 to v2.1,
and have v2 unit test cases shared between v2.1 and v2.
Partially implements blueprint v2-on-v3-api

Change-Id: Id40c637c0fc207e97b1d094805eb0cee6e9cd9c9
vfs: guestfs logging integration

Adds support to enable guestfs logging.

Change-Id: I46c5ec6606e4a2eb8277b081d0c773ceb6d36c4c
DocImpact: New group of option has been introduced "guestfs"
Closes-Bug: #1279857
Merge "Break out over-quota calculation code from quota_reserve()"
Finish objects conversion in the os-interface API

Most of the API code was using instance objects already except for the
listing, so this updates that.

Updates the test to use a fake instance object rather than a dict to
enforce the change.

Also adds a note on the slightly weird call to common.get_instance
in the show method when the instance isn't used for anything, it's
really a check to make sure the instance exists.

Part of blueprint kilo-objects

Change-Id: Ief17c57afbd81e2b6aef9586b448e8797aaa6544
Merge "Add @_retry_on_deadlock to _instance_update()"
Merge "vfs: guestfs logging integration"
Fix libvirt watchdog support

Using the flavor extra_specs property "hw_watchdog_action" was broken.
Scheduling of a new instance always failed with NoValidHostFound error
because of ComputeCapabilitiesFilter, which treated this property as a
host capability to be checked.

Commit f0ff4d51057080e769407e873e5ed212f15b773d caused the problem.

To fix this watchdog_action property is put into 'hw:' scope, so
that it will be ignored by ComputeCapabilitiesFilter in scheduler and
handled in libvirt driver. The doc must be fixed accordingly.

Now driver accepts both 'hw_watchdog_action' and
'hw:watchdog_action', tests were edited for these cases.
Were added TODO items to delete the compat code in the next release.

DocImpact
Closes-Bug: #1367344

Change-Id: Ic5344ec34a130ee5a0ed2c7348af0b9d79e3508e
Revise compute API schemas and add tests

This revises the servers, images, and flavors schemas to avoid a
duplicate definition of the top-level tags in those schemas.  Instead,
of defines each schema to allow either a list of tags with only
name/id (as in the index listings), or a list of fully-defined
servers/images/flavors.  It is not permitted to mix and match.

It also adds three kinds of unit tests for the API schemas:

* A basic check to ensure that the schema files are valid RelaxNG;
* A check to ensure that the collected body of schema files does not
  contain duplicate top-level tag definitions;
* Explicit test XML documents.

Closes-Bug: 885025
Change-Id: I542b420de34fd82bb2a2813f36637aef2c2d5c92
Merge "VMWare: Fix nova-compute crash when instance datastore not available"
Don't log every (friggin) migration version step during unit tests

Right now any test that fails spews *all* of the migration steps at INFO
level along with the test output (assuming it did migrations). This patch
squelches the INFO-level messages from migrate, which don't add anything
useful anyway. Messages look like this:

    ...
    2014-10-10 09:51:41,967 INFO [migrate.versioning.api] 264 -> 265...
    2014-10-10 09:51:41,984 INFO [migrate.versioning.api] done
    2014-10-10 09:51:41,984 INFO [migrate.versioning.api] 265 -> 266...
    2014-10-10 09:51:42,003 INFO [migrate.versioning.api] done

Change-Id: I424bbb25c04b5e327c6d5d2ff8bad266bc7d51d0
Merge "Revise compute API schemas and add tests"
Merge "Fix libvirt watchdog support"
Merge "Don't log every (friggin) migration version step during unit tests"
Merge "Allow backup operation in paused and suspend state"
Use database joins for fixed ips to other objects

Many of the fixed ip related calls are extremely inefficient. This
joins a couple of calls so that we can optimize queries that use
them.

Change-Id: Ifa2e4c6ac517286f7ae952052d29801b45a6b6b2
Partial-bug: #1365606