Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ nodes:
sys_clk: "1800"
ifc_clk: "1800"
mac_clk: "1600"
ecmp_alb_enable: "1"
alb_port_state_enable: "1"
ecmp_alb_timeout_step_size: "2"
txring:
- txring_id: "0"
desc_count: "1024"
Expand Down
1 change: 1 addition & 0 deletions src/sonic-yang-models/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def print_yang_files_validation_report(yang_files_list):
# Specify only the file basenames here; directory prefixes will be added automatically.
yang_files = [
'sonic-acl.yang',
'sonic-ars.yang',
'sonic-asic-sensors.yang',
'sonic-auto_techsupport.yang',
'sonic-banner.yang',
Expand Down
64 changes: 56 additions & 8 deletions src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -2304,7 +2304,7 @@
"type": "DWRR",
"weight": "10"
}
},
},

"WRED_PROFILE": {
"Wred1": {
Expand Down Expand Up @@ -3122,12 +3122,12 @@
"dpu_bfd_probe_multiplier": "3"
}
},
"XCVRD_LOG": {
"Y_CABLE": {
"log_verbosity": "notice"
}
},
"GRPCCLIENT": {
"XCVRD_LOG": {
"Y_CABLE": {
"log_verbosity": "notice"
}
},
"GRPCCLIENT": {
"config": {
"type": "secure",
"auth_level": "server",
Expand All @@ -3139,7 +3139,7 @@
"ca_crt": "root.pem",
"grpc_ssl_credential": "azureclient.ms"
}
},
},
"BANNER_MESSAGE": {
"global": {
"state": "enabled",
Expand Down Expand Up @@ -3246,6 +3246,54 @@
"guard_time": "2",
"ber_threshold": "12"
}
},
"ARS_PROFILE": {
"ars_profile_default": {
"algorithm": "ewma",
"ars_nhg_path_selector_mode": "interface",
"ars_lag_path_selector_mode": "interface",
"default_ars_object": "ars_obj_name",
"max_flows": "2048",
"sampling_interval": "10",
"past_load_min_value": "0",
"past_load_max_value": "10",
"past_load_weight": "6",
"future_load_min_value": "10",
"future_load_max_value": "50",
"future_load_weight": "10",
"current_load_min_value": "20",
"current_load_max_value": "30",
"ipv4_enable": "true",
"ipv6_enable": "true"
}
},
"ARS_OBJECT": {
"ars_obj_name": {
"assign_mode": "per_flowlet_quality",
"flowlet_idle_time": "256",
"max_flows": "512",
"primary_path_threshold": "100",
"alternative_path_cost": "250"
}
},
"ARS_NEXTHOP": {
"default|1.1.1.10": {
"ars_obj_name": "ars_obj_name"
},
"default|2.2.2.20": {
"ars_obj_name": "ars_obj_name",
"role": "alternative_path"
},
"default|3.3.3.30": {
"ars_obj_name": "ars_obj_name"
}
},
"ARS_INTERFACE": {
"Ethernet0": {
"scaling_factor": "100",
"ars_obj_name": "ars_obj_name"
},
"Ethernet8": {}
}
},
"SAMPLE_CONFIG_DB_UNKNOWN": {
Expand Down
37 changes: 37 additions & 0 deletions src/sonic-yang-models/tests/yang_model_tests/tests/ars.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"ARS_TEST": {
"desc": "Sample config in ARS."
},
"ARS_TEST_TOO_MANY_PROFILES": {
"desc": "ARS configuration with more than one profile ARS_PROFILE_LIST table.",
"eStr": "Too many ARS_PROFILE_LIST elements."
},
"ARS_TEST_INTERFACE_INVALID_LINK": {
"desc": "Interface configuration with invalid name in ARS_INTERFACE_LIST table.",
"eStrKey": "InvalidValue",
"eStr": [
"if_name"
]
},
"ARS_TEST_OBJECT_INVALID_MODE": {
"desc": "ARS_OBJECT configuration with an invalid value for 'assign_mode'.",
"eStrKey": "InvalidValue",
"eStr": [
"assign_mode"
]
},
"ARS_TEST_OBJECT_REFERENCE_IN_PROFILE_INVALID": {
"desc": "Verify that default_ars_object reference fails when target object is missing.",
"eStrKey": "InvalidValue",
"eStr": [
"default_ars_object"
]
},
"ARS_TEST_NEXTHOP_INVALID_IP": {
"desc": "Verify nexthop_ip fails validation when an invalid IP address is used.",
"eStrKey": "InvalidValue",
"eStr": [
"nexthop_ip"
]
}
}
146 changes: 146 additions & 0 deletions src/sonic-yang-models/tests/yang_model_tests/tests_config/ars.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
{
"ARS_TEST": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"admin_status": "up",
"alias": "Ethernet1",
"description": "Ethernet1",
"lanes": "65",
"mtu": "9000",
"name": "Ethernet1",
"tpid": "0x8100",
"speed": "25000"
},
{
"admin_status": "up",
"alias": "Ethernet2",
"description": "Ethernet2",
"lanes": "65",
"mtu": "9000",
"name": "Ethernet2",
"tpid": "0x8100",
"speed": "25000"
},
{
"admin_status": "up",
"alias": "Ethernet3",
"description": "Ethernet3",
"lanes": "65",
"mtu": "9000",
"name": "Ethernet3",
"tpid": "0x8100",
"speed": "25000"
}
]
}
},
"sonic-ars:sonic-ars": {
"sonic-ars:ARS_PROFILE": {
"ARS_PROFILE_LIST": [
{
"profile_name": "global",
"algorithm": "ewma",
"max_flows": "2048",
"ars_nhg_path_selector_mode": "interface",
"ars_lag_path_selector_mode": "interface"
}
]
},
"sonic-ars:ARS_INTERFACE": {
"ARS_INTERFACE_LIST": [
{
"if_name": "Ethernet1",
"scaling_factor": "100"
},
{
"if_name": "Ethernet2",
"scaling_factor": "1000"
}]
},
"sonic-ars:ARS_NEXTHOP": {
"ARS_NEXTHOP_LIST": [
{
"vrf_name": "default",
"nexthop_ip": "10.0.0.1"
},
{
"vrf_name": "default",
"nexthop_ip": "10.1.0.1"
}]
},
"sonic-ars:ARS_OBJECT": {
"ARS_OBJECT_LIST": [
{
"ars_obj_name": "ars_obj_name",
"assign_mode": "per_packet_quality"
}]
}
}
},
"ARS_TEST_TOO_MANY_PROFILES": {
"sonic-ars:sonic-ars": {
"sonic-ars:ARS_PROFILE": {
"ARS_PROFILE_LIST": [
{
"profile_name": "group1",
"algorithm": "ewma"
},
{
"profile_name": "group2",
"sampling_interval": "10"
}
]
}
}
},
"ARS_TEST_INTERFACE_INVALID_LINK": {
"sonic-ars:sonic-ars": {
"sonic-ars:ARS_INTERFACE": {
"ARS_INTERFACE_LIST": [
{
"if_name": "EthernetXXX"
}
]
}
}
},
"ARS_TEST_OBJECT_INVALID_MODE": {
"sonic-ars:sonic-ars": {
"sonic-ars:ARS_OBJECT": {
"ARS_OBJECT_LIST": [
{
"ars_obj_name": "ars_obj_default",
"assign_mode": "invalid_mode_value"
}
]
}
}
},
"ARS_TEST_OBJECT_REFERENCE_IN_PROFILE_INVALID": {
"sonic-ars:sonic-ars": {
"sonic-ars:ARS_PROFILE": {
"ARS_PROFILE_LIST": [
{
"profile_name": "group1",
"algorithm": "ewma",
"default_ars_object": "ars_obj_default"
}
]
}
}
},
"ARS_TEST_NEXTHOP_INVALID_IP": {
"sonic-ars:sonic-ars": {
"sonic-ars:ARS_NEXTHOP": {
"ARS_NEXTHOP_LIST": [
{
"vrf_name": "default",
"nexthop_ip": "300.1.2.3"
}
]
}
}
}
}
Loading
Loading