Loading src/service/service/service_handlers/l3nm_ietfactn/L3NM_IETFACTN_ServiceHandler.py +10 −2 Original line number Diff line number Diff line Loading @@ -43,11 +43,19 @@ class L3NM_IETFACTN_ServiceHandler(_ServiceHandler): ) -> Tuple[Device, EndPoint, Dict]: device_uuid, endpoint_uuid = get_device_endpoint_uuids(endpoint) device_obj = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) device_name = device_obj.name device_prefix = '/device[{:s}]/'.format(device_name) for config_rule in device_obj.device_config.config_rules: self.__settings_handler.update_config_rule(config_rule) if config_rule.WhichOneof('config_rule') != 'custom': continue rw_config_rule = ConfigRule() rw_config_rule.CopyFrom(config_rule) resource_key = str(config_rule.custom.resource_key) if resource_key.startswith('/endpoints/endpoint['): resource_key = resource_key.replace('/endpoints/', device_prefix) rw_config_rule.custom.resource_key = resource_key self.__settings_handler.update_config_rule(rw_config_rule) endpoint_obj = get_endpoint_matching(device_obj, endpoint_uuid) endpoint_settings = self.__settings_handler.get_endpoint_settings(device_obj, endpoint_obj) device_name = device_obj.name endpoint_name = endpoint_obj.name if endpoint_settings is None: MSG = 'Settings not found for Endpoint(device=[uuid={:s}, name={:s}], endpoint=[uuid={:s}, name={:s}])' Loading Loading
src/service/service/service_handlers/l3nm_ietfactn/L3NM_IETFACTN_ServiceHandler.py +10 −2 Original line number Diff line number Diff line Loading @@ -43,11 +43,19 @@ class L3NM_IETFACTN_ServiceHandler(_ServiceHandler): ) -> Tuple[Device, EndPoint, Dict]: device_uuid, endpoint_uuid = get_device_endpoint_uuids(endpoint) device_obj = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) device_name = device_obj.name device_prefix = '/device[{:s}]/'.format(device_name) for config_rule in device_obj.device_config.config_rules: self.__settings_handler.update_config_rule(config_rule) if config_rule.WhichOneof('config_rule') != 'custom': continue rw_config_rule = ConfigRule() rw_config_rule.CopyFrom(config_rule) resource_key = str(config_rule.custom.resource_key) if resource_key.startswith('/endpoints/endpoint['): resource_key = resource_key.replace('/endpoints/', device_prefix) rw_config_rule.custom.resource_key = resource_key self.__settings_handler.update_config_rule(rw_config_rule) endpoint_obj = get_endpoint_matching(device_obj, endpoint_uuid) endpoint_settings = self.__settings_handler.get_endpoint_settings(device_obj, endpoint_obj) device_name = device_obj.name endpoint_name = endpoint_obj.name if endpoint_settings is None: MSG = 'Settings not found for Endpoint(device=[uuid={:s}, name={:s}], endpoint=[uuid={:s}, name={:s}])' Loading