Commit dc32fbb8 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Device - OpenConfig SBI driver:

- Corrected Jinja template for edit-config interface/subinterface
parent ce2ae05f
Loading
Loading
Loading
Loading
+14 −15
Original line number Diff line number Diff line
<interfaces xmlns="http://openconfig.net/yang/interfaces" 
            xmlns:oc-ip="http://openconfig.net/yang/interfaces/ip" >
<interfaces xmlns="http://openconfig.net/yang/interfaces">
    <interface{% if operation is defined %} xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="{{operation}}"{% endif %}>
        <name>{{name}}</name>
        {% if operation is defined and operation != 'delete' %}
@@ -31,20 +30,20 @@
                </vlan>
                {% endif %}
                {% if address_ip is defined %}
                <oc-ip:ipv4>
                    <oc-ip:config>
                <ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
                    <config>
                        {% if mtu is defined %}<mtu>{{mtu}}</mtu>{% endif%}
                    </oc-ip:config>
                    <oc-ip:addresses>
                        <oc-ip:address>
                            <oc-ip:ip>{{address_ip}}</oc-ip:ip>
                            <oc-ip:config>
                                <oc-ip:ip>{{address_ip}}</oc-ip:ip>
                                <oc-ip:prefix-length>{{address_prefix}}</oc-ip:prefix-length>
                            </oc-ip:config>
                        </oc-ip:address>
                    </oc-ip:addresses>
                </oc-ip:ipv4>
                    </config>
                    <addresses>
                        <address>
                            <ip>{{address_ip}}</ip>
                            <config>
                                <ip>{{address_ip}}</ip>
                                <prefix-length>{{address_prefix}}</prefix-length>
                            </config>
                        </address>
                    </addresses>
                </ipv4>
                {% endif %}
            </subinterface>
        </subinterfaces>