[Openstack] Grizzly libvirt volume drivers all in single file "volume.py"?

Daniel P. Berrange berrange at redhat.com
Tue Jul 2 12:44:50 UTC 2013


On Tue, Jul 02, 2013 at 08:31:22AM -0400, Brad Goodman wrote:
> I am trying to write a volume driver for a new/unique storage type
> uncovered by the existing ones.
> 
> I have a Cinder driver working fine - but I am now working on adding the
> nova/libvirt component of it (for Nova clients to connect into).
> 
> It appears that (unlike in Cinder) - ALL of the drivers are in a single
> file "volume.py" and the libvirt_volume_drivers list options all call the
> classes from it.
> 
> Any attempt I have made to call a driver in another file results in the
> libvirt.driver module itself to fail to load.

You'll need to provide a bit more info on the problems you are hitting
here.

> Is there some (odd) reason why all the drivers are placed in a single file?

It evolved that way historically, with the exception of the nfs driver
which was separate for a while, until I merged it back into the main
volume.py to get consistency across all drivers.

> Will it continue to be mandated to do it this why? Is there a way around
> this that I am missing?

The only "mandate" is to follow a consistent approach for code structure
across all the drivers. What we absolutely don't want is a scenario (which
we had in the past) where some drivers are in the same file and other
drivers are in separate files.

> This seems broken and wrong for so many different reasons...

If you think that it is wrong, then feel free to provide a patch to
split up all existing drivers into separate files, along with the
justification and reviewers will surely consider it. Otherwise just
follow existing practice for adding drivers in the same file.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the Openstack mailing list