Fix bug in address check format string

This commit is contained in:
Joshua Boniface 2021-06-22 02:21:32 -04:00
parent e623909a43
commit 1787a970ab
1 changed files with 4 additions and 4 deletions

View File

@ -598,10 +598,10 @@ def vm_networks_add(config, vm, network, macaddr, model, sriov, sriov_mode, rest
if sriov_mode == 'hostdev':
if interface.attrib.get('type') == 'hostdev':
interface_address = 'domain="{pci_domain}" bus="{pci_bus}" slot="{pci_slot}" function="{pci_function}"'.format(
interface.source.address.attrib.get('domain'),
interface.source.address.attrib.get('bus'),
interface.source.address.attrib.get('slot'),
interface.source.address.attrib.get('function')
pci_domain=interface.source.address.attrib.get('domain'),
pci_bus=interface.source.address.attrib.get('bus'),
pci_slot=interface.source.address.attrib.get('slot'),
pci_function=interface.source.address.attrib.get('function')
)
if interface_address == bus_address:
return False, 'Network "{}" is already configured for VM "{}".'.format(network, vm)