Implement import/export for SolidFire Driver

This adds the import/export (or manage) functioniality
to the SolidFire driver.

Partially Implements: blueprint add-export-import-volumes

Change-Id: I4e7d5fc7c66d8037f01efc47a4cf5e93d9dba662
fix atom link in XML Version API

This patch fixes tag names where the tag name has ':'
for links templates.
Some examples are
'{http://www.w3.org/2005/Atom}link'
should be
['{http://www.w3.org/2005/Atom}link']

and

'test1:test2'
should be
['test1', 'test2']

Closes-Bug: #1311243
Change-Id: I6e7c068e41eb6b069c24ef9d6c46b726ea722074
Have task/flow logging go to a separate log file

To be able to point the taskflow logging at a task log
we need to be able to separate the logs coming from cinder
from the logs coming from taskflow (as well as the listener
that acts as the intermediary between both projects).

To start the process of having a detailed task log
location, add-in a new log setting that can be used for just
this purpose.

This is not the most ideal way of doing this, since it just
provides a sample logging configuration adjustment, but there
does not appear to be a better way (due to how
cinder/openstack/common/logging.py can't be modified or adjusted
with a better option).

Part of blueprint task-logging

Change-Id: I5e3946c71110ee1b923c2258f3a7eb83c358426b
VMware: Update default task_poll_interval value

The task_poll_interval option is used as the polling interval of vCenter/ESX
task status. This patch updates the default value to 0.5s in order to reduce
the wait time for task completion. Similar change has been done in nova and
this change is needed to keep the driver config values consistent.

DocImpact
   Updated default value of task_poll_interval to 0.5 seconds.

Change-Id: I66b80c629e255d61047592455ca42632f93051b2
Closes-bug: #1278028
Fix unit test test_import_record_with_verify

The test case test_import_record_with_verify is intended to call a
backup service class with a defined verify function. This verify
function wasn't overloaded by the fake service.

Change-Id: Ib5738e9c463856dd71a47717b7abb8dff785b3b1
Closes-bug: #1350699
Fixes wrong usage of mock.assert_not_called()

There is no method assert_not_called in mock, use
assertFalse(mock.called) instead of that.

Change-Id: I1b37c49e0a624de42d89890b44458ec6bd4239ee
fix a small typo in development.environment.rst

virutalenv ==> virtualenv

Change-Id: If090ab7b92230fba15d7be98a84b51cce507bedd
Closes-bug: 1358531
Adds CA cert file path option for glance connections

Currently, there is no way to pass CA cert for HTTPS glance
connections. This patch adds new cinder.conf option to enable
secure connection.

Closes-Bug: 1311271
DocImpact - New option added to cinder.conf

Change-Id: I3f39980b94ae314c6351c77f8668ab0922b1c3d8
Ignore HTTP_PROXY during test requests

urllib2 follows http_proxy/HTTP_PROXY by default.  If a (non-local)
proxy is set and a test tries to connect to localhost:$port, it will
instead attempt to connect to $port on the proxy and (presumably) fail.

This change forces the two tests that failed in the presence of
HTTP_PROXY to connect directly.

Change-Id: Ia12c91b356f0ccebf874933ff459aa2faa190655
VMware: Check snapshot and rename backing

This patch adds methods for: a) checking existence of backing VM snapshots;
and b) rename backing.

Change-Id: Iede168e28d9569a5a3331479c8096c3cca5140e9
Partial-Bug: #1275682
Implements: blueprint vmdk-backup
Prevent tenant viewing volumes owed by another

Bug introduced by 0505bb268942534ad5d6ecd5e34a4d9b0e7f5c04 allows any
tenant to get the details of a volume belonging to any other tenant
if the UUID is known.

This commit allows only the tenant or an admin to get a volume.

Change-Id: I0268d374f7529d89068dcbf3c1cb9ab3d60d4115
Closes-Bug: #1356368
Enable F402 checks and fix violations

This change enables F402 hacking check and fixes all violations found.

[F402] import module from line N shadowed by loop variable

Basically this rule tries to avoid loop variables using the same name as
imported module, for example:

    from cinder import volume
    ...

    for volume in volumes:
        ...

Change-Id: Ie3010616ca87fda113d452fe684e6cff3d5fd978
Sync latest oslo-incubator log for debug fixes

This patch pulls in the changes in openstack/common/log.py that
fix the problems that popped up after we removed _() from
around LOG.debug messages.  The change in log ensures that any
text that is not of six.text_type is converted to six.text_type.

Current HEAD in OSLO:
---------------------
commit 759bd8791ec6a4b0e89f649a4179d177530e7536
Merge: 71d072f 631f880
Author: Jenkins <jenkins@review.openstack.org>
Date:   Wed Aug 13 13:37:27 2014 +0000

Merge "Set keystonemiddleware and routes.middleware to log on WARN level"
---------------------

Additional changes being merged (newest to oldest):
---------------------
759bd879 -
Merge "Set keystonemiddleware and routes.middleware to log on WARN level
71d072f1 -
Merge "Except socket.error if syslog isn't running"
37c00918 -
Add unicode coercion of logged messages to ContextFormatter
66144135 -
Correct coercion of logged message to unicode
1188d88a -
Except socket.error if syslog isn't running
ac995bec -
Fix E126 pep8 errors

Note that this change required an update to config.sample due to change
759bd879 -  Merge "Set keystonemiddleware and routes.middleware to log
on WARN level"

Change-Id: I4b849981c65300b327076d68fbf8601d46ec61f0
Closes-Bug: 1348244
Actually encode the SolidFire json dump result

The SolidFire driver intends to do a encode on the json data to utf-8,
unfortunatly it's not really doing anything because the syntax of the
calls is wrong.

This patch changes things to actually perform the encoding.

Change-Id: I2bc94ed1fdc1dd5f9a6371ae5f63a955f213bc15
Closes-Bug: #1355622
Merge "Enable F402 checks and fix violations"
Merge "Actually encode the SolidFire json dump result"
Enable import group hacking rule

This change enables H305, H307 included in newly updated hacking 0.9
all violations are fixed.

H305, H307 will check if imports are grouped in stdlib, 3rd libs and
OpenStack components.

Change-Id: I612cae64982450a9be5207dbe26a2b52da49dac6
Merge "VMware: Check snapshot and rename backing"
Merge "Enable import group hacking rule"
Catch DBDuplicateEntry instead of IntegrityError

'iscsi_target_create_safe' method didn't catch DB exceptions
correct.

Need to catch both db_exc.DBError and db_exc.DBDuplicateEntry
due to current oslo.db limitations: it doesn't handle correct
DBDuplicateEntry with different SQLite versions

Related-Bug: #1187367

Change-Id: Ie412ecabd3cbcac301340c82b4275adb7a7206c3