1f259e2a94
The nova.pci.manager.PciDevTracker.claim_instance() accepted an Instance object and called nova.objects.InstancePCIRequests.get_by_instance() to retrieve the PCI requests for the instance. This caused a DB lookup of the PCI requests for that instance, even though in all situations other than for migration/resize, the instance's PCI requests were already retrieved by the resource tracker. This change removes that additional DB lookup during claim_instance() by changing the instance parameter to instead be an InstancePCIRequests object and an InstanceNUMATopology object. Also in this patch is a change to nova.objects.PciDevice.claim() that changes the single parameter to an instance UUID instead of an Instance object, since nothing other than the instance's UUID was used in the method. Change-Id: I9ab10c3035628f083233114b47b43a9b9ecdd166