Loading src/device/service/DeviceServiceServicerImpl.py +6 −0 Original line number Original line Diff line number Diff line Loading @@ -160,6 +160,12 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): for error in errors: LOGGER.error(error) for error in errors: LOGGER.error(error) raise OperationFailedException('ConfigureDevice', extra_details=errors) raise OperationFailedException('ConfigureDevice', extra_details=errors) # Context Performance+Scalability enhancement: # This method, besides P4 logic, does not add/update/delete endpoints. # Remove endpoints to reduce number of inserts done by Context. # TODO: Add logic to inspect endpoints and keep only those ones modified with respect to Context. del device.device_endpoints[:] # Note: Rules are updated by configure_rules() and deconfigure_rules() methods. # Note: Rules are updated by configure_rules() and deconfigure_rules() methods. device_id = context_client.SetDevice(device) device_id = context_client.SetDevice(device) return device_id return device_id Loading Loading
src/device/service/DeviceServiceServicerImpl.py +6 −0 Original line number Original line Diff line number Diff line Loading @@ -160,6 +160,12 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): for error in errors: LOGGER.error(error) for error in errors: LOGGER.error(error) raise OperationFailedException('ConfigureDevice', extra_details=errors) raise OperationFailedException('ConfigureDevice', extra_details=errors) # Context Performance+Scalability enhancement: # This method, besides P4 logic, does not add/update/delete endpoints. # Remove endpoints to reduce number of inserts done by Context. # TODO: Add logic to inspect endpoints and keep only those ones modified with respect to Context. del device.device_endpoints[:] # Note: Rules are updated by configure_rules() and deconfigure_rules() methods. # Note: Rules are updated by configure_rules() and deconfigure_rules() methods. device_id = context_client.SetDevice(device) device_id = context_client.SetDevice(device) return device_id return device_id Loading