]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Properly use obj_extra_fields in objects
authorThang Pham <thang.g.pham@gmail.com>
Tue, 17 Mar 2015 14:24:08 +0000 (10:24 -0400)
committerThang Pham <thang.g.pham@gmail.com>
Thu, 26 Mar 2015 19:15:55 +0000 (19:15 +0000)
commit2d7d86fccd0923ac17f55431cf756f980a5abc9c
treec5531e4c5fe79c21aaeb2db1a1272609cccc19af
parent982c423dfefe85d498887d5d57ef6b5c8e4105cf
Properly use obj_extra_fields in objects

The following patch fixes a bug in the snapshot object,
where fields that are not part of the Snapshot model,
i.e. name and volume_name, were not specified as
obj_extra_fields in the object. It also fixes the same
problem in the volume object, i.e. name and name_id.
With this patch, those extra fields are properly loaded,
e.g. snapshot.volume_name or volume.name.

Change-Id: Ie2b8dc66c897f89f941e9ad3b80ec4f4ab346430
Closes-Bug: #1429889
cinder/objects/snapshot.py
cinder/objects/volume.py
cinder/tests/objects/test_snapshot.py
cinder/tests/objects/test_volume.py