X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2Ftopology.py;h=d31d17830c14d69da0954e268fcb16ec08f85526;hp=82516beb6b1274520a148a51e58c86cc84cf48f8;hb=3c863def2096b573832499985e3a12bbccf82ea8;hpb=b4e5c717f5e2c39ded81f0c6f7b0f9f61945befd diff --git a/resources/libraries/python/topology.py b/resources/libraries/python/topology.py index 82516beb6b..d31d17830c 100644 --- a/resources/libraries/python/topology.py +++ b/resources/libraries/python/topology.py @@ -184,6 +184,19 @@ class Topology(object): """ node['interfaces'][iface_key]['mac_address'] = str(mac_address) + @staticmethod + def update_interface_pci_address(node, iface_key, pci_address): + """Update pci_address on the interface from the node. + + :param node: Node to update PCI on. + :param iface_key: Topology key of the interface. + :param pci_address: PCI address. + :type node: dict + :type iface_key: str + :type pci_address: str + """ + node['interfaces'][iface_key]['pci_address'] = str(pci_address) + @staticmethod def update_interface_vhost_socket(node, iface_key, vhost_socket): """Update vhost socket name on the interface from the node.