Loading src/service/service/ServiceServiceServicerImpl.py +3 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ import grpc, json, logging from typing import Optional from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.method_wrappers.ServiceExceptions import AlreadyExistsException, InvalidArgumentException from common.proto.context_pb2 import Empty, Service, ServiceId, ServiceStatusEnum from common.proto.context_pb2 import Empty, Service, ServiceId, ServiceStatusEnum, ServiceTypeEnum from common.proto.pathcomp_pb2 import PathCompRequest from common.proto.service_pb2_grpc import ServiceServiceServicer from common.tools.grpc.Tools import grpc_message_to_json, grpc_message_to_json_string Loading Loading @@ -93,6 +93,8 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): _service : Optional[Service] = get_service(context_client, request.service_id) service = Service() service.CopyFrom(request if _service is None else _service) if service.service_type == ServiceTypeEnum.SERVICETYPE_UNKNOWN: # pylint: disable=no-member service.service_type = request.service_type # pylint: disable=no-member service.service_status.service_status = ServiceStatusEnum.SERVICESTATUS_PLANNED # pylint: disable=no-member del service.service_endpoint_ids[:] # pylint: disable=no-member Loading Loading
src/service/service/ServiceServiceServicerImpl.py +3 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ import grpc, json, logging from typing import Optional from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.method_wrappers.ServiceExceptions import AlreadyExistsException, InvalidArgumentException from common.proto.context_pb2 import Empty, Service, ServiceId, ServiceStatusEnum from common.proto.context_pb2 import Empty, Service, ServiceId, ServiceStatusEnum, ServiceTypeEnum from common.proto.pathcomp_pb2 import PathCompRequest from common.proto.service_pb2_grpc import ServiceServiceServicer from common.tools.grpc.Tools import grpc_message_to_json, grpc_message_to_json_string Loading Loading @@ -93,6 +93,8 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): _service : Optional[Service] = get_service(context_client, request.service_id) service = Service() service.CopyFrom(request if _service is None else _service) if service.service_type == ServiceTypeEnum.SERVICETYPE_UNKNOWN: # pylint: disable=no-member service.service_type = request.service_type # pylint: disable=no-member service.service_status.service_status = ServiceStatusEnum.SERVICESTATUS_PLANNED # pylint: disable=no-member del service.service_endpoint_ids[:] # pylint: disable=no-member Loading