Commit 137f5bed authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Device component - OpenConfig driver:

- Recovered removed blocks
- Adapted IP address assignment to interfaces being part of a network instance
parent db0c5aad
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -30,6 +30,22 @@
                    </match>
                </vlan>
                {% endif %}
                {% if address_ip is defined %}
                <oc-ip:ipv4>
                    <oc-ip:config>
                        <oc-ip:mtu>1500</mtu>
                    </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>
                {% endif %}
            </subinterface>
        </subinterfaces>
        {% endif %}
+1 −31
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
        <name>{{name}}</name>
        <config>
            <name>{{name}}</name>
            <type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
            <type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:{{type}}</type>
        </config>
        <interfaces>
            <interface{% if operation is defined %} xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="{{operation}}"{% endif %}>
@@ -17,33 +17,3 @@
        </interfaces>
    </network-instance>
</network-instances>
<interfaces xmlns="http://openconfig.net/yang/interfaces">
    <interface>
        <name>{{interface}}</name>
        <config>
            <name>{{interface}}</name>
        </config>
        <subinterfaces>
            <subinterface>
                <index>{{subinterface}}</index>
                <config>
                    <index>{{subinterface}}</index>
                </config>
                <ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
                    <config>
                        <mtu>1500</mtu>
                    </config>
                    <addresses>
                        <address>
                            <ip>{{address_ip}}</ip>
                            <config>
                                <ip>{{address_ip}}</ip>
                                <prefix-length>{{address_prefix}}</prefix-length>
                            </config>
                        </address>
                    </addresses>
                </ipv4>
            </subinterface>
        </subinterfaces>
    </interface>
</interfaces>