diff --git a/aci-preupgrade-validation-script.py b/aci-preupgrade-validation-script.py index 877d382..def6e61 100644 --- a/aci-preupgrade-validation-script.py +++ b/aci-preupgrade-validation-script.py @@ -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\d+)\/\d\/\d', dn) + m = re.search(r'eth(?P\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 diff --git a/tests/invalid_fex_rs_check/infraRsHPathAtt_neg.json b/tests/invalid_fex_rs_check/infraRsHPathAtt_neg.json index 7ab519b..561c93c 100644 --- a/tests/invalid_fex_rs_check/infraRsHPathAtt_neg.json +++ b/tests/invalid_fex_rs_check/infraRsHPathAtt_neg.json @@ -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": "" + } + } } ] \ No newline at end of file diff --git a/tests/invalid_fex_rs_check/infraRsHPathAtt_pos.json b/tests/invalid_fex_rs_check/infraRsHPathAtt_pos.json index 71fc3bd..c79d139 100644 --- a/tests/invalid_fex_rs_check/infraRsHPathAtt_pos.json +++ b/tests/invalid_fex_rs_check/infraRsHPathAtt_pos.json @@ -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": { @@ -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": "" + } + } } ] \ No newline at end of file