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

Fix service teardown durign service update for non-gps-location-aware services

parent f4e0a2ac
No related branches found
No related tags found
1 merge request!142Release TeraFlowSDN 2.1
...@@ -97,13 +97,14 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): ...@@ -97,13 +97,14 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
context_client, request.service_id, rw_copy=False, context_client, request.service_id, rw_copy=False,
include_config_rules=True, include_constraints=True, include_endpoint_ids=True) include_config_rules=True, include_constraints=True, include_endpoint_ids=True)
location_aware = False gps_location_aware = False
for constraint in request.service_constraints: for constraint in request.service_constraints:
if constraint.WhichOneof('constraint') != 'endpoint_location': continue if constraint.WhichOneof('constraint') != 'endpoint_location': continue
location_aware = True if constraint.endpoint_location.location.WhichOneof('location') != 'gps_position': continue
gps_location_aware = True
LOGGER.debug('location_aware={:s}'.format(str(location_aware))) LOGGER.debug('gps_location_aware={:s}'.format(str(gps_location_aware)))
if _service is not None and location_aware: if _service is not None and gps_location_aware:
LOGGER.debug(' Removing previous service') LOGGER.debug(' Removing previous service')
tasks_scheduler = TasksScheduler(self.service_handler_factory) tasks_scheduler = TasksScheduler(self.service_handler_factory)
tasks_scheduler.compose_from_service(_service, is_delete=True) tasks_scheduler.compose_from_service(_service, is_delete=True)
......
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