[YANG] Add an infrastructure to write pytest tests for the YANG model. (#17767)

### Why I did it
The existing test cases and test data for YANG model tests are defined in JSON files. The tests are limited and require a huge amount of copy-paste to provide good coverage.
For the features that have a lot of similar attributes that need to be covered with the tests, the JSON files can be quite big and hard to maintain (for example CRM).
The debuggability of the JSON tests is almost zero. Which makes implementation of the new test cases much harder than it should be.  When the single test case fails it generates thousands of lines of output that make it hard to understand the issue. It is hard to find what failed, and what is the error message. It is impossible to re-run single test cases. Etc.

The Pytest provides an alternative way to implement the tests.
Both JSON tests and Pytests can co-exist. But it is suggested to use Pytest for the new tests.
The tests written in Pytest are compact, readable, and human-friendly. 
They give more flexibility in the testing of corner cases allow to leverage Python and Pytest capabilities to generate configuration and data for better coverage.

### How I did it
Add an infrastructure that allows to write model tests in Python.
Conver CRM, DASH CRM, and SmartSwitch tests to Pytest.

#### How to verify it
Build the YANG model package.
This commit is contained in:
Oleksandr Ivantsiv 2024-03-18 09:52:25 -07:00 committed by GitHub
parent ec57a44b47
commit 5f2a2b9051
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 358 additions and 2287 deletions

View File

@ -0,0 +1,43 @@
import os
import pytest
import yang as ly
from json import dumps
from glob import glob
class YangModel:
def __init__(self) -> None:
cur_dir = os.path.dirname(os.path.abspath(__file__))
project_root = os.path.abspath(os.path.join(cur_dir, '..', '..'))
self.model_dir = os.path.join(project_root, 'yang-models')
self._load_model()
def _load_model(self) -> None:
self.ctx = ly.Context(self.model_dir)
yang_files = glob(self.model_dir +"/*.yang")
for file in yang_files:
m = self.ctx.parse_module_path(file, ly.LYS_IN_YANG)
if not m:
raise RuntimeError("Failed to parse '{file}' model")
def _load_data(self, data) -> None:
self.ctx.parse_data_mem(dumps(data), ly.LYD_JSON,
ly.LYD_OPT_CONFIG | ly.LYD_OPT_STRICT)
def load_data(self, data, expected_error=None) -> None:
if expected_error:
with pytest.raises(RuntimeError) as exc_info:
self._load_data(data)
assert expected_error in str(exc_info)
else:
self._load_data(data)
@pytest.fixture
def yang_model():
yang_model = YangModel()
return yang_model

View File

@ -0,0 +1,101 @@
import pytest
thresholds = [
'free', 'FREE',
'used', 'USED',
'percentage', 'PERCENTAGE'
]
@pytest.fixture(params=thresholds)
def threshold(request):
return request.param
resources = [
'acl_counter',
'acl_group',
'acl_entry',
'acl_table',
'fdb_entry',
'ipv4_neighbor',
'ipv4_nexthop',
'ipv4_route',
'ipv6_neighbor',
'ipv6_nexthop',
'ipv6_route',
'nexthop_group',
'nexthop_group_member',
'dnat_entry',
'snat_entry',
'ipmc_entry',
'mpls_inseg',
'mpls_nexthop',
'srv6_my_sid_entry',
'srv6_nexthop'
]
@pytest.fixture(params=resources)
def resource(request):
return request.param
class TestCrm:
def test_crm_valid_data(self, yang_model, resource, threshold):
data = {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
f"{resource}_high_threshold": 95,
f"{resource}_low_threshold": 70,
f"{resource}_threshold_type": threshold
}
}
}
}
yang_model.load_data(data)
@pytest.mark.parametrize(
"high, low, error_message", [
(-1, 70, 'Invalid value "-1"'),
(100, -70, 'Invalid value "-70"'),
(10, 70, 'high_threshold should be more than low_threshold')]
)
def test_crm_thresholds(self, yang_model, resource, threshold, high, low, error_message):
data = {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
f"{resource}_high_threshold": high,
f"{resource}_low_threshold": low,
f"{resource}_threshold_type": threshold
}
}
}
}
yang_model.load_data(data, error_message)
@pytest.mark.parametrize(
"high, low, th_type, error_message", [
(100, 70, 'wrong', 'Value "wrong" does not satisfy the constraint'),
(110, 20, 'percentage', 'Must condition')]
)
def test_crm_threshold_type(self, yang_model, resource, high, low, th_type, error_message):
data = {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
f"{resource}_high_threshold": high,
f"{resource}_low_threshold": low,
f"{resource}_threshold_type": th_type
}
}
}
}
yang_model.load_data(data, error_message)

View File

@ -0,0 +1,104 @@
import pytest
from copy import deepcopy
@pytest.fixture(scope='function')
def data(request):
base_data = {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
"localhost": {
"switch_type": "dpu"
}
}
}
}
return base_data
dash_thresholds = [
'free', 'FREE',
'used', 'USED',
'percentage', 'PERCENTAGE'
]
@pytest.fixture(params=dash_thresholds)
def threshold(request):
return request.param
dash_resources = [
'vnet',
'eni',
'eni_ether_address_map',
'ipv4_inbound_routing',
'ipv6_inbound_routing',
'ipv4_outbound_routing',
'ipv6_outbound_routing',
'ipv4_pa_validation',
'ipv6_pa_validation',
'ipv4_outbound_ca_to_pa',
'ipv6_outbound_ca_to_pa',
'ipv4_acl_group',
'ipv6_acl_group'
]
@pytest.fixture(params=dash_resources)
def resource(request):
return request.param
class TestDashCrm:
def test_dash_crm_valid_data(self, yang_model, data, resource, threshold):
data["sonic-crm:sonic-crm"] = {
"sonic-crm:CRM": {
"Config": {
f"dash_{resource}_high_threshold": 95,
f"dash_{resource}_low_threshold": 70,
f"dash_{resource}_threshold_type": threshold
}
}
}
yang_model.load_data(data)
@pytest.mark.parametrize(
"high, low, error_message", [
(-1, 70, 'Invalid value "-1"'),
(100, -70, 'Invalid value "-70"'),
(10, 70, 'high_threshold should be more than low_threshold')]
)
def test_dash_crm_thresholds(self, yang_model, data, resource, threshold, high, low, error_message):
data["sonic-crm:sonic-crm"] = {
"sonic-crm:CRM": {
"Config": {
f"dash_{resource}_high_threshold": high,
f"dash_{resource}_low_threshold": low,
f"dash_{resource}_threshold_type": threshold
}
}
}
yang_model.load_data(data, error_message)
@pytest.mark.parametrize(
"high, low, th_type, error_message", [
(100, 70, 'wrong', 'Value "wrong" does not satisfy the constraint'),
(110, 20, 'percentage', 'Must condition')]
)
def test_dash_crm_threshold_type(self, yang_model, data, resource, high, low, th_type, error_message):
data["sonic-crm:sonic-crm"] = {
"sonic-crm:CRM": {
"Config": {
f"dash_{resource}_high_threshold": high,
f"dash_{resource}_low_threshold": low,
f"dash_{resource}_threshold_type": th_type
}
}
}
yang_model.load_data(data, error_message)

View File

@ -0,0 +1,110 @@
import pytest
class TestSmartSwitch:
def test_valid_data(self, yang_model):
data = {
"sonic-smart-switch:sonic-smart-switch": {
"sonic-smart-switch:MID_PLANE_BRIDGE": {
"GLOBAL": {
"bridge": "bridge_midplane",
"ip_prefix": "169.254.200.254/24"
}
},
"sonic-smart-switch:DPUS": {
"DPUS_LIST": [
{
"dpu_name": "dpu0",
"midplane_interface": "dpu0"
},
{
"dpu_name": "dpu1",
"midplane_interface": "dpu1"
}
]
}
}
}
yang_model.load_data(data)
@pytest.mark.parametrize(
"bridge_name, error_message", [
("bridge_midplane", None),
("wrong_name", 'Value "wrong_name" does not satisfy the constraint "bridge_midplane"')]
)
def test_bridge_name(self, yang_model, bridge_name, error_message):
data = {
"sonic-smart-switch:sonic-smart-switch": {
"sonic-smart-switch:MID_PLANE_BRIDGE": {
"GLOBAL": {
"bridge": bridge_name,
"ip_prefix": "169.254.200.254/24"
}
}
}
}
yang_model.load_data(data, error_message)
@pytest.mark.parametrize(
"ip_prefix, error_message", [
("169.254.200.254/24", None),
("169.254.xyz.254/24", 'Value "169.254.xyz.254/24" does not satisfy the constraint')]
)
def test_bridge_ip_prefix(self, yang_model, ip_prefix, error_message):
data = {
"sonic-smart-switch:sonic-smart-switch": {
"sonic-smart-switch:MID_PLANE_BRIDGE": {
"GLOBAL": {
"bridge": "bridge_midplane",
"ip_prefix": ip_prefix
}
}
}
}
yang_model.load_data(data, error_message)
@pytest.mark.parametrize(
"dpu_name, error_message", [
("dpu0", None),
("xyz", 'Value "xyz" does not satisfy the constraint "dpu[0-9]+')]
)
def test_dpu_name(self, yang_model, dpu_name, error_message):
data = {
"sonic-smart-switch:sonic-smart-switch": {
"sonic-smart-switch:DPUS": {
"DPUS_LIST": [
{
"dpu_name": dpu_name,
"midplane_interface": "dpu0"
}
]
}
}
}
yang_model.load_data(data, error_message)
@pytest.mark.parametrize(
"midplane_interface, error_message", [
("dpu0", None),
("xyz", 'Value "xyz" does not satisfy the constraint "dpu[0-9]+')]
)
def test_dpu_midplane_interface(self, yang_model, midplane_interface, error_message):
data = {
"sonic-smart-switch:sonic-smart-switch": {
"sonic-smart-switch:DPUS": {
"DPUS_LIST": [
{
"dpu_name": "dpu0",
"midplane_interface": midplane_interface
}
]
}
}
}
yang_model.load_data(data, error_message)

View File

@ -1,157 +0,0 @@
{
"CRM_WITH_CORRECT_FREE_VALUE": {
"desc": "CRM_WITH_CORRECT_FREE_VALUE no failure."
},
"CRM_WITH_CORRECT_USED_VALUE": {
"desc": "CRM_WITH_CORRECT_USED_VALUE no failure."
},
"CRM_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "CRM_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"CRM_WITH_WRONG_PERCENTAGE": {
"desc": "CRM_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"CRM_WITH_HIGH_THRESHOLD_ERR": {
"desc": "CRM_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_WITH_CORRECT_USED_VALUE": {
"desc": "CRM_WITH_CORRECT_USED_VALUE no failure."
},
"SNAT_WITH_WRONG_PERCENTAGE": {
"desc": "SNAT_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"SNAT_WITH_HIGH_THRESHOLD_ERR": {
"desc": "SNAT_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": [ "high_threshold should be more than low_threshold" ]
},
"SNAT_WITH_CORRECT_FREE_VALUE": {
"desc": "SNAT_WITH_CORRECT_FREE_VALUE no failure."
},
"SNAT_WITH_CORRECT_USED_VALUE": {
"desc": "SNAT_WITH_CORRECT_USED_VALUE no failure."
},
"SNAT_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "SNAT_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"DNAT_WITH_WRONG_PERCENTAGE": {
"desc": "DNAT_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"DNAT_WITH_HIGH_THRESHOLD_ERR": {
"desc": "DNAT_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": [ "high_threshold should be more than low_threshold" ]
},
"DNAT_WITH_CORRECT_FREE_VALUE": {
"desc": "DNAT_WITH_CORRECT_FREE_VALUE no failure."
},
"DNAT_WITH_CORRECT_USED_VALUE": {
"desc": "DNAT_WITH_CORRECT_USED_VALUE no failure."
},
"DNAT_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "DNAT_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"IPMC_WITH_WRONG_PERCENTAGE": {
"desc": "IPMC_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"IPMC_WITH_HIGH_THRESHOLD_ERR": {
"desc": "IPMC_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": [ "high_threshold should be more than low_threshold" ]
},
"IPMC_WITH_CORRECT_FREE_VALUE": {
"desc": "IPMC_WITH_CORRECT_FREE_VALUE no failure."
},
"IPMC_WITH_CORRECT_USED_VALUE": {
"desc": "IPMC_WITH_CORRECT_USED_VALUE no failure."
},
"IPMC_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "IPMC_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"MPLS_INSEG_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "MPLS_INSEG_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"MPLS_INSEG_WITH_WRONG_PERCENTAGE": {
"desc": "MPLS_INSEG_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"MPLS_INSEG_WITH_HIGH_THRESHOLD_ERR": {
"desc": "MPLS_INSEG_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": ["high_threshold should be more than low_threshold"]
},
"MPLS_INSEG_WITH_CORRECT_USED_VALUE": {
"desc": "MPLS_INSEG_WITH_CORRECT_USED_VALUE no failure."
},
"MPLS_INSEG_WITH_CORRECT_FREE_VALUE": {
"desc": "MPLS_INSEG_WITH_CORRECT_FREE_VALUE no failure."
},
"MPLS_NH_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "MPLS_NH_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"MPLS_NH_WITH_WRONG_PERCENTAGE": {
"desc": "MPLS_NH_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"MPLS_NH_WITH_HIGH_THRESHOLD_ERR": {
"desc": "MPLS_NH_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": ["high_threshold should be more than low_threshold"]
},
"MPLS_NH_WITH_CORRECT_USED_VALUE": {
"desc": "MPLS_NH_WITH_CORRECT_USED_VALUE no failure."
},
"MPLS_NH_WITH_CORRECT_USED_VALUE": {
"desc": "MPLS_NH_WITH_CORRECT_USED_VALUE no failure."
},
"SRV6_MY_SID_ENTRY_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "SRV6_MY_SID_ENTRY_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"SRV6_MY_SID_ENTRY_WITH_WRONG_PERCENTAGE": {
"desc": "SRV6_MY_SID_ENTRY_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"SRV6_MY_SID_ENTRY_WITH_HIGH_THRESHOLD_ERR": {
"desc": "SRV6_MY_SID_ENTRY_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": ["high_threshold should be more than low_threshold"]
},
"SRV6_MY_SID_ENTRY_WITH_CORRECT_USED_VALUE": {
"desc": "SRV6_MY_SID_ENTRY_WITH_CORRECT_USED_VALUE no failure."
},
"SRV6_MY_SID_ENTRY_WITH_CORRECT_FREE_VALUE": {
"desc": "SRV6_MY_SID_ENTRY_WITH_CORRECT_FREE_VALUE no failure."
},
"SRV6_NH_WITH_WRONG_THRESHOLD_TYPE": {
"desc": "SRV6_NH_WITH_WRONG_THRESHOLD_TYPE pattern failure.",
"eStrKey": "Pattern",
"eStr": ["wrong" ]
},
"SRV6_NH_WITH_WRONG_PERCENTAGE": {
"desc": "SRV6_NH_WITH_WRONG_PERCENTAGE must condition failure.",
"eStrKey": "Must"
},
"SRV6_NH_WITH_HIGH_THRESHOLD_ERR": {
"desc": "SRV6_NH_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.",
"eStr": ["high_threshold should be more than low_threshold"]
},
"SRV6_NH_WITH_CORRECT_USED_VALUE": {
"desc": "SRV6_NH_WITH_CORRECT_USED_VALUE no failure."
},
"SRV6_NH_WITH_CORRECT_USED_VALUE": {
"desc": "SRV6_NH_WITH_CORRECT_USED_VALUE no failure."
}
}

View File

@ -1,287 +0,0 @@
{
"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"]
}
}

View File

@ -1,9 +0,0 @@
{
"SMART_SWITCH_MID_PLANE_BRIDGE_WITH_DPU_TEST" : {
"desc": "Valid configuration in MID_PLANE_BRIDGE and DPUS tables."
},
"SMART_SWITCH_DPU_NAME_TEST" : {
"desc": "DPU name validation.",
"eStr": "does not satisfy the constraint"
}
}

View File

@ -1,442 +0,0 @@
{
"CRM_WITH_CORRECT_FREE_VALUE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"acl_counter_high_threshold": 90,
"acl_counter_low_threshold": 70,
"acl_counter_threshold_type": "free"
}
}
}
},
"CRM_WITH_CORRECT_USED_VALUE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"acl_counter_high_threshold": 85,
"acl_counter_low_threshold": 25,
"acl_counter_threshold_type": "used"
}
}
}
},
"CRM_WITH_HIGH_THRESHOLD_ERR": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"acl_counter_high_threshold": 80,
"acl_counter_low_threshold": 81,
"acl_counter_threshold_type": "PERCENTAGE"
}
}
}
},
"CRM_WITH_WRONG_PERCENTAGE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"acl_counter_high_threshold": 110,
"acl_counter_low_threshold": 85,
"acl_counter_threshold_type": "PERCENTAGE"
}
}
}
},
"CRM_WITH_WRONG_THRESHOLD_TYPE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"acl_counter_high_threshold": 90,
"acl_counter_low_threshold": 70,
"acl_counter_threshold_type": "wrong"
}
}
}
},
"DNAT_WITH_CORRECT_FREE_VALUE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"dnat_entry_high_threshold": 90,
"dnat_entry_low_threshold": 70,
"dnat_entry_threshold_type": "free"
}
}
}
},
"DNAT_WITH_CORRECT_USED_VALUE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"dnat_entry_high_threshold": 85,
"dnat_entry_low_threshold": 25,
"dnat_entry_threshold_type": "used"
}
}
}
},
"DNAT_WITH_HIGH_THRESHOLD_ERR": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"dnat_entry_high_threshold": 80,
"dnat_entry_low_threshold": 81,
"dnat_entry_threshold_type": "PERCENTAGE"
}
}
}
},
"DNAT_WITH_WRONG_PERCENTAGE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"dnat_entry_high_threshold": 110,
"dnat_entry_low_threshold": 85,
"dnat_entry_threshold_type": "PERCENTAGE"
}
}
}
},
"DNAT_WITH_WRONG_THRESHOLD_TYPE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"dnat_entry_high_threshold": 90,
"dnat_entry_low_threshold": 70,
"dnat_entry_threshold_type": "wrong"
}
}
}
},
"IPMC_WITH_CORRECT_FREE_VALUE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"ipmc_entry_high_threshold": 90,
"ipmc_entry_low_threshold": 70,
"ipmc_entry_threshold_type": "free"
}
}
}
},
"IPMC_WITH_CORRECT_USED_VALUE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"ipmc_entry_high_threshold": 85,
"ipmc_entry_low_threshold": 25,
"ipmc_entry_threshold_type": "used"
}
}
}
},
"IPMC_WITH_HIGH_THRESHOLD_ERR": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"ipmc_entry_high_threshold": 80,
"ipmc_entry_low_threshold": 81,
"ipmc_entry_threshold_type": "PERCENTAGE"
}
}
}
},
"IPMC_WITH_WRONG_PERCENTAGE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"ipmc_entry_high_threshold": 110,
"ipmc_entry_low_threshold": 85,
"ipmc_entry_threshold_type": "PERCENTAGE"
}
}
}
},
"IPMC_WITH_WRONG_THRESHOLD_TYPE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"ipmc_entry_high_threshold": 90,
"ipmc_entry_low_threshold": 70,
"ipmc_entry_threshold_type": "wrong"
}
}
}
},
"SNAT_WITH_CORRECT_FREE_VALUE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"snat_entry_high_threshold": 90,
"snat_entry_low_threshold": 70,
"snat_entry_threshold_type": "free"
}
}
}
},
"SNAT_WITH_CORRECT_USED_VALUE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"snat_entry_high_threshold": 85,
"snat_entry_low_threshold": 25,
"snat_entry_threshold_type": "used"
}
}
}
},
"SNAT_WITH_HIGH_THRESHOLD_ERR": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"snat_entry_high_threshold": 80,
"snat_entry_low_threshold": 81,
"snat_entry_threshold_type": "PERCENTAGE"
}
}
}
},
"SNAT_WITH_WRONG_PERCENTAGE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"snat_entry_high_threshold": 110,
"snat_entry_low_threshold": 85,
"snat_entry_threshold_type": "PERCENTAGE"
}
}
}
},
"SNAT_WITH_WRONG_THRESHOLD_TYPE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"snat_entry_high_threshold": 90,
"snat_entry_low_threshold": 70,
"snat_entry_threshold_type": "wrong"
}
}
}
},
"MPLS_INSEG_WITH_CORRECT_FREE_VALUE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"mpls_inseg_high_threshold": 90,
"mpls_inseg_low_threshold": 70,
"mpls_inseg_threshold_type": "free"
}
}
}
},
"MPLS_INSEG_WITH_CORRECT_USED_VALUE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"mpls_inseg_high_threshold": 85,
"mpls_inseg_low_threshold": 25,
"mpls_inseg_threshold_type": "used"
}
}
}
},
"MPLS_INSEG_WITH_HIGH_THRESHOLD_ERR": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"mpls_inseg_high_threshold": 80,
"mpls_inseg_low_threshold": 81,
"mpls_inseg_threshold_type": "PERCENTAGE"
}
}
}
},
"MPLS_INSEG_WITH_WRONG_PERCENTAGE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"mpls_inseg_high_threshold": 110,
"mpls_inseg_low_threshold": 85,
"mpls_inseg_threshold_type": "PERCENTAGE"
}
}
}
},
"MPLS_INSEG_WITH_WRONG_THRESHOLD_TYPE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"mpls_inseg_high_threshold": 90,
"mpls_inseg_low_threshold": 70,
"mpls_inseg_threshold_type": "wrong"
}
}
}
},
"MPLS_NH_WITH_CORRECT_FREE_VALUE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"mpls_nexthop_high_threshold": 90,
"mpls_nexthop_low_threshold": 70,
"mpls_nexthop_threshold_type": "free"
}
}
}
},
"MPLS_NH_WITH_CORRECT_USED_VALUE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"mpls_nexthop_high_threshold": 85,
"mpls_nexthop_low_threshold": 25,
"mpls_nexthop_threshold_type": "used"
}
}
}
},
"MPLS_NH_WITH_HIGH_THRESHOLD_ERR": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"mpls_nexthop_high_threshold": 80,
"mpls_nexthop_low_threshold": 81,
"mpls_nexthop_threshold_type": "PERCENTAGE"
}
}
}
},
"MPLS_NH_WITH_WRONG_PERCENTAGE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"mpls_nexthop_high_threshold": 110,
"mpls_nexthop_low_threshold": 85,
"mpls_nexthop_threshold_type": "PERCENTAGE"
}
}
}
},
"MPLS_NH_WITH_WRONG_THRESHOLD_TYPE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"mpls_nexthop_high_threshold": 90,
"mpls_nexthop_low_threshold": 70,
"mpls_nexthop_threshold_type": "wrong"
}
}
}
},
"SRV6_MY_SID_ENTRY_WITH_CORRECT_FREE_VALUE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"srv6_my_sid_entry_high_threshold": 90,
"srv6_my_sid_entry_low_threshold": 70,
"srv6_my_sid_entry_threshold_type": "free"
}
}
}
},
"SRV6_MY_SID_ENTRY_WITH_CORRECT_USED_VALUE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"srv6_my_sid_entry_high_threshold": 85,
"srv6_my_sid_entry_low_threshold": 25,
"srv6_my_sid_entry_threshold_type": "used"
}
}
}
},
"SRV6_MY_SID_ENTRY_WITH_HIGH_THRESHOLD_ERR": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"srv6_my_sid_entry_high_threshold": 80,
"srv6_my_sid_entry_low_threshold": 81,
"srv6_my_sid_entry_threshold_type": "PERCENTAGE"
}
}
}
},
"SRV6_MY_SID_ENTRY_WITH_WRONG_PERCENTAGE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"srv6_my_sid_entry_high_threshold": 110,
"srv6_my_sid_entry_low_threshold": 85,
"srv6_my_sid_entry_threshold_type": "PERCENTAGE"
}
}
}
},
"SRV6_MY_SID_ENTRY_WITH_WRONG_THRESHOLD_TYPE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"srv6_my_sid_entry_high_threshold": 90,
"srv6_my_sid_entry_low_threshold": 70,
"srv6_my_sid_entry_threshold_type": "wrong"
}
}
}
},
"SRV6_NH_WITH_CORRECT_FREE_VALUE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"srv6_nexthop_high_threshold": 90,
"srv6_nexthop_low_threshold": 70,
"srv6_nexthop_threshold_type": "free"
}
}
}
},
"SRV6_NH_WITH_CORRECT_USED_VALUE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"srv6_nexthop_high_threshold": 85,
"srv6_nexthop_low_threshold": 25,
"srv6_nexthop_threshold_type": "used"
}
}
}
},
"SRV6_NH_WITH_HIGH_THRESHOLD_ERR": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"srv6_nexthop_high_threshold": 80,
"srv6_nexthop_low_threshold": 81,
"srv6_nexthop_threshold_type": "PERCENTAGE"
}
}
}
},
"SRV6_NH_WITH_WRONG_PERCENTAGE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"srv6_nexthop_high_threshold": 110,
"srv6_nexthop_low_threshold": 85,
"srv6_nexthop_threshold_type": "PERCENTAGE"
}
}
}
},
"SRV6_NH_WITH_WRONG_THRESHOLD_TYPE": {
"sonic-crm:sonic-crm": {
"sonic-crm:CRM": {
"Config": {
"srv6_nexthop_high_threshold": 90,
"srv6_nexthop_low_threshold": 70,
"srv6_nexthop_threshold_type": "wrong"
}
}
}
}
}

View File

@ -1,40 +0,0 @@
{
"SMART_SWITCH_MID_PLANE_BRIDGE_WITH_DPU_TEST": {
"sonic-smart-switch:sonic-smart-switch": {
"sonic-smart-switch:MID_PLANE_BRIDGE": {
"GLOBAL": {
"bridge": "bridge_midplane",
"ip_prefix": "169.254.200.254/24"
}
},
"sonic-smart-switch:DPUS": {
"DPUS_LIST": [
{
"dpu_name": "dpu0",
"midplane_interface": "dpu0"
},
{
"dpu_name": "dpu1",
"midplane_interface": "dpu1"
}
]
}
}
},
"SMART_SWITCH_DPU_NAME_TEST": {
"sonic-smart-switch:sonic-smart-switch": {
"sonic-smart-switch:DPUS": {
"DPUS_LIST": [
{
"dpu_name": "dpu0",
"midplane_interface": "dpuX"
},
{
"dpu_name": "dpu1",
"midplane_interface": "dpu0"
}
]
}
}
}
}