+ if iface.get("type") in ("SR-IOV", "PCI-PASSTHROUGH") and self.config.get("sdn-port-mapping"):
+ compute_index = randrange(len(self.config["sdn-port-mapping"]))
+ port_index = randrange(len(self.config["sdn-port-mapping"][compute_index]["ports"]))
+ interface["compute_node"] = self.config["sdn-port-mapping"][compute_index]["compute_node"]
+ interface["pci"] = self.config["sdn-port-mapping"][compute_index]["ports"][port_index]["pci"]
+