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
64 changes: 52 additions & 12 deletions aci-preupgrade-validation-script.py
Original file line number Diff line number Diff line change
Expand Up @@ -3838,24 +3838,64 @@ def target_version_compatibility_check(cversion, tversion, **kwargs):
return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url)


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

if not tversion:
return Result(result=MANUAL, msg=TVER_MISSING)
if tversion.newer_than("5.0(1a)"):
if not tversion.older_than("5.0(1a)"):
for node in fabric_nodes:
model = node['fabricNode']['attributes']['model']
if model in gen1_models:
data.append([str(tversion), node['fabricNode']['attributes']['id'], model, 'Switch', 'Not supported on 5.x+'])

eqptLCs = icurl('class', 'eqptLC.json')
for eqptLC in eqptLCs:
model = eqptLC['eqptLC']['attributes']['model']
if model in unsupported_5_0_1_exp_module_models:
dn = re.search(node_regex, eqptLC['eqptLC']['attributes']['dn'])
node_id = dn.group('node') if dn else '-'
data.append([str(tversion), node_id, model, 'Expansion Module', 'Not supported on 5.x+'])

if not tversion.older_than("6.0(1a)"):
for node in fabric_nodes:
if node['fabricNode']['attributes']['model'] in gen1_models:
data.append([str(tversion), node['fabricNode']['attributes']['id'],
node['fabricNode']['attributes']['model'], 'Not supported on 5.x+'])
model = node['fabricNode']['attributes']['model']
if model in unsupported_6_0_1_switch_models:
data.append([str(tversion), node['fabricNode']['attributes']['id'], model, 'Switch', 'Deprecated from 6.0(1)+'])

if not tversion.older_than("6.1(1f)"):
for node in fabric_nodes:
model = node['fabricNode']['attributes']['model']
if model in unsupported_6_1_1_switch_models:
data.append([str(tversion), node['fabricNode']['attributes']['id'], model, 'Switch', 'Deprecated from 6.1(1)+'])

eqptExtChs = icurl('class', 'eqptExtCh.json')
for eqptExtCh in eqptExtChs:
model = eqptExtCh['eqptExtCh']['attributes']['model']
if model in unsupported_6_1_1_fex_models:
dn = re.search(node_regex, eqptExtCh['eqptExtCh']['attributes']['dn'])
node_id = dn.group('node') if dn else '-'
data.append([str(tversion), node_id, model, 'FEX', 'Deprecated from 6.1(1)+'])

eqptSupCs = icurl('class', 'eqptSupC.json')
for eqptSupC in eqptSupCs:
model = eqptSupC['eqptSupC']['attributes']['model']
if model in unsupported_6_1_1_sup_models:
dn = re.search(node_regex, eqptSupC['eqptSupC']['attributes']['dn'])
node_id = dn.group('node') if dn else '-'
data.append([str(tversion), node_id, model, 'Supervisor', 'Deprecated from 6.1(1)+'])

if not data:
result = PASS
return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url)
Expand Down Expand Up @@ -6127,7 +6167,7 @@ class CheckManager:
api_checks = [
# General Checks
target_version_compatibility_check,
gen1_switch_compatibility_check,
supported_hardware_check,
r_leaf_compatibility_check,
cimc_compatibilty_check,
apic_cluster_health_check,
Expand Down
11 changes: 11 additions & 0 deletions docs/docs/validations.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Items | This Script
[Fabric Link Redundancy][g17] | :white_check_mark: | :no_entry_sign:
[APIC Database Size][g18] | :white_check_mark: | :no_entry_sign:
[APIC downgrade compatibility when crossing 6.2 release][g19]| :white_check_mark: | :no_entry_sign:
[Supported hardware compatibility][g20] | :white_check_mark: | :no_entry_sign:

[g1]: #compatibility-target-aci-version
[g2]: #compatibility-cimc-version
Expand All @@ -57,6 +58,7 @@ Items | This Script
[g17]: #fabric-link-redundancy
[g18]: #apic-database-size
[g19]: #apic-downgrade-compatibility-when-crossing-62-release
[g20]: #Supported-hardware-compatibility

### Fault Checks
Items | Faults | This Script | APIC built-in
Expand Down Expand Up @@ -256,6 +258,15 @@ The script checks the presence of generation one switches when the upgrade is cr
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.


### Supported hardware compatibility

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

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.

Contact cisco TAC for further assistance.


### Compatibility (Remote Leaf Switch)

The script checks the requirement to use remote leaf switches on the target version.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"eqptExtCh": {
"attributes": {
"dn": "topology/pod-1/node-101/sys/ch/supslot-1/extch-101",
"model": "N2K-C2348UPQ"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"eqptExtCh": {
"attributes": {
"dn": "topology/pod-1/node-101/sys/ch/supslot-1/extch-101",
"model": "N2K-C2232PP-10GE"
}
}
},
{
"eqptExtCh": {
"attributes": {
"dn": "topology/pod-1/node-101/sys/ch/supslot-1/extch-102",
"model": "N2K-C2348UPQ"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"eqptExtCh": {
"attributes": {
"dn": "invalid-dn-format",
"model": "N2K-C2232PP-10GE"
}
}
}
]
10 changes: 10 additions & 0 deletions tests/checks/supported_hardware_check/eqptLC_supported_only.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"eqptLC": {
"attributes": {
"dn": "topology/pod-1/node-1001/sys/ch/lcslot-1/lc",
"model": "N9K-X9732C-EX"
}
}
}
]
18 changes: 18 additions & 0 deletions tests/checks/supported_hardware_check/eqptLC_with_unsupported.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"eqptLC": {
"attributes": {
"dn": "topology/pod-1/node-1001/sys/ch/lcslot-1/lc",
"model": "N9K-M6PQ"
}
}
},
{
"eqptLC": {
"attributes": {
"dn": "topology/pod-1/node-1001/sys/ch/lcslot-2/lc",
"model": "N9K-X9732C-EX"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"eqptLC": {
"attributes": {
"dn": "bad-lc-dn",
"model": "N9K-M6PQ-E"
}
}
}
]
10 changes: 10 additions & 0 deletions tests/checks/supported_hardware_check/eqptSupC_supported_only.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"eqptSupC": {
"attributes": {
"dn": "topology/pod-1/node-1001/sys/ch/supslot-1/sup",
"model": "N9K-SUP-C"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"eqptSupC": {
"attributes": {
"dn": "topology/pod-1/node-1001/sys/ch/supslot-1/sup",
"model": "N9K-SUP-B"
}
}
},
{
"eqptSupC": {
"attributes": {
"dn": "topology/pod-1/node-1001/sys/ch/supslot-2/sup",
"model": "N9K-SUP-C"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"eqptSupC": {
"attributes": {
"dn": "not-a-topology-dn",
"model": "N9K-SUP-B"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"fabricNode": {
"attributes": {
"id": "101",
"model": "N9K-C93180YC-FX",
"role": "leaf"
}
}
},
{
"fabricNode": {
"attributes": {
"id": "1001",
"model": "N9K-C9504",
"role": "spine"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[
{
"fabricNode": {
"attributes": {
"id": "101",
"model": "N9K-C9372TX-E",
"role": "leaf"
}
}
},
{
"fabricNode": {
"attributes": {
"id": "102",
"model": "N9K-C93180LC-EX",
"role": "leaf"
}
}
},
{
"fabricNode": {
"attributes": {
"id": "103",
"model": "N9K-C93180YC-FX",
"role": "leaf"
}
}
}
]
Loading