[DASH][CRM] Extend the CRM YANG model with DASH attributes. (#14701)

- Why I did it
Extend the CRM YANG model with DASH attributes.

- How I did it
Add new attributes to the existing CRM YANG model.
Implement tests for DASH CRM attributes.

- How to verify it
Build sonic_yang_models packages. The tests will be run automatically.
This commit is contained in:
Oleksandr Ivantsiv 2023-04-25 09:26:45 +02:00 committed by GitHub
parent 4e6131032a
commit 3cf50ca7fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2151 additions and 1 deletions

View File

@ -23,6 +23,7 @@ Table of Contents
* [COPP_TABLE](#copp_table)
* [Console](#console)
* [CRM](#crm)
* [CRM DASH](#crm-dash)
* [Data Plane L3 Interfaces](#data-plane-l3-interfaces)
* [DEFAULT_LOSSLESS_BUFFER_PARAMETER](#DEFAULT_LOSSLESS_BUFFER_PARAMETER)
* [Device Metadata](#device-metadata)
@ -785,6 +786,62 @@ It currently allows user to administratively bring down a line-card or fabric-ca
```
### CRM DASH
```json
{
"CRM": {
"Config": {
"dash_vnet_threshold_type": "percentage",
"dash_vnet_low_threshold": "70",
"dash_vnet_high_threshold": "85",
"dash_eni_threshold_type": "percentage",
"dash_eni_low_threshold": "70",
"dash_eni_high_threshold": "85",
"dash_eni_ether_address_map_threshold_type": "percentage",
"dash_eni_ether_address_map_low_threshold": "70",
"dash_eni_ether_address_map_high_threshold": "85",
"dash_ipv4_inbound_routing_threshold_type": "percentage",
"dash_ipv4_inbound_routing_low_threshold": "70",
"dash_ipv4_inbound_routing_high_threshold": "85",
"dash_ipv6_inbound_routing_threshold_type": "percentage",
"dash_ipv6_inbound_routing_low_threshold": "70",
"dash_ipv6_inbound_routing_high_threshold": "85",
"dash_ipv4_outbound_routing_threshold_type": "percentage",
"dash_ipv4_outbound_routing_low_threshold": "70",
"dash_ipv4_outbound_routing_high_threshold": "85",
"dash_ipv6_outbound_routing_threshold_type": "percentage",
"dash_ipv6_outbound_routing_low_threshold": "70",
"dash_ipv6_outbound_routing_high_threshold": "85",
"dash_ipv4_pa_validation_threshold_type": "percentage",
"dash_ipv4_pa_validation_low_threshold": "70",
"dash_ipv4_pa_validation_high_threshold": "85",
"dash_ipv6_pa_validation_threshold_type": "percentage",
"dash_ipv6_pa_validation_low_threshold": "70",
"dash_ipv6_pa_validation_high_threshold": "85",
"dash_ipv4_outbound_ca_to_pa_threshold_type": "percentage",
"dash_ipv4_outbound_ca_to_pa_low_threshold": "70",
"dash_ipv4_outbound_ca_to_pa_high_threshold": "85",
"dash_ipv6_outbound_ca_to_pa_threshold_type": "percentage",
"dash_ipv6_outbound_ca_to_pa_low_threshold": "70",
"dash_ipv6_outbound_ca_to_pa_high_threshold": "85",
"dash_ipv4_acl_group_threshold_type": "percentage",
"dash_ipv4_acl_group_low_threshold": "70",
"dash_ipv4_acl_group_high_threshold": "85",
"dash_ipv6_acl_group_threshold_type": "percentage",
"dash_ipv6_acl_group_low_threshold": "70",
"dash_ipv6_acl_group_high_threshold": "85",
"dash_ipv4_acl_rule_threshold_type": "percentage",
"dash_ipv4_acl_rule_low_threshold": "70",
"dash_ipv4_acl_rule_high_threshold": "85",
"dash_ipv6_acl_rule_threshold_type": "percentage",
"dash_ipv6_acl_rule_low_threshold": "70",
"dash_ipv6_acl_rule_high_threshold": "85"
}
}
}
```
### Data Plane L3 Interfaces
IP configuration for data plane are defined in **INTERFACE**, **VLAN_SUB_INTERFACE**,

View File

@ -0,0 +1,287 @@
{
"CRM_DASH_VNET_WITH_CORRECT_FREE_VALUE": {
"desc": "CRM_DASH_VNET_WITH_CORRECT_FREE_VALUE no failure."
},
"CRM_DASH_VNET_WITH_CORRECT_USED_VALUE": {
"desc": "CRM_DASH_VNET_WITH_CORRECT_USED_VALUE no failure."
},
"CRM_DASH_VNET_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "CRM_DASH_VNET_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"CRM_DASH_VNET_WITH_WRONG_PERCENTAGE": {
"desc": "CRM_DASH_VNET_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"CRM_DASH_VNET_WITH_HIGH_THRESHOLD_ERR": {
"desc": "CRM_DASH_VNET_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": ["high_threshold should be more than low_threshold"]
},
"CRM_DASH_ENI_WITH_CORRECT_FREE_VALUE": {
"desc": "CRM_DASH_ENI_WITH_CORRECT_FREE_VALUE no failure."
},
"CRM_DASH_ENI_WITH_CORRECT_USED_VALUE": {
"desc": "CRM_DASH_ENI_WITH_CORRECT_USED_VALUE no failure."
},
"CRM_DASH_ENI_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "CRM_DASH_ENI_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"CRM_DASH_ENI_WITH_WRONG_PERCENTAGE": {
"desc": "CRM_DASH_ENI_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"CRM_DASH_ENI_WITH_HIGH_THRESHOLD_ERR": {
"desc": "CRM_DASH_ENI_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": ["high_threshold should be more than low_threshold"]
},
"CRM_DASH_ENI_ETHER_ADDRESS_MAP_WITH_CORRECT_FREE_VALUE": {
"desc": "CRM_DASH_ENI_ETHER_ADDRESS_MAP_WITH_CORRECT_FREE_VALUE no failure."
},
"CRM_DASH_ENI_ETHER_ADDRESS_MAP_WITH_CORRECT_USED_VALUE": {
"desc": "CRM_DASH_ENI_ETHER_ADDRESS_MAP_WITH_CORRECT_USED_VALUE no failure."
},
"CRM_DASH_ENI_ETHER_ADDRESS_MAP_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "CRM_DASH_ENI_ETHER_ADDRESS_MAP_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"CRM_DASH_ENI_ETHER_ADDRESS_MAP_WITH_WRONG_PERCENTAGE": {
"desc": "CRM_DASH_ENI_ETHER_ADDRESS_MAP_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"CRM_DASH_ENI_ETHER_ADDRESS_MAP_WITH_HIGH_THRESHOLD_ERR": {
"desc": "CRM_DASH_ENI_ETHER_ADDRESS_MAP_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": ["high_threshold should be more than low_threshold"]
},
"CRM_DASH_IPV4_INBOUND_ROUTING_WITH_CORRECT_FREE_VALUE": {
"desc": "CRM_DASH_IPV4_INBOUND_ROUTING_WITH_CORRECT_FREE_VALUE no failure."
},
"CRM_DASH_IPV4_INBOUND_ROUTING_WITH_CORRECT_USED_VALUE": {
"desc": "CRM_DASH_IPV4_INBOUND_ROUTING_WITH_CORRECT_USED_VALUE no failure."
},
"CRM_DASH_IPV4_INBOUND_ROUTING_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "CRM_DASH_IPV4_INBOUND_ROUTING_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"CRM_DASH_IPV4_INBOUND_ROUTING_WITH_WRONG_PERCENTAGE": {
"desc": "CRM_DASH_IPV4_INBOUND_ROUTING_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"CRM_DASH_IPV4_INBOUND_ROUTING_WITH_HIGH_THRESHOLD_ERR": {
"desc": "CRM_DASH_IPV4_INBOUND_ROUTING_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": ["high_threshold should be more than low_threshold"]
},
"CRM_DASH_IPV6_INBOUND_ROUTING_WITH_CORRECT_FREE_VALUE": {
"desc": "CRM_DASH_IPV6_INBOUND_ROUTING_WITH_CORRECT_FREE_VALUE no failure."
},
"CRM_DASH_IPV6_INBOUND_ROUTING_WITH_CORRECT_USED_VALUE": {
"desc": "CRM_DASH_IPV6_INBOUND_ROUTING_WITH_CORRECT_USED_VALUE no failure."
},
"CRM_DASH_IPV6_INBOUND_ROUTING_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "CRM_DASH_IPV6_INBOUND_ROUTING_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"CRM_DASH_IPV6_INBOUND_ROUTING_WITH_WRONG_PERCENTAGE": {
"desc": "CRM_DASH_IPV6_INBOUND_ROUTING_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"CRM_DASH_IPV6_INBOUND_ROUTING_WITH_HIGH_THRESHOLD_ERR": {
"desc": "CRM_DASH_IPV6_INBOUND_ROUTING_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": ["high_threshold should be more than low_threshold"]
},
"CRM_DASH_IPV4_OUTBOUND_ROUTING_WITH_CORRECT_FREE_VALUE": {
"desc": "CRM_DASH_IPV4_OUTBOUND_ROUTING_WITH_CORRECT_FREE_VALUE no failure."
},
"CRM_DASH_IPV4_OUTBOUND_ROUTING_WITH_CORRECT_USED_VALUE": {
"desc": "CRM_DASH_IPV4_OUTBOUND_ROUTING_WITH_CORRECT_USED_VALUE no failure."
},
"CRM_DASH_IPV4_OUTBOUND_ROUTING_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "CRM_DASH_IPV4_OUTBOUND_ROUTING_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"CRM_DASH_IPV4_OUTBOUND_ROUTING_WITH_WRONG_PERCENTAGE": {
"desc": "CRM_DASH_IPV4_OUTBOUND_ROUTING_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"CRM_DASH_IPV4_OUTBOUND_ROUTING_WITH_HIGH_THRESHOLD_ERR": {
"desc": "CRM_DASH_IPV4_OUTBOUND_ROUTING_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": ["high_threshold should be more than low_threshold"]
},
"CRM_DASH_IPV6_OUTBOUND_ROUTING_WITH_CORRECT_FREE_VALUE": {
"desc": "CRM_DASH_IPV6_OUTBOUND_ROUTING_WITH_CORRECT_FREE_VALUE no failure."
},
"CRM_DASH_IPV6_OUTBOUND_ROUTING_WITH_CORRECT_USED_VALUE": {
"desc": "CRM_DASH_IPV6_OUTBOUND_ROUTING_WITH_CORRECT_USED_VALUE no failure."
},
"CRM_DASH_IPV6_OUTBOUND_ROUTING_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "CRM_DASH_IPV6_OUTBOUND_ROUTING_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"CRM_DASH_IPV6_OUTBOUND_ROUTING_WITH_WRONG_PERCENTAGE": {
"desc": "CRM_DASH_IPV6_OUTBOUND_ROUTING_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"CRM_DASH_IPV6_OUTBOUND_ROUTING_WITH_HIGH_THRESHOLD_ERR": {
"desc": "CRM_DASH_IPV6_OUTBOUND_ROUTING_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": ["high_threshold should be more than low_threshold"]
},
"CRM_DASH_IPV4_PA_VALIDATION_WITH_CORRECT_FREE_VALUE": {
"desc": "CRM_DASH_IPV4_PA_VALIDATION_WITH_CORRECT_FREE_VALUE no failure."
},
"CRM_DASH_IPV4_PA_VALIDATION_WITH_CORRECT_USED_VALUE": {
"desc": "CRM_DASH_IPV4_PA_VALIDATION_WITH_CORRECT_USED_VALUE no failure."
},
"CRM_DASH_IPV4_PA_VALIDATION_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "CRM_DASH_IPV4_PA_VALIDATION_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"CRM_DASH_IPV4_PA_VALIDATION_WITH_WRONG_PERCENTAGE": {
"desc": "CRM_DASH_IPV4_PA_VALIDATION_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"CRM_DASH_IPV4_PA_VALIDATION_WITH_HIGH_THRESHOLD_ERR": {
"desc": "CRM_DASH_IPV4_PA_VALIDATION_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": ["high_threshold should be more than low_threshold"]
},
"CRM_DASH_IPV6_PA_VALIDATION_WITH_CORRECT_FREE_VALUE": {
"desc": "CRM_DASH_IPV6_PA_VALIDATION_WITH_CORRECT_FREE_VALUE no failure."
},
"CRM_DASH_IPV6_PA_VALIDATION_WITH_CORRECT_USED_VALUE": {
"desc": "CRM_DASH_IPV6_PA_VALIDATION_WITH_CORRECT_USED_VALUE no failure."
},
"CRM_DASH_IPV6_PA_VALIDATION_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "CRM_DASH_IPV6_PA_VALIDATION_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"CRM_DASH_IPV6_PA_VALIDATION_WITH_WRONG_PERCENTAGE": {
"desc": "CRM_DASH_IPV6_PA_VALIDATION_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"CRM_DASH_IPV6_PA_VALIDATION_WITH_HIGH_THRESHOLD_ERR": {
"desc": "CRM_DASH_IPV6_PA_VALIDATION_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": ["high_threshold should be more than low_threshold"]
},
"CRM_DASH_IPV4_OUTBOUND_CA_TO_PA_WITH_CORRECT_FREE_VALUE": {
"desc": "CRM_DASH_IPV4_OUTBOUND_CA_TO_PA_WITH_CORRECT_FREE_VALUE no failure."
},
"CRM_DASH_IPV4_OUTBOUND_CA_TO_PA_WITH_CORRECT_USED_VALUE": {
"desc": "CRM_DASH_IPV4_OUTBOUND_CA_TO_PA_WITH_CORRECT_USED_VALUE no failure."
},
"CRM_DASH_IPV4_OUTBOUND_CA_TO_PA_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "CRM_DASH_IPV4_OUTBOUND_CA_TO_PA_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"CRM_DASH_IPV4_OUTBOUND_CA_TO_PA_WITH_WRONG_PERCENTAGE": {
"desc": "CRM_DASH_IPV4_OUTBOUND_CA_TO_PA_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"CRM_DASH_IPV4_OUTBOUND_CA_TO_PA_WITH_HIGH_THRESHOLD_ERR": {
"desc": "CRM_DASH_IPV4_OUTBOUND_CA_TO_PA_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": ["high_threshold should be more than low_threshold"]
},
"CRM_DASH_IPV6_OUTBOUND_CA_TO_PA_WITH_CORRECT_FREE_VALUE": {
"desc": "CRM_DASH_IPV6_OUTBOUND_CA_TO_PA_WITH_CORRECT_FREE_VALUE no failure."
},
"CRM_DASH_IPV6_OUTBOUND_CA_TO_PA_WITH_CORRECT_USED_VALUE": {
"desc": "CRM_DASH_IPV6_OUTBOUND_CA_TO_PA_WITH_CORRECT_USED_VALUE no failure."
},
"CRM_DASH_IPV6_OUTBOUND_CA_TO_PA_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "CRM_DASH_IPV6_OUTBOUND_CA_TO_PA_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"CRM_DASH_IPV6_OUTBOUND_CA_TO_PA_WITH_WRONG_PERCENTAGE": {
"desc": "CRM_DASH_IPV6_OUTBOUND_CA_TO_PA_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"CRM_DASH_IPV6_OUTBOUND_CA_TO_PA_WITH_HIGH_THRESHOLD_ERR": {
"desc": "CRM_DASH_IPV6_OUTBOUND_CA_TO_PA_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": ["high_threshold should be more than low_threshold"]
},
"CRM_DASH_IPV4_ACL_GROUP_WITH_CORRECT_FREE_VALUE": {
"desc": "CRM_DASH_IPV4_ACL_GROUP_WITH_CORRECT_FREE_VALUE no failure."
},
"CRM_DASH_IPV4_ACL_GROUP_WITH_CORRECT_USED_VALUE": {
"desc": "CRM_DASH_IPV4_ACL_GROUP_WITH_CORRECT_USED_VALUE no failure."
},
"CRM_DASH_IPV4_ACL_GROUP_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "CRM_DASH_IPV4_ACL_GROUP_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"CRM_DASH_IPV4_ACL_GROUP_WITH_WRONG_PERCENTAGE": {
"desc": "CRM_DASH_IPV4_ACL_GROUP_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"CRM_DASH_IPV4_ACL_GROUP_WITH_HIGH_THRESHOLD_ERR": {
"desc": "CRM_DASH_IPV4_ACL_GROUP_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": ["high_threshold should be more than low_threshold"]
},
"CRM_DASH_IPV6_ACL_GROUP_WITH_CORRECT_FREE_VALUE": {
"desc": "CRM_DASH_IPV6_ACL_GROUP_WITH_CORRECT_FREE_VALUE no failure."
},
"CRM_DASH_IPV6_ACL_GROUP_WITH_CORRECT_USED_VALUE": {
"desc": "CRM_DASH_IPV6_ACL_GROUP_WITH_CORRECT_USED_VALUE no failure."
},
"CRM_DASH_IPV6_ACL_GROUP_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "CRM_DASH_IPV6_ACL_GROUP_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"CRM_DASH_IPV6_ACL_GROUP_WITH_WRONG_PERCENTAGE": {
"desc": "CRM_DASH_IPV6_ACL_GROUP_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"CRM_DASH_IPV6_ACL_GROUP_WITH_HIGH_THRESHOLD_ERR": {
"desc": "CRM_DASH_IPV6_ACL_GROUP_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": ["high_threshold should be more than low_threshold"]
},
"CRM_DASH_IPV4_ACL_RULE_WITH_CORRECT_FREE_VALUE": {
"desc": "CRM_DASH_IPV4_ACL_RULE_WITH_CORRECT_FREE_VALUE no failure."
},
"CRM_DASH_IPV4_ACL_RULE_WITH_CORRECT_USED_VALUE": {
"desc": "CRM_DASH_IPV4_ACL_RULE_WITH_CORRECT_USED_VALUE no failure."
},
"CRM_DASH_IPV4_ACL_RULE_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "CRM_DASH_IPV4_ACL_RULE_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"CRM_DASH_IPV4_ACL_RULE_WITH_WRONG_PERCENTAGE": {
"desc": "CRM_DASH_IPV4_ACL_RULE_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"CRM_DASH_IPV4_ACL_RULE_WITH_HIGH_THRESHOLD_ERR": {
"desc": "CRM_DASH_IPV4_ACL_RULE_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": ["high_threshold should be more than low_threshold"]
},
"CRM_DASH_IPV6_ACL_RULE_WITH_CORRECT_FREE_VALUE": {
"desc": "CRM_DASH_IPV6_ACL_RULE_WITH_CORRECT_FREE_VALUE no failure."
},
"CRM_DASH_IPV6_ACL_RULE_WITH_CORRECT_USED_VALUE": {
"desc": "CRM_DASH_IPV6_ACL_RULE_WITH_CORRECT_USED_VALUE no failure."
},
"CRM_DASH_IPV6_ACL_RULE_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "CRM_DASH_IPV6_ACL_RULE_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"CRM_DASH_IPV6_ACL_RULE_WITH_WRONG_PERCENTAGE": {
"desc": "CRM_DASH_IPV6_ACL_RULE_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"CRM_DASH_IPV6_ACL_RULE_WITH_HIGH_THRESHOLD_ERR": {
"desc": "CRM_DASH_IPV6_ACL_RULE_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": ["high_threshold should be more than low_threshold"]
}
}

File diff suppressed because it is too large Load Diff

View File

@ -9,6 +9,10 @@ module sonic-crm {
prefix stypes;
}
import sonic-device_metadata {
prefix dm;
}
description "CRM YANG Module for SONiC OS";
revision 2020-04-10 {
@ -456,6 +460,456 @@ module sonic-crm {
type threshold;
}
leaf dash_vnet_threshold_type {
description "CRM threshold support for DASH VNETs";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(((current()='PERCENTAGE' or current()='percentage') and
../dash_vnet_high_threshold<100 and
../dash_vnet_low_threshold<100) or
(current()!='PERCENTAGE' and current()!='percentage'))";
type stypes:crm_threshold_type;
}
leaf dash_vnet_high_threshold {
description "CRM threshold support for DASH VNETs";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(current() > ../dash_vnet_low_threshold)"
{
error-message "high_threshold should be more than low_threshold";
}
type threshold;
}
leaf dash_vnet_low_threshold {
description "CRM threshold support for DASH VNETs";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
type threshold;
}
leaf dash_eni_threshold_type {
description "CRM threshold support for DASH ENIs";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(((current()='PERCENTAGE' or current()='percentage') and
../dash_eni_high_threshold<100 and
../dash_eni_low_threshold<100) or
(current()!='PERCENTAGE' and current()!='percentage'))";
type stypes:crm_threshold_type;
}
leaf dash_eni_high_threshold {
description "CRM threshold support for DASH ENIs";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(current() > ../dash_eni_low_threshold)"
{
error-message "high_threshold should be more than low_threshold";
}
type threshold;
}
leaf dash_eni_low_threshold {
description "CRM threshold support for DASH ENIs";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
type threshold;
}
leaf dash_eni_ether_address_map_threshold_type {
description "CRM threshold support for DASH ENI ETHER address map entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(((current()='PERCENTAGE' or current()='percentage') and
../dash_eni_ether_address_map_high_threshold<100 and
../dash_eni_ether_address_map_low_threshold<100) or
(current()!='PERCENTAGE' and current()!='percentage'))";
type stypes:crm_threshold_type;
}
leaf dash_eni_ether_address_map_high_threshold {
description "CRM threshold support for DASH ENI ETHER address map entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(current() > ../dash_eni_ether_address_map_low_threshold)"
{
error-message "high_threshold should be more than low_threshold";
}
type threshold;
}
leaf dash_eni_ether_address_map_low_threshold {
description "CRM threshold support for DASH ENI ETHER address map entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
type threshold;
}
leaf dash_ipv4_inbound_routing_threshold_type {
description "CRM threshold support for DASH IPv4 inbound routes";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(((current()='PERCENTAGE' or current()='percentage') and
../dash_ipv4_inbound_routing_high_threshold<100 and
../dash_ipv4_inbound_routing_low_threshold<100) or
(current()!='PERCENTAGE' and current()!='percentage'))";
type stypes:crm_threshold_type;
}
leaf dash_ipv4_inbound_routing_high_threshold {
description "CRM threshold support for DASH IPv4 inbound routes";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(current() > ../dash_ipv4_inbound_routing_low_threshold)"
{
error-message "high_threshold should be more than low_threshold";
}
type threshold;
}
leaf dash_ipv4_inbound_routing_low_threshold {
description "CRM threshold support for DASH IPv4 inbound routes";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
type threshold;
}
leaf dash_ipv6_inbound_routing_threshold_type {
description "CRM threshold support for DASH IPv6 inbound routes";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(((current()='PERCENTAGE' or current()='percentage') and
../dash_ipv6_inbound_routing_high_threshold<100 and
../dash_ipv6_inbound_routing_low_threshold<100) or
(current()!='PERCENTAGE' and current()!='percentage'))";
type stypes:crm_threshold_type;
}
leaf dash_ipv6_inbound_routing_high_threshold {
description "CRM threshold support for DASH IPv6 inbound routes";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(current() > ../dash_ipv6_inbound_routing_low_threshold)"
{
error-message "high_threshold should be more than low_threshold";
}
type threshold;
}
leaf dash_ipv6_inbound_routing_low_threshold {
description "CRM threshold support for DASH IPv6 inbound routes";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
type threshold;
}
leaf dash_ipv4_outbound_routing_threshold_type {
description "CRM threshold support for DASH IPv4 outbound routes";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(((current()='PERCENTAGE' or current()='percentage') and
../dash_ipv4_outbound_routing_high_threshold<100 and
../dash_ipv4_outbound_routing_low_threshold<100) or
(current()!='PERCENTAGE' and current()!='percentage'))";
type stypes:crm_threshold_type;
}
leaf dash_ipv4_outbound_routing_high_threshold {
description "CRM threshold support for DASH IPv4 outbound routes";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(current() > ../dash_ipv4_outbound_routing_low_threshold)"
{
error-message "high_threshold should be more than low_threshold";
}
type threshold;
}
leaf dash_ipv4_outbound_routing_low_threshold {
description "CRM threshold support for DASH IPv4 outbound routes";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
type threshold;
}
leaf dash_ipv6_outbound_routing_threshold_type {
description "CRM threshold support for DASH IPv6 outbound routes";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(((current()='PERCENTAGE' or current()='percentage') and
../dash_ipv6_outbound_routing_high_threshold<100 and
../dash_ipv6_outbound_routing_low_threshold<100) or
(current()!='PERCENTAGE' and current()!='percentage'))";
type stypes:crm_threshold_type;
}
leaf dash_ipv6_outbound_routing_high_threshold {
description "CRM threshold support for DASH IPv6 outbound routes";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(current() > ../dash_ipv6_outbound_routing_low_threshold)"
{
error-message "high_threshold should be more than low_threshold";
}
type threshold;
}
leaf dash_ipv6_outbound_routing_low_threshold {
description "CRM threshold support for DASH IPv6 outbound routes";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
type threshold;
}
leaf dash_ipv4_pa_validation_threshold_type {
description "CRM threshold support for DASH IPv4 PA validation entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(((current()='PERCENTAGE' or current()='percentage') and
../dash_ipv4_pa_validation_high_threshold<100 and
../dash_ipv4_pa_validation_low_threshold<100) or
(current()!='PERCENTAGE' and current()!='percentage'))";
type stypes:crm_threshold_type;
}
leaf dash_ipv4_pa_validation_high_threshold {
description "CRM threshold support for DASH IPv4 PA validation entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(current() > ../dash_ipv4_pa_validation_low_threshold)"
{
error-message "high_threshold should be more than low_threshold";
}
type threshold;
}
leaf dash_ipv4_pa_validation_low_threshold {
description "CRM threshold support for DASH IPv4 PA validation entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
type threshold;
}
leaf dash_ipv6_pa_validation_threshold_type {
description "CRM threshold support for DASH IPv6 PA validation entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(((current()='PERCENTAGE' or current()='percentage') and
../dash_ipv6_pa_validation_high_threshold<100 and
../dash_ipv6_pa_validation_low_threshold<100) or
(current()!='PERCENTAGE' and current()!='percentage'))";
type stypes:crm_threshold_type;
}
leaf dash_ipv6_pa_validation_high_threshold {
description "CRM threshold support for DASH IPv6 PA validation entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(current() > ../dash_ipv6_pa_validation_low_threshold)"
{
error-message "high_threshold should be more than low_threshold";
}
type threshold;
}
leaf dash_ipv6_pa_validation_low_threshold {
description "CRM threshold support for DASH IPv6 PA validation entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
type threshold;
}
leaf dash_ipv4_outbound_ca_to_pa_threshold_type {
description "CRM threshold support for DASH IPv4 outbound CA to PA entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(((current()='PERCENTAGE' or current()='percentage') and
../dash_ipv4_outbound_ca_to_pa_high_threshold<100 and
../dash_ipv4_outbound_ca_to_pa_low_threshold<100) or
(current()!='PERCENTAGE' and current()!='percentage'))";
type stypes:crm_threshold_type;
}
leaf dash_ipv4_outbound_ca_to_pa_high_threshold {
description "CRM threshold support for DASH IPv4 outbound CA to PA entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(current() > ../dash_ipv4_outbound_ca_to_pa_low_threshold)"
{
error-message "high_threshold should be more than low_threshold";
}
type threshold;
}
leaf dash_ipv4_outbound_ca_to_pa_low_threshold {
description "CRM threshold support for DASH IPv4 outbound CA to PA entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
type threshold;
}
leaf dash_ipv6_outbound_ca_to_pa_threshold_type {
description "CRM threshold support for DASH IPv6 outbound CA to PA entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(((current()='PERCENTAGE' or current()='percentage') and
../dash_ipv6_outbound_ca_to_pa_high_threshold<100 and
../dash_ipv6_outbound_ca_to_pa_low_threshold<100) or
(current()!='PERCENTAGE' and current()!='percentage'))";
type stypes:crm_threshold_type;
}
leaf dash_ipv6_outbound_ca_to_pa_high_threshold {
description "CRM threshold support for DASH IPv6 outbound CA to PA entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(current() > ../dash_ipv6_outbound_ca_to_pa_low_threshold)"
{
error-message "high_threshold should be more than low_threshold";
}
type threshold;
}
leaf dash_ipv6_outbound_ca_to_pa_low_threshold {
description "CRM threshold support for DASH IPv6 outbound CA to PA entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
type threshold;
}
leaf dash_ipv4_acl_group_threshold_type {
description "CRM threshold support for DASH IPv4 ACL group entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(((current()='PERCENTAGE' or current()='percentage') and
../dash_ipv4_acl_group_high_threshold<100 and
../dash_ipv4_acl_group_low_threshold<100) or
(current()!='PERCENTAGE' and current()!='percentage'))";
type stypes:crm_threshold_type;
}
leaf dash_ipv4_acl_group_high_threshold {
description "CRM threshold support for DASH IPv4 ACL group entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(current() > ../dash_ipv4_acl_group_low_threshold)"
{
error-message "high_threshold should be more than low_threshold";
}
type threshold;
}
leaf dash_ipv4_acl_group_low_threshold {
description "CRM threshold support for DASH IPv4 ACL group entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
type threshold;
}
leaf dash_ipv6_acl_group_threshold_type {
description "CRM threshold support for DASH IPv6 ACL group entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(((current()='PERCENTAGE' or current()='percentage') and
../dash_ipv6_acl_group_high_threshold<100 and
../dash_ipv6_acl_group_low_threshold<100) or
(current()!='PERCENTAGE' and current()!='percentage'))";
type stypes:crm_threshold_type;
}
leaf dash_ipv6_acl_group_high_threshold {
description "CRM threshold support for DASH IPv6 ACL group entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(current() > ../dash_ipv6_acl_group_low_threshold)"
{
error-message "high_threshold should be more than low_threshold";
}
type threshold;
}
leaf dash_ipv6_acl_group_low_threshold {
description "CRM threshold support for DASH IPv6 ACL group entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
type threshold;
}
leaf dash_ipv4_acl_rule_threshold_type {
description "CRM threshold support for DASH IPv4 ACL rule entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(((current()='PERCENTAGE' or current()='percentage') and
../dash_ipv4_acl_rule_high_threshold<100 and
../dash_ipv4_acl_rule_low_threshold<100) or
(current()!='PERCENTAGE' and current()!='percentage'))";
type stypes:crm_threshold_type;
}
leaf dash_ipv4_acl_rule_high_threshold {
description "CRM threshold support for DASH IPv4 ACL rule entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(current() > ../dash_ipv4_acl_rule_low_threshold)"
{
error-message "high_threshold should be more than low_threshold";
}
type threshold;
}
leaf dash_ipv4_acl_rule_low_threshold {
description "CRM threshold support for DASH IPv4 ACL rule entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
type threshold;
}
leaf dash_ipv6_acl_rule_threshold_type {
description "CRM threshold support for DASH IPv6 ACL rule entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(((current()='PERCENTAGE' or current()='percentage') and
../dash_ipv6_acl_rule_high_threshold<100 and
../dash_ipv6_acl_rule_low_threshold<100) or
(current()!='PERCENTAGE' and current()!='percentage'))";
type stypes:crm_threshold_type;
}
leaf dash_ipv6_acl_rule_high_threshold {
description "CRM threshold support for DASH IPv6 ACL rule entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
must "(current() > ../dash_ipv6_acl_rule_low_threshold)"
{
error-message "high_threshold should be more than low_threshold";
}
type threshold;
}
leaf dash_ipv6_acl_rule_low_threshold {
description "CRM threshold support for DASH IPv6 ACL rule entries";
when "(/dm:sonic-device_metadata/dm:DEVICE_METADATA/dm:localhost/dm:switch_type = 'dpu')";
type threshold;
}
}
/* end of Config */
}

View File

@ -182,7 +182,7 @@ module sonic-device_metadata {
leaf switch_type {
type string {
pattern "chassis-packet|fabric|npu|voq";
pattern "chassis-packet|fabric|npu|voq|dpu";
}
description "Type of switch. Default is NPU, on a VOQ switch voq is used for a regular
switching device while fabric is used for a fabric device.