Comment 2 for bug 1408480

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/145619
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=50ee9dd76e8955dd57e5a7318be023c76c462f67
Submitter: Jenkins
Branch: master

commit 50ee9dd76e8955dd57e5a7318be023c76c462f67
Author: EdLeafe <email address hidden>
Date: Mon Jan 12 15:56:21 2015 +0000

    Pass correct context to get_by_compute_node()

    A recent change to the PciDevTracker class allowed for the passing of
    the compute node ID to the __init__() method, where
    PciDevsList.get_by_compute_node() was called with a 'context' parameter,
    which wasn't defined, resulting in the imported context module being
    passed instead.

    This change requires that the context be passed in to the __init__() for
    the PciDevTracker class, and that that be used to create the
    PciDevsList. The existing import of the context module is no longer
    needed in the pci/manager.py file, so the conflict is no longer a
    problem. The only place in the code that currently instantiates a
    PciDevTracker object is in the ResourceTracker, so that has been updated
    to pass in the context. A unit test to check for context has also been
    added.

    Change-Id: Id136eabacb00e4381c03f12d8484fc90a5eb48b1
    Closes-Bug: #1408480