[yang] support ACL ACCEPT action (#9784)

Why I did it
ACL have ACCEPT action indeed, but yang doesn't support it.

How I did it
Add 'ACCEPT' enum to sonic-types.yang.j2

How to verify it
Run the YANG model unit tests
This commit is contained in:
jingwenxie 2022-01-21 11:11:54 +08:00 committed by Judy Joseph
parent d2f92eb3e0
commit 8f15f2d574
3 changed files with 35 additions and 0 deletions

View File

@ -102,5 +102,8 @@
"ACL_RULE_L2_INVALID_ETHER": {
"desc": "Configure invalid MAC address format.",
"eStrKey" : "Pattern"
},
"ACL_PACKET_ACTION_VALIDATE_VALUE_ACCEPT": {
"desc": "Configure CTRLPLANE with proper action ACCEPT."
}
}

View File

@ -789,5 +789,36 @@
]
}
}
},
"ACL_PACKET_ACTION_VALIDATE_VALUE_ACCEPT": {
"sonic-acl:sonic-acl": {
"sonic-acl:ACL_RULE": {
"ACL_RULE_LIST": [
{
"ACL_TABLE_NAME": "SNMP_ACL",
"DST_IP": "10.186.72.0/26",
"IP_TYPE": "IPv4ANY",
"PACKET_ACTION": "ACCEPT",
"PRIORITY": 999980,
"RULE_NAME": "Rule_20",
"SRC_IP": "10.176.0.0/15"
}
]
},
"sonic-acl:ACL_TABLE": {
"ACL_TABLE_LIST": [
{
"ACL_TABLE_NAME": "SNMP_ACL",
"policy_desc": "SNMP_ACL",
"services": [
"SNMP"
],
"stage": "ingress",
"type": "CTRLPLANE"
}
]
}
}
}
}

View File

@ -61,6 +61,7 @@ module sonic-types {
typedef packet_action{
type enumeration {
enum DROP;
enum ACCEPT;
enum FORWARD;
enum REDIRECT;
enum DO_NOT_NAT;