sonic-utilities icon indicating copy to clipboard operation
sonic-utilities copied to clipboard

Remove the rules of the deleted table - fix bug

Open shiraez opened this issue 1 year ago • 4 comments

What I did

Fix bug for https://github.com/sonic-net/sonic-utilities/issues/2550: Delete the rules of the deleted table

How I did it

Add a call to acl-loader delete

How to verify it

config load acl.json

{
    "ACL_TABLE": 
    {
        "L3_IPV4_INGRESS": 
         { 
               "type": "L3", "stage": "INGRESS", "ports": ["Ethernet127"], "policy_desc": "L3_IPV4_INGRESS" 
          }
    },
    "ACL_RULE":  
     {
          "L3_IPV4_INGRESS|rule1": 
           { 
                   "PACKET_ACTION": "FORWARD", "SRC_IP": "1.1.1.1/32", "DST_IP": "2.2.2.2/32", "L4_SRC_PORT": 43, "L4_DST_PORT_RANGE": "10-20", "DSCP":62, "IP_PROTOCOL": 6, "PRIORITY": 1000 
           }
    }
}

show acl rule config acl remove rule

Previous command output (if the output of a command-line utility has changed)

admin@sonic:~$ sudo show acl rule
Table            Rule    Priority    Action    Match                     Status
---------------  ------  ----------  --------  ------------------------  --------
L3_IPV4_INGRESS  rule1   1000        FORWARD   DSCP: 62                  Inactive
                                               DST_IP: 2.2.2.2/32
                                               IP_PROTOCOL: 6
                                               L4_DST_PORT_RANGE: 10-20
                                               L4_SRC_PORT: 43
                                               SRC_IP: 1.1.1.1/32

New command output (if the output of a command-line utility has changed)

admin@sonic:~$ sudo show acl rule
Table            Rule    Priority    Action    Match                     Status
---------------  ------  ----------  --------  ------------------------  --------

shiraez avatar Feb 11 '24 13:02 shiraez

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: shiraez / name: Shira (e703988cac82fb717712a32f0d43cdf82886a8f4, 3a49404a4fcf34c0cbdea08c8ea75110f1e5cc65, a4cf161a0ae5801ccb18c1e9ed5233154206d739, a00d4250a43bbb8ab408d96fbd8bf8c1f603694a)

@ArthiGovindaraj This will fix your bug.

shiraez avatar Feb 18 '24 08:02 shiraez

@stcheng would you be able to review?

shiraez avatar Feb 19 '24 12:02 shiraez

@qiluo-msft , could you please help review it? Thanks.

shiraez avatar Mar 26 '24 08:03 shiraez