Add time_type dictionary to test_migrations

A number of postgresql migration tests fail because the test case
is verifying that an sqlalchemy.types.DATETIME column was created.
When the column type is checked, however, postgresql reports the type as
sqlalchemy.types.TIMESTAMP.  The mismatch causes numerous
test cases to fail for postgresql.

This creates a dictionary for each engine being tested to handle the
different time types.

Change-Id: Ic9921ff9fda001a66c0ea3a6a75c8adefa60b107
Closes-bug: 1262426
Do not show quota of removed volume types in Default Quotas panel

Fixes the issue where quota for removed volume types still show up
in Admin -> Defaults -> Default Quotas view.

Change-Id: I2a822ac08b8347a8d76e8de70deca0e34fafe6e3
Closes-Bug: #1266906
Sync RPC module from Oslo

22e971a safe_log Sanitize Passwords in List of Dicts
8b2b0b7 Use hacking import_exceptions for gettextutils._
23f6029 Use six.seraise() instead of `raise exc, val, tb`
6d0a6c3 Correct invalid docstrings
7cac1ac Fix mis-spellings
ef406a2* Create a shared queue for QPID topic consumers
e6494c2 Use six.iteritems to make dict work on Python2/3
e227c0e* Properly reconnect subscribing clients when QPID broker restarts
16fb43b Replace data structures' attribute with six module
27b21bc Unify different names between Python2/3 with six.moves
12bcdb7 Remove vim header
3970d46 Fix typos in oslo
1771a77 Adjust import order according to PEP8 imports rule
0717d1d matchmaker_redis compatibility with redis-py 2.4
f88d59a Drop RPC securemessage.py
39f6589 Use localisation
8a3996a Fix missing space in help text
4bfb7a2 Apply six for metaclass
d7d74a7 Add `versionutils` for version compatibility checks
3cdd157 Add third element to RPC versions for backports
76972e2* Support a new qpid topology
284b13a Raise timeout in fake RPC if no consumers found
9721129 exception: remove
7b0cb37 Don't eat callback exceptions
69abf38 requeue instead of reject
28395d9 Fixes files with wrong bitmode
bec54ac Fix case error in qpid exchange type "direct"
61c4cde Ensure context type is handled when using to_dict
223f9e1 Clarify precedence of secret_key_file
a035f95 Don't shadow cfg import in securemessage
0f88575 Remove redundant global keyword in securemessage
848c4d5 Some nitpicky securemessage cleanups
5c71c25 Allow non-use of cfg.CONF in securemessage
9157286 RPC: Add MessageSecurity implementation
2031e60 Refactors boolean returns
a047a35 Make ZeroMQ based RPC consumer threads more robust
34a6842 On reconnecting a FanoutConsumer, don't grow the topic name
f52446c Add serializer param to RPC service
5ff534d Add config for amqp durable/auto_delete queues
f9f1b4f Revert "Add support for heartbeating in the kombu RPC driver"
1a2df89 Enable H302 hacking check
7bfd443 Avoid shadowing Exception 'message' attribute
99b7c35 Convert kombu SSL version string into integer
c37f6aa Add support for heartbeating in the kombu RPC driver
3006787 Sanitize passwords in _safe_log
dea334a Replace sys.exit by a RPCException
3969355 Fix exception arg typo
22ec8ff Make AMQP based RPC consumer threads more robust
13650b1 rpc: remove some unused serialization code
e204885 Optionally reject messages on exception.
688832f Remove unused zmq relay functionality
719eba4 Don't reconnect to exclusive fanout consumers.
980fe5f Allow exceptions to hop up cells
80476f0 Add can_send_version() to RpcProxy.
7119e29 Enable hacking H404 test.
32e2a25 zmq: remove someone unused code from ZmqClient
6d42ced Remove the amqp_rpc_single_reply_queue option from Havana
7ce5441 Fix problem with long messages in Qpid
e3545f8 Enable hacking H402 test
15d8d69 Silence exceptions from qpid connection.close()
484a1df Enable hacking H403 test
35660da Enable hacking H401 test
1a9a744 MatchMakerStub - make it work & add test
35aad91 Use zero-copy in ZeroMQ proxy (zmq-rpc-receiver)
b677b13 Remove rootwrap from IPC directory creation
93ee6e3 Add generic serialization support
fe2f108 Enable hacking H702 localization test
0a14e1d Enable hacking H703: Multiple positional placeholders
df7ea83 Allow RPC_API_NAMESPACE on RpcProxy objects
aa89d8b Support capping message versions in the client.
1d7920a Extract matchmaker_ring to own module
3e33692 Merge "Removes len() on empty sequence evaluation"
44c79fc Merge "python3: use 'as' syntax for exception assignment"
0c54b72 python3: use 'as' syntax for exception assignment
a514693 Removes len() on empty sequence evaluation
fde1e15 Convert unicode for python3 portability
0c9047c* Ensure that qpid connection is closed.
120ddef Improve Python 3.x compatibility

(* after hash indicates this was already ported to Cinder)

Oslo version:
7a51572 Merge "Implement cache abstraction layer"
Date:   Wed Jan 15 19:31:16 2014 +0000

Related-Bug: #1189711
Closes-Bug: #1270178

Change-Id: I19572c5e98c1c1037a6a622d63fbdea8d6001532
VolumeManager: initialize even if a volume can't be found

If a previously volume cannot be exported (for example, because
an iSCSI target's backing LV is no longer present), VolumeManager
would previously bail out, leaving the volume service uninitialized.
This left volumes dangling in limbo: their state would be reported
as available (clearly not a reflection of reality), and they could
not be deleted (because the volume service that would be responsible
for deletion was unavailable).

Instead, catch an exception raised by ensure_export() separately,
log it, and set the volume to the error state.

For the tgt backend, this will also remove the volume_path file.
Previously this would cause an ISCSITargetRemoveFailed exception
when the volume would be removed. Instead, simply log a warning
and return, the way other backends (example: RBD) already do.

Also, add an info message that reflects the actual path and
contents of the volume_path file.

Finally, fix up the tgtadm unit test so that it tests for
identical IQNs,

Closes-bug: 1270959.

Change-Id: Id61407c9a5e020d5a823dd7b8c973d237c35cb9b
Revert initialize_connection changes

A change was merged that reusulted in interittent
gate failures.  It seems that in certain cases the
intitialize is doing an update targets and is
deleting the existing targets and not recreating them.

The idea of this patch was to fix up the iscis targets
for cases where volumes are extended.

A better solution is in progress that will remove the
target creation from the create_volume process altogether.

Currently we seem to have create_export, ensure_export and
now initialize that all are designed to do very similar
things.

A bug has been filed to address this and will attempt
to collapse these functions to be done at attach time.

This particular patch in essence reverts two patches:
commit: 18f8f5be94aae3b1747b143479ea1b188872f000
commit: a9267644ee09591e2d642d6c1204d94a9fdd8c82

Change-Id: Ib615847f3cbeb74b1e4416d51730162ad1d07a40
Closes-Bug: 1270608
Stop volume_type_encryption creation when in use

This bug fix addresses bug #1274252.  It requires a volume
type to have no volumes with the type before allowing it
to be made encrypted.  This prevents a situation where
non-encrypted volumes could have an encrypted volume type.
This fix also adds a unit test to confirm functionality.

Change-Id: Iab0954c2d0af73bce28be7fa319b8b34ca20e720
Closes-Bug: #1274252
Set a sane default for state_path

This change set a sane default to state_path, removed no more used cfg
options, and put the previous state_path for tests only.

DocImpact
Closes bug: #1240879

Change-Id: If56b60950d8ebf9111ef99bfbf2cb549bbb6b29b
Brick LVM: Handle space info as numeric types

Rather than relying on callers to cast values from the VG object
to float, always create them as floats up front.

This removes the nosuffix option used with the LVM commands in
Brick, as it does not appear to be used.

Also removes unneeded self.vg_pool_name variable.

Change-Id: Ic19ce206bc8069071e3c2d9e58ba5393119e9b4d
Add support for special char in volume metadata

Using special characters such as "&" in volume metadata caused SAX
parser to split text into multiple child nodes, as stated in the
specs for SAX parsers. In this case extract_text would return
'None' because text was return if there was exactly
one child node. Concatenating the values of child nodes accounts
for SAX parsers splitting contigous characters into
multiple chunks.

Change-Id: I3709789d33ff7b07eaeaf725f5183105443d0abc
Closes-Bug: #1268513
Merge "Revert initialize_connection changes"
Merge "VolumeManager: initialize even if a volume can't be found"
Remove unused task from manager create_volume flow

ExtractSchedulerSpecTask hasn't been ever used in the
create_volume flow, so it should be deleted.

Change-Id: Ia841e224bc253c68ed21520951016a1a90634faf
Merge "Brick LVM: Handle space info as numeric types"
Merge "Remove unused task from manager create_volume flow"
Remove a catching exception during delete_volume

GlanceMetadataNotFound Exception was catching during
a call to volume_glance_metadata_delete_by_volume().
This exception is never thrown by the implementation.
This catching has been removed.

Change-Id: Ifa15df5d9c4517f75a1a050ff5aa34225f33931b
Closes-Bug: #1274601
Allow spaces in host names in the storwize driver

Storwize/SVC naming rules allow host objects to have spaces in their
names. The SSH injection filter will currently reject such names, and so
we surround the names with quotes. Please note that this doesn't allow
to have an arbitrary character in there except a space (anything else
will be cleaned up by the driver or rejected by the SSH injection filter
up the call chain).

Change-Id: If9aec40fe34293031f08d759dd930d73ead456f5
Closes-Bug: #1270204
Merge "Stop volume_type_encryption creation when in use"
Imported Translations from Transifex

Change-Id: I723d6663ee209a3e56c1dfcd6e0ddcd2e2af9a12
Merge "Remove a catching exception during delete_volume"
Merge "Add support for special char in volume metadata"