Loading src/device/service/drivers/gnmi_openconfig/GnmiSessionHandler.py +2 −1 Original line number Original line Diff line number Diff line Loading @@ -108,9 +108,10 @@ class GnmiSessionHandler: if len(updates) > 1: if len(updates) > 1: # Create a new notification with all updates for this resource type # Create a new notification with all updates for this resource type aggregated_notification = type(notifications[0])() aggregated_notification = type(notifications[0])() # Copy the first notification's structure aggregated_notification.CopyFrom(notifications[0]) aggregated_notification.CopyFrom(notifications[0]) # Clear the updates and add our aggregated ones # Clear the updates and add our aggregated ones aggregated_notification.update.Clear() del aggregated_notification.update[:] # Clear the repeated field aggregated_notification.update.extend(updates) aggregated_notification.update.extend(updates) # Use the latest timestamp # Use the latest timestamp if hasattr(updates[0], 'timestamp') and updates[0].timestamp: if hasattr(updates[0], 'timestamp') and updates[0].timestamp: Loading Loading
src/device/service/drivers/gnmi_openconfig/GnmiSessionHandler.py +2 −1 Original line number Original line Diff line number Diff line Loading @@ -108,9 +108,10 @@ class GnmiSessionHandler: if len(updates) > 1: if len(updates) > 1: # Create a new notification with all updates for this resource type # Create a new notification with all updates for this resource type aggregated_notification = type(notifications[0])() aggregated_notification = type(notifications[0])() # Copy the first notification's structure aggregated_notification.CopyFrom(notifications[0]) aggregated_notification.CopyFrom(notifications[0]) # Clear the updates and add our aggregated ones # Clear the updates and add our aggregated ones aggregated_notification.update.Clear() del aggregated_notification.update[:] # Clear the repeated field aggregated_notification.update.extend(updates) aggregated_notification.update.extend(updates) # Use the latest timestamp # Use the latest timestamp if hasattr(updates[0], 'timestamp') and updates[0].timestamp: if hasattr(updates[0], 'timestamp') and updates[0].timestamp: Loading