]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Move update_migrated_volume() to BaseVD
authorErlon R. Cruz <erlon.cruz@fit-tecnologia.org.br>
Tue, 7 Jul 2015 14:30:15 +0000 (11:30 -0300)
committerEric Harney <eharney@redhat.com>
Tue, 28 Jul 2015 13:09:58 +0000 (09:09 -0400)
commit162f4125e13493d8e51e41363986c5167999f481
treecb277bef77823d5875a5483573cd26538c35d27d
parent94e3098238f4af32f6ffa85833d0107cab07c14c
Move update_migrated_volume() to BaseVD

The update_migrated_volume() function on volume/manager.py
calls the update_migrated_volume() from the driver. If the
driver does not implement the function, the manager falls
back (by catching the NotImplementedError exception) and
implements a default behavior, not renaming the volume.  If
the driver does not have the function implemented, the
migration will fail as in this case, an AttributeError
exception can be raised.

We fix this by implementing the method
update_migrate_volume() in the BaseVD driver so all drivers
now throw the proper exception.

Change-Id: I9f3cbdc5ae1cdcbf8fe61168abf35b985d4182c6
Closes-Bug: #1471807
cinder/tests/unit/test_nfs.py
cinder/volume/driver.py