Skip to content
Snippets Groups Projects
Commit 0a03b17f authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Device component:

- Removed endpoints when running SetDevice method in ConfigureDevice for performance enhancement.
parent 41b7ac7b
No related branches found
No related tags found
2 merge requests!142Release TeraFlowSDN 2.1,!81Context Performance Scalability
...@@ -160,6 +160,12 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): ...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment