]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Use abstract class for the backup driver interface
authorMarc Koderer <marc@koderer.com>
Tue, 22 Jul 2014 11:53:45 +0000 (13:53 +0200)
committerMarc Koderer <marc@koderer.com>
Fri, 15 Aug 2014 06:30:05 +0000 (08:30 +0200)
commit64f6bebc6623a0e48dde3bef38390460728ea91e
tree6bcb66e73f22d26352389e9f4df5c7aba042d315
parent4b973e90e099d7ab66d3c10de2c32506d68e9f6c
Use abstract class for the backup driver interface

Instead of using NotImplementedError exceptions to define the interface
it's better to use python abc class [1]. The advantage that it fails
faster if a class doesn't implement the needed interface.
See also [2].

[1]: http://legacy.python.org/dev/peps/pep-3119/
[2]: http://dbader.org/blog/abstract-base-classes-in-python

Change-Id: I625a73f70ac5c6ca68ee38a70c98d999454a817e
Partial-Bug: #1346797
cinder/backup/driver.py
cinder/backup/manager.py
cinder/tests/backup/fake_service.py
cinder/tests/backup/fake_service_with_verify.py
cinder/tests/test_backup.py
cinder/tests/test_backup_driver_base.py