[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:
parent
d2f92eb3e0
commit
8f15f2d574
@ -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."
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -61,6 +61,7 @@ module sonic-types {
|
||||
typedef packet_action{
|
||||
type enumeration {
|
||||
enum DROP;
|
||||
enum ACCEPT;
|
||||
enum FORWARD;
|
||||
enum REDIRECT;
|
||||
enum DO_NOT_NAT;
|
||||
|
Loading…
Reference in New Issue
Block a user