'Test weigher with a PCI device instance and huge hosts.
Ensure that the weigher gracefully degrades when the number of PCI
devices on the host exceeeds MAX_DEVS.'

def test_multiplier_with_many_pci(self):

    hosts = [('host1', 'node1', [500]), ('host2', 'node2', [2000])]
    hostinfo_list = self._get_all_hosts(hosts)
    request = objects.InstancePCIRequest(count=4, spec=[{'vendor_id': '8086'}])
    requests = objects.InstancePCIRequests(requests=[request])
    spec_obj = objects.RequestSpec(pci_requests=requests)
    weighed_hosts = self._get_weighed_hosts(hostinfo_list, spec_obj)
    for weighed_host in weighed_hosts:
        self.assertEqual(0.0, weighed_host.weight)
