Skip to content

Commit 321a9aa

Browse files
committed
Merge remote-tracking branch 'upstream/v4.2.0-dev' into tmp_dir_snapshot
2 parents 34225b9 + 916ca44 commit 321a9aa

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
@@ -3880,27 +3880,83 @@ def target_version_compatibility_check(cversion, tversion, **kwargs):
38803880
return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url)
38813881

38823882

3883-
@check_wrapper(check_title="Gen 1 switch compatibility")
3884-
def gen1_switch_compatibility_check(tversion, fabric_nodes, **kwargs):
3883+
@check_wrapper(check_title="Supported hardware compatibility")
3884+
def supported_hardware_check(tversion, fabric_nodes, **kwargs):
38853885
result = FAIL_UF
3886-
headers = ["Target Version", "Node ID", "Model", "Warning"]
3886+
headers = ["Target Version", "Node ID", "Model", "Type", "Warning"]
3887+
data = []
3888+
unformatted_headers = ["Target Version", "DN", "Model", "Type", "Warning"]
3889+
unformatted_data = []
38873890
gen1_models = ["N9K-C9336PQ", "N9K-X9736PQ", "N9K-C9504-FM", "N9K-C9508-FM", "N9K-C9516-FM", "N9K-C9372PX-E",
38883891
"N9K-C9372TX-E", "N9K-C9332PQ", "N9K-C9372PX", "N9K-C9372TX", "N9K-C9396PX", "N9K-C9396TX",
38893892
"N9K-C93128TX"]
3890-
data = []
3893+
unsupported_6_0_1_switch_models = ["N9K-C93120TX"]
3894+
unsupported_6_1_1_switch_models = ["N9K-C93180LC-EX"]
3895+
unsupported_5_0_1_exp_module_models = ["N9K-M12PQ", "N9K-M6PQ", "N9K-M6PQ-E"]
3896+
unsupported_6_1_1_fex_models = ["N2K-C2332TQ-10GT", "N2K-C2348TQ-10GE", "N2K-C2232PP-10GE", "N2K-C2232TM-E-10GE", "N2K-C2348TQ-10G-E"]
3897+
unsupported_6_1_1_sup_models = ["N9K-SUP-A", "N9K-SUP-B"]
38913898
recommended_action = 'Select supported target version or upgrade hardware'
3892-
doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#compatibility-switch-hardware-gen1'
3899+
doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#supported-hardware-compatibility'
38933900

3894-
if not tversion:
3895-
return Result(result=MANUAL, msg=TVER_MISSING)
3896-
if tversion.newer_than("5.0(1a)"):
3901+
if not tversion.older_than("5.0(1a)"):
38973902
for node in fabric_nodes:
3898-
if node['fabricNode']['attributes']['model'] in gen1_models:
3899-
data.append([str(tversion), node['fabricNode']['attributes']['id'],
3900-
node['fabricNode']['attributes']['model'], 'Not supported on 5.x+'])
3901-
if not data:
3903+
model = node['fabricNode']['attributes']['model']
3904+
if model in gen1_models:
3905+
data.append([str(tversion), node['fabricNode']['attributes']['id'], model, 'Switch', 'Not supported on 5.x+'])
3906+
3907+
eqptLCs = icurl('class', 'eqptLC.json')
3908+
for eqptLC in eqptLCs:
3909+
model = eqptLC['eqptLC']['attributes']['model']
3910+
if model in unsupported_5_0_1_exp_module_models:
3911+
dn = re.search(node_regex, eqptLC['eqptLC']['attributes']['dn'])
3912+
if dn:
3913+
data.append([str(tversion), dn.group('node'), model, 'Expansion Module', 'Not supported on 5.x+'])
3914+
else:
3915+
unformatted_data.append([str(tversion), eqptLC['eqptLC']['attributes']['dn'], model, 'Expansion Module', 'Not supported on 5.x+'])
3916+
3917+
if not tversion.older_than("6.0(1a)"):
3918+
for node in fabric_nodes:
3919+
model = node['fabricNode']['attributes']['model']
3920+
if model in unsupported_6_0_1_switch_models:
3921+
data.append([str(tversion), node['fabricNode']['attributes']['id'], model, 'Switch', 'Deprecated from 6.0(1)+'])
3922+
3923+
if not tversion.older_than("6.1(1f)"):
3924+
for node in fabric_nodes:
3925+
model = node['fabricNode']['attributes']['model']
3926+
if model in unsupported_6_1_1_switch_models:
3927+
data.append([str(tversion), node['fabricNode']['attributes']['id'], model, 'Switch', 'Deprecated from 6.1(1)+'])
3928+
3929+
eqptExtChs = icurl('class', 'eqptExtCh.json')
3930+
for eqptExtCh in eqptExtChs:
3931+
model = eqptExtCh['eqptExtCh']['attributes']['model']
3932+
if model in unsupported_6_1_1_fex_models:
3933+
dn = re.search(node_regex, eqptExtCh['eqptExtCh']['attributes']['dn'])
3934+
if dn:
3935+
data.append([str(tversion), dn.group('node'), model, 'FEX', 'Deprecated from 6.1(1)+'])
3936+
else:
3937+
unformatted_data.append([str(tversion), eqptExtCh['eqptExtCh']['attributes']['dn'], model, 'FEX', 'Deprecated from 6.1(1)+'])
3938+
3939+
eqptSupCs = icurl('class', 'eqptSupC.json')
3940+
for eqptSupC in eqptSupCs:
3941+
model = eqptSupC['eqptSupC']['attributes']['model']
3942+
if model in unsupported_6_1_1_sup_models:
3943+
dn = re.search(node_regex, eqptSupC['eqptSupC']['attributes']['dn'])
3944+
if dn:
3945+
data.append([str(tversion), dn.group('node'), model, 'Supervisor', 'Deprecated from 6.1(1)+'])
3946+
else:
3947+
unformatted_data.append([str(tversion), eqptSupC['eqptSupC']['attributes']['dn'], model, 'Supervisor', 'Deprecated from 6.1(1)+'])
3948+
3949+
if not data and not unformatted_data:
39023950
result = PASS
3903-
return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url)
3951+
return Result(
3952+
result=result,
3953+
headers=headers,
3954+
data=data,
3955+
unformatted_headers=unformatted_headers,
3956+
unformatted_data=unformatted_data,
3957+
recommended_action=recommended_action,
3958+
doc_url=doc_url,
3959+
)
39043960

39053961

39063962
@check_wrapper(check_title="Contract Port 22 Defect")
@@ -6431,7 +6487,7 @@ class CheckManager:
64316487
api_checks = [
64326488
# General Checks
64336489
target_version_compatibility_check,
6434-
gen1_switch_compatibility_check,
6490+
supported_hardware_check,
64356491
r_leaf_compatibility_check,
64366492
cimc_compatibilty_check,
64376493
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)