diff --git a/src/device/service/drivers/openconfig/templates/VPN/Interfaces_multivendor.py b/src/device/service/drivers/openconfig/templates/VPN/Interfaces_multivendor.py index 453096e19199d2ff74555abc2e0c443db819b9a4..0efa2e8f24c19b8058925f95aa026eb440f3b547 100644 --- a/src/device/service/drivers/openconfig/templates/VPN/Interfaces_multivendor.py +++ b/src/device/service/drivers/openconfig/templates/VPN/Interfaces_multivendor.py @@ -54,8 +54,7 @@ def create_If_SubIf(data,vendor, DEL): with tag('enabled'):text('true') with tag('subinterfaces'): with tag('subinterface'): - # if vendor == 'ADVA': - if True: + if vendor is None or vendor == 'ADVA': with tag('index'): text('0') with tag('config'): with tag('index'): text('0') diff --git a/src/device/service/drivers/openconfig/templates/VPN/Network_instance_multivendor.py b/src/device/service/drivers/openconfig/templates/VPN/Network_instance_multivendor.py index 8e6a9144e56357b64f721db6fe4564e12eef7107..1f70156945dcc9222f557ffbb9612661c9752cc5 100644 --- a/src/device/service/drivers/openconfig/templates/VPN/Network_instance_multivendor.py +++ b/src/device/service/drivers/openconfig/templates/VPN/Network_instance_multivendor.py @@ -66,12 +66,10 @@ def create_NI(parameters,vendor,DEL): with tag('name'):text(parameters['name']) if "router_id" in parameters: with tag('router-id'):text(parameters['router_id']) - # if vendor == "ADVA": - if True: + if vendor is None or vendor == 'ADVA': with tag('type', 'xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types"'):text('oc-ni-types:',parameters['type']) with tag('route-distinguisher'):text(parameters['route_distinguisher']) - # if vendor == "ADVA": - if True: + if vendor is None or vendor == 'ADVA': with tag('encapsulation'): with tag('config'): with tag('encapsulation-type', 'xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types"') :text('oc-ni-types:MPLS') @@ -149,8 +147,7 @@ def add_protocol_NI(parameters,vendor, DEL): with tag('neighbor-address'): text(neighbor['ip_address']) with tag('enabled'): text('true') with tag('peer-as'): text(parameters['as']) - # if vendor == "ADVA": - if True: + if vendor is None or vendor == 'ADVA': with tag('tables'): with tag('table'): with tag('protocol', 'xmlns:oc-pol-types="http://openconfig.net/yang/policy-types"'):text('oc-pol-types:',parameters['identifier']) diff --git a/src/device/service/drivers/openconfig/templates/VPN/Routing_policy.py b/src/device/service/drivers/openconfig/templates/VPN/Routing_policy.py index b144eb5bafcf1a5bb677ee11d7bc33df08ad4012..69fdd2cc52ec179665b6fc5a766b04b0e6c2a6ae 100644 --- a/src/device/service/drivers/openconfig/templates/VPN/Routing_policy.py +++ b/src/device/service/drivers/openconfig/templates/VPN/Routing_policy.py @@ -40,7 +40,6 @@ def create_rp_statement(data, DEL): RP_statement_name = data['statement_name'] RP_policy_result = data['policy_result'] RP_ext_comm_set_name = data['ext_community_set_name'] - RP_sequence_id = data['sequence_id'] with tag('routing-policy', xmlns="http://openconfig.net/yang/routing-policy"): @@ -56,9 +55,9 @@ def create_rp_statement(data, DEL): with tag('name'):text(RP_policy_name) with tag('statements'): with tag('statement'): - with tag('name'):text(RP_sequence_id) + with tag('name'):text(RP_statement_name) with tag('config'): - with tag('name'):text(RP_sequence_id) + with tag('name'):text(RP_statement_name) with tag('conditions'): with tag('config'): with tag('install-protocol-eq', **{'xmlns:openconfig-policy-types': 'http://openconfig.net/yang/policy-types'}):text('openconfig-policy-types:DIRECTLY_CONNECTED') diff --git a/src/device/service/drivers/openconfig/templates/routing_policy/policy_definition/statement/edit_config.xml b/src/device/service/drivers/openconfig/templates/routing_policy/policy_definition/statement/edit_config.xml index 1bf1cf3220342d1c0aa98e18c53ed7b954a16e27..eda2d99c9f6299f7345767db8bed8e8cc58284ae 100644 --- a/src/device/service/drivers/openconfig/templates/routing_policy/policy_definition/statement/edit_config.xml +++ b/src/device/service/drivers/openconfig/templates/routing_policy/policy_definition/statement/edit_config.xml @@ -8,9 +8,9 @@ </config> <statements> <statement> - <name>{{sequence_id}}</name> + <name>{{statement_name}}</name> <config> - <name>{{sequence_id}}</name> + <name>{{statement_name}}</name> </config> <conditions> <config>