From 105cae43c73f5c75bb342fb4c5d20b5c8edee00c Mon Sep 17 00:00:00 2001
From: =?utf8?q?P=C3=A1draig=20Brady?= <pbrady@redhat.com>
Date: Tue, 2 Apr 2013 14:44:51 +0100
Subject: [PATCH] remove deprecated assert_unicode sqlalchemy attribute

Removing this enables use with sqlalchemy 0.8.0
The deprecation is described upstream at:
http://docs.sqlalchemy.org/en/latest/changelog/changelog_08.html#change-ad44af79c886d1bb283042deb64f9cbe

Change-Id: I305bfdbcd3c3669c41318ea34115624f729b3909
---
 .../migrate_repo/versions/002_quota_class.py          | 11 ++++-------
 .../migrate_repo/versions/008_add_backup.py           | 11 -----------
 2 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/cinder/db/sqlalchemy/migrate_repo/versions/002_quota_class.py b/cinder/db/sqlalchemy/migrate_repo/versions/002_quota_class.py
index 9f5b643c5..fe911c0d4 100644
--- a/cinder/db/sqlalchemy/migrate_repo/versions/002_quota_class.py
+++ b/cinder/db/sqlalchemy/migrate_repo/versions/002_quota_class.py
@@ -37,14 +37,12 @@ def upgrade(migrate_engine):
                           Column('class_name',
                                  String(length=255,
                                         convert_unicode=True,
-                                        assert_unicode=None,
                                         unicode_error=None,
                                         _warn_on_bytestring=False),
                                  index=True),
                           Column('resource',
                                  String(length=255,
                                         convert_unicode=True,
-                                        assert_unicode=None,
                                         unicode_error=None,
                                         _warn_on_bytestring=False)),
                           Column('hard_limit', Integer(), nullable=True),
@@ -67,12 +65,12 @@ def upgrade(migrate_engine):
                          Column('id', Integer(), primary_key=True),
                          Column('project_id',
                                 String(length=255, convert_unicode=True,
-                                       assert_unicode=None, unicode_error=None,
+                                       unicode_error=None,
                                        _warn_on_bytestring=False),
                                 index=True),
                          Column('resource',
                                 String(length=255, convert_unicode=True,
-                                       assert_unicode=None, unicode_error=None,
+                                       unicode_error=None,
                                        _warn_on_bytestring=False)),
                          Column('in_use', Integer(), nullable=False),
                          Column('reserved', Integer(), nullable=False),
@@ -97,7 +95,6 @@ def upgrade(migrate_engine):
                          Column('uuid',
                                 String(length=36,
                                        convert_unicode=True,
-                                       assert_unicode=None,
                                        unicode_error=None,
                                        _warn_on_bytestring=False),
                                 nullable=False),
@@ -107,12 +104,12 @@ def upgrade(migrate_engine):
                                 nullable=False),
                          Column('project_id',
                                 String(length=255, convert_unicode=True,
-                                       assert_unicode=None, unicode_error=None,
+                                       unicode_error=None,
                                        _warn_on_bytestring=False),
                                 index=True),
                          Column('resource',
                                 String(length=255, convert_unicode=True,
-                                       assert_unicode=None, unicode_error=None,
+                                       unicode_error=None,
                                        _warn_on_bytestring=False)),
                          Column('delta', Integer(), nullable=False),
                          Column('expire', DateTime(timezone=False)),
diff --git a/cinder/db/sqlalchemy/migrate_repo/versions/008_add_backup.py b/cinder/db/sqlalchemy/migrate_repo/versions/008_add_backup.py
index 4cc1689f5..5dfbed0f6 100644
--- a/cinder/db/sqlalchemy/migrate_repo/versions/008_add_backup.py
+++ b/cinder/db/sqlalchemy/migrate_repo/versions/008_add_backup.py
@@ -37,49 +37,38 @@ def upgrade(migrate_engine):
         Column('id', String(36), primary_key=True, nullable=False),
         Column('volume_id', String(36), nullable=False),
         Column('user_id', String(length=255, convert_unicode=False,
-                                 assert_unicode=None,
                                  unicode_error=None,
                                  _warn_on_bytestring=False)),
         Column('project_id', String(length=255, convert_unicode=False,
-                                    assert_unicode=None,
                                     unicode_error=None,
                                     _warn_on_bytestring=False)),
         Column('host', String(length=255, convert_unicode=False,
-                              assert_unicode=None,
                               unicode_error=None,
                               _warn_on_bytestring=False)),
         Column('availability_zone', String(length=255,
                                            convert_unicode=False,
-                                           assert_unicode=None,
                                            unicode_error=None,
                                            _warn_on_bytestring=False)),
         Column('display_name', String(length=255, convert_unicode=False,
-                                      assert_unicode=None,
                                       unicode_error=None,
                                       _warn_on_bytestring=False)),
         Column('display_description', String(length=255,
                                              convert_unicode=False,
-                                             assert_unicode=None,
                                              unicode_error=None,
                                              _warn_on_bytestring=False)),
         Column('container', String(length=255, convert_unicode=False,
-                                   assert_unicode=None,
                                    unicode_error=None,
                                    _warn_on_bytestring=False)),
         Column('status', String(length=255, convert_unicode=False,
-                                assert_unicode=None,
                                 unicode_error=None,
                                 _warn_on_bytestring=False)),
         Column('fail_reason', String(length=255, convert_unicode=False,
-                                     assert_unicode=None,
                                      unicode_error=None,
                                      _warn_on_bytestring=False)),
         Column('service_metadata', String(length=255, convert_unicode=False,
-                                          assert_unicode=None,
                                           unicode_error=None,
                                           _warn_on_bytestring=False)),
         Column('service', String(length=255, convert_unicode=False,
-                                 assert_unicode=None,
                                  unicode_error=None,
                                  _warn_on_bytestring=False)),
         Column('size', Integer()),
-- 
2.45.2