← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1361797] Re: unused code in pci_manager.get_instance_pci_devs()

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => kilo-1

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1361797

Title:
  unused code in pci_manager.get_instance_pci_devs()

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  def get_instance_pci_devs(inst):
      """Get the devices assigned to the instances."""
      if isinstance(inst, objects.Instance):
          return inst.pci_devices
      else:
          ctxt = context.get_admin_context()
          return objects.PciDeviceList.get_by_instance_uuid(
              ctxt, inst['uuid'])

  In the above code, the else part may not be used by the normal code
  flow. Removing it may break some of the unit tests. Thus fix is also
  needed in the unit test code that is using it.

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


References