]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Make volume_glance_metadata_create compat with DB2
authorzhuzhubj <zhuzhubj@cn.ibm.com>
Wed, 3 Jul 2013 10:07:43 +0000 (18:07 +0800)
committerJay S. Bryant <jsbryant@us.ibm.com>
Tue, 26 Nov 2013 00:18:11 +0000 (18:18 -0600)
commit1350867613d8638baf8ccc85910a61df94d5a86d
treef948ceb60706cce5c19d08dd94439fc8aeafb1f7
parent0b71a3f0bd502f9637043aa3f21a6653d536b866
Make volume_glance_metadata_create compat with DB2

As DB2 does not support SQL insert via raw number type if
table column data type is "CLOB" ("TEXT" in sqlalchemy), we need
to convert numerical values to string before insert operations.

This problem was discovered through the
test_volume_create_get_update_delete_from_image test case in
tempest.api.volume.test_volumes_get.  The test case fails with
a DBError without this change in place.

Partial-blueprint db2-database

Change-Id: I5b378cce5b639df23d7003548f49bdab1eecf6a0
cinder/db/sqlalchemy/api.py
cinder/tests/test_volume_glance_metadata.py