1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

feature #4620: Add PCI_ID to PCI devices

This commit is contained in:
Ruben S. Montero 2016-07-18 11:31:55 +02:00
parent 5178c31268
commit 086ccd4f09

View File

@ -1237,17 +1237,20 @@ static int check_pci_attributes(VectorAttribute * pci, string& error_str)
int VirtualMachine::parse_pci(string& error_str)
{
vector<VectorAttribute *> array_pci;
vector<VectorAttribute *>::iterator it;
int pci_id = 0;
user_obj_template->remove("PCI", array_pci);
for (it = array_pci.begin(); it !=array_pci.end(); it++)
for (it = array_pci.begin(); it !=array_pci.end(); ++it, ++pci_id)
{
(*it)->replace("PCI_ID", pci_id);
obj_template->set(*it);
}
for (it = array_pci.begin(); it !=array_pci.end(); it++)
for (it = array_pci.begin(); it !=array_pci.end(); ++it)
{
if ( check_pci_attributes(*it, error_str) != 0 )
{