<network-instances xmlns="http://openconfig.net/yang/network-instance">
    <network-instance>
        <name>{{name}}</name>
        <interfaces>
            <interface{% if operation is defined %} xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="{{operation}}"{% endif %}>
                <id>{{id}}</id>
                {% if operation is not defined or operation != 'delete' %}
                <config>
                    <id>{{id}}</id>
                    {% if 1==0 %}
                    <interface>{{id}}</interface>
                    {% else %}
                    <interface>13/1/2</interface>
                    <subinterface>1</subinterface>
                    {% endif %}
                </config>
                {% endif %}
            </interface>
        </interfaces>
    </network-instance>
</network-instances>
