Skip to content

Commit fbf3a73

Browse files
committed
Addressed the review comments
1 parent dc0b1e1 commit fbf3a73

3 files changed

Lines changed: 33 additions & 2 deletions

File tree

docs/docs/validations.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ Or you can check the [Release Note 15.0(1) of ACI switches][3] to see the list o
269269

270270
The script checks the presence of deprecated hardware in the fabric.
271271

272+
The list of supported and unsupported hardware is populated from the Release Notes across all ACI releases. This means the check covers hardware compatibility changes introduced in any version, not just the most recent release. As new release notes are published and hardware is deprecated, this list is updated accordingly.
273+
272274
Refer the [Release Note 15.0(1) of ACI switches][3] to see the list of unsuporrted hardware for your desired target versions. Prior upgrading to target version, replace the unsupported hardware elements in your fabric with other supported hardware.
273275

274276
Contact cisco TAC for further assistance.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[
2+
{
3+
"eqptLC": {
4+
"attributes": {
5+
"dn": "sys/ch/lcslot-1/lc",
6+
"model": "N9K-M6PQ"
7+
}
8+
}
9+
}
10+
]

tests/checks/supported_hardware_check/test_supported_hardware_check.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
eqptSupC = "eqptSupC.json"
1616

1717
@pytest.mark.parametrize(
18-
"icurl_outputs, tversion, fabric_nodes, expected_result, expected_data",
18+
"icurl_outputs, tversion, fabric_nodes, expected_result, expected_data, expected_unformatted_data",
1919
[
2020
# FAIL - unsupported Gen1 and 6.1(1)+ deprecated hardware found
2121
(
@@ -34,6 +34,7 @@
3434
["6.1(1f)", "101", "N2K-C2232PP-10GE", "FEX", "Deprecated from 6.1(1)+"],
3535
["6.1(1f)", "1001", "N9K-SUP-B", "Supervisor", "Deprecated from 6.1(1)+"],
3636
],
37+
[],
3738
),
3839
# PASS - no unsupported hardware found
3940
(
@@ -46,6 +47,7 @@
4647
read_data(dir, "fabricNode_supported_only.json"),
4748
script.PASS,
4849
[],
50+
[],
4951
),
5052
# FAIL - pre 6.1(1f): only Gen1 hit should be reported
5153
(
@@ -56,6 +58,7 @@
5658
read_data(dir, "fabricNode_with_unsupported_hardware.json"),
5759
script.FAIL_UF,
5860
[["6.1(1a)", "101", "N9K-C9372TX-E", "Switch", "Not supported on 5.x+"]],
61+
[],
5962
),
6063
# PASS - pre 5.x: unsupported hardware checks should not trigger
6164
(
@@ -68,6 +71,7 @@
6871
read_data(dir, "fabricNode_with_unsupported_hardware.json"),
6972
script.PASS,
7073
[],
74+
[],
7175
),
7276
# FAIL - 6.0(1)+ unsupported switch model
7377
(
@@ -87,6 +91,7 @@
8791
],
8892
script.FAIL_UF,
8993
[["6.0(1a)", "201", "N9K-C93120TX", "Switch", "Deprecated from 6.0(1)+"]],
94+
[],
9095
),
9196
# PASS - empty fabric nodes and supported inventory
9297
(
@@ -99,14 +104,28 @@
99104
[],
100105
script.PASS,
101106
[],
107+
[],
108+
),
109+
# FAIL - expansion module with unformatted DN (no topology/pod-X/node-Y prefix);
110+
# the entry should appear in unformatted_data with the raw DN, not in data
111+
(
112+
{
113+
eqptLC: read_data(dir, "eqptLC_with_unformatted_dn.json"),
114+
},
115+
"5.0(1a)",
116+
[],
117+
script.FAIL_UF,
118+
[],
119+
[["5.0(1a)", "sys/ch/lcslot-1/lc", "N9K-M6PQ", "Expansion Module", "Not supported on 5.x+"]],
102120
),
103121
],
104122
)
105-
def test_logic(run_check, mock_icurl, tversion, fabric_nodes, expected_result, expected_data):
123+
def test_logic(run_check, mock_icurl, tversion, fabric_nodes, expected_result, expected_data, expected_unformatted_data):
106124
result = run_check(
107125
tversion=script.AciVersion(tversion) if tversion else None,
108126
fabric_nodes=fabric_nodes,
109127
)
110128

111129
assert result.result == expected_result
112130
assert result.data == expected_data
131+
assert result.unformatted_data == expected_unformatted_data

0 commit comments

Comments
 (0)