Loading src/service/service/ServiceServiceServicerImpl.py +2 −5 Original line number Original line Diff line number Diff line Loading @@ -269,15 +269,12 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): device_names : Dict[str, str] = dict() device_names : Dict[str, str] = dict() for device in devices: for device in devices: device_uuid = device.device_id.device_uuid.uuid device_uuid = device.device_id.device_uuid.uuid device_names[device_uuid] = device.name device_names[device_uuid] = device.name # ID => name device_names[device.name] = device.name # name => name (that way, if not present, crash) LOGGER.warning('device_names={:s}'.format(str(device_names))) LOGGER.warning('service={:s}'.format(grpc_message_to_json_string(service))) devs = [] devs = [] ports = [] ports = [] for endpoint_id in service.service_endpoint_ids: for endpoint_id in service.service_endpoint_ids: LOGGER.warning('endpoint_id={:s}'.format(grpc_message_to_json_string(endpoint_id))) endpoint_device_uuid = endpoint_id.device_id.device_uuid.uuid endpoint_device_uuid = endpoint_id.device_id.device_uuid.uuid endpoint_device_name = device_names[endpoint_device_uuid] endpoint_device_name = device_names[endpoint_device_uuid] devs.append(endpoint_device_name) devs.append(endpoint_device_name) Loading Loading
src/service/service/ServiceServiceServicerImpl.py +2 −5 Original line number Original line Diff line number Diff line Loading @@ -269,15 +269,12 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): device_names : Dict[str, str] = dict() device_names : Dict[str, str] = dict() for device in devices: for device in devices: device_uuid = device.device_id.device_uuid.uuid device_uuid = device.device_id.device_uuid.uuid device_names[device_uuid] = device.name device_names[device_uuid] = device.name # ID => name device_names[device.name] = device.name # name => name (that way, if not present, crash) LOGGER.warning('device_names={:s}'.format(str(device_names))) LOGGER.warning('service={:s}'.format(grpc_message_to_json_string(service))) devs = [] devs = [] ports = [] ports = [] for endpoint_id in service.service_endpoint_ids: for endpoint_id in service.service_endpoint_ids: LOGGER.warning('endpoint_id={:s}'.format(grpc_message_to_json_string(endpoint_id))) endpoint_device_uuid = endpoint_id.device_id.device_uuid.uuid endpoint_device_uuid = endpoint_id.device_id.device_uuid.uuid endpoint_device_name = device_names[endpoint_device_uuid] endpoint_device_name = device_names[endpoint_device_uuid] devs.append(endpoint_device_name) devs.append(endpoint_device_name) Loading