From 6dadeffac6a88ad0ddc12eac4f0d2b19015489d5 Mon Sep 17 00:00:00 2001 From: PabloArmingolRobles <pablo.armingolrobles.practicas@telefonica.com> Date: Fri, 29 Jul 2022 12:19:58 +0200 Subject: [PATCH] Changes in ACL --- .../acl/acl-set/acl-entry/edit_config.xml | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/device/service/drivers/openconfig/templates/acl/acl-set/acl-entry/edit_config.xml b/src/device/service/drivers/openconfig/templates/acl/acl-set/acl-entry/edit_config.xml index 297563cca..2769e8b2e 100644 --- a/src/device/service/drivers/openconfig/templates/acl/acl-set/acl-entry/edit_config.xml +++ b/src/device/service/drivers/openconfig/templates/acl/acl-set/acl-entry/edit_config.xml @@ -13,7 +13,16 @@ <config> <sequence-id>{{sequence_id}}</sequence-id> </config> - {% if config is defined %} + {% if operation is not defined or operation != 'delete' %} + {% if type=='ACL_L2' %} + <l2> + <config> + {% if source_address is defined %}<source-mac>{{source_address}}</source-mac>{% endif%} + {% if destination_address is defined %}<destination-mac>{{destination_address}}</destination-mac>{% endif%} + </config> + </l2> + {% endif%} + {% if type=='ACL_IPV4' %} <ipv4> <config> {% if source_address is defined %}<source-address>{{source_address}}</source-address>{% endif%} @@ -30,6 +39,19 @@ {% if tcp_flags is defined %}<tcp-flags>{{tcp_flags}}</tcp-flags>{% endif%} </config> </transport> + {% endif%} + {% if type=='ACL_IPV6' %} + <ipv6> + <config> + {% if source_address is defined %}<source-address>{{source_address}}</source-address>{% endif%} + {% if destination_address is defined %}<destination-address>{{destination_address}}</destination-address>{% endif%} + {% if protocol is defined %}<protocol>{{protocol}}</protocol>{% endif%} + {% if dscp is defined %}<dscp>{{dscp}}</dscp>{% endif%} + {% if hop_limit is defined %}<hop-limit>{{hop_limit}}</hop-limit>{% endif%} + </config> + </ipv6> + {% endif%} + <actions> <config> {% if forwarding_action is defined %}<forwarding-action>{{forwarding_action}}</forwarding-action>{% endif%} -- GitLab