← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1305186] Re: Fake libvirtError incompatibile with real libvirtError

 

** Also affects: nova/icehouse
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1305186

Title:
  Fake libvirtError incompatibile with real libvirtError

Status in OpenStack Neutron (virtual network service):
  Invalid
Status in OpenStack Compute (Nova):
  Fix Released
Status in OpenStack Compute (nova) icehouse series:
  New

Bug description:
  PROBLEM

  The existing `fakelibvirt.libvirtError` is actually not compatible
  with the real `libvirt.libvirtError` class in that it accepts
  different kwargs in the `__init__`.

  This is a problem because test code may use either class depending on
  whether `libvirt-python` happens to be installed on the box.

  For example, if `libvirt-python` is installed on the box and you try
  to use `libvirtError` class from a test with the `error_code` kwarg,
  you'll get this exception: http://paste.openstack.org/show/75432/

  This code would work on a machine that doesn't have `libvirt-python`
  installed b/c `fakelibvirt.libvirtError` was used.

  POSSIBLE SOLUTION

  Copy over the real `libvirt.libvirtError` class so that it matches
  exactly.

  Create a `make_libvirtError` convenience function so we can still
  create `libvirtErrors` using the nice `error_code` kwarg in the
  constructor (b/c 99% of the time that's what we want).

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1305186/+subscriptions


References