Commit 3874e897 authored by Shayan Hajipour's avatar Shayan Hajipour
Browse files

operation_type selection added to config rule creation

parent 319ea841
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -229,6 +229,10 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler):
            running_candidate_diff = get_running_candidate_ietf_slice_data_diff(
                service_config
            )
            if not running_candidate_diff:
                operation_type = "create"
            elif "values_changed" in running_candidate_diff:
                operation_type = "update"
            LOGGER.debug("running_candidate_diff: %s", running_candidate_diff)
            slice_services = candidate_resource_value_dict["network-slice-services"][
                "slice-service"
@@ -292,7 +296,7 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler):
                "dst_ce_pe_network_prefix": dst_ce_address_prefix,
                "dst_mtu": MTU,
            }
            json_config_rules = setup_config_rules(service_uuid, resource_value_dict)
            json_config_rules = setup_config_rules(service_uuid, resource_value_dict, operation_type)
            del controller.device_config.config_rules[:]
            for jcr in json_config_rules:
                controller.device_config.config_rules.append(ConfigRule(**jcr))