Commit cf82c1a5 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Optical Controller:

- Allow indexing devices by name and by uuid
parent def34421
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -441,14 +441,17 @@ class GetTopology(Resource):
                else:
                    continue

                dev_uuid = device.device_id.device_uuid.uuid
                dev_dic = {
                    "id":device.device_id.device_uuid.uuid,
                    "id": dev_uuid,
                    #"ip":f"10.30.2.{207+i}",
                    #"port":"50001",
                    "type": dev_type,
                    "driver": "OpticalOC"
                }
                # Allow indexing by device name and by device UUID
                node_dict[device.name] = dev_dic
                node_dict[dev_uuid] = dev_dic
                added_device_uuids.add(device.device_id.device_uuid.uuid)
                #i+=1
                #print(f"refresh_optical controller optical_links_dict= {links_dict}")