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:
parent
5178c31268
commit
086ccd4f09
@ -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 )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user