]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Make nullable of fields in db model and object match
authorLisaLi <xiaoyan.li@intel.com>
Fri, 26 Feb 2016 02:41:19 +0000 (10:41 +0800)
committerLisaLi <xiaoyan.li@intel.com>
Mon, 29 Feb 2016 06:29:54 +0000 (06:29 +0000)
commit7a158ac4488ac86c742e15c714dda7dd76772366
treeb57944346917d876e1f8e204a4c6e9ba1d05e400
parent687ea8dd30683895d49ebe8c95321bb7f2e09fd1
Make nullable of fields in db model and object match

Currently there are some fields whose nullable in db
model and object don't match. This may lead object query
fails.

For example, for volume, if attach_status is nullable in
db schema, but is not nullable in object schema.
When writting data to db using db interface, the attach_status
can be null. But later when reading data from db to construct
volume object, it raises exception. As a result, all the
query related to the volume fails.

This patch is to make all the fields in corresponding db
model and object match.

Change-Id: I84fb16f0a67f9a1f7a09e91bb8ebe6298f3f49c4
Closes-Bug: #1549669
Related-Bug: #1549673
cinder/objects/backup.py
cinder/objects/base.py
cinder/objects/service.py
cinder/objects/snapshot.py
cinder/objects/volume.py
cinder/objects/volume_type.py
cinder/tests/unit/objects/test_objects.py