Skip to content
Snippets Groups Projects
Commit e6dba8b7 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Service component - L2NM Emulated Service Handler:

- Improved parameter gathering
parent b9287d37
No related branches found
No related tags found
2 merge requests!142Release TeraFlowSDN 2.1,!110Partial fix OECC/PSC'22 test, InterDomain component, and other side improvements
...@@ -24,7 +24,7 @@ def setup_config_rules( ...@@ -24,7 +24,7 @@ def setup_config_rules(
if service_settings is None: return [] if service_settings is None: return []
if endpoint_settings is None: return [] if endpoint_settings is None: return []
#json_settings : Dict = service_settings.value json_settings : Dict = service_settings.value
json_endpoint_settings : Dict = endpoint_settings.value json_endpoint_settings : Dict = endpoint_settings.value
#mtu = json_settings.get('mtu', 1450 ) # 1512 #mtu = json_settings.get('mtu', 1450 ) # 1512
...@@ -35,11 +35,14 @@ def setup_config_rules( ...@@ -35,11 +35,14 @@ def setup_config_rules(
#router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10' #router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10'
#route_distinguisher = json_endpoint_settings.get('route_distinguisher', '0:0' ) # '60001:801' #route_distinguisher = json_endpoint_settings.get('route_distinguisher', '0:0' ) # '60001:801'
sub_interface_index = json_endpoint_settings.get('sub_interface_index', 0 ) # 1 sub_interface_index = json_endpoint_settings.get('sub_interface_index', 0 ) # 1
vlan_id = json_endpoint_settings.get('vlan_id', 1 ) # 400 vlan_id = json_endpoint_settings.get('vlan_id', None ) # 400
#address_ip = json_endpoint_settings.get('address_ip', '0.0.0.0') # '2.2.2.1' #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 #address_prefix = json_endpoint_settings.get('address_prefix', 24 ) # 30
remote_router = json_endpoint_settings.get('remote_router', '0.0.0.0') # '5.5.5.5' remote_router = json_endpoint_settings.get('remote_router', '0.0.0.0') # '5.5.5.5'
circuit_id = json_endpoint_settings.get('circuit_id', '000' ) # '111' circuit_id = json_endpoint_settings.get('circuit_id', None ) # '111'
if vlan_id is None: vlan_id = json_settings.get('vlan_id', 1)
if circuit_id is None: circuit_id = json_settings.get('circuit_id', '000')
if_cirid_name = '{:s}.{:s}'.format(endpoint_name, str(circuit_id)) if_cirid_name = '{:s}.{:s}'.format(endpoint_name, str(circuit_id))
network_instance_name = 'ELAN-AC:{:s}'.format(str(circuit_id)) network_instance_name = 'ELAN-AC:{:s}'.format(str(circuit_id))
......
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