<acl xmlns="http://openconfig.net/yang/acl">
  <interfaces>
    <interface {% if operation is defined %}{% if all is defined %} xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="{{operation}}"{% endif %} {% endif %}>
      <id>{{id}}</id>
      <config>
        <id>{{id}}</id>
      </config>
      {% if interface is defined %}
      <interface-ref>
        <config>
          <interface>{{interface}}</interface>
          {% if subinterface is defined %}<subinterface>{{subinterface}}</subinterface>{% endif%}
        </config>
      </interface-ref>
      {% endif%}
      {% if set_name_egress is defined %}
      <egress-acl-sets>
        <egress-acl-set {% if operation is defined %}{% if egress is defined %} xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="{{operation}}"{% endif %} {% endif %}>>
          <set-name>{{set_name_egress}}</set-name>
          <type>{{type_egress}}</type>
          <config>
            <set-name>{{set_name_egress}}</set-name>
            <type>{{type_egress}}</type>
          </config>
        </egress-acl-set>
      </egress-acl-sets>
      {% endif%}
    </interface>
  </interfaces>
</acl>
