Skip to content

Commit 916ca44

Browse files
dhaselvamonrog2takishidapsureshbHarinadh-Saladi
authored
Unsupported hardware check (datacenter#364)
* Add arg to define thread limit - to throttle concurrent API calls when required (datacenter#355) * add `--max-threads` arg * fix bad descriptor errs/race conditions * update pytests * 353 the script incorrectly detects vpc and port channel interfaces as cscwh68103 invalid fabricpathep targets (datacenter#357) * specific testing for known failure conditions of cscwh68103 as to not catch valid scenarios * Update aci-preupgrade-validation-script.py mark version * print cleanup * Unsupported hardware check * fix: Add cversion check for post_upgrade_cb_check (datacenter#377) * added validation for CFD CSCwp64296 (datacenter#307) Added rogue ep/coop exception mac check for the CFD CSCwp64296 * Added pre-upgrade validation for N9K-C9408 with more than 6 N9K-X9400-16W LEM's for the bug CSCws82819 (datacenter#354) * Added a new check for the bug 'CSCws82819N9K-C9408 boot loop on 16.1.2f and later with 6 or more LEMs' * New Validation for APIC Storage Inode Usage (F4388, F4389, F4390 equipment-full) (datacenter#361) * New Validation for APIC Storage Inode Usage (F4388, F4389, F4390 equipment-full) * Add new exception handling of invalid query filter in `icurl` due to, for example, a non-supported fault code on older versions * Add validation for multipod_modular_spine_bootscript_check - CSCwr66848 (datacenter#365) * Add check for CFD - CSCwr66848 * Update pytest.yml to run on vX.Y.Z branches * adding of cli parameters for user and password (datacenter#335) * added cli parameter for user (-u) and password (-p) to be used in an eased way for fully automated execution of 'aci-preupgrade-validation-script.py' * test: Add pytest --------- Co-authored-by: Detlef Sass <detlef.sass@de.bosch.com> * Addressed the review comments * Added validation for CSCwd40071 (datacenter#332) * Added validation for CSCwd40071 * Addressed the comments * Added cversion for the check * Removed empty spaces * logic change. removed 0.0.0.0/0 and made pytest changes * logic modified and validation.md file updated * Addressed the review comments * Added validation for CSCws84232 (datacenter#334) * Feat:added svccoreCtrlr excessive entries check * updated the formated json in svccore_negative.json * Removed other PR checks * Fix: svccoreNode mo check is updated * Fix:update the threshold to 240 * refactor:moved to general check * refactor:updated recommended action * refactor:optimise the check for get the count alone * refactor:added try catch exception for error handling * update the threshold value for 240 * refactor:query-target was added * refactor: removed unwanted spaces * refactor:removed unwanted spaces in validation.md * resolve conflict while rebasing * resolve conflict while rebasing * updated pytest script file * updated validation.md * addressed review comments * updated validation.md --------- Co-authored-by: takishida <38262981+takishida@users.noreply.github.com> * Removed gen1_switch_compatibility_check --------- Co-authored-by: GM <monrog2@gmail.com> Co-authored-by: Gabriel <gmonroy@cisco.com> Co-authored-by: tkishida <tkishida@cisco.com> Co-authored-by: takishida <38262981+takishida@users.noreply.github.com> Co-authored-by: psureshb <psureshb@cisco.com> Co-authored-by: Harinadh-Saladi <hsaladi@cisco.com> Co-authored-by: sanjanch <sanjanch@cisco.com> Co-authored-by: asraf-khan <anazar@cisco.com> Co-authored-by: Thatleft <detlef.sass@web.de> Co-authored-by: Detlef Sass <detlef.sass@de.bosch.com> Co-authored-by: veesenth_cisco <veesenth@cisco.com>
1 parent a643312 commit 916ca44

15 files changed

Lines changed: 370 additions & 132 deletions

aci-preupgrade-validation-script.py

Lines changed: 70 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3866,27 +3866,83 @@ def target_version_compatibility_check(cversion, tversion, **kwargs):
38663866
return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url)
38673867

38683868

3869-
@check_wrapper(check_title="Gen 1 switch compatibility")
3870-
def gen1_switch_compatibility_check(tversion, fabric_nodes, **kwargs):
3869+
@check_wrapper(check_title="Supported hardware compatibility")
3870+
def supported_hardware_check(tversion, fabric_nodes, **kwargs):
38713871
result = FAIL_UF
3872-
headers = ["Target Version", "Node ID", "Model", "Warning"]
3872+
headers = ["Target Version", "Node ID", "Model", "Type", "Warning"]
3873+
data = []
3874+
unformatted_headers = ["Target Version", "DN", "Model", "Type", "Warning"]
3875+
unformatted_data = []
38733876
gen1_models = ["N9K-C9336PQ", "N9K-X9736PQ", "N9K-C9504-FM", "N9K-C9508-FM", "N9K-C9516-FM", "N9K-C9372PX-E",
38743877
"N9K-C9372TX-E", "N9K-C9332PQ", "N9K-C9372PX", "N9K-C9372TX", "N9K-C9396PX", "N9K-C9396TX",
38753878
"N9K-C93128TX"]
3876-
data = []
3879+
unsupported_6_0_1_switch_models = ["N9K-C93120TX"]
3880+
unsupported_6_1_1_switch_models = ["N9K-C93180LC-EX"]
3881+
unsupported_5_0_1_exp_module_models = ["N9K-M12PQ", "N9K-M6PQ", "N9K-M6PQ-E"]
3882+
unsupported_6_1_1_fex_models = ["N2K-C2332TQ-10GT", "N2K-C2348TQ-10GE", "N2K-C2232PP-10GE", "N2K-C2232TM-E-10GE", "N2K-C2348TQ-10G-E"]
3883+
unsupported_6_1_1_sup_models = ["N9K-SUP-A", "N9K-SUP-B"]
38773884
recommended_action = 'Select supported target version or upgrade hardware'
3878-
doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#compatibility-switch-hardware-gen1'
3885+
doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#supported-hardware-compatibility'
38793886

3880-
if not tversion:
3881-
return Result(result=MANUAL, msg=TVER_MISSING)
3882-
if tversion.newer_than("5.0(1a)"):
3887+
if not tversion.older_than("5.0(1a)"):
38833888
for node in fabric_nodes:
3884-
if node['fabricNode']['attributes']['model'] in gen1_models:
3885-
data.append([str(tversion), node['fabricNode']['attributes']['id'],
3886-
node['fabricNode']['attributes']['model'], 'Not supported on 5.x+'])
3887-
if not data:
3889+
model = node['fabricNode']['attributes']['model']
3890+
if model in gen1_models:
3891+
data.append([str(tversion), node['fabricNode']['attributes']['id'], model, 'Switch', 'Not supported on 5.x+'])
3892+
3893+
eqptLCs = icurl('class', 'eqptLC.json')
3894+
for eqptLC in eqptLCs:
3895+
model = eqptLC['eqptLC']['attributes']['model']
3896+
if model in unsupported_5_0_1_exp_module_models:
3897+
dn = re.search(node_regex, eqptLC['eqptLC']['attributes']['dn'])
3898+
if dn:
3899+
data.append([str(tversion), dn.group('node'), model, 'Expansion Module', 'Not supported on 5.x+'])
3900+
else:
3901+
unformatted_data.append([str(tversion), eqptLC['eqptLC']['attributes']['dn'], model, 'Expansion Module', 'Not supported on 5.x+'])
3902+
3903+
if not tversion.older_than("6.0(1a)"):
3904+
for node in fabric_nodes:
3905+
model = node['fabricNode']['attributes']['model']
3906+
if model in unsupported_6_0_1_switch_models:
3907+
data.append([str(tversion), node['fabricNode']['attributes']['id'], model, 'Switch', 'Deprecated from 6.0(1)+'])
3908+
3909+
if not tversion.older_than("6.1(1f)"):
3910+
for node in fabric_nodes:
3911+
model = node['fabricNode']['attributes']['model']
3912+
if model in unsupported_6_1_1_switch_models:
3913+
data.append([str(tversion), node['fabricNode']['attributes']['id'], model, 'Switch', 'Deprecated from 6.1(1)+'])
3914+
3915+
eqptExtChs = icurl('class', 'eqptExtCh.json')
3916+
for eqptExtCh in eqptExtChs:
3917+
model = eqptExtCh['eqptExtCh']['attributes']['model']
3918+
if model in unsupported_6_1_1_fex_models:
3919+
dn = re.search(node_regex, eqptExtCh['eqptExtCh']['attributes']['dn'])
3920+
if dn:
3921+
data.append([str(tversion), dn.group('node'), model, 'FEX', 'Deprecated from 6.1(1)+'])
3922+
else:
3923+
unformatted_data.append([str(tversion), eqptExtCh['eqptExtCh']['attributes']['dn'], model, 'FEX', 'Deprecated from 6.1(1)+'])
3924+
3925+
eqptSupCs = icurl('class', 'eqptSupC.json')
3926+
for eqptSupC in eqptSupCs:
3927+
model = eqptSupC['eqptSupC']['attributes']['model']
3928+
if model in unsupported_6_1_1_sup_models:
3929+
dn = re.search(node_regex, eqptSupC['eqptSupC']['attributes']['dn'])
3930+
if dn:
3931+
data.append([str(tversion), dn.group('node'), model, 'Supervisor', 'Deprecated from 6.1(1)+'])
3932+
else:
3933+
unformatted_data.append([str(tversion), eqptSupC['eqptSupC']['attributes']['dn'], model, 'Supervisor', 'Deprecated from 6.1(1)+'])
3934+
3935+
if not data and not unformatted_data:
38883936
result = PASS
3889-
return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url)
3937+
return Result(
3938+
result=result,
3939+
headers=headers,
3940+
data=data,
3941+
unformatted_headers=unformatted_headers,
3942+
unformatted_data=unformatted_data,
3943+
recommended_action=recommended_action,
3944+
doc_url=doc_url,
3945+
)
38903946

38913947

38923948
@check_wrapper(check_title="Contract Port 22 Defect")
@@ -6417,7 +6473,7 @@ class CheckManager:
64176473
api_checks = [
64186474
# General Checks
64196475
target_version_compatibility_check,
6420-
gen1_switch_compatibility_check,
6476+
supported_hardware_check,
64216477
r_leaf_compatibility_check,
64226478
cimc_compatibilty_check,
64236479
apic_cluster_health_check,

docs/docs/validations.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ Items | This Script
3737
[Fabric Link Redundancy][g17] | :white_check_mark: | :no_entry_sign:
3838
[APIC Database Size][g18] | :white_check_mark: | :no_entry_sign:
3939
[APIC downgrade compatibility when crossing 6.2 release][g19]| :white_check_mark: | :no_entry_sign:
40-
[Svccore Excessive Data Check][g20] | :white_check_mark: | :no_entry_sign:
40+
[Supported Hardware Compatibility][g20] | :white_check_mark: | :no_entry_sign:
41+
[Svccore Excessive Data Check][g21] | :white_check_mark: | :no_entry_sign:
4142

4243
[g1]: #compatibility-target-aci-version
4344
[g2]: #compatibility-cimc-version
@@ -58,7 +59,8 @@ Items | This Script
5859
[g17]: #fabric-link-redundancy
5960
[g18]: #apic-database-size
6061
[g19]: #apic-downgrade-compatibility-when-crossing-62-release
61-
[g20]: #svccore-excessive-data-check
62+
[g20]: #supported-hardware-compatibility
63+
[g21]: #svccore-excessive-data-check
6264

6365
### Fault Checks
6466
Items | Faults | This Script | APIC built-in
@@ -267,6 +269,17 @@ The script checks the presence of generation one switches when the upgrade is cr
267269
Or you can check the [Release Note 15.0(1) of ACI switches][3] to see the list of generation one switches, typically the one without any suffix such as N9K-C9372PX, that are no longer supported from 15.0(1) release.
268270

269271

272+
### Supported Hardware Compatibility
273+
274+
The script checks the presence of deprecated hardware in the fabric.
275+
276+
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.
277+
278+
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.
279+
280+
Contact cisco TAC for further assistance.
281+
282+
270283
### Compatibility (Remote Leaf Switch)
271284

272285
The script checks the requirement to use remote leaf switches on the target version.

tests/checks/gen1_switch_compatibility_check/fabricNode_no_gen1.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

tests/checks/gen1_switch_compatibility_check/fabricNode_with_gen1.json

Lines changed: 0 additions & 44 deletions
This file was deleted.

tests/checks/gen1_switch_compatibility_check/test_gen1_switch_compatibility_check.py

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[
2+
{
3+
"eqptExtCh": {
4+
"attributes": {
5+
"dn": "topology/pod-1/node-101/sys/ch/supslot-1/extch-101",
6+
"model": "N2K-C2348UPQ"
7+
}
8+
}
9+
}
10+
]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[
2+
{
3+
"eqptExtCh": {
4+
"attributes": {
5+
"dn": "topology/pod-1/node-101/sys/ch/supslot-1/extch-101",
6+
"model": "N2K-C2232PP-10GE"
7+
}
8+
}
9+
},
10+
{
11+
"eqptExtCh": {
12+
"attributes": {
13+
"dn": "topology/pod-1/node-101/sys/ch/supslot-1/extch-102",
14+
"model": "N2K-C2348UPQ"
15+
}
16+
}
17+
}
18+
]
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": "topology/pod-1/node-1001/sys/ch/lcslot-1/lc",
6+
"model": "N9K-X9732C-EX"
7+
}
8+
}
9+
}
10+
]
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+
]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[
2+
{
3+
"eqptLC": {
4+
"attributes": {
5+
"dn": "topology/pod-1/node-1001/sys/ch/lcslot-1/lc",
6+
"model": "N9K-M6PQ"
7+
}
8+
}
9+
},
10+
{
11+
"eqptLC": {
12+
"attributes": {
13+
"dn": "topology/pod-1/node-1001/sys/ch/lcslot-2/lc",
14+
"model": "N9K-X9732C-EX"
15+
}
16+
}
17+
}
18+
]

0 commit comments

Comments
 (0)