Commit 14783e4c authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Pre-merge code cleanup

parent 762e4740
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
import logging, operator
from enum import Enum
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Set, Tuple
from common.proto.context_pb2 import Device, Service
from common.proto.context_pb2 import Device, DeviceDriverEnum, Service
from common.tools.grpc.Tools import grpc_message_to_json_string
from .Exceptions import (
    UnsatisfiedFilterException, UnsupportedServiceHandlerClassException, UnsupportedFilterFieldException,
@@ -114,12 +114,13 @@ def get_service_handler_class(
    service_handler_factory : ServiceHandlerFactory, service : Service,
    device_and_drivers: Dict[str, Tuple[Device, Set[int]]]
) -> Optional['_ServiceHandler']:
    LOGGER.debug(f'SERVICE_HANDLER_FACTORY: Getting service handler for service: {service.service_config.config_rules}')
    str_service_key = grpc_message_to_json_string(service.service_id)
    # Checks if the service is of type ipowdm
    if 'ipowdm' in str(service.service_config.config_rules): common_device_drivers = [13]
    if 'ipowdm' in str(service.service_config.config_rules):
        common_device_drivers = [DeviceDriverEnum.DEVICEDRIVER_IETF_L3VPN]
    # Checks if the service is of type tapi_lsp
    elif 'tapi_lsp' in str(service.service_config.config_rules): common_device_drivers = [2]
    elif 'tapi_lsp' in str(service.service_config.config_rules):
        common_device_drivers = [DeviceDriverEnum.DEVICEDRIVER_TRANSPORT_API]
    else:
        common_device_drivers = get_common_device_drivers([
            device_drivers
+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.