diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/acl.json b/src/sonic-yang-models/tests/yang_model_tests/tests/acl.json index 0de357f5b167..f66afc09d1c9 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/acl.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/acl.json @@ -143,5 +143,8 @@ "ACL_RULE_WRONG_AETH_SYNDROME": { "desc": "Configure invalid AETH_SYNDROME in decimal format.", "eStrKey" : "Pattern" + }, + "ACL_TABLE_L3V4V6_TABLE_TYPE": { + "desc": "ACL_TABLE Validate type L3V4V6." } } diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/acl.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/acl.json index 7decf89871bd..4733c9c3cc73 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/acl.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/acl.json @@ -1146,5 +1146,69 @@ ] } } + }, + "ACL_TABLE_L3V4V6_TABLE_TYPE": { + "sonic-acl:sonic-acl": { + "sonic-acl:ACL_RULE": { + "ACL_RULE_LIST": [ + { + "ACL_TABLE_NAME": "DATA-ACL-V4V6", + "IP_TYPE": "IPV4", + "DST_IP": "10.186.72.64/26", + "PACKET_ACTION": "FORWARD", + "PRIORITY": 999960, + "RULE_NAME": "Rule_40", + "SRC_IP": "10.176.0.0/15" + }, + { + "ACL_TABLE_NAME": "DATA-ACL-V4V6", + "DST_IPV6": "2a04:f547:43:320::/64", + "IP_TYPE": "IPV6", + "PACKET_ACTION": "FORWARD", + "PRIORITY": 999980, + "RULE_NAME": "Rule_20", + "SRC_IPV6": "2a04:f547:41::/48" + } + ] + }, + "sonic-acl:ACL_TABLE": { + "ACL_TABLE_LIST": [ + { + "ACL_TABLE_NAME": "DATA-ACL-V4V6", + "policy_desc": "Filter IPv4 and IPv6", + "ports": [ + "Ethernet0", + "Ethernet1" + ], + "stage": "EGRESS", + "type": "L3V4V6" + } + ] + } + }, + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "admin_status": "up", + "alias": "eth0", + "description": "Ethernet0", + "mtu": 9000, + "lanes": "0,1,2,3", + "name": "Ethernet0", + "speed": 25000 + }, + { + "admin_status": "up", + "alias": "eth1", + "description": "Ethernet1", + "mtu": 9000, + "lanes": "10,11,12,13", + "name": "Ethernet1", + "speed": 25000 + } + ] + } + } } } diff --git a/src/sonic-yang-models/yang-templates/sonic-types.yang.j2 b/src/sonic-yang-models/yang-templates/sonic-types.yang.j2 index ee26a7d67b13..7f82eb3dc4fb 100644 --- a/src/sonic-yang-models/yang-templates/sonic-types.yang.j2 +++ b/src/sonic-yang-models/yang-templates/sonic-types.yang.j2 @@ -88,6 +88,7 @@ module sonic-types { enum L2; enum L3; enum L3V6; + enum L3V4V6; enum MIRROR; enum MIRRORV6; enum MIRROR_DSCP;