changed quantum to neutron in vif-openstack

Change-Id: I50c14066584527a6fbc25c59b0bf03a321a5f1f5
Fixes the Hyper-V VolumeOpsTestCase base class

The VolumeOpsTestCase base class inherits incorrectly from
HyperVAPITestCase, with the unwanted side effect of executing all
base class tests as well.

This patch generalizes a common base class from HyperVAPITestCase
and fixes the inheritance issue.

Closes-Bug: #1280379

Change-Id: Ic81beb8397138c16c8d2d88a9c9d05d2b76e0e83
VMware: add instance detail to detach log message

Provide extra details when detaching a volume from an instance.

Change-Id: I043bce041f82d18379ffc052ad8868ac425167fe
Move the metrics update to get_metrics

It is not necessary to update the metrics when get every metric in
one compute monitor plugin, just update once when get metrics for
the monitor plugin.

Change-Id: Ib665188964de8318f6d94343891666c674111c8c
VMware: support instance objects

Over the course of Icehouse the instance dictionary has been changed
to an instance object. The patch ensures that the driver functions
receive an instance object as input.

Change-Id: I502ab7708f9b3c992ca80d442d794fdd4f5db6d5
xenapi: stop destroy_vdi errors masking real error

We frequently call destroy_vdi in an exception block where we plan to
re-raise the exception.

Should an error occur while destroying the vdi this hides the real error
that caused the problem. To stop this, I have moved those calls to
safe_destroy_vdis and added unit tests to ensure the error from
destroy_vdi does not mask the real issue.

Closes-Bug: #1246276
Change-Id: Ib02f93ab1086f077d3d00e5ca915a26f90552c85
xenapi: changes the debug log formatting

This patch changes the log formatting to use multiple arguments instead
of interpolation.

Note:
It's a matter of performance :
When you do the interpolation in your code, this code will be executed
each time you call the logger (event if the logger or the log level is
not activated).
When you let the logger do the interpolation, it will do the interpolation
only if the logger and log level is activated.

Change-Id: I628000767f41bb0ab1839089a0ba98f6974c4635
Move vbd plug/unplug into session object

To make it easier not to miss the VBD plug/unplug workaround I have
moved this into the xenapi object, overriding the regular method.

Change-Id: Ia0e677824b2bf700c5fb73a75c335f74a6ebb6a2
Move xenapi/agent.py to new call_xenapi style

At the same time, we used to call get_record to just fetch the domid,
this is very expensive compared to just call get_domid, so I have moved
towards using the cheaper call, particularly because this is called many
times when booting a server.

Part of blueprint xenapi-driver-refactor
Change-Id: If489f41c3d90ba9f738cd56bbc1277d105ab6b8d
Restore get_available_resource method in docker driver

The get_available_resource method, a necessary public
method was marked as private and it snuck through
code review! We caught this with docker-ci, but
only after it was merged.

This patch makes get_available_resource a public
method again, removing the _ prefix.

This is a partial revert for change:
    58d7eeede1e2912ab250fd306c85ca1a05de2fbc

Closes-Bug: 1286457

Change-Id: I07cede8e1ebf606988aeec5bb4d65a9c5ebfe20b
Sync the latest DB code from oslo-incubator

This sync contains the following commits from olso-incubator:

7959826 db: move all options into database group
dda24eb Introduce mysql_sql_mode option, remove old warning
0b5af67 Introduce a method to set any MySQL session SQL mode
8dccc7b Handle ibm_db_sa DBDuplicateEntry integrity errors
0f24d82 Fix migration.db_version when no tables
ac84a40 Update log translation domains
c0d357b Add model_query() to db.sqlalchemy.utils module
84254fc Fix a small typo in api.py
b8a676c Remove CONF.database.connection default value
86707cd Remove None for dict.get()
0545121 Fix duplicating of SQL queries in logs
fcf517d Update oslo log messages with translation domains
fa05b7c Restore the ability to load the DB backend lazily
630d395 Don't use cfg.CONF in oslo.db
ce69e7f Don't store engine instances in oslo.db
35dc1d7 py3kcompat: remove
b4f72b2 Don't raise MySQL 2013 'Lost connection' errors
271adfb Format sql in db.sqlalchemy.session docstring
0334cb3 Handle exception messages with six.text_type
eff69ce Drop dependency on log from oslo db code
7a11a04 Automatic retry db.api query if db connection lost
11f2add Clean up docstring in db.sqlalchemy.session
1b5147f Only enable MySQL TRADITIONAL mode if we're running against MySQL
39e1c5c Move db tests base.py to common code
986dafd Fix parsing of UC errors in sqlite 3.7.16+/3.8.2+
bcf6d5e Small edits on help strings
ae01e9a Transition from migrate to alembic

Due to API changes in oslo.db code we have to change Nova code a bit
in order to reuse oslo-incubator changes (oslo.db no longer stores
SQLAlchemy Engine and sessionmaker instances globally and it's up to
applications to create them).

Change-Id: I4aaa7151f66e0292ff66c29330f93d78c6bf78a6
Refactor xenapi/host.py to new call_xenapi pattern

Update all calls to call_xenapi to the new calling pattern.

This code calls out to the "host" object that this change adding into
the collection of session objects.

An expensive call to host.get_record has been changed to the cheaper
call of get_uuid.

Part of blueprint xenapi-driver-refactor
Change-Id: I4bc4e3f990e36d422beee2a7a9f5fa413044052a
Move rebuild to BDM objects

This patch makes the rebuild code path use new-world block device
mapping objects.

Closes-bug: #1241615
Part of blueprint: clean-up-legacy-block-device-mapping
Part of blueprint: icehouse-objects

Change-Id: Id09dba6560b6c0624f9b7fbfa893360a2a3d41b6
Move all shelve code paths to BDM objects

At this point only unshelve used direct conductor calls to fetch BDMs so
this patch moves it to objects and fixes tests.

Part of the blueprint: icehouse-objects

Change-Id: I6821222e98bc975fbe618fe922edc41d25f40200
Adding image multiple location support

Images now support multiple locations within its metadata and it may be
stored on more than one backend storage. Nova should add a layer to
transparently handle image preparing and removing for an instance by the
best approach/location, and it should allow administrators to configure
the image handler pipeline with the order who preferred to the layer.

Also, based on this structure we could implement particular sub-class in
relevant hypervisor layer with more advanced functions, such as CoW
making, snapshot capturing and etc. in future.

Implement bp: image-multiple-location
DocImpact

Change-Id: Idce8d21ae37bfdbb28a2567120a83d1061061904
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
regenerate the config file to support 1.3.0a9

osloe.messaging 1.3.0a9 dropped another config option, which is
causing all of nova to fail pep8. Updating config.

Change-Id: I1f7c5f00f32d74a2fd317fc6a3ec52d2a61deda6
Merge "Move xenapi/agent.py to new call_xenapi style"
Merge "Refactor xenapi/host.py to new call_xenapi pattern"
Merge "Restore get_available_resource method in docker driver"
Merge "xenapi: stop destroy_vdi errors masking real error"