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 0efa2e8f24c19b8058925f95aa026eb440f3b547..ab57ce3bd26e9183f931a1a6e13a44a9a85bef7d 100644 --- a/src/device/service/drivers/openconfig/templates/VPN/Interfaces_multivendor.py +++ b/src/device/service/drivers/openconfig/templates/VPN/Interfaces_multivendor.py @@ -65,8 +65,10 @@ def create_If_SubIf(data,vendor, DEL): with tag('single-tagged'): with tag('config'): with tag('vlan-id'):text(data['vlan_id']) - if "l3ipvlan" in data['type']: + if "l3ipvlan" in data['type'] and 'address_ip' in data: with tag('ipv4', xmlns="http://openconfig.net/yang/interfaces/ip"): + if 'mtu' in data: + with tag('mtu'):text(data['mtu']) with tag('addresses'): with tag('address'): with tag('ip'):text(data['address_ip']) 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 1f70156945dcc9222f557ffbb9612661c9752cc5..8d59cf5ac4e798a0c8962f96e013980566e372e4 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 @@ -196,7 +196,7 @@ def associate_If_to_NI(parameters, DEL): with tag('name'):text(parameters['name']) with tag('config'): with tag('name'):text(parameters['name']) - with tag('type', 'xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types"'):text('oc-ni-types:L3VRF') + with tag('type', 'xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types"'):text('oc-ni-types:',parameters['type']) with tag('interfaces'): with tag('interface'): with tag('id'):text(parameters['id']) @@ -204,25 +204,7 @@ def associate_If_to_NI(parameters, DEL): with tag('id') :text(parameters['id']) with tag('interface') :text(parameters['interface']) with tag('subinterface'):text(parameters['subinterface']) - with tag('interfaces', 'xmlns="http://openconfig.net/yang/interfaces"'): - with tag('interface'): - with tag('name'):text(parameters['interface']) - with tag('config'): - with tag('name'):text(parameters['interface']) - with tag('subinterfaces'): - with tag('subinterface'): - with tag('index'): text(parameters['subinterface']) - with tag('config'): - with tag('index'): text(parameters['subinterface']) - with tag('ipv4', 'xmlns="http://openconfig.net/yang/interfaces/ip"'): - with tag('config'): - with tag('mtu'): text('1500') - with tag('addresses'): - with tag('address'): - with tag('ip'):text(parameters['address_ip']) - with tag('config'): - with tag('ip'):text(parameters['address_ip']) - with tag('prefix-length'):text(parameters['address_prefix']) + result = indent( doc.getvalue(), @@ -365,7 +347,8 @@ def create_table_conns(parameters,DEL): with tag('src-protocol','xmlns:oc-pol-types="http://openconfig.net/yang/policy-types"'): text('oc-pol-types:',parameters['src_protocol']) with tag('dst-protocol','xmlns:oc-pol-types="http://openconfig.net/yang/policy-types"'): text('oc-pol-types:',parameters['dst_protocol']) with tag('address-family', 'xmlns:oc-types="http://openconfig.net/yang/openconfig-types"'):text('oc-types:',parameters['address_family']) - with tag('dst-instance', 'xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments"'):text('65000') + # for OCNOS: check if needed + #with tag('dst-instance', 'xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments"'):text('65000') if len(parameters['default_import_policy']) != 0: with tag('default-import-policy'):text(parameters['default_import_policy']) result = indent( diff --git a/src/device/service/drivers/openconfig/templates/network_instance/table_connections/edit_config.xml b/src/device/service/drivers/openconfig/templates/network_instance/table_connections/edit_config.xml index bd1dac1b326c9d14645d059bafefd73319497593..35c535c6bd3f78e30fc2177ecc722b1115f54fc5 100644 --- a/src/device/service/drivers/openconfig/templates/network_instance/table_connections/edit_config.xml +++ b/src/device/service/drivers/openconfig/templates/network_instance/table_connections/edit_config.xml @@ -11,7 +11,9 @@ <src-protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:{{src_protocol}}</src-protocol> <dst-protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:{{dst_protocol}}</dst-protocol> <address-family xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:{{address_family}}</address-family> - <dst-instance xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">{{as}}</dst-instance> + {% if False %} + <dst-instance xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">{{as}}</dst-instance> + {% endif %} {% if default_import_policy is defined %}<default-import-policy>{{default_import_policy}}</default-import-policy>{% endif %} </config> {% endif %}