maint: remove unused exceptions

* nova/exception (InstanceSystemMetadataNotFound):
Unreferenced since commit 0d417fa73
* nova/exception (CellError): Never referenced.

Change-Id: I30449748fe1156adf7da03aaace565e63bdac144
Convert pause/unpause to use objects

Switch pause/unpause to use objects.  This also converts the compute API
tests to be unit tests.

Related to blueprint compute-api-objects

Change-Id: I439e06e7c9778b18e8a736dcbc76db534bcdb835
Fix change detection logic in conductor

The change detection logic in conductor attempts to determine what
changes an object action had on the object itself in order to
communicate them back to the caller. This logic previously assumed
that if an attribute was present on the updated object that it was
also present on the original. However, that will not be the case
in situations where a method sets a new attribute (such as
instance create, which will set many of them).

This change to the logic avoids triggering a lazy-load of the
attribute on the original object while trying to determine if
it has changed. It corrects behavior and doesn't change the interface
at all, so no RPC version changes are needed.

Related to blueprint unified-object-model

Change-Id: I8b01185ba81f3126f494db95c70c23dfa77ad959
Add ObjectActionFailed exception and make Instance use it

The obj_load_attr() code in Instance slipped through review with
just a "raise Exception()" for the case where the load cannot
complete. This adds a new exception for the case, fixes the
Instance.obj_load_attr() method, and adds a test to verify it.

Related to blueprint compute-api-objects

Change-Id: I73c966deb3c498019370eb83ade64bff2c48aec0
Add obj_attr_is_set() method to NovaObject

We have lots of places where we need to test if an object's attribute
has been set yet, and we do that rather manually. This adds a
method to the base object to make that more convienient and consistent.

Related to blueprint compute-api-objects

Change-Id: Ic5ff4a80b10dec6a5a772c21405de7ff1d331e72
Update mailmap

Change-Id: I6b6530841f242829d394998a6dfd85b34e04f232
Allow user and admin lock of an instance

The existing instance lock capability is currently restricted
to being an admin-only action in the default policy. This
introduces additional functionality that allows the lock to be
used by users (to prevent accidental changes to an instance for
example), but also allows the lock to taken by an administrator
with appropriate privileges such that it overrides any lock held
by the user (for example to block actions on a rouge instance).

When unlocking an instance, an additional check is made to see if
the lock is held by user. If it isn't, an additional check is
made against the unlock_override policy.

Additionally added the current instance lock status to the
v3 extended status extension.

Blueprint mandatory-vm-lock
Flags: DocImpact

Change-Id: I5040276c2d9fd42a71c9d8d4529331992abd7538
Merge "Update mailmap"
Add plug-in modules for direct downloads of glance locations

Glance can expose direct URL locations to its clients.  In current
versions of nova the only URL that can be accessed directly is file://.
This patch adds a notion of download plug-ins.  With this new download
protocol modules can be added without disruption to the rest of the
code base.  Based on the scheme of the URL returned from Glance a
plug-in will be loaded and used to download the data directly, instead
of first routing it through Glance.  If anything fails in the process
the image will be downloaded by way of Glance.

Handlers are loaded with stevedore.  To add a new module follow the example
in nova.image.downloads.file.py.  The module is required to have two
functions:

get_download_hander():
This must return a child of nova.image.download.TransferBase

get_scheme():
Return the URL scheme that this module handles (ex: 'file')

If additional configuration is needed it can be added by the specific
plug-in (as shown by file_download_module_config included with this
patch submission).  Once the module is created it must be added as an
entry point to the python installation.  For those included with nova
this can be done by adding the following it setup.cfg:

[entry_points]
nova.download.modules =
    file = nova.image.xfers.file

Additionally, as part of the multiple-locations work in Glance meta data
comes back with each location describing it.  As an example,
this is needed for direct access to file URLs.  Nova cannot assume that
every file URL is accessible on its mounted file systems, nor can it
assume that the mount points are the same.  This patch solves that
problem for direct access to files.

blueprint image-multiple-location

Change-Id: I79b863c0075cebaadce5b630f22b81d2959ddbb1
Merge "Convert pause/unpause to use objects"
Merge "Fix change detection logic in conductor"
Merge "Add ObjectActionFailed exception and make Instance use it"
Merge "Add obj_attr_is_set() method to NovaObject"
Merge "Add plug-in modules for direct downloads of glance locations"
Convert camelCase attribute naming to camel_case

Convert cases of camelCase attribute naming to camel_case in the
security groups V3 API to make the v3 API as whole consistent in the naming
of attributes

Partially implements blueprint nova-v3-api

Change-Id: I3def0508d62194545a506ce845cfbfa2b87fd6f9
xenapi: retry when plugin killed by signal

Sometimes the glance upload will get killed because of a signal. We
should retry the upload on these types of errors.

It is currently unclear where the signal comes from, so further
investigation is required to determine why the signal gets raised. It
does not appear that any services are restarting at the time the signal
gets raised.

This change has also increased the coverage around the unit tests for
the glance upload, so we now test the try logic.

Fixes bug 1207746
Change-Id: I116be92e153cf27c353cb20168a67b2c0b3cd595
Merge "Allow user and admin lock of an instance"
Merge "maint: remove unused exceptions"
Avoid extra glance v2 locations call!

In 7df1c911 we added code to attempt to direct download
images from glance locations. This feature is meant to be off
by default however when it is disabled it adds an unnecessary
glance V2 API call.

This patch removes the extra get_locations call when
CONF.allowed_direct_url_schemes is empty (disabled). This effectively
fixes Nova on Python some 2.6 distros which fail to work with the
recent Glance V2 schema code.

Fixes LP Bug #1208656

Change-Id: I0989ed4f248cd1126d4703ad6498cfd66685ae31
Merge "Convert camelCase attribute naming to camel_case"