Skip to content

Commit 2c3f18c

Browse files
welkinhemonrog2
andauthored
Removed stale pconsRa check. (#287)
* Removed stale pconsRa check. * doc to call out deprecated checks * remove app infra references + standardize deprecated checks docs * verbiage cleanup * whitespace cleanup --------- Co-authored-by: Gabriel <gmonroy@cisco.com>
1 parent 78d3fc0 commit 2c3f18c

8 files changed

Lines changed: 109 additions & 362 deletions

File tree

aci-preupgrade-validation-script.py

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5192,56 +5192,6 @@ def ave_eol_check(tversion, **kwargs):
51925192
return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url)
51935193

51945194

5195-
@check_wrapper(check_title='Stale pconsRA Objects')
5196-
def stale_pcons_ra_mo_check(cversion, tversion, **kwargs):
5197-
result = PASS
5198-
headers = ["Stale pconsRA DN", "Non-Existing DN"]
5199-
data = []
5200-
recommended_action = 'Contact Cisco TAC to delete stale pconsRA before upgrading'
5201-
doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#stale-pconsra-object'
5202-
5203-
if not tversion:
5204-
return Result(result=MANUAL, msg=TVER_MISSING)
5205-
5206-
if cversion.older_than("6.0(3d)") and tversion.newer_than("6.0(3c)") and tversion.older_than("6.1(4a)"):
5207-
pcons_rssubtreedep_api = 'pconsRsSubtreeDep.json?query-target-filter=wcard(pconsRsSubtreeDep.tDn,"/instdn-")'
5208-
pcons_rssubtreedep_mo = icurl('class', pcons_rssubtreedep_api)
5209-
pcons_inst_dn_reg = r'registry/class-\d+/instdn-\[(?P<policy_dn>.+?)\]/ra'
5210-
pcons_ra_dn_reg = r'(?P<pcons_ra_dn>.+?)/p...-\['
5211-
5212-
pcons_ra_set = set()
5213-
policy_dn_set = set()
5214-
5215-
for mo in pcons_rssubtreedep_mo:
5216-
pcons_rssubtreedep_tdn = mo['pconsRsSubtreeDep']['attributes']['tDn']
5217-
instdn_found = re.search(pcons_inst_dn_reg, pcons_rssubtreedep_tdn)
5218-
radn_found = re.search(pcons_ra_dn_reg, pcons_rssubtreedep_tdn)
5219-
if instdn_found and radn_found:
5220-
pcons_ra_dn = radn_found.group('pcons_ra_dn')
5221-
policy_dn = instdn_found.group('policy_dn')
5222-
if pcons_ra_dn not in pcons_ra_set:
5223-
pcons_ra_set.add(pcons_ra_dn)
5224-
if policy_dn not in policy_dn_set:
5225-
policy_dn_set.add(policy_dn)
5226-
5227-
for policy_dn in policy_dn_set:
5228-
policy_dn_api = policy_dn + '.json'
5229-
policy_dn_mo = icurl('mo', policy_dn_api)
5230-
if not policy_dn_mo:
5231-
for pcons_ra_dn in pcons_ra_set:
5232-
if policy_dn in pcons_ra_dn:
5233-
pcons_ra_api = pcons_ra_dn + '.json'
5234-
pcons_ra_dn_mo = icurl('mo', pcons_ra_api)
5235-
if pcons_ra_dn_mo:
5236-
data.append([pcons_ra_dn, policy_dn])
5237-
else:
5238-
return Result(result=NA, msg=VER_NOT_AFFECTED)
5239-
5240-
if data:
5241-
result = FAIL_O
5242-
return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url)
5243-
5244-
52455195
@check_wrapper(check_title='ISIS DTEPs Byte Size')
52465196
def isis_database_byte_check(tversion, **kwargs):
52475197
result = PASS
@@ -5510,7 +5460,6 @@ def get_checks(api_only, debug_function):
55105460
n9408_model_check,
55115461
pbr_high_scale_check,
55125462
standby_sup_sync_check,
5513-
stale_pcons_ra_mo_check,
55145463
isis_database_byte_check,
55155464

55165465
]

docs/docs/validations.md

Lines changed: 108 additions & 118 deletions
Large diffs are not rendered by default.

docs/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ theme:
1616
favicon: assets/logo.svg
1717
markdown_extensions:
1818
- admonition
19+
- attr_list
1920

2021
# code blocks
2122
- pymdownx.highlight:

tests/stale_pcons_ra_mo_check/pconsRA.json

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

tests/stale_pcons_ra_mo_check/pconsRsSubtreeDep.json

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

tests/stale_pcons_ra_mo_check/policyDn.json

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

tests/stale_pcons_ra_mo_check/policyDn_empty.json

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

tests/stale_pcons_ra_mo_check/test_stale_pcons_ra_mo_check.py

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

0 commit comments

Comments
 (0)