Generate config samples for oslo.messaging

This patch adds oslo.messaging to the
CINDER_CONFIG_GENERATOR_EXTRA_LIBRARIES env variable, which adds
oslo.messaging config options to cinder.conf.sample

Implements blueprint: oslo-messaging

Change-Id: I8aed8a8fdbd5b4ef41e3a3a7dcdebc6f216ec75d
Fixes ssh-injection error while using chap authentication

A space in the command construction was being caught by the
ssh-injection check. The fix is to separate the command strings.

Change-Id: If1f719f9c2ceff31ed5386c53cf60bc7f522f4d7
Closes-Bug: #1280409
Merge "Generate config samples for oslo.messaging"
Merge "Fixes ssh-injection error while using chap authentication"
Fix missing package dependency for requests

The package named requests is used by NetApp eseries
driver for doing client/server communications. This entry
is absent in requirements.txt. The patch fixes it.

Closes-bug: #1291325

Change-Id: I044ecce433d3d9e0409762a3e4551e1ce17f607d
Convert cinder utils tests to use mock

Convert the tests using mox to use mock.  Also add several
new tests to increase overall test coverage.

Closes-bug: 1285905
Change-Id: Ic7ed128e860aec50f135a9fd8728b868b27640ba
3PAR: Support extend volume based on snapshot

If extend volume fails with an HTTP Forbidden error 150,
convert the volume to a base volume and retry extending.

Change-Id: Id407058e954b2630f4a7f31c6149361301b502f2
Closes-Bug: #1285906
Updated from global requirements

Change-Id: I864af28306bd6d3efc3c1101e3510456465b9a66
Port to oslo.messaging

The oslo.messaging library takes the existing RPC code from oslo and
wraps it in a sane API with well defined semantics around which we can
make a commitment to retain compatibility in future.

The patch is large, but the changes can be summarized as:

    * oslo.messaging>=1.3.0a4 is required; a proper 1.3.0 release will be
    pushed before the icehouse release candidates.

    * The new rpc module has init() and cleanup() methods which manage the
    global oslo.messaging transport state. The TRANSPORT and NOTIFIER
    globals are conceptually similar to the current RPCIMPL global,
    except we're free to create and use alternate Transport objects
    in e.g. the cells code.

    * The rpc.get_{client,server,notifier}() methods are just helpers
    which wrap the global messaging state, specifiy serializers and
    specify the use of the eventlet executor.

    * In oslo.messaging, a request context is expected to be a dict so
    we add a RequestContextSerializer which can serialize to and from
    dicts using RequestContext.{to,from}_dict()

    * The allowed_rpc_exception_modules configuration option is replaced
    by an allowed_remote_exmods get_transport() parameter. This is not
    something that users ever need to configure, but it is something
    each project using oslo.messaging needs to be able to customize.

    * We maintain a global NOTIFIER object and create specializations of
    it with specific publisher IDs in order to avoid notification driver
    loading overhead.

    * rpc.py contains transport aliases for backwards compatibility
    purposes. setup.cfg also contains notification driver aliases for
    backwards compat.

    * The messaging options are moved about in cinder.conf.sample because
    the options are advertised via a oslo.config.opts entry point and
    picked up by the generator.

    * We use messaging.ConfFixture in tests to override oslo.messaging
    config options, rather than making assumptions about the options
    registered by the library.

Implements blueprint: oslo-messaging

Change-Id: Ib912809428d92e788558439e2d85b51272ebefdd
Merge "Convert cinder utils tests to use mock"
Merge "Updated from global requirements"
Merge "Port to oslo.messaging"
Merge "3PAR: Support extend volume based on snapshot"
VMware: Take the volume size from the user input

When we create a volume from an image or a snapshot, we need to
take the size of the volume from the user input and validate whether
the size is appropriate instead of taking the image size as the
volume size directly.

Change-Id: If09933d8ffa989c4dacc0860c19ea332bc21092a
Closes-Bug: #1237557
Add libffi-dev to list of packages to install in dev env

libffi-dev is needed by cffi

Change-Id: Ib91bd2e1a1005dc96f9d9054ae5cb150c5fae7db
Adding domain to context

Add support for upcoming "domain" concept in Keystone V3 API in
the context.

This fix ensures there is a user_identity in the context for the
corresponding new attribute in the log format string added in oslo. The
oslo change has the same change-id as this one.

Closes-Bug: #1290503
Change-Id: Ic2cf3e52cfcc0b8adccdf9c59afaa4014708a303
Fixed nova VM live migration issue with 3PAR

Nova bypasses the cinder checks for a volume
being available, when it tries to attach a volume
to a new host during live migration.  The assumption
in cinder to this point has been that volumes can only
be attached to one host.  The 3PAR driver worked under
that assumption.  This assumption fell apart during detach
time as the driver was only looking for a VLUN on the
entire 3PAR, since it assumed it could only exist on one host.

This patch ensures that the driver looks for the VLUN on the
hostname it expects.

Change-Id: Ie894ad386990794d270ca1cb72f40095bd40c2e6
Closes-Bug: 1288927
Merge "Adding domain to context"
Merge "Fixed nova VM live migration issue with 3PAR"
Merge "Add libffi-dev to list of packages to install in dev env"