Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wajahatrazi committed Dec 30, 2024
2 parents 0de9d67 + e684942 commit aacb424
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 342 deletions.
152 changes: 32 additions & 120 deletions src/sonic-yang-models/tests/yang_model_tests/tests/stp.json
Original file line number Diff line number Diff line change
@@ -1,148 +1,60 @@
{
"STP_GLOBAL_CONFIG_TEST": {
"STP_GLOBAL_VALID_CONFIG_TEST": {
"desc": "Configure STP globally with valid mode (mst or pvst)."
},
"STP_GLOBAL_INVALID_PRIORITY": {
"desc": "Configure an invalid priority value in the STP global settings.",
"desc": "Configure an invalid priority value in STP global settings.",
"eStrKey": "InvalidValue",
"eStr": ["priority"]
"eStr": ["Invalid Bridge Priority value."]
},
"STP_GLOBAL_INVALID_MODE_TEST": {
"desc": "Configure STP globally with an invalid mode.",
"eStrKey": "InvalidSTPMode",
"eStr": ["Invalid STP mode value. Valid values are 'mst' or 'pvst'."]
},
"STP_GLOBAL_CONFIG_NO_MODE_NEG_TEST": {
"desc": "Configure STP globally without specifying a mode.",
"eStrKey": "Mandatory",
"eStr": ["STP mode must be specified."]
},
"STP_GLOBAL_INVALID_ROOTGUARD_TIMEOUT": {
"desc": "Configure an invalid root guard timeout in global STP settings.",
"eStrKey": "InvalidRootguardTimeout",
"eStr": ["Root-guard Timeout must be between 5 and 600 seconds."]
"STP_GLOBAL_ROOTGUARD_TIMEOUT_MST_NEG_TEST": {
"desc": "Configure rootguard timeout in MST mode.",
"eStrKey": "stp-invalid",
"eStr": ["Configuration not allowed in MST mode"]
},
"STP_VLAN_VALID_CONFIG_TEST": {
"desc": "Configure PVST VLAN with valid parameters (priority and VLAN ID)."
"desc": "Configure PVST VLAN with valid parameters (vlanid and priority)."
},
"STP_VLAN_INVALID_VLAN_ID_NEG_TEST": {
"STP_VLAN_INVALID_ID_TEST": {
"desc": "Configure PVST VLAN with an invalid VLAN ID.",
"eStrKey": "InvalidVlanID",
"eStr": ["VLAN ID must be between 1 and 4095."]
},
"STP_VLAN_INVALID_PRIORITY_NEG_TEST": {
"desc": "Configure PVST VLAN with an invalid bridge priority.",
"eStrKey": "InvalidPriority",
"eStr": ["Bridge priority must be between 0 and 61440."]
},
"STP_VLAN_MISSING_PRIORITY_NEG_TEST": {
"desc": "Configure PVST VLAN without specifying priority.",
"eStrKey": "Mandatory",
"eStr": ["Bridge priority must be specified for PVST VLAN."]
},
"STP_VLAN_DUPLICATE_CONFIG_NEG_TEST": {
"desc": "Configure PVST VLAN with a duplicate VLAN ID.",
"eStrKey": "DuplicateVlanID",
"eStr": ["Duplicate VLAN ID detected."]
"eStrKey": "vlanid-invalid",
"eStr": ["Vlan ID out of range"]
},
"STP_INTERFACE_VALID_CONFIG_TEST": {
"desc": "Configure STP parameters on an interface with valid values."
"STP_PORT_CONFIG_VALID_TEST": {
"desc": "Configure STP port with valid parameters (enabled, bpdu_guard, root_guard)."
},
"STP_INTERFACE_INVALID_COST_NEG_TEST": {
"desc": "Configure an invalid path cost for an interface.",
"eStrKey": "InvalidPathCost",
"eStr": ["Path cost must be between 1 and 200000000."]
},
"STP_INTERFACE_DUPLICATE_NEG_TEST": {
"desc": "Configure duplicate STP parameters for the same interface.",
"eStrKey": "DuplicateInterfaceConfig",
"eStr": ["Duplicate interface configuration detected."]
},
"STP_INTERFACE_INVALID_PORTFAST_NEG_TEST": {
"desc": "Configure portfast on MST mode interface.",
"eStrKey": "InvalidPortfast",
"STP_PORT_INVALID_PORTFAST_MST_NEG_TEST": {
"desc": "Configure portfast on an interface in MST mode.",
"eStrKey": "stp-invalid",
"eStr": ["Configuration not allowed in MST mode"]
},
"STP_MST_GLOBAL_CONFIG_TEST": {
"desc": "Configure MSTP globally with valid parameters."
},
"STP_MST_REGION_NAME_MISSING_NEG_TEST": {
"desc": "Configure MSTP region without specifying a name.",
"eStrKey": "Mandatory",
"eStr": ["MST region name must be provided."]
"STP_MST_GLOBAL_VALID_CONFIG_TEST": {
"desc": "Configure MST global settings with valid region name, revision, and parameters."
},
"STP_MST_REGION_NAME_INVALID_NEG_TEST": {
"desc": "Configure MSTP with an invalid region name.",
"STP_MST_REGION_NAME_INVALID_TEST": {
"desc": "Configure MST global settings with an invalid region name.",
"eStrKey": "InvalidValue",
"eStr": ["MST region name must be between 1 and 32 characters."]
},
"STP_MST_INSTANCE_VALID_CONFIG_TEST": {
"desc": "Configure MSTP instance with valid instance ID and VLAN mapping."
},
"STP_MST_INSTANCE_DUPLICATE_ID_NEG_TEST": {
"desc": "Configure MSTP instance with a duplicate instance ID.",
"eStrKey": "DuplicateInstanceID",
"eStr": ["Duplicate MSTP instance ID detected."]
"eStr": ["MST Region name must be between 1 and 32 characters."]
},
"STP_MST_INSTANCE_INVALID_VLAN_NEG_TEST": {
"desc": "Configure MSTP instance with an invalid VLAN list.",
"eStrKey": "InvalidVlanList",
"eStr": ["VLAN list contains invalid or out-of-range VLAN IDs."]
"STP_MST_PORT_VALID_CONFIG_TEST": {
"desc": "Configure MST port settings with valid edge port and link type."
},
"STP_MST_INSTANCE_MISSING_VLAN_NEG_TEST": {
"desc": "Configure MSTP instance without associating VLANs.",
"eStrKey": "Mandatory",
"eStr": ["At least one VLAN must be associated with the MSTP instance."]
},
"STP_MST_PORT_CONFIG_TEST": {
"desc": "Configure MSTP parameters on a port with valid settings."
},
"STP_MST_PORT_INVALID_PRIORITY_NEG_TEST": {
"desc": "Configure MSTP port with an invalid port priority.",
"eStrKey": "InvalidPortPriority",
"eStr": ["Port priority must be between 0 and 240."]
},
"STP_MST_PORT_INVALID_COST_NEG_TEST": {
"desc": "Configure MSTP port with an invalid path cost.",
"eStrKey": "InvalidPathCost",
"eStr": ["Path cost must be between 1 and 20000000."]
},
"STP_MST_PORT_DUPLICATE_NEG_TEST": {
"desc": "Configure MSTP parameters with duplicate port settings.",
"eStrKey": "DuplicatePortConfig",
"eStr": ["Duplicate MSTP port configuration detected."]
},
"STP_MST_PORT_EDGE_PORT_NEG_TEST": {
"desc": "Configure MSTP port with edge-port enabled in non-MST mode.",
"eStrKey": "InvalidEdgePort",
"eStr": ["Edge-port configuration is only allowed in MST mode."]
},
"STP_MST_PORT_LINK_TYPE_TEST": {
"desc": "Configure MSTP port with valid link type (auto, shared, point-to-point)."
},
"STP_MST_PORT_INVALID_LINK_TYPE_NEG_TEST": {
"desc": "Configure MSTP port with an invalid link type.",
"STP_MST_PORT_INVALID_LINK_TYPE_TEST": {
"desc": "Configure MST port with an invalid link type.",
"eStrKey": "InvalidLinkType",
"eStr": ["Link type must be 'auto', 'shared', or 'point-to-point'."]
},
"STP_MST_PORT_CONFIG_DUPLICATE_EDGE_PORT_NEG_TEST": {
"desc": "Configure MSTP port with duplicate edge-port configuration.",
"eStrKey": "DuplicateEdgePortConfig",
"eStr": ["Duplicate edge-port configuration detected."]
},
"STP_PORT_EDGE_PORT_TEST": {
"desc": "Configure edge port settings on an interface."
},
"STP_PORT_LINK_TYPE_TEST": {
"desc": "Configure link type settings on an interface."
},
"STP_MST_HOLD_COUNT_TEST": {
"desc": "Configure MST hold count with valid settings."
},
"STP_MST_HELLO_TIME_TEST": {
"desc": "Configure MST hello time with valid settings."
"STP_MST_INSTANCE_VALID_CONFIG_TEST": {
"desc": "Configure MST instance with a valid instance ID and VLAN mapping."
},
"STP_MST_MAX_HOPS_TEST": {
"desc": "Configure MST max hops with valid settings."
"STP_MST_INSTANCE_MISSING_VLAN_TEST": {
"desc": "Configure MST instance without associating VLANs.",
"eStrKey": "Mandatory",
"eStr": ["At least one VLAN must be associated with the MST instance."]
}
}
}
Loading

0 comments on commit aacb424

Please sign in to comment.