From 214ffd0ec89b28466b0217a93fca8d05416c9c07 Mon Sep 17 00:00:00 2001 From: gifrerenom <lluis.gifre@cttc.es> Date: Tue, 23 Apr 2024 15:29:42 +0000 Subject: [PATCH] Service component - L3NM OpenConfig: - Rolling back malformed config rules, left backup for future integration --- .../l3nm_openconfig/ConfigRules.py | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py b/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py index 098776970..f440a3c92 100644 --- a/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py +++ b/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py @@ -115,13 +115,11 @@ def setup_config_rules( #Associate interface to network instance json_config_rule_set( '/network_instance[{:s}]/interface[{:s}]'.format(network_instance_name, if_subif_name), { - 'name' : network_instance_name, - 'type' : 'L3VRF', - 'id' : if_subif_name, - 'interface' : if_subif_name, - 'subinterface' : sub_interface_index, - 'address_ip' : address_ip, - 'address_prefix': address_prefix, + 'name' : network_instance_name, + 'type' : 'L3VRF', + 'id' : if_subif_name, + 'interface' : if_subif_name, + 'subinterface': sub_interface_index, }), #Create routing policy @@ -216,13 +214,16 @@ def teardown_config_rules( #mtu = json_settings.get('mtu', 1450 ) # 1512 #address_families = json_settings.get('address_families', [] ) # ['IPV4'] #bgp_as = json_settings.get('bgp_as', 65000 ) # 65000 - route_distinguisher = json_device_settings.get('route_distinguisher', '0:0' ) # '60001:801' + route_distinguisher = json_settings.get('route_distinguisher', '0:0' ) # '60001:801' #sub_interface_index = json_endpoint_settings.get('sub_interface_index', 0 ) # 1 #router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10' + vlan_id = json_endpoint_settings.get('vlan_id', 1 ) # 400 #address_ip = json_endpoint_settings.get('address_ip', '0.0.0.0') # '2.2.2.1' #address_prefix = json_endpoint_settings.get('address_prefix', 24 ) # 30 - policy_import = json_device_settings.get('policy_AZ', '2' ) # 2 - policy_export = json_device_settings.get('policy_ZA', '7' ) # 30 + policy_import = json_endpoint_settings.get('policy_AZ', '2' ) # 2 + policy_export = json_endpoint_settings.get('policy_ZA', '7' ) # 30 + + if_subif_name = '{:s}.{:d}'.format(endpoint_name, vlan_id) json_config_rules = [ #Delete table connections -- GitLab