Improper check for implemented driver methods
Bug #1492311 reported by
Lucian Petrut
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Shared File Systems Service (Manila) |
Fix Released
|
Undecided
|
Lucian Petrut |
Bug Description
The base ShareDriver "_has_redefined
This can cause issues if those methods are inherited, being actually implemented in the super class, which does not have to be
the base ShareDriver class (for example, we could have common classes, inherited by multiple drivers).
At the moment, this method is used when checking if a driver supports snapshots.
Changed in manila: | |
assignee: | nobody → Lucian Petrut (petrutlucian94) |
status: | New → In Progress |
Changed in manila: | |
milestone: | none → liberty-rc1 |
Changed in manila: | |
status: | Fix Committed → Fix Released |
Changed in manila: | |
milestone: | liberty-rc1 → 1.0.0 |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/220511 /git.openstack. org/cgit/ openstack/ manila/ commit/ ?id=c6c28948210 34a4ad87bf2e5e1 d2676b84d2d760
Committed: https:/
Submitter: Jenkins
Branch: master
commit c6c2894821034a4 ad87bf2e5e1d267 6b84d2d760
Author: Lucian Petrut <email address hidden>
Date: Fri Sep 4 16:33:03 2015 +0300
Enhance base driver checking if a method was implemented
The base ShareDriver "_has_redefined _driver_ methods" method
checks if a stub method was implemented by comparing it to the
super class method.
This can cause issues if those methods are inherited, being
actually implemented in the super class, which does not have to be
the base ShareDriver class (for example, we could have common
classes, inherited by multiple drivers).
This patch fixes this by comparing the methods being tested with
the ones from the ShareDriver class.
Also, the create_ share_from_ snapshot method was removed from the rror.
Huawei driver as it was actually just raising NotImplementedE
This was misleading for our way of checking if a driver supports
snapshotting.
Closes-Bug: #1492311
Change-Id: I0369d086234053 e5495a35db5034f 7344c6c323a