diff options
author | Boris Pavlovic <boris@pavlovic.me> | 2013-05-22 16:57:47 +0400 |
---|---|---|
committer | Boris Pavlovic <boris@pavlovic.me> | 2013-05-24 14:57:27 +0400 |
commit | 7238438ef218d79a31acb07ea004fca8c2e78798 (patch) | |
tree | 6424423d6c16a18004601ad62bfc87f6a97b72f9 /nova/exception.py | |
parent | 05be719ec76adf60a151b56d695c59fd832cb22b (diff) | |
download | nova-7238438ef218d79a31acb07ea004fca8c2e78798.tar.gz nova-7238438ef218d79a31acb07ea004fca8c2e78798.tar.xz nova-7238438ef218d79a31acb07ea004fca8c2e78798.zip |
Fix tests for sqlalchemy utils
This fix tests to be able to run it with postgresql and mysql.
Some tests should be run only on sqlite
Method create_shadow_tables raises different exception in different
backends (when we try to create duplicate table):
In postgresql it is ProgrammingError
In sqlite and mysql it is OperationalError
So create new Exception that will be raised in both cases.
bp db-common-migration-and-utils
Change-Id: I11be23106bc01bd3c72dad30edfb31a17177bb34
Diffstat (limited to 'nova/exception.py')
-rw-r--r-- | nova/exception.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/exception.py b/nova/exception.py index dfa31941a..a763fbcb6 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -1203,6 +1203,10 @@ class RescheduledException(NovaException): "%(reason)s") +class ShadowTableExists(NovaException): + message = _("Shadow table with name %(name)s already exists.") + + class InstanceFaultRollback(NovaException): def __init__(self, inner_exception=None): message = _("Instance rollback performed due to: %s") |