Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

"nova-manage prints libvirt related warnings if libvirt isn't installed" is certainly a valid bug IMHO

This would work:

   def is_libvirt_kvm_or_qemu():
       if FLAGS.connection_type != 'libvirt':
           return False

       flags.DECLARE('libvirt_type', 'nova.virt.libvirt.connection')

       return FLAGS.libvirt_type in ['kvm', 'qemu']

    if not is_libvirt_kvm_or_qermu():
        msg = _('Only KVM and QEmu are supported for now. Sorry!')
        raise exception.Error(msg)