<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>
                    <interface>{{id}}</interface>
                </config>
                {% endif %}
            </interface>
        </interfaces>
    </network-instance>
</network-instances>
