Add a unit test to check method impl on backend drivers, and act as a reference of drivers and methods that Cinder has.

Registered by John Griffith

So we added abstract base class decorators in Kilo. That's neat, some people really like it (a few don't). Another option that serves multiple purposes is to add a special driver unit test (test_driver_methods.py). I'm not proposing we remove abc... enough people like it, might as well keep it.

This would serve a number of purposes:
1. Make sure the right method are implemented
2. Serve as a rolling reference in the code base of:
  a. All the drivers!!!!! (there's quite a few now)
  b. All the base methods we consider required

The test would rely on a driver list file that would live in the Cinder tree. This could be something under the docs directory (likely a good place to give a single/easy reference of everything that's in tree) and updated with the addition of each driver. It could be yaml, text or whatever and would just include the drivers.<module> for each driver:
lvm.LVMISCSIDriver
pure.PureISCSIDriver
san.hp.hp_3pariscsi.HP3PARISCSIDriver
solidfire.SolidFireISCSIDriver
.....

The unit test itself would just read these entries into a list, and run a loop that loads each one and does some simple checks that methods exist and return.

This isn't only to do the stuff that ABC does, but also we're getting to the point where it would be REALLY useful to have a definitive and maintained (in source control) list of drivers that exist in Cinder.

driver_list ['lvm.LVMISCSIDriver', 'pure.PureISCSIDriver']kk

Blueprint information

Status:
Complete
Approver:
Sean McGinnis
Priority:
Medium
Drafter:
John Griffith
Direction:
Needs approval
Assignee:
None
Definition:
Superseded
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Sean McGinnis

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/unit-test-methodcheck-backend-drivers,n,z

Addressed by: https://review.openstack.org/192751
    Add driver list generator

Addressed by: https://review.openstack.org/389762
    Add unit test for driver methods.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.