Add unit tests for cinder/api/contrib/volume_actions.

Added to the following unit tests:
  Test begin detaching;
  Test roll detaching;
  Test volume upload to image with TypeError;
  Test extend volume with ValueError;
  Test copy volume to image, when body without Image's name.

Change-Id: I2382e043b7968a2c285c505ec02ff65fd81ea605
Ignore files created by Sphinx build

Change-Id: I5eafa7aefc8da18527ec14b9b116f7132787f667
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Fix a few Sphinx warnings

Corrects some rst formatting to eliminate warnings in
the documenation build.

Change-Id: I4026a1c8e7fae1928ca50d80aa1b5440faf754da
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Consist terminate_connection function signature

Clean up the "force=False" in function signature for terminate_connection
since it already accept **kwargs.

Thus make all function signature for terminate_connection consist to
    def terminate_connection(self, volume, connector, **kwargs)

Fixes: bug #1190419
Change-Id: I8765cb8f2aa3cfbb49ff57ae034b148aee35a8c4
Implement extend volume functionality in SolidFire

This implements the extend volume functionality for SolidFire driver.

Implements: blueprint solidfire-extend-size-support

Change-Id: I00dc15f722c70b8835ae5a060ca8f0c4a80a1acb
Fix missing volume_name_template flag.

volume_template_name was converted to a self.configuration option,
however we don't import that opt in the self.configuration changes.

This patch switches the specifier back to the global CONF

Fixes bug: 1199909

Change-Id: I1431ba8a46b3a86ed77c02646a1c5fd1f62ae010
    cinder.api: Replace 'locals()' with explicit values

    Help bring source code into compliance with the
    Cinder Style Commandments:
    https://github.com/openstack/cinder/blob/master/HACKING.rst

    This change covers all affected source in the
    cinder api module, specifically:
    cinder/api/contrib/volume_actions.py

    Partially fixes: bug #1190758

Change-Id: I2134e69b70a5a5132847168f60b4d192bdf0b536
Enable setting blocksize on volumes.

Some back-ends support blocksizes other than the default 512 (like 4096),
this change adds a provider_geometry column to the volumes table,
format is "physical_block_size logical_block_size".

This can then be used by libvirt to determine if it should pass in
non-default block_size info, and there's a method for future
geometry/disk info that might be needed.

Fixes bug: 1196248

Change-Id: I8d40bc56403154fbe955cd4ccf8f0c55fc9eb7c5
remove improper assert usage

There're many talks about it. An assert should be used for `never
happen` cases, not common paramaters validating.

With grep, we could many all assert statement used in none-test codes:

cinder/volume/drivers/san/solaris.py:110:
cinder/volume/drivers/san/solaris.py:116:
cinder/volume/drivers/san/solaris.py:161:
cinder/volume/drivers/san/solaris.py:162:
cinder/volume/drivers/san/solaris.py:163:
cinder/volume/drivers/san/solaris.py:164:
cinder/volume/drivers/san/solaris.py:170:
    checking cmd output which should never changed, so leave it
cinder/db/sqlalchemy/migration.py:113:
    ensure file existence from impossible cases, so leave it
cinder/utils.py:
    used for functional flow, so use ValueError instead

fixes bug #1199354
Change-Id: I2b1701269bdf7c8737548e57bd940921a6256372
Add tests for cinder/api/urlmap.py

Add tests for unquoting and parsing functions in
TestParseFunction class
Add tests for Accept class methods:
 - TestAccept class - test cases for processing content types
 - TestUrlMapFactory - test cases for urlmap factory
Add tests for URLMap class methods except __call__ method in TestURLMap

Change-Id: I3f1aa527f49175d9fac6fbe7309383709c30c237
Add support to import images into sheepdog volumes.

Supporting import images from glance to sheepdog volumes.
Unit test framework for sheepdog is added too.

Fix Bug #1148784

Change-Id: I8ffd1bc1b2d719aed27ce0d98eaa41fef8027ca2
Merge "Consist terminate_connection function signature"
Merge "Fix missing volume_name_template flag."
Merge "    cinder.api: Replace 'locals()' with explicit values"
Fixed Ceph backup librbd segfault

Change-Id: I1a6b9935eb7da9fca5b572ea4823bae3def99ea0
Fixes: bug #1198271
Merge "Enable setting blocksize on volumes."
Check enabled backup service before rpc request

In previous code we didn't check whether we have an enabled
backup service there before we send out the rpc request,
results that if no enabled backup service there,the volume will
stays in "backing-up" state and the backup will stays in "creating".

This patch fixed this issue, we exam whether at least an appropriate
(same host,az as the volume and is_alive) backup service available
before we do the rpc request.

Fixes: bug #1200040
Change-Id: I77154528f489ed20f7b784e6fcefccf15dc81d1d
Merge "Fixed Ceph backup librbd segfault"
Merge "Check enabled backup service before rpc request"
Minor reorg for (array resource usage and backend options naming)

1. Use HUS target/initiator resources efficiently.
2. Command options aligned with openStack scheme of using dashes.
3. Self tests modified to accomodate #1 and #2.

Change-Id: I7d23a980f237c973538ca08215f77a1f69cc2517
Fixes: bug 1200441