Updated oslo_db.
Updated oslo.db to most recent version, which includes a patch by @greghaynes that fixes pymysql error handling. Also updated all uses of the deprecated oslo.db namespace to use oslo_db. Change-Id: I7de41aef6db0f45a638eb2aa22cfae45f99c8195
This commit is contained in:
parent
3bdd1e3940
commit
2c0bd07e58
@ -9,7 +9,7 @@ oslo.config>=1.2.1
|
|||||||
oslo.context>=0.1.0
|
oslo.context>=0.1.0
|
||||||
oslo.utils>=1.2.0
|
oslo.utils>=1.2.0
|
||||||
pecan>=0.4.5
|
pecan>=0.4.5
|
||||||
oslo.db>=0.2.0
|
oslo.db>=1.8.0
|
||||||
oslo.log>=0.1.0
|
oslo.log>=0.1.0
|
||||||
pika>=0.9.14
|
pika>=0.9.14
|
||||||
python-openid
|
python-openid
|
||||||
|
@ -9,7 +9,7 @@ oslo.config>=1.2.1
|
|||||||
oslo.context>=0.1.0
|
oslo.context>=0.1.0
|
||||||
oslo.utils>=1.2.0
|
oslo.utils>=1.2.0
|
||||||
pecan>=0.4.5
|
pecan>=0.4.5
|
||||||
oslo.db>=0.2.0
|
oslo.db>=1.8.0
|
||||||
oslo.log>=0.1.0
|
oslo.log>=0.1.0
|
||||||
pika>=0.9.14
|
pika>=0.9.14
|
||||||
python-openid
|
python-openid
|
||||||
|
@ -16,10 +16,10 @@
|
|||||||
import copy
|
import copy
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
from oslo.db import exception as db_exc
|
from oslo_db import exception as db_exc
|
||||||
from oslo.db.sqlalchemy import session as db_session
|
from oslo_db.sqlalchemy import session as db_session
|
||||||
from oslo.db.sqlalchemy.utils import InvalidSortKey
|
from oslo_db.sqlalchemy.utils import InvalidSortKey
|
||||||
from oslo.db.sqlalchemy.utils import paginate_query as utils_paginate_query
|
from oslo_db.sqlalchemy.utils import paginate_query as utils_paginate_query
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
from pecan import request
|
from pecan import request
|
||||||
import six
|
import six
|
||||||
@ -284,7 +284,7 @@ def entity_create(kls, values, session=None):
|
|||||||
raise exc.DBDeadLock()
|
raise exc.DBDeadLock()
|
||||||
except db_exc.DBInvalidUnicodeParameter:
|
except db_exc.DBInvalidUnicodeParameter:
|
||||||
raise exc.DBInvalidUnicodeParameter
|
raise exc.DBInvalidUnicodeParameter
|
||||||
# XXX(greghaynes) Due to a bug in oslo.db + PyMySQL reference errors
|
# XXX(greghaynes) Due to a bug in oslo_db + PyMySQL reference errors
|
||||||
# are not properly raised.
|
# are not properly raised.
|
||||||
except db_exc.DBError:
|
except db_exc.DBError:
|
||||||
raise exc.DBReferenceError(object_name=kls.__name__,
|
raise exc.DBReferenceError(object_name=kls.__name__,
|
||||||
@ -321,7 +321,7 @@ def entity_update(kls, entity_id, values, session=None):
|
|||||||
raise exc.DBDeadLock()
|
raise exc.DBDeadLock()
|
||||||
except db_exc.DBInvalidUnicodeParameter:
|
except db_exc.DBInvalidUnicodeParameter:
|
||||||
raise exc.DBInvalidUnicodeParameter
|
raise exc.DBInvalidUnicodeParameter
|
||||||
# XXX(greghaynes) Due to a bug in oslo.db + PyMySQL reference errors
|
# XXX(greghaynes) Due to a bug in oslo_db + PyMySQL reference errors
|
||||||
# are not properly raised.
|
# are not properly raised.
|
||||||
except db_exc.DBError:
|
except db_exc.DBError:
|
||||||
raise exc.DBReferenceError(object_name=kls.__name__,
|
raise exc.DBReferenceError(object_name=kls.__name__,
|
||||||
@ -354,7 +354,7 @@ def entity_hard_delete(kls, entity_id):
|
|||||||
raise exc.DBDeadLock()
|
raise exc.DBDeadLock()
|
||||||
except db_exc.DBInvalidUnicodeParameter:
|
except db_exc.DBInvalidUnicodeParameter:
|
||||||
raise exc.DBInvalidUnicodeParameter()
|
raise exc.DBInvalidUnicodeParameter()
|
||||||
# XXX(greghaynes) Due to a bug in oslo.db + PyMySQL reference errors
|
# XXX(greghaynes) Due to a bug in oslo_db + PyMySQL reference errors
|
||||||
# are not properly raised.
|
# are not properly raised.
|
||||||
except db_exc.DBError:
|
except db_exc.DBError:
|
||||||
raise exc.DBReferenceError(object_name=kls.__name__,
|
raise exc.DBReferenceError(object_name=kls.__name__,
|
||||||
|
@ -22,7 +22,7 @@ from alembic import command as alembic_command
|
|||||||
from alembic import config as alembic_config
|
from alembic import config as alembic_config
|
||||||
from alembic import util as alembic_util
|
from alembic import util as alembic_util
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
from oslo.db import options
|
from oslo_db import options
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from storyboard.db import projects_loader
|
from storyboard.db import projects_loader
|
||||||
|
@ -23,7 +23,7 @@ import six
|
|||||||
import six.moves.urllib.parse as urlparse
|
import six.moves.urllib.parse as urlparse
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
from oslo.db.sqlalchemy import models
|
from oslo_db.sqlalchemy import models
|
||||||
from sqlalchemy import Boolean
|
from sqlalchemy import Boolean
|
||||||
from sqlalchemy import Column
|
from sqlalchemy import Column
|
||||||
from sqlalchemy.dialects.mysql import MEDIUMTEXT
|
from sqlalchemy.dialects.mysql import MEDIUMTEXT
|
||||||
@ -77,7 +77,7 @@ class IdMixin(object):
|
|||||||
|
|
||||||
class UTCTimestampMixin(object):
|
class UTCTimestampMixin(object):
|
||||||
"""A Database model mixin that automatically manages our creation and
|
"""A Database model mixin that automatically manages our creation and
|
||||||
updating timestamps. This mixin was copied from oslo.db, and adapted to
|
updating timestamps. This mixin was copied from oslo_db, and adapted to
|
||||||
use our own internal UTCDateTime type decorator.
|
use our own internal UTCDateTime type decorator.
|
||||||
"""
|
"""
|
||||||
created_at = Column(UTCDateTime,
|
created_at = Column(UTCDateTime,
|
||||||
|
@ -38,7 +38,7 @@ postgres=# create database openstack_citest with owner openstack_citest;
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
from oslo.db.sqlalchemy import utils as db_utils
|
from oslo_db.sqlalchemy import utils as db_utils
|
||||||
|
|
||||||
from storyboard.tests.db.migration import test_migrations_base as base
|
from storyboard.tests.db.migration import test_migrations_base as base
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user