Loading src/automation/service/AutomationServiceServicerImpl.py +6 −1 Original line number Diff line number Diff line Loading @@ -42,6 +42,8 @@ class AutomationServiceServicerImpl(AutomationServiceServicer): targetService = context_client.GetService(request.target_service_id) telemetryService = context_client.GetService(request.telemetry_service_id) LOGGER.info(f"Target service type: {targetService.service_type}") LOGGER.info(f"Telemetry service type: {telemetryService.service_type}") handler_cls = self.get_service_handler_based_on_service_types( targetService.service_type, telemetryService.service_type, ZSM_SERVICE_HANDLERS Loading Loading @@ -102,6 +104,8 @@ class AutomationServiceServicerImpl(AutomationServiceServicer): ): flag = True for handler_cls, filters in ZSM_SERVICE_HANDLERS: LOGGER.info(f"Handler: {handler_cls}") # <<--P4INTZSMPlugin LOGGER.info(f"Filters: {filters}") # <--ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY for filter in filters: flag = self.check_if_requested_services_pass_filter_criteria( filter, targetServiceType, telemetryServiceType Loading @@ -115,6 +119,7 @@ class AutomationServiceServicerImpl(AutomationServiceServicer): ): flag = True for filter_key, filter_value in filter.items(): LOGGER.info(f"Filter value: {filter_value}") # <--ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY if filter_value in ZSM_FILTER_FIELD_ALLOWED_VALUES[filter_key.value]: if filter_key.value == ZSMFilterFieldEnum.TARGET_SERVICE_TYPE.value: if filter_value != targetServiceType: Loading src/automation/service/zsm_handler_api/ZSMFilterFields.py +2 −2 Original line number Diff line number Diff line Loading @@ -20,11 +20,11 @@ class ZSMFilterFieldEnum(Enum): TELEMETRY_SERVICE_TYPE = 'telemetry_service_type' TARGET_SERVICE_TYPE_VALUES = { ServiceTypeEnum.SERVICETYPE_L2NM ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY } TELEMETRY_SERVICE_TYPE_VALUES = { ServiceTypeEnum.SERVICETYPE_INT ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY } # Maps filter fields to allowed values per Filter field. # If no restriction (free text) None is specified Loading src/automation/service/zsm_handlers/P4INTZSMPlugin.py +3 −3 Original line number Diff line number Diff line Loading @@ -74,9 +74,9 @@ class P4INTZSMPlugin(_ZSMHandler): LOGGER.exception(ex.code()) # ToDo: Investigate why PolicyAddService throws exception # if ex.code() != grpc.StatusCode.NOT_FOUND: raise # pylint: disable=no-member context_client.close() policy_client.close() return self._zsm_create_response_empty() # context_client.close() # policy_client.close() # return self._zsm_create_response_empty() context_client.close() analytics_frontend_client.close() Loading src/automation/service/zsm_handlers/__init__.py +2 −2 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ from automation.service.zsm_handlers.P4INTZSMPlugin import P4INTZSMPlugin ZSM_SERVICE_HANDLERS = [ (P4INTZSMPlugin, [ { ZSMFilterFieldEnum.TARGET_SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L2NM, ZSMFilterFieldEnum.TELEMETRY_SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_INT, ZSMFilterFieldEnum.TARGET_SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY, ZSMFilterFieldEnum.TELEMETRY_SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY, } ]) ] src/common/tools/kafka/Variables.py +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ from kafka.errors import TopicAlreadyExistsError from common.Settings import get_setting LOGGER = logging.getLogger(__name__) KFK_SERVER_ADDRESS_TEMPLATE = 'kafka-service.{:s}.svc.cluster.local:{:s}' KFK_SERVER_ADDRESS_TEMPLATE = 'kafka-public.{:s}.svc.cluster.local:{:s}' KAFKA_TOPIC_NUM_PARTITIONS = 1 KAFKA_TOPIC_REPLICATION_FACTOR = 1 Loading Loading
src/automation/service/AutomationServiceServicerImpl.py +6 −1 Original line number Diff line number Diff line Loading @@ -42,6 +42,8 @@ class AutomationServiceServicerImpl(AutomationServiceServicer): targetService = context_client.GetService(request.target_service_id) telemetryService = context_client.GetService(request.telemetry_service_id) LOGGER.info(f"Target service type: {targetService.service_type}") LOGGER.info(f"Telemetry service type: {telemetryService.service_type}") handler_cls = self.get_service_handler_based_on_service_types( targetService.service_type, telemetryService.service_type, ZSM_SERVICE_HANDLERS Loading Loading @@ -102,6 +104,8 @@ class AutomationServiceServicerImpl(AutomationServiceServicer): ): flag = True for handler_cls, filters in ZSM_SERVICE_HANDLERS: LOGGER.info(f"Handler: {handler_cls}") # <<--P4INTZSMPlugin LOGGER.info(f"Filters: {filters}") # <--ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY for filter in filters: flag = self.check_if_requested_services_pass_filter_criteria( filter, targetServiceType, telemetryServiceType Loading @@ -115,6 +119,7 @@ class AutomationServiceServicerImpl(AutomationServiceServicer): ): flag = True for filter_key, filter_value in filter.items(): LOGGER.info(f"Filter value: {filter_value}") # <--ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY if filter_value in ZSM_FILTER_FIELD_ALLOWED_VALUES[filter_key.value]: if filter_key.value == ZSMFilterFieldEnum.TARGET_SERVICE_TYPE.value: if filter_value != targetServiceType: Loading
src/automation/service/zsm_handler_api/ZSMFilterFields.py +2 −2 Original line number Diff line number Diff line Loading @@ -20,11 +20,11 @@ class ZSMFilterFieldEnum(Enum): TELEMETRY_SERVICE_TYPE = 'telemetry_service_type' TARGET_SERVICE_TYPE_VALUES = { ServiceTypeEnum.SERVICETYPE_L2NM ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY } TELEMETRY_SERVICE_TYPE_VALUES = { ServiceTypeEnum.SERVICETYPE_INT ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY } # Maps filter fields to allowed values per Filter field. # If no restriction (free text) None is specified Loading
src/automation/service/zsm_handlers/P4INTZSMPlugin.py +3 −3 Original line number Diff line number Diff line Loading @@ -74,9 +74,9 @@ class P4INTZSMPlugin(_ZSMHandler): LOGGER.exception(ex.code()) # ToDo: Investigate why PolicyAddService throws exception # if ex.code() != grpc.StatusCode.NOT_FOUND: raise # pylint: disable=no-member context_client.close() policy_client.close() return self._zsm_create_response_empty() # context_client.close() # policy_client.close() # return self._zsm_create_response_empty() context_client.close() analytics_frontend_client.close() Loading
src/automation/service/zsm_handlers/__init__.py +2 −2 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ from automation.service.zsm_handlers.P4INTZSMPlugin import P4INTZSMPlugin ZSM_SERVICE_HANDLERS = [ (P4INTZSMPlugin, [ { ZSMFilterFieldEnum.TARGET_SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L2NM, ZSMFilterFieldEnum.TELEMETRY_SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_INT, ZSMFilterFieldEnum.TARGET_SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY, ZSMFilterFieldEnum.TELEMETRY_SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY, } ]) ]
src/common/tools/kafka/Variables.py +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ from kafka.errors import TopicAlreadyExistsError from common.Settings import get_setting LOGGER = logging.getLogger(__name__) KFK_SERVER_ADDRESS_TEMPLATE = 'kafka-service.{:s}.svc.cluster.local:{:s}' KFK_SERVER_ADDRESS_TEMPLATE = 'kafka-public.{:s}.svc.cluster.local:{:s}' KAFKA_TOPIC_NUM_PARTITIONS = 1 KAFKA_TOPIC_REPLICATION_FACTOR = 1 Loading