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

Pre-release CI/CD pipeline fixes

parent a868d68d
No related branches found
No related tags found
2 merge requests!142Release TeraFlowSDN 2.1,!137Pre-release CI/CD fixes - Service - PathComp
...@@ -18,7 +18,8 @@ from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_m ...@@ -18,7 +18,8 @@ from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_m
from common.method_wrappers.ServiceExceptions import ( from common.method_wrappers.ServiceExceptions import (
AlreadyExistsException, InvalidArgumentException, NotFoundException, NotImplementedException, AlreadyExistsException, InvalidArgumentException, NotFoundException, NotImplementedException,
OperationFailedException) OperationFailedException)
from common.proto.context_pb2 import Connection, Empty, Service, ServiceId, ServiceStatusEnum, ServiceTypeEnum, ConstraintActionEnum from common.proto.context_pb2 import (
Connection, Empty, Service, ServiceId, ServiceStatusEnum, ServiceTypeEnum, ConstraintActionEnum)
from common.proto.pathcomp_pb2 import PathCompRequest from common.proto.pathcomp_pb2 import PathCompRequest
from common.proto.service_pb2_grpc import ServiceServiceServicer from common.proto.service_pb2_grpc import ServiceServiceServicer
from common.tools.context_queries.Service import get_service_by_id from common.tools.context_queries.Service import get_service_by_id
...@@ -108,6 +109,10 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): ...@@ -108,6 +109,10 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
LOGGER.warning('[before] request={:s}'.format(grpc_message_to_json_string(request))) LOGGER.warning('[before] request={:s}'.format(grpc_message_to_json_string(request)))
for constraint in request.service_constraints: for constraint in request.service_constraints:
if constraint.action == ConstraintActionEnum.CONSTRAINTACTION_UNDEFINED:
# Field action is new; assume if not set, it means SET
constraint.action = ConstraintActionEnum.CONSTRAINTACTION_SET
if constraint.action != ConstraintActionEnum.CONSTRAINTACTION_SET: continue if constraint.action != ConstraintActionEnum.CONSTRAINTACTION_SET: continue
if constraint.WhichOneof('constraint') != 'endpoint_location': continue if constraint.WhichOneof('constraint') != 'endpoint_location': continue
if constraint.endpoint_location.HasField('endpoint_id'): continue if constraint.endpoint_location.HasField('endpoint_id'): continue
......
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