Skip to content

Commit

Permalink
invalid_fex_rs_check; check fex_ id >= 101 (#146)
Browse files Browse the repository at this point in the history
* invalid_fex_rs_check; check fex_ id >= 101

* review changes
  • Loading branch information
monrog2 authored Aug 8, 2024
1 parent a872016 commit 7a39ee6
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 2 deletions.
5 changes: 3 additions & 2 deletions aci-preupgrade-validation-script.py
Original file line number Diff line number Diff line change
Expand Up @@ -3491,10 +3491,11 @@ def invalid_fex_rs_check(index, total_checks, **kwargs):

for rs in infraRsHPathAtt:
dn = rs["infraRsHPathAtt"]["attributes"]["dn"]
m = re.search(r'eth(?P<fex>\d+)\/\d\/\d', dn)
m = re.search(r'eth(?P<fex>\d{3})\/\d\/\d', dn)
if m:
fex_id = m.group('fex')
data.append([fex_id, dn])
if int(fex_id) >= 101:
data.append([fex_id, dn])

if data:
result = FAIL_UF
Expand Down
44 changes: 44 additions & 0 deletions tests/invalid_fex_rs_check/infraRsHPathAtt_neg.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,49 @@
"userdom": ""
}
}
},
{
"infraRsHPathAtt": {
"attributes": {
"annotation": "",
"childAction": "",
"dn": "uni/infra/hpaths-105_eth198_1_7/rsHPathAtt-[topology/pod-1/paths-105/pathep-[eth100/1/7]]",
"extMngdBy": "",
"forceResolve": "yes",
"lcOwn": "local",
"modTs": "2021-10-23T08:33:12.722+09:00",
"rType": "mo",
"state": "unformed",
"stateQual": "none",
"status": "",
"tCl": "fabricPathEp",
"tDn": "topology/pod-1/paths-105/pathep-[eth198/1/7]",
"tType": "mo",
"uid": "15374",
"userdom": ""
}
}
},
{
"infraRsHPathAtt": {
"attributes": {
"annotation": "",
"childAction": "",
"dn": "uni/infra/hpaths-105_eth198_1_7/rsHPathAtt-[topology/pod-1/paths-105/pathep-[eth1/30/11]]",
"extMngdBy": "",
"forceResolve": "yes",
"lcOwn": "local",
"modTs": "2021-10-23T08:33:12.722+09:00",
"rType": "mo",
"state": "unformed",
"stateQual": "none",
"status": "",
"tCl": "fabricPathEp",
"tDn": "topology/pod-1/paths-105/pathep-[eth198/1/7]",
"tType": "mo",
"uid": "15374",
"userdom": ""
}
}
}
]
66 changes: 66 additions & 0 deletions tests/invalid_fex_rs_check/infraRsHPathAtt_pos.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,28 @@
}
}
},
{
"infraRsHPathAtt": {
"attributes": {
"annotation": "",
"childAction": "",
"dn": "uni/infra/hpaths-105_eth198_1_7/rsHPathAtt-[topology/pod-1/paths-105/pathep-[eth101/1/20]]",
"extMngdBy": "",
"forceResolve": "yes",
"lcOwn": "local",
"modTs": "2021-10-23T08:33:12.722+09:00",
"rType": "mo",
"state": "unformed",
"stateQual": "none",
"status": "",
"tCl": "fabricPathEp",
"tDn": "topology/pod-1/paths-105/pathep-[eth198/1/7]",
"tType": "mo",
"uid": "15374",
"userdom": ""
}
}
},
{
"infraRsHPathAtt": {
"attributes": {
Expand All @@ -42,5 +64,49 @@
"userdom": ""
}
}
},
{
"infraRsHPathAtt": {
"attributes": {
"annotation": "",
"childAction": "",
"dn": "uni/infra/hpaths-105_eth198_1_7/rsHPathAtt-[topology/pod-1/paths-105/pathep-[eth13/1/4]]",
"extMngdBy": "",
"forceResolve": "yes",
"lcOwn": "local",
"modTs": "2021-10-23T08:33:12.722+09:00",
"rType": "mo",
"state": "unformed",
"stateQual": "none",
"status": "",
"tCl": "fabricPathEp",
"tDn": "topology/pod-1/paths-105/pathep-[eth198/1/7]",
"tType": "mo",
"uid": "15374",
"userdom": ""
}
}
},
{
"infraRsHPathAtt": {
"attributes": {
"annotation": "",
"childAction": "",
"dn": "uni/infra/hpaths-105_eth198_1_7/rsHPathAtt-[topology/pod-1/paths-105/pathep-[eth1/11/11]]",
"extMngdBy": "",
"forceResolve": "yes",
"lcOwn": "local",
"modTs": "2021-10-23T08:33:12.722+09:00",
"rType": "mo",
"state": "unformed",
"stateQual": "none",
"status": "",
"tCl": "fabricPathEp",
"tDn": "topology/pod-1/paths-105/pathep-[eth198/1/7]",
"tType": "mo",
"uid": "15374",
"userdom": ""
}
}
}
]

0 comments on commit 7a39ee6

Please sign in to comment.