mirror of
https://github.com/ml-explore/mlx.git
synced 2025-11-02 01:08:10 +08:00
Fix missing domain_uuid_key in thunderbolt ring setup (#2682)
This commit is contained in:
@@ -567,13 +567,16 @@ def prepare_tb_ring(args, hosts):
|
|||||||
name = ""
|
name = ""
|
||||||
ports = []
|
ports = []
|
||||||
for t in c["SPThunderboltDataType"]:
|
for t in c["SPThunderboltDataType"]:
|
||||||
|
uuid = t.get("domain_uuid_key")
|
||||||
|
if uuid is None:
|
||||||
|
continue
|
||||||
name = t["device_name_key"]
|
name = t["device_name_key"]
|
||||||
uuid = t["domain_uuid_key"]
|
|
||||||
tag = t["receptacle_1_tag"]["receptacle_id_key"]
|
tag = t["receptacle_1_tag"]["receptacle_id_key"]
|
||||||
if items := t.get("_items", []):
|
items = t.get("_items", [])
|
||||||
connected_to = items[0]["domain_uuid_key"]
|
connected_items = [item for item in items if "domain_uuid_key" in item]
|
||||||
else:
|
connected_to = (
|
||||||
connected_to = None
|
connected_items[0]["domain_uuid_key"] if connected_items else None
|
||||||
|
)
|
||||||
iface = iface_map[f"Thunderbolt {tag}"]
|
iface = iface_map[f"Thunderbolt {tag}"]
|
||||||
ports.append(ThunderboltPort(iface, uuid, connected_to))
|
ports.append(ThunderboltPort(iface, uuid, connected_to))
|
||||||
tb_hosts.append(ThunderboltHost(name, sorted(ports, key=lambda x: x.iface)))
|
tb_hosts.append(ThunderboltHost(name, sorted(ports, key=lambda x: x.iface)))
|
||||||
|
|||||||
Reference in New Issue
Block a user