use 'exc_info=1' instead of import traceback

We need store traceback message in log sometime. Python logging module
already provide a argument to do that. For example, we could:

logger.error('msg', exc_info=1)
logger.debug(e, exc_info=(type_,value_,tb))
logger.exception('msg') # exception add exc_info automaticly

Change-Id: Iaf541e4f4ea139d9315ac1990f0e6079c8f8a20d
Remove xen storage manager tables

This removes the unused tables sm_backend_config, sm_flavors and
sm_volume. In addition, they're removed from the database API.

Change-Id: I02ff6434c2d6928f2e2b08053f6dcb6178edd773
Fixes: bug #1206962
Improve DB API test coverage

This patch improves the test coverage of DB API methods a bit.

Blueprint: db-session-cleanup

Change-Id: Ib4b7312b6effca771a80d6b3137005cc28cb81e4
Execute DB API methods in a single transaction

Many DB API methods do a few queries to a DB (e. g.  SELECT
and then UPDATE, or SELECT and then DELETE, etc).  By default,
a Session instance is used with autocommit=True, which means,
that each query to a DB is done in a separate transaction. This
is error-prone (as it may lead to race conditions or returning
of unexpected results) and makes rollbacks harder (if one of
transactions fail, the previous ones can not be rolled back).

This patch ensures that all DB API methods, which do a few
queries (or call private DB API methods), are executed inside
a single transaction.

Blueprint: db-session-cleanup

Change-Id: Ie6510becffdeb78048fe4a09511ab326627d3412
Fix volume_create()/snapshot_create() DB methods

volume_create() and snapshot_create() DB API methods create
entities and return information about them by calling
_volume_get() and snapshot_get() methods. There is no need
to create a new transaction to call the corresponding 'getter'.

Unfortunately, fixing this breaks two existing tests, which rely
on the current behaviour of these DB API methods: both volume_create()
and snapshot_create() raise exceptions, nevertheless new entities are
created.

Blueprint: db-session-cleanup

Change-Id: Idecac70893ec280c149f9227f86a6959d70c15fe
Call get_session() only when necessary

A Session instance should be retrieved only when it's
really needed, e. g. to make a few DB queries inside a
single transaction or to pass the session to a private
DB API method, etc. At the same time, many queries are
simple and can be expressed by the means  of auxiliary
model_query() function.

Blueprint: db-session-cleanup

Change-Id: I2ddc0cda42a84fe600c04f4624db9c2933799bfc
Ignore "volume does not exist error"

Patch to ignore "volume does not exist error" when driver is deleting volume.

Change-Id: I31645182e5495c44e67fe1add0a2e6c8222534b0
Update driver version to 1.1

This patch includes bumping the driver versions for both
Fibre Channel and iSCSI to 1.1.  Included a history change
that describes the changes since 1.0.

This patch also changes the way we do clone volume.  We no
longer have to check the status of the volume clone on the 3par
as it's instantly done now since 3.1.2 MU2 firmware.

Change-Id: I541ac7f97e6d1290bac6232d6c80e8ecf3a75dda
Add new persona value in the 3PAR driver

A new persona type, '12 - OpenVMS' was added to the list of valid
personas in the 3PAR drivers. This persona was introduced in the
3.1.2 MU2 firmware update on the 3PAR storage array.

DocImpact

Change-Id: Ib848938d261acfdc8a422a03668cada109e97173
Merge "Ignore "volume does not exist error""
Set bootable flag for volume serializer

In previous code we didn't set the bootable flag in volume
serializer, and even didn't check it in test. This is the
root cause for bug #1207155

This patch fixed this issue by set the bootable flag in serializer.

Fixed bug #1207155

Change-Id: I0219785aa7f30036747c230800447e99c383042c
Merge "Remove xen storage manager tables"
Merge "Improve DB API test coverage"
Merge "Execute DB API methods in a single transaction"
Merge "Fix volume_create()/snapshot_create() DB methods"
Merge "Call get_session() only when necessary"
Merge "Add new persona value in the 3PAR driver"
Merge "Update driver version to 1.1"
Merge "Set bootable flag for volume serializer"
Merge "use 'exc_info=1' instead of import traceback"