Loading src/pathcomp/frontend/service/algorithms/_Algorithm.py +11 −3 Original line number Diff line number Diff line Loading @@ -176,13 +176,19 @@ class _Algorithm: service.service_id.context_id.context_uuid.uuid = context_uuid service.service_id.service_uuid.uuid = service_uuid service.service_type = service_type rules_nb = len(config_rules) if service_type == ServiceTypeEnum.SERVICETYPE_L2NM: if service_type == ServiceTypeEnum.SERVICETYPE_L2NM and rules_nb == 0: compose_l2nm_config_rules(config_rules, service.service_config.config_rules) elif service_type == ServiceTypeEnum.SERVICETYPE_L3NM: self.logger.info("Installing default rules for L2NM service") pass elif service_type == ServiceTypeEnum.SERVICETYPE_L3NM and rules_nb == 0: compose_l3nm_config_rules(config_rules, service.service_config.config_rules) elif service_type == ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE: self.logger.info("Installing default rules for L3NM service") pass elif service_type == ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE and rules_nb == 0: compose_tapi_config_rules(config_rules, service.service_config.config_rules) self.logger.info("Installing default rules for TAPI service") else: MSG = 'Unhandled generic Config Rules for service {:s} {:s}' self.logger.warning(MSG.format(str(service_uuid), str(ServiceTypeEnum.Name(service_type)))) Loading @@ -208,6 +214,8 @@ class _Algorithm: service.timestamp.CopyFrom(tuple_service[1].timestamp) for constraint in tuple_service[1].service_constraints: service.service_constraints.add().CopyFrom(constraint) for config_rule in config_rules: service.service_config.config_rules.add().CopyFrom(config_rule) return service Loading Loading
src/pathcomp/frontend/service/algorithms/_Algorithm.py +11 −3 Original line number Diff line number Diff line Loading @@ -176,13 +176,19 @@ class _Algorithm: service.service_id.context_id.context_uuid.uuid = context_uuid service.service_id.service_uuid.uuid = service_uuid service.service_type = service_type rules_nb = len(config_rules) if service_type == ServiceTypeEnum.SERVICETYPE_L2NM: if service_type == ServiceTypeEnum.SERVICETYPE_L2NM and rules_nb == 0: compose_l2nm_config_rules(config_rules, service.service_config.config_rules) elif service_type == ServiceTypeEnum.SERVICETYPE_L3NM: self.logger.info("Installing default rules for L2NM service") pass elif service_type == ServiceTypeEnum.SERVICETYPE_L3NM and rules_nb == 0: compose_l3nm_config_rules(config_rules, service.service_config.config_rules) elif service_type == ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE: self.logger.info("Installing default rules for L3NM service") pass elif service_type == ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE and rules_nb == 0: compose_tapi_config_rules(config_rules, service.service_config.config_rules) self.logger.info("Installing default rules for TAPI service") else: MSG = 'Unhandled generic Config Rules for service {:s} {:s}' self.logger.warning(MSG.format(str(service_uuid), str(ServiceTypeEnum.Name(service_type)))) Loading @@ -208,6 +214,8 @@ class _Algorithm: service.timestamp.CopyFrom(tuple_service[1].timestamp) for constraint in tuple_service[1].service_constraints: service.service_constraints.add().CopyFrom(constraint) for config_rule in config_rules: service.service_config.config_rules.add().CopyFrom(config_rule) return service Loading