Virtualization Driver Cleanup

Registered by Sean Dague

The nova.virt drivers currently aren't fully dynamic and use the connection_type and a static list of known drivers in loading. We should clean this up so that drivers are fully dynamically loaded using the openstack commons importutils, and let users specify drivers by class name in nova.conf. Additional cleanup and refactoring of the virt drivers will be done to make driver class naming consistent and predictable.

Blueprint information

Status:
Complete
Approver:
Vish Ishaya
Priority:
Low
Drafter:
Sean Dague
Direction:
Approved
Assignee:
Sean Dague
Definition:
Approved
Series goal:
Accepted for folsom
Implementation:
Implemented
Milestone target:
milestone icon 2012.2
Started by
Sean Dague
Completed by
Sean Dague

Related branches

Sprints

Whiteboard

Proposed path forward from email list discussion and initial prototype:

a) remove get_connection from the drivers (and just have it construct the 'connection' class directly)
b) modify the global get_connection to construct the drivers for backwards compatibilty
c) modify the documentation to suggest changing drivers by specifying the full path to the driver instead of connection_type
d) rename the connection classes to something reasonable representing drivers (libvirt.driver:LibvirtDriver() vs libvirt.connection.LibvirtConnection)
e) bonus points if it could be done with a short path for ease of use (compute_driver=libvirt.LibvirtDriver vs compute_driver=nova.virt.libvirt.driver.LibvirtDriver)

Gerrit topic: https://review.openstack.org/#q,topic:bp/virt-driver-cleanup,n,z

Addressed by: https://review.openstack.org/7930
    convert virt drivers to fully dynamic loading

Addressed by: https://review.openstack.org/8158
    add unit tests for new virt driver loader

Addressed by: https://review.openstack.org/8778
    refactor libvirt from connection -> driver

Addressed by: https://review.openstack.org/9173
    update importutils from openstack-common

Addressed by: https://review.openstack.org/9174
    use import_object_ns for compute_driver loading

Addressed by: https://review.openstack.org/9410
    refactor vmwareapi_conn => vmwareapi/driver

Addressed by: https://review.openstack.org/9411
    refactor xenapi/connection => xenapi/driver

Addressed by: https://review.openstack.org/9458
    refactor baremetal/proxy => baremetal/driver

Addressed by: https://review.openstack.org/9459
    flags documentation to deprecate connection_type

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.