Skip to content
Snippets Groups Projects
Commit ac8ccd01 authored by Shayan Hajipour's avatar Shayan Hajipour
Browse files

Merge branch...

Merge branch 'feat/215-cttc-implement-l3-vpn-sbi-driver-compatible-with-ietf-l3-service-model' into camara-demo-integration
parents ae6ff0a7 3874e897
No related branches found
No related tags found
2 merge requests!359Release TeraFlowSDN 5.0,!321Resolve: "(CTTC) CAMARA Demo Integration tests"
...@@ -229,6 +229,10 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): ...@@ -229,6 +229,10 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler):
running_candidate_diff = get_running_candidate_ietf_slice_data_diff( running_candidate_diff = get_running_candidate_ietf_slice_data_diff(
service_config 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) LOGGER.debug("running_candidate_diff: %s", running_candidate_diff)
slice_services = candidate_resource_value_dict["network-slice-services"][ slice_services = candidate_resource_value_dict["network-slice-services"][
"slice-service" "slice-service"
...@@ -292,7 +296,7 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): ...@@ -292,7 +296,7 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler):
"dst_ce_pe_network_prefix": dst_ce_address_prefix, "dst_ce_pe_network_prefix": dst_ce_address_prefix,
"dst_mtu": MTU, "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[:] del controller.device_config.config_rules[:]
for jcr in json_config_rules: for jcr in json_config_rules:
controller.device_config.config_rules.append(ConfigRule(**jcr)) controller.device_config.config_rules.append(ConfigRule(**jcr))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment