From 3fc5ebfd461559ac36300591bd3bca3e4c9187bc Mon Sep 17 00:00:00 2001 From: psureshb Date: Fri, 19 Dec 2025 13:35:37 +0000 Subject: [PATCH 1/6] Added rogue ep/coop exception mac check for the CFD CSCwp64296 --- aci-preupgrade-validation-script.py | 43 ++ .../no_rogue_mac_response.json | 1 + .../presListener_exceptcont.json | 386 ++++++++++++++++++ .../presListener_exceptcont_31_missing.json | 14 + .../presListener_exceptcont_many_missing.json | 326 +++++++++++++++ .../presListener_exceptcont_one_missing.json | 374 +++++++++++++++++ .../rogue_mac_response.json | 102 +++++ .../test_rogue_ep_coop_exception_mac_check.py | 152 +++++++ 8 files changed, 1398 insertions(+) create mode 100644 tests/checks/rogue_ep_coop_exception_mac_check/no_rogue_mac_response.json create mode 100644 tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont.json create mode 100644 tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_31_missing.json create mode 100644 tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_many_missing.json create mode 100644 tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_one_missing.json create mode 100644 tests/checks/rogue_ep_coop_exception_mac_check/rogue_mac_response.json create mode 100644 tests/checks/rogue_ep_coop_exception_mac_check/test_rogue_ep_coop_exception_mac_check.py diff --git a/aci-preupgrade-validation-script.py b/aci-preupgrade-validation-script.py index ebe04773..a491f60c 100644 --- a/aci-preupgrade-validation-script.py +++ b/aci-preupgrade-validation-script.py @@ -6007,6 +6007,48 @@ def apic_vmm_inventory_sync_faults_check(**kwargs): recommended_action=recommended_action, doc_url=doc_url) +@check_wrapper(check_title='Rogue EP/COOP Exception MACs missing') +def rogue_ep_coop_exception_mac_check(cversion, tversion, **kwargs): + result = PASS + headers = ["Rogue Exception MACs Count", "presListener Count"] + data = [] + recommended_action = 'Add the missing MAC addresses to the rogue EP/COOP exception list before upgrade' + doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#rogue-epcoop-exception-macs-missing' + + # Target version check + if not tversion: + prints("Target version not provided, skipping check.") + return Result(result=MANUAL, msg=TVER_MISSING) + + # Check applicable only when upgrading from versions newer than 3.1(2v) to versions older than 6.1(3g) + if cversion.newer_than("3.1(2v)") and tversion.older_than("6.1(3g)"): + # endpoint to fetch the rogue exception MACs + exception_mac_api = 'fvRogueExceptionMac.json?query-target-filter=and(wcard(fvRogueExceptionMac.dn,"([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}"))' + + # endpoint to fetch the presListener entries + presListener_api = 'presListener.json?query-target-filter=and(wcard(presListener.dn,"exceptcont"))' + + exception_macs = icurl('class', exception_mac_api) + + if exception_macs: + prints("Found {} exception MACs, checking presListener entries...".format(len(exception_macs))) + presListener_response = icurl('class', presListener_api) + if len(presListener_response) ==0: + prints("No presListener entries found for exception MACs.") + result = FAIL_UF + data.append([len(exception_macs), 0]) + elif len(presListener_response) < 32: + prints("Insufficient presListener entries ({} found) for {} exception MACs.".format(len(presListener_response), len(exception_macs))) + result = FAIL_O + data.append([len(exception_macs), len(presListener_response)]) + + elif not exception_macs: + result = PASS + prints("No exception MACs found, skipping check.") + data.append([0, "Check not performed since exception MAC list is empty"]) + + return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url) + # ---- Script Execution ---- @@ -6168,6 +6210,7 @@ class CheckManager: standby_sup_sync_check, isis_database_byte_check, configpush_shard_check, + rogue_ep_coop_exception_mac_check, ] ssh_checks = [ diff --git a/tests/checks/rogue_ep_coop_exception_mac_check/no_rogue_mac_response.json b/tests/checks/rogue_ep_coop_exception_mac_check/no_rogue_mac_response.json new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/tests/checks/rogue_ep_coop_exception_mac_check/no_rogue_mac_response.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont.json b/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont.json new file mode 100644 index 00000000..bcaa9881 --- /dev/null +++ b/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont.json @@ -0,0 +1,386 @@ +[ + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-20/relnholder/rspresClass-[resregistry/resregistry-20/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:56.619-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-17/relnholder/rspresClass-[resregistry/resregistry-17/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:56.509-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-32/relnholder/rspresClass-[resregistry/resregistry-32/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:56.471-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-27/relnholder/rspresClass-[resregistry/resregistry-27/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:56.412-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-24/relnholder/rspresClass-[resregistry/resregistry-24/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:56.382-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-23/relnholder/rspresClass-[resregistry/resregistry-23/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:55.049-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-29/relnholder/rspresClass-[resregistry/resregistry-29/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:55.048-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-21/relnholder/rspresClass-[resregistry/resregistry-21/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:55.035-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-22/relnholder/rspresClass-[resregistry/resregistry-22/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:55.015-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-18/relnholder/rspresClass-[resregistry/resregistry-18/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.953-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-11/relnholder/rspresClass-[resregistry/resregistry-11/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.945-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-12/relnholder/rspresClass-[resregistry/resregistry-12/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.913-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-2/relnholder/rspresClass-[resregistry/resregistry-2/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.809-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-4/relnholder/rspresClass-[resregistry/resregistry-4/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.802-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-30/relnholder/rspresClass-[resregistry/resregistry-30/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.769-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-14/relnholder/rspresClass-[resregistry/resregistry-14/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.691-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-8/relnholder/rspresClass-[resregistry/resregistry-8/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.685-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-16/relnholder/rspresClass-[resregistry/resregistry-16/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.660-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-6/relnholder/rspresClass-[resregistry/resregistry-6/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.642-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-15/relnholder/rspresClass-[resregistry/resregistry-15/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.629-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-19/relnholder/rspresClass-[resregistry/resregistry-19/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.625-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-25/relnholder/rspresClass-[resregistry/resregistry-25/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.608-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-28/relnholder/rspresClass-[resregistry/resregistry-28/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.604-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-5/relnholder/rspresClass-[resregistry/resregistry-5/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.470-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-7/relnholder/rspresClass-[resregistry/resregistry-7/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.453-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-9/relnholder/rspresClass-[resregistry/resregistry-9/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.437-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-13/relnholder/rspresClass-[resregistry/resregistry-13/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.405-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-1/relnholder/rspresClass-[resregistry/resregistry-1/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.396-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-31/relnholder/rspresClass-[resregistry/resregistry-31/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.373-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-26/relnholder/rspresClass-[resregistry/resregistry-26/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:53.810-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-10/relnholder/rspresClass-[resregistry/resregistry-10/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:53.282-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-3/relnholder/rspresClass-[resregistry/resregistry-3/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:53.248-08:00", + "status": "" + } + } + } +] \ No newline at end of file diff --git a/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_31_missing.json b/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_31_missing.json new file mode 100644 index 00000000..09abfdec --- /dev/null +++ b/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_31_missing.json @@ -0,0 +1,14 @@ +[ + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-27/relnholder/rspresClass-[resregistry/resregistry-27/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:56.412-08:00", + "status": "" + } + } + } +] \ No newline at end of file diff --git a/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_many_missing.json b/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_many_missing.json new file mode 100644 index 00000000..7ecfd0fc --- /dev/null +++ b/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_many_missing.json @@ -0,0 +1,326 @@ +[ + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-20/relnholder/rspresClass-[resregistry/resregistry-20/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:56.619-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-17/relnholder/rspresClass-[resregistry/resregistry-17/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:56.509-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-32/relnholder/rspresClass-[resregistry/resregistry-32/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:56.471-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-27/relnholder/rspresClass-[resregistry/resregistry-27/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:56.412-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-24/relnholder/rspresClass-[resregistry/resregistry-24/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:56.382-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-23/relnholder/rspresClass-[resregistry/resregistry-23/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:55.049-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-29/relnholder/rspresClass-[resregistry/resregistry-29/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:55.048-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-21/relnholder/rspresClass-[resregistry/resregistry-21/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:55.035-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-22/relnholder/rspresClass-[resregistry/resregistry-22/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:55.015-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-18/relnholder/rspresClass-[resregistry/resregistry-18/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.953-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-14/relnholder/rspresClass-[resregistry/resregistry-14/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.691-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-8/relnholder/rspresClass-[resregistry/resregistry-8/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.685-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-16/relnholder/rspresClass-[resregistry/resregistry-16/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.660-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-6/relnholder/rspresClass-[resregistry/resregistry-6/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.642-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-15/relnholder/rspresClass-[resregistry/resregistry-15/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.629-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-19/relnholder/rspresClass-[resregistry/resregistry-19/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.625-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-25/relnholder/rspresClass-[resregistry/resregistry-25/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.608-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-28/relnholder/rspresClass-[resregistry/resregistry-28/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.604-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-5/relnholder/rspresClass-[resregistry/resregistry-5/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.470-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-7/relnholder/rspresClass-[resregistry/resregistry-7/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.453-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-9/relnholder/rspresClass-[resregistry/resregistry-9/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.437-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-13/relnholder/rspresClass-[resregistry/resregistry-13/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.405-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-1/relnholder/rspresClass-[resregistry/resregistry-1/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.396-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-31/relnholder/rspresClass-[resregistry/resregistry-31/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.373-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-26/relnholder/rspresClass-[resregistry/resregistry-26/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:53.810-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-10/relnholder/rspresClass-[resregistry/resregistry-10/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:53.282-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-3/relnholder/rspresClass-[resregistry/resregistry-3/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:53.248-08:00", + "status": "" + } + } + } +] \ No newline at end of file diff --git a/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_one_missing.json b/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_one_missing.json new file mode 100644 index 00000000..11ff0fd1 --- /dev/null +++ b/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_one_missing.json @@ -0,0 +1,374 @@ +[ + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-20/relnholder/rspresClass-[resregistry/resregistry-20/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:56.619-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-17/relnholder/rspresClass-[resregistry/resregistry-17/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:56.509-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-32/relnholder/rspresClass-[resregistry/resregistry-32/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:56.471-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-27/relnholder/rspresClass-[resregistry/resregistry-27/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:56.412-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-24/relnholder/rspresClass-[resregistry/resregistry-24/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:56.382-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-23/relnholder/rspresClass-[resregistry/resregistry-23/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:55.049-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-29/relnholder/rspresClass-[resregistry/resregistry-29/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:55.048-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-21/relnholder/rspresClass-[resregistry/resregistry-21/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:55.035-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-22/relnholder/rspresClass-[resregistry/resregistry-22/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:55.015-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-18/relnholder/rspresClass-[resregistry/resregistry-18/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.953-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-11/relnholder/rspresClass-[resregistry/resregistry-11/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.945-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-12/relnholder/rspresClass-[resregistry/resregistry-12/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.913-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-2/relnholder/rspresClass-[resregistry/resregistry-2/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.809-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-4/relnholder/rspresClass-[resregistry/resregistry-4/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.802-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-30/relnholder/rspresClass-[resregistry/resregistry-30/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.769-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-14/relnholder/rspresClass-[resregistry/resregistry-14/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.691-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-8/relnholder/rspresClass-[resregistry/resregistry-8/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.685-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-16/relnholder/rspresClass-[resregistry/resregistry-16/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.660-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-6/relnholder/rspresClass-[resregistry/resregistry-6/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.642-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-15/relnholder/rspresClass-[resregistry/resregistry-15/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.629-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-19/relnholder/rspresClass-[resregistry/resregistry-19/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.625-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-25/relnholder/rspresClass-[resregistry/resregistry-25/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.608-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-28/relnholder/rspresClass-[resregistry/resregistry-28/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.604-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-5/relnholder/rspresClass-[resregistry/resregistry-5/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.470-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-7/relnholder/rspresClass-[resregistry/resregistry-7/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.453-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-9/relnholder/rspresClass-[resregistry/resregistry-9/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.437-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-13/relnholder/rspresClass-[resregistry/resregistry-13/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.405-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-1/relnholder/rspresClass-[resregistry/resregistry-1/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.396-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-31/relnholder/rspresClass-[resregistry/resregistry-31/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:54.373-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-26/relnholder/rspresClass-[resregistry/resregistry-26/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:53.810-08:00", + "status": "" + } + } + }, + { + "presListener": { + "attributes": { + "childAction": "", + "dn": "resregistry/resregistry-10/relnholder/rspresClass-[resregistry/resregistry-10/class-19076]/list-[exceptcont]", + "lcOwn": "local", + "lstDn": "exceptcont", + "modTs": "2025-09-22T00:05:53.282-08:00", + "status": "" + } + } + } +] \ No newline at end of file diff --git a/tests/checks/rogue_ep_coop_exception_mac_check/rogue_mac_response.json b/tests/checks/rogue_ep_coop_exception_mac_check/rogue_mac_response.json new file mode 100644 index 00000000..b648d4dc --- /dev/null +++ b/tests/checks/rogue_ep_coop_exception_mac_check/rogue_mac_response.json @@ -0,0 +1,102 @@ +[ + { + "fvRogueExceptionMac": { + "attributes": { + "mac": "10:B3:D5:14:14:29", + "annotation": "", + "childAction": "", + "descr": "", + "dn": "uni/tn-Exception/BD-Exception_BD/rgexpmac-10:B3:D5:14:14:29", + "extMngdBy": "", + "lcOwn": "local", + "modTs": "2024-07-17T04:57:04.923+00:00", + "name": "", + "nameAlias": "", + "rn": "rgexpmac-10:B3:D5:14:14:29", + "status": "", + "uid": "16222", + "userdom": ":all:" + } + } + }, + { + "fvRogueExceptionMac": { + "attributes": { + "mac": "00:50:56:9A:1B:2C", + "annotation": "", + "childAction": "", + "descr": "", + "dn": "uni/tn-Production/BD-Prod_BD/rgexpmac-00:50:56:9A:1B:2C", + "extMngdBy": "", + "lcOwn": "local", + "modTs": "2024-07-18T10:22:15.456+00:00", + "name": "", + "nameAlias": "", + "rn": "rgexpmac-00:50:56:9A:1B:2C", + "status": "", + "uid": "16223", + "userdom": ":all:" + } + } + }, + { + "fvRogueExceptionMac": { + "attributes": { + "mac": "AA:BB:CC:DD:EE:FF", + "annotation": "", + "childAction": "", + "descr": "", + "dn": "uni/tn-Test/BD-Test_BD/rgexpmac-AA:BB:CC:DD:EE:FF", + "extMngdBy": "", + "lcOwn": "local", + "modTs": "2024-07-19T14:35:28.789+00:00", + "name": "", + "nameAlias": "", + "rn": "rgexpmac-AA:BB:CC:DD:EE:FF", + "status": "", + "uid": "16224", + "userdom": ":all:" + } + } + }, + { + "fvRogueExceptionMac": { + "attributes": { + "mac": "F0:1F:AF:2D:3E:4F", + "annotation": "", + "childAction": "", + "descr": "", + "dn": "uni/tn-Dev/BD-Dev_BD/rgexpmac-F0:1F:AF:2D:3E:4F", + "extMngdBy": "", + "lcOwn": "local", + "modTs": "2024-07-20T08:45:12.321+00:00", + "name": "", + "nameAlias": "", + "rn": "rgexpmac-F0:1F:AF:2D:3E:4F", + "status": "", + "uid": "16225", + "userdom": ":all:" + } + } + }, + { + "fvRogueExceptionMac": { + "attributes": { + "mac": "12:34:56:78:9A:BC", + "annotation": "", + "childAction": "", + "descr": "", + "dn": "uni/tn-Staging/BD-Staging_BD/rgexpmac-12:34:56:78:9A:BC", + "extMngdBy": "", + "lcOwn": "local", + "modTs": "2024-07-21T16:55:33.654+00:00", + "name": "", + "nameAlias": "", + "rn": "rgexpmac-12:34:56:78:9A:BC", + "status": "", + "uid": "16226", + "userdom": ":all:" + } + } + } +] \ No newline at end of file diff --git a/tests/checks/rogue_ep_coop_exception_mac_check/test_rogue_ep_coop_exception_mac_check.py b/tests/checks/rogue_ep_coop_exception_mac_check/test_rogue_ep_coop_exception_mac_check.py new file mode 100644 index 00000000..2ec34da0 --- /dev/null +++ b/tests/checks/rogue_ep_coop_exception_mac_check/test_rogue_ep_coop_exception_mac_check.py @@ -0,0 +1,152 @@ +import os +import pytest +import logging +import importlib +from helpers.utils import read_data + +log = logging.getLogger(__name__) +dir = os.path.dirname(os.path.abspath(__file__)) + +script = importlib.import_module("aci-preupgrade-validation-script") + +test_function = "rogue_ep_coop_exception_mac_check" + +# icurl queries +exception_mac_api = 'fvRogueExceptionMac.json' +exception_mac_api += '?query-target-filter=and(wcard(fvRogueExceptionMac.dn,"([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}"))' + +presListener_api = 'presListener.json' +presListener_api += '?query-target-filter=and(wcard(presListener.dn,"exceptcont"))' + + +@pytest.mark.parametrize( + "icurl_outputs, tversion, cversion, expected_result", + [ + # PASS cases + # Non affected tversion, affected cversion, no exception MACs + ( + {exception_mac_api: read_data(dir, "no_rogue_mac_response.json"), + presListener_api: read_data(dir, "presListener_exceptcont.json")}, + "6.1(3g)", + "5.2(8e)", + script.PASS, + ), + # Non affected cversion, affected tversion, no exception MACs + ( + {exception_mac_api: read_data(dir, "no_rogue_mac_response.json"), + presListener_api: read_data(dir, "presListener_exceptcont.json")}, + "6.0(8h)", + "3.1(2v)", + script.PASS, + ), + # non affected cversion and tversion, no exception MACs + ( + {exception_mac_api: read_data(dir, "no_rogue_mac_response.json"), + presListener_api: read_data(dir, "presListener_exceptcont.json")}, + "6.1(4h)", + "3.1(2s)", + script.PASS, + ), + # non affected cversion and tversion, with exception MACs + ( + {exception_mac_api: read_data(dir, "rogue_mac_response.json"), + presListener_api: read_data(dir, "presListener_exceptcont.json")}, + "6.1(4h)", + "3.1(2s)", + script.PASS, + ), + # affected edge cversion and tversion, no exception MACs + ( + {exception_mac_api: read_data(dir, "no_rogue_mac_response.json"), + presListener_api: read_data(dir, "presListener_exceptcont.json")}, + "6.1(3f)", + "5.2(7f)", + script.PASS, + ), + # affected cversion and tversion, no exception MACs + ( + {exception_mac_api: read_data(dir, "no_rogue_mac_response.json"), + presListener_api: read_data(dir, "presListener_exceptcont.json")}, + "6.1(2f)", + "5.2(8g)", + script.PASS, + ), + # affected version, exception MACs present but exceptcont listeners present + ( + {exception_mac_api: read_data(dir, "rogue_mac_response.json"), + presListener_api: read_data(dir, "presListener_exceptcont.json")}, + "6.0(3e)", + "5.2(8g)E", + script.PASS, + ), + # affected edge version, exception MACs present but exceptcont listeners present + ( + {exception_mac_api: read_data(dir, "rogue_mac_response.json"), + presListener_api: read_data(dir, "presListener_exceptcont.json")}, + "6.1(3f)", + "5.2(7f)", + script.PASS, + ), + # MANUAL cases + # tversion is not provided + ( + {exception_mac_api: read_data(dir, "rogue_mac_response.json"), + presListener_api: read_data(dir, "presListener_exceptcont.json")}, + "", + "5.2(8g)", + script.MANUAL, + ), + # FAIL cases + # affected edge version, exception MACs present, one missing exceptcont presListeners + ( + {exception_mac_api: read_data(dir, "rogue_mac_response.json"), + presListener_api: read_data(dir, "presListener_exceptcont_one_missing.json")}, + "6.1(3f)", + "5.2(7f)", + script.FAIL_O, + ), + # affected version, exception MACs present, 31 exceptcont presListeners missing + ( + {exception_mac_api: read_data(dir, "rogue_mac_response.json"), + presListener_api: read_data(dir, "presListener_exceptcont_31_missing.json")}, + "6.0(3e)", + "5.2(8g)E", + script.FAIL_O, + ), + # affected version, exception MACs present, many exceptcont presListeners missing + ( + {exception_mac_api: read_data(dir, "rogue_mac_response.json"), + presListener_api: read_data(dir, "presListener_exceptcont_many_missing.json")}, + "6.1(2f)", + "5.2(8g)", + script.FAIL_O, + ), + # affected version, exception MACs present, no exceptcont presListeners missing + ( + {exception_mac_api: read_data(dir, "rogue_mac_response.json"), + presListener_api: []}, + "6.1(2f)", + "5.2(8g)", + script.FAIL_UF, + ), + ], + ids=[ + "PASS_non_affected_tversion_affected_cversion_no_exception_MACs", + "PASS_non_affected_cversion_affected_tversion_no_exception_MACs", + "PASS_non_affected_cversion_tversion_no_exception_MACs", + "PASS_non_affected_cversion_tversion_with_exception_MACs", + "PASS_affected_edge_cversion_tversion_no_exception_MACs", + "PASS_affected_cversion_tversion_no_exception_MACs", + "PASS_affected_cversion_tversion_exception_MACs_with_exceptcont_listeners", + "PASS_affected_edge_cversion_tversion_exception_MACs_with_exceptcont_listeners", + "MANUAL_tversion_not_provided", + "FAIL_affected_edge_cversion_tversion_exception_MACs_one_missing_exceptcont_listener", + "FAIL_affected_cversion_tversion_exception_MACs_31_missing_exceptcont_listeners", + "FAIL_affected_cversion_tversion_exception_MACs_many_missing_exceptcont_listeners", + "FAIL_affected_cversion_tversion_exception_MACs_no_exceptcont_listeners", + ], +) +def test_rogue_ep_coop_exception_mac_check(run_check, mock_icurl, tversion, cversion, expected_result): + """Test rogue_ep_coop_exception_mac_check with various scenarios.""" + result = run_check(cversion=script.AciVersion(cversion), tversion=script.AciVersion(tversion) if tversion else None) + assert result.result == expected_result \ No newline at end of file From 4a06b4f545fabc93d0bb2db9b7bc0f6a40f53dfd Mon Sep 17 00:00:00 2001 From: psureshb Date: Mon, 22 Dec 2025 13:03:19 +0000 Subject: [PATCH 2/6] Revert "Added rogue ep/coop exception mac check for the CFD CSCwp64296" This reverts commit 3fc5ebfd461559ac36300591bd3bca3e4c9187bc. --- aci-preupgrade-validation-script.py | 43 -- .../no_rogue_mac_response.json | 1 - .../presListener_exceptcont.json | 386 ------------------ .../presListener_exceptcont_31_missing.json | 14 - .../presListener_exceptcont_many_missing.json | 326 --------------- .../presListener_exceptcont_one_missing.json | 374 ----------------- .../rogue_mac_response.json | 102 ----- .../test_rogue_ep_coop_exception_mac_check.py | 152 ------- 8 files changed, 1398 deletions(-) delete mode 100644 tests/checks/rogue_ep_coop_exception_mac_check/no_rogue_mac_response.json delete mode 100644 tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont.json delete mode 100644 tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_31_missing.json delete mode 100644 tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_many_missing.json delete mode 100644 tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_one_missing.json delete mode 100644 tests/checks/rogue_ep_coop_exception_mac_check/rogue_mac_response.json delete mode 100644 tests/checks/rogue_ep_coop_exception_mac_check/test_rogue_ep_coop_exception_mac_check.py diff --git a/aci-preupgrade-validation-script.py b/aci-preupgrade-validation-script.py index a491f60c..ebe04773 100644 --- a/aci-preupgrade-validation-script.py +++ b/aci-preupgrade-validation-script.py @@ -6007,48 +6007,6 @@ def apic_vmm_inventory_sync_faults_check(**kwargs): recommended_action=recommended_action, doc_url=doc_url) -@check_wrapper(check_title='Rogue EP/COOP Exception MACs missing') -def rogue_ep_coop_exception_mac_check(cversion, tversion, **kwargs): - result = PASS - headers = ["Rogue Exception MACs Count", "presListener Count"] - data = [] - recommended_action = 'Add the missing MAC addresses to the rogue EP/COOP exception list before upgrade' - doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#rogue-epcoop-exception-macs-missing' - - # Target version check - if not tversion: - prints("Target version not provided, skipping check.") - return Result(result=MANUAL, msg=TVER_MISSING) - - # Check applicable only when upgrading from versions newer than 3.1(2v) to versions older than 6.1(3g) - if cversion.newer_than("3.1(2v)") and tversion.older_than("6.1(3g)"): - # endpoint to fetch the rogue exception MACs - exception_mac_api = 'fvRogueExceptionMac.json?query-target-filter=and(wcard(fvRogueExceptionMac.dn,"([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}"))' - - # endpoint to fetch the presListener entries - presListener_api = 'presListener.json?query-target-filter=and(wcard(presListener.dn,"exceptcont"))' - - exception_macs = icurl('class', exception_mac_api) - - if exception_macs: - prints("Found {} exception MACs, checking presListener entries...".format(len(exception_macs))) - presListener_response = icurl('class', presListener_api) - if len(presListener_response) ==0: - prints("No presListener entries found for exception MACs.") - result = FAIL_UF - data.append([len(exception_macs), 0]) - elif len(presListener_response) < 32: - prints("Insufficient presListener entries ({} found) for {} exception MACs.".format(len(presListener_response), len(exception_macs))) - result = FAIL_O - data.append([len(exception_macs), len(presListener_response)]) - - elif not exception_macs: - result = PASS - prints("No exception MACs found, skipping check.") - data.append([0, "Check not performed since exception MAC list is empty"]) - - return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url) - # ---- Script Execution ---- @@ -6210,7 +6168,6 @@ class CheckManager: standby_sup_sync_check, isis_database_byte_check, configpush_shard_check, - rogue_ep_coop_exception_mac_check, ] ssh_checks = [ diff --git a/tests/checks/rogue_ep_coop_exception_mac_check/no_rogue_mac_response.json b/tests/checks/rogue_ep_coop_exception_mac_check/no_rogue_mac_response.json deleted file mode 100644 index 0637a088..00000000 --- a/tests/checks/rogue_ep_coop_exception_mac_check/no_rogue_mac_response.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont.json b/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont.json deleted file mode 100644 index bcaa9881..00000000 --- a/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont.json +++ /dev/null @@ -1,386 +0,0 @@ -[ - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-20/relnholder/rspresClass-[resregistry/resregistry-20/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:56.619-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-17/relnholder/rspresClass-[resregistry/resregistry-17/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:56.509-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-32/relnholder/rspresClass-[resregistry/resregistry-32/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:56.471-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-27/relnholder/rspresClass-[resregistry/resregistry-27/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:56.412-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-24/relnholder/rspresClass-[resregistry/resregistry-24/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:56.382-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-23/relnholder/rspresClass-[resregistry/resregistry-23/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:55.049-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-29/relnholder/rspresClass-[resregistry/resregistry-29/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:55.048-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-21/relnholder/rspresClass-[resregistry/resregistry-21/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:55.035-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-22/relnholder/rspresClass-[resregistry/resregistry-22/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:55.015-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-18/relnholder/rspresClass-[resregistry/resregistry-18/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.953-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-11/relnholder/rspresClass-[resregistry/resregistry-11/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.945-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-12/relnholder/rspresClass-[resregistry/resregistry-12/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.913-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-2/relnholder/rspresClass-[resregistry/resregistry-2/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.809-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-4/relnholder/rspresClass-[resregistry/resregistry-4/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.802-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-30/relnholder/rspresClass-[resregistry/resregistry-30/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.769-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-14/relnholder/rspresClass-[resregistry/resregistry-14/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.691-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-8/relnholder/rspresClass-[resregistry/resregistry-8/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.685-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-16/relnholder/rspresClass-[resregistry/resregistry-16/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.660-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-6/relnholder/rspresClass-[resregistry/resregistry-6/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.642-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-15/relnholder/rspresClass-[resregistry/resregistry-15/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.629-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-19/relnholder/rspresClass-[resregistry/resregistry-19/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.625-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-25/relnholder/rspresClass-[resregistry/resregistry-25/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.608-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-28/relnholder/rspresClass-[resregistry/resregistry-28/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.604-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-5/relnholder/rspresClass-[resregistry/resregistry-5/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.470-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-7/relnholder/rspresClass-[resregistry/resregistry-7/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.453-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-9/relnholder/rspresClass-[resregistry/resregistry-9/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.437-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-13/relnholder/rspresClass-[resregistry/resregistry-13/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.405-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-1/relnholder/rspresClass-[resregistry/resregistry-1/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.396-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-31/relnholder/rspresClass-[resregistry/resregistry-31/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.373-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-26/relnholder/rspresClass-[resregistry/resregistry-26/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:53.810-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-10/relnholder/rspresClass-[resregistry/resregistry-10/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:53.282-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-3/relnholder/rspresClass-[resregistry/resregistry-3/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:53.248-08:00", - "status": "" - } - } - } -] \ No newline at end of file diff --git a/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_31_missing.json b/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_31_missing.json deleted file mode 100644 index 09abfdec..00000000 --- a/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_31_missing.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-27/relnholder/rspresClass-[resregistry/resregistry-27/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:56.412-08:00", - "status": "" - } - } - } -] \ No newline at end of file diff --git a/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_many_missing.json b/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_many_missing.json deleted file mode 100644 index 7ecfd0fc..00000000 --- a/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_many_missing.json +++ /dev/null @@ -1,326 +0,0 @@ -[ - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-20/relnholder/rspresClass-[resregistry/resregistry-20/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:56.619-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-17/relnholder/rspresClass-[resregistry/resregistry-17/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:56.509-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-32/relnholder/rspresClass-[resregistry/resregistry-32/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:56.471-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-27/relnholder/rspresClass-[resregistry/resregistry-27/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:56.412-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-24/relnholder/rspresClass-[resregistry/resregistry-24/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:56.382-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-23/relnholder/rspresClass-[resregistry/resregistry-23/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:55.049-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-29/relnholder/rspresClass-[resregistry/resregistry-29/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:55.048-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-21/relnholder/rspresClass-[resregistry/resregistry-21/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:55.035-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-22/relnholder/rspresClass-[resregistry/resregistry-22/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:55.015-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-18/relnholder/rspresClass-[resregistry/resregistry-18/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.953-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-14/relnholder/rspresClass-[resregistry/resregistry-14/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.691-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-8/relnholder/rspresClass-[resregistry/resregistry-8/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.685-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-16/relnholder/rspresClass-[resregistry/resregistry-16/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.660-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-6/relnholder/rspresClass-[resregistry/resregistry-6/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.642-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-15/relnholder/rspresClass-[resregistry/resregistry-15/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.629-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-19/relnholder/rspresClass-[resregistry/resregistry-19/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.625-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-25/relnholder/rspresClass-[resregistry/resregistry-25/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.608-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-28/relnholder/rspresClass-[resregistry/resregistry-28/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.604-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-5/relnholder/rspresClass-[resregistry/resregistry-5/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.470-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-7/relnholder/rspresClass-[resregistry/resregistry-7/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.453-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-9/relnholder/rspresClass-[resregistry/resregistry-9/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.437-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-13/relnholder/rspresClass-[resregistry/resregistry-13/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.405-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-1/relnholder/rspresClass-[resregistry/resregistry-1/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.396-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-31/relnholder/rspresClass-[resregistry/resregistry-31/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.373-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-26/relnholder/rspresClass-[resregistry/resregistry-26/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:53.810-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-10/relnholder/rspresClass-[resregistry/resregistry-10/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:53.282-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-3/relnholder/rspresClass-[resregistry/resregistry-3/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:53.248-08:00", - "status": "" - } - } - } -] \ No newline at end of file diff --git a/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_one_missing.json b/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_one_missing.json deleted file mode 100644 index 11ff0fd1..00000000 --- a/tests/checks/rogue_ep_coop_exception_mac_check/presListener_exceptcont_one_missing.json +++ /dev/null @@ -1,374 +0,0 @@ -[ - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-20/relnholder/rspresClass-[resregistry/resregistry-20/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:56.619-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-17/relnholder/rspresClass-[resregistry/resregistry-17/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:56.509-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-32/relnholder/rspresClass-[resregistry/resregistry-32/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:56.471-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-27/relnholder/rspresClass-[resregistry/resregistry-27/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:56.412-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-24/relnholder/rspresClass-[resregistry/resregistry-24/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:56.382-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-23/relnholder/rspresClass-[resregistry/resregistry-23/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:55.049-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-29/relnholder/rspresClass-[resregistry/resregistry-29/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:55.048-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-21/relnholder/rspresClass-[resregistry/resregistry-21/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:55.035-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-22/relnholder/rspresClass-[resregistry/resregistry-22/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:55.015-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-18/relnholder/rspresClass-[resregistry/resregistry-18/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.953-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-11/relnholder/rspresClass-[resregistry/resregistry-11/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.945-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-12/relnholder/rspresClass-[resregistry/resregistry-12/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.913-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-2/relnholder/rspresClass-[resregistry/resregistry-2/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.809-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-4/relnholder/rspresClass-[resregistry/resregistry-4/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.802-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-30/relnholder/rspresClass-[resregistry/resregistry-30/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.769-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-14/relnholder/rspresClass-[resregistry/resregistry-14/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.691-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-8/relnholder/rspresClass-[resregistry/resregistry-8/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.685-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-16/relnholder/rspresClass-[resregistry/resregistry-16/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.660-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-6/relnholder/rspresClass-[resregistry/resregistry-6/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.642-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-15/relnholder/rspresClass-[resregistry/resregistry-15/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.629-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-19/relnholder/rspresClass-[resregistry/resregistry-19/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.625-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-25/relnholder/rspresClass-[resregistry/resregistry-25/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.608-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-28/relnholder/rspresClass-[resregistry/resregistry-28/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.604-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-5/relnholder/rspresClass-[resregistry/resregistry-5/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.470-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-7/relnholder/rspresClass-[resregistry/resregistry-7/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.453-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-9/relnholder/rspresClass-[resregistry/resregistry-9/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.437-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-13/relnholder/rspresClass-[resregistry/resregistry-13/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.405-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-1/relnholder/rspresClass-[resregistry/resregistry-1/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.396-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-31/relnholder/rspresClass-[resregistry/resregistry-31/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:54.373-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-26/relnholder/rspresClass-[resregistry/resregistry-26/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:53.810-08:00", - "status": "" - } - } - }, - { - "presListener": { - "attributes": { - "childAction": "", - "dn": "resregistry/resregistry-10/relnholder/rspresClass-[resregistry/resregistry-10/class-19076]/list-[exceptcont]", - "lcOwn": "local", - "lstDn": "exceptcont", - "modTs": "2025-09-22T00:05:53.282-08:00", - "status": "" - } - } - } -] \ No newline at end of file diff --git a/tests/checks/rogue_ep_coop_exception_mac_check/rogue_mac_response.json b/tests/checks/rogue_ep_coop_exception_mac_check/rogue_mac_response.json deleted file mode 100644 index b648d4dc..00000000 --- a/tests/checks/rogue_ep_coop_exception_mac_check/rogue_mac_response.json +++ /dev/null @@ -1,102 +0,0 @@ -[ - { - "fvRogueExceptionMac": { - "attributes": { - "mac": "10:B3:D5:14:14:29", - "annotation": "", - "childAction": "", - "descr": "", - "dn": "uni/tn-Exception/BD-Exception_BD/rgexpmac-10:B3:D5:14:14:29", - "extMngdBy": "", - "lcOwn": "local", - "modTs": "2024-07-17T04:57:04.923+00:00", - "name": "", - "nameAlias": "", - "rn": "rgexpmac-10:B3:D5:14:14:29", - "status": "", - "uid": "16222", - "userdom": ":all:" - } - } - }, - { - "fvRogueExceptionMac": { - "attributes": { - "mac": "00:50:56:9A:1B:2C", - "annotation": "", - "childAction": "", - "descr": "", - "dn": "uni/tn-Production/BD-Prod_BD/rgexpmac-00:50:56:9A:1B:2C", - "extMngdBy": "", - "lcOwn": "local", - "modTs": "2024-07-18T10:22:15.456+00:00", - "name": "", - "nameAlias": "", - "rn": "rgexpmac-00:50:56:9A:1B:2C", - "status": "", - "uid": "16223", - "userdom": ":all:" - } - } - }, - { - "fvRogueExceptionMac": { - "attributes": { - "mac": "AA:BB:CC:DD:EE:FF", - "annotation": "", - "childAction": "", - "descr": "", - "dn": "uni/tn-Test/BD-Test_BD/rgexpmac-AA:BB:CC:DD:EE:FF", - "extMngdBy": "", - "lcOwn": "local", - "modTs": "2024-07-19T14:35:28.789+00:00", - "name": "", - "nameAlias": "", - "rn": "rgexpmac-AA:BB:CC:DD:EE:FF", - "status": "", - "uid": "16224", - "userdom": ":all:" - } - } - }, - { - "fvRogueExceptionMac": { - "attributes": { - "mac": "F0:1F:AF:2D:3E:4F", - "annotation": "", - "childAction": "", - "descr": "", - "dn": "uni/tn-Dev/BD-Dev_BD/rgexpmac-F0:1F:AF:2D:3E:4F", - "extMngdBy": "", - "lcOwn": "local", - "modTs": "2024-07-20T08:45:12.321+00:00", - "name": "", - "nameAlias": "", - "rn": "rgexpmac-F0:1F:AF:2D:3E:4F", - "status": "", - "uid": "16225", - "userdom": ":all:" - } - } - }, - { - "fvRogueExceptionMac": { - "attributes": { - "mac": "12:34:56:78:9A:BC", - "annotation": "", - "childAction": "", - "descr": "", - "dn": "uni/tn-Staging/BD-Staging_BD/rgexpmac-12:34:56:78:9A:BC", - "extMngdBy": "", - "lcOwn": "local", - "modTs": "2024-07-21T16:55:33.654+00:00", - "name": "", - "nameAlias": "", - "rn": "rgexpmac-12:34:56:78:9A:BC", - "status": "", - "uid": "16226", - "userdom": ":all:" - } - } - } -] \ No newline at end of file diff --git a/tests/checks/rogue_ep_coop_exception_mac_check/test_rogue_ep_coop_exception_mac_check.py b/tests/checks/rogue_ep_coop_exception_mac_check/test_rogue_ep_coop_exception_mac_check.py deleted file mode 100644 index 2ec34da0..00000000 --- a/tests/checks/rogue_ep_coop_exception_mac_check/test_rogue_ep_coop_exception_mac_check.py +++ /dev/null @@ -1,152 +0,0 @@ -import os -import pytest -import logging -import importlib -from helpers.utils import read_data - -log = logging.getLogger(__name__) -dir = os.path.dirname(os.path.abspath(__file__)) - -script = importlib.import_module("aci-preupgrade-validation-script") - -test_function = "rogue_ep_coop_exception_mac_check" - -# icurl queries -exception_mac_api = 'fvRogueExceptionMac.json' -exception_mac_api += '?query-target-filter=and(wcard(fvRogueExceptionMac.dn,"([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}"))' - -presListener_api = 'presListener.json' -presListener_api += '?query-target-filter=and(wcard(presListener.dn,"exceptcont"))' - - -@pytest.mark.parametrize( - "icurl_outputs, tversion, cversion, expected_result", - [ - # PASS cases - # Non affected tversion, affected cversion, no exception MACs - ( - {exception_mac_api: read_data(dir, "no_rogue_mac_response.json"), - presListener_api: read_data(dir, "presListener_exceptcont.json")}, - "6.1(3g)", - "5.2(8e)", - script.PASS, - ), - # Non affected cversion, affected tversion, no exception MACs - ( - {exception_mac_api: read_data(dir, "no_rogue_mac_response.json"), - presListener_api: read_data(dir, "presListener_exceptcont.json")}, - "6.0(8h)", - "3.1(2v)", - script.PASS, - ), - # non affected cversion and tversion, no exception MACs - ( - {exception_mac_api: read_data(dir, "no_rogue_mac_response.json"), - presListener_api: read_data(dir, "presListener_exceptcont.json")}, - "6.1(4h)", - "3.1(2s)", - script.PASS, - ), - # non affected cversion and tversion, with exception MACs - ( - {exception_mac_api: read_data(dir, "rogue_mac_response.json"), - presListener_api: read_data(dir, "presListener_exceptcont.json")}, - "6.1(4h)", - "3.1(2s)", - script.PASS, - ), - # affected edge cversion and tversion, no exception MACs - ( - {exception_mac_api: read_data(dir, "no_rogue_mac_response.json"), - presListener_api: read_data(dir, "presListener_exceptcont.json")}, - "6.1(3f)", - "5.2(7f)", - script.PASS, - ), - # affected cversion and tversion, no exception MACs - ( - {exception_mac_api: read_data(dir, "no_rogue_mac_response.json"), - presListener_api: read_data(dir, "presListener_exceptcont.json")}, - "6.1(2f)", - "5.2(8g)", - script.PASS, - ), - # affected version, exception MACs present but exceptcont listeners present - ( - {exception_mac_api: read_data(dir, "rogue_mac_response.json"), - presListener_api: read_data(dir, "presListener_exceptcont.json")}, - "6.0(3e)", - "5.2(8g)E", - script.PASS, - ), - # affected edge version, exception MACs present but exceptcont listeners present - ( - {exception_mac_api: read_data(dir, "rogue_mac_response.json"), - presListener_api: read_data(dir, "presListener_exceptcont.json")}, - "6.1(3f)", - "5.2(7f)", - script.PASS, - ), - # MANUAL cases - # tversion is not provided - ( - {exception_mac_api: read_data(dir, "rogue_mac_response.json"), - presListener_api: read_data(dir, "presListener_exceptcont.json")}, - "", - "5.2(8g)", - script.MANUAL, - ), - # FAIL cases - # affected edge version, exception MACs present, one missing exceptcont presListeners - ( - {exception_mac_api: read_data(dir, "rogue_mac_response.json"), - presListener_api: read_data(dir, "presListener_exceptcont_one_missing.json")}, - "6.1(3f)", - "5.2(7f)", - script.FAIL_O, - ), - # affected version, exception MACs present, 31 exceptcont presListeners missing - ( - {exception_mac_api: read_data(dir, "rogue_mac_response.json"), - presListener_api: read_data(dir, "presListener_exceptcont_31_missing.json")}, - "6.0(3e)", - "5.2(8g)E", - script.FAIL_O, - ), - # affected version, exception MACs present, many exceptcont presListeners missing - ( - {exception_mac_api: read_data(dir, "rogue_mac_response.json"), - presListener_api: read_data(dir, "presListener_exceptcont_many_missing.json")}, - "6.1(2f)", - "5.2(8g)", - script.FAIL_O, - ), - # affected version, exception MACs present, no exceptcont presListeners missing - ( - {exception_mac_api: read_data(dir, "rogue_mac_response.json"), - presListener_api: []}, - "6.1(2f)", - "5.2(8g)", - script.FAIL_UF, - ), - ], - ids=[ - "PASS_non_affected_tversion_affected_cversion_no_exception_MACs", - "PASS_non_affected_cversion_affected_tversion_no_exception_MACs", - "PASS_non_affected_cversion_tversion_no_exception_MACs", - "PASS_non_affected_cversion_tversion_with_exception_MACs", - "PASS_affected_edge_cversion_tversion_no_exception_MACs", - "PASS_affected_cversion_tversion_no_exception_MACs", - "PASS_affected_cversion_tversion_exception_MACs_with_exceptcont_listeners", - "PASS_affected_edge_cversion_tversion_exception_MACs_with_exceptcont_listeners", - "MANUAL_tversion_not_provided", - "FAIL_affected_edge_cversion_tversion_exception_MACs_one_missing_exceptcont_listener", - "FAIL_affected_cversion_tversion_exception_MACs_31_missing_exceptcont_listeners", - "FAIL_affected_cversion_tversion_exception_MACs_many_missing_exceptcont_listeners", - "FAIL_affected_cversion_tversion_exception_MACs_no_exceptcont_listeners", - ], -) -def test_rogue_ep_coop_exception_mac_check(run_check, mock_icurl, tversion, cversion, expected_result): - """Test rogue_ep_coop_exception_mac_check with various scenarios.""" - result = run_check(cversion=script.AciVersion(cversion), tversion=script.AciVersion(tversion) if tversion else None) - assert result.result == expected_result \ No newline at end of file From e586d859da1f295b266c50a328e7ab6c3a37681b Mon Sep 17 00:00:00 2001 From: psureshb Date: Wed, 24 Dec 2025 04:11:49 +0000 Subject: [PATCH 3/6] added validation for CSCwp66238 OSPCv3 IPSec ESN stuck in 0 and its pytest file. --- aci-preupgrade-validation-script.py | 37 ++++++++ docs/docs/validations.md | 16 +++- .../ospfv3_ipsec_esn_check/esp_enabled.json | 71 ++++++++++++++ .../esp_not_enabled.json | 1 + .../test_ospfv3_ipsec_esn_check.py | 93 +++++++++++++++++++ 5 files changed, 217 insertions(+), 1 deletion(-) create mode 100644 tests/checks/ospfv3_ipsec_esn_check/esp_enabled.json create mode 100644 tests/checks/ospfv3_ipsec_esn_check/esp_not_enabled.json create mode 100644 tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py diff --git a/aci-preupgrade-validation-script.py b/aci-preupgrade-validation-script.py index ebe04773..3a6ac14f 100644 --- a/aci-preupgrade-validation-script.py +++ b/aci-preupgrade-validation-script.py @@ -6007,6 +6007,42 @@ def apic_vmm_inventory_sync_faults_check(**kwargs): recommended_action=recommended_action, doc_url=doc_url) + +@check_wrapper(check_title='OSPFv3 IPSec ESP ESN stuck in 0') +def ospfv3_ipsec_esn_check(tversion, **kwargs): + result = PASS + headers = ["dn","Policy Name"] + data = [] + recommended_action = 'Upgrade to a version with the fix for CSCwp64212. Current target version is affected.' + doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#ospfv3-ipsec-esn-stuck-in-0' + + if not tversion: + prints("Target version is required for this check.") + return Result(result=MANUAL, msg=TVER_MISSING) + + if (tversion.newer_than("6.1(1f)") or tversion.same_as("6.1(1f)")) and (tversion.older_than("6.1(4h)") or tversion.same_as("6.1(4h)")): + # ospfIPSec_api = 'ospfv3IPsec.json' + prints("Checking for OSPFv3 IPSec ESP ESN policies...") + esp_config_api = 'fvProtoAuthPol.json?query-target-filter=and(wcard(fvProtoAuthPol.proto,"esp"))' + + esp_configs = icurl('class', esp_config_api) + + if esp_configs: + for item in esp_configs: + prints("ESP config found: {}".format(item['fvProtoAuthPol']['attributes']['dn'])) + policy_name = item['fvProtoAuthPol']['attributes']['name'] + dn = item['fvProtoAuthPol']['attributes']['dn'] + data.append([dn, policy_name]) + + else: + prints("Non affected target version for this check.") + return Result(result=NA, msg=VER_NOT_AFFECTED) + + if data: + result = FAIL_O + + return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url) + # ---- Script Execution ---- @@ -6168,6 +6204,7 @@ class CheckManager: standby_sup_sync_check, isis_database_byte_check, configpush_shard_check, + ospfv3_ipsec_esn_check, ] ssh_checks = [ diff --git a/docs/docs/validations.md b/docs/docs/validations.md index fa1fc0e4..fe416e63 100644 --- a/docs/docs/validations.md +++ b/docs/docs/validations.md @@ -190,7 +190,8 @@ Items | Defect | This Script [Observer Database Size][d25] | CSCvw45531 | :white_check_mark: | :no_entry_sign: [Stale pconsRA Object][d26] | CSCwp22212 | :warning:{title="Deprecated"} | :no_entry_sign: [ISIS DTEPs Byte Size][d27] | CSCwp15375 | :white_check_mark: | :no_entry_sign: -[Policydist configpushShardCont Crash][d28] | CSCwp95515 | :white_check_mark: | +[Policydist configpushShardCont Crash][d28] | CSCwp95515 | :white_check_mark: | :no_entry_sign: +[OSPFv3 IPSec ESP ESN stuck in 0][d29] | CSCwp66238 | :white_check_mark: | :no_entry_sign: [d1]: #ep-announce-compatibility [d2]: #eventmgr-db-size-defect-susceptibility @@ -220,6 +221,7 @@ Items | Defect | This Script [d26]: #stale-pconsra-object [d27]: #isis-dteps-byte-size [d28]: #policydist-configpushshardcont-crash +[d29]: #ospfv3-ipsec-esp-esn-stuck-in-0 ## General Check Details @@ -2614,6 +2616,17 @@ Due to [CSCwp95515][59], upgrading to an affected version while having any `conf If any instances of `configpushShardCont` are flagged by this script, Cisco TAC must be contacted to identify and resolve the underlying issue before performing the upgrade. +### OSPFv3 IPSec ESP ESN stuck in 0 + +OSPFv3 (Open Shortest Path First for IPv6) can be protected with IPSec ESP, which encrypts and authenticates routing protocol packets. According to RFC4303, the ESP sequence number is a per-SA (Security Association) 32-bit counter that must increment by one for each packet sent. + +The bug [CSCwp66238][62] states that all ESP packets sent between ACI and NX-OS have seq=0, no matter how many packets are sent. The ESP implementation in both ACI and NX-OS is not incrementing the ESP sequence number per packet. The value stays at 0 after the Security Association (SA) is established. OSPFv3 adjacencies with ESP encryption may fail or become unstable when traversing devices that check for ESP sequence number increments, such as security appliances. + +The ESP protocol field present in instances of `fvProtoAuthPol` of affected versions will produce this issue. The script validated if the targer version falls under the affected version range and check if the ESP is present. The affected version range is 6.1(1f) to 6.1(4h). + +If found, the target version of your upgrade should be a version with a fix for CSCwp66238. + + [0]: https://github.com/datacenter/ACI-Pre-Upgrade-Validation-Script [1]: https://www.cisco.com/c/dam/en/us/td/docs/Website/datacenter/apicmatrix/index.html [2]: https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-release-notes-list.html @@ -2676,3 +2689,4 @@ If any instances of `configpushShardCont` are flagged by this script, Cisco TAC [59]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwp95515 [60]: https://www.cisco.com/c/en/us/solutions/collateral/data-center-virtualization/application-centric-infrastructure/white-paper-c11-743951.html#Inter [61]: https://www.cisco.com/c/en/us/solutions/collateral/data-center-virtualization/application-centric-infrastructure/white-paper-c11-743951.html#EnablePolicyCompression +[62]: https://cdetsng.cisco.com/summary/#/defect/CSCwp66238 diff --git a/tests/checks/ospfv3_ipsec_esn_check/esp_enabled.json b/tests/checks/ospfv3_ipsec_esn_check/esp_enabled.json new file mode 100644 index 00000000..8e9d48d4 --- /dev/null +++ b/tests/checks/ospfv3_ipsec_esn_check/esp_enabled.json @@ -0,0 +1,71 @@ +[ + { + "fvProtoAuthPol": { + "attributes": { + "annotation": "", + "childAction": "", + "descr": "", + "dn": "uni/tn-ten1ant/protoAuthPol-ipsec_pol1", + "extMngdBy": "", + "lcOwn": "local", + "modTs": "2025-12-23T10:13:32.132+00:00", + "monPolDn": "uni/tn-common/monepg-default", + "name": "ipsec_pol1", + "nameAlias": "", + "ownerKey": "", + "ownerTag": "", + "proto": "esp", + "spi": "256", + "status": "", + "uid": "15374", + "userdom": ":all:" + } + } + }, + { + "fvProtoAuthPol": { + "attributes": { + "annotation": "", + "childAction": "", + "descr": "", + "dn": "uni/tn-ten1ant/protoAuthPol-ipsec_pol2", + "extMngdBy": "", + "lcOwn": "local", + "modTs": "2025-12-23T10:13:32.132+00:00", + "monPolDn": "uni/tn-common/monepg-pol1_1", + "name": "ipsec_pol2", + "nameAlias": "", + "ownerKey": "", + "ownerTag": "", + "proto": "esp", + "spi": "256", + "status": "", + "uid": "15374", + "userdom": ":all:" + } + } + }, + { + "fvProtoAuthPol": { + "attributes": { + "annotation": "", + "childAction": "", + "descr": "", + "dn": "uni/tn-ten2ant/protoAuthPol-ipsec_pol3", + "extMngdBy": "", + "lcOwn": "local", + "modTs": "2025-12-23T10:13:32.132+00:00", + "monPolDn": "uni/tn-common/monepg-pol5_2", + "name": "ipsec_pol3", + "nameAlias": "", + "ownerKey": "", + "ownerTag": "", + "proto": "esp", + "spi": "256", + "status": "", + "uid": "15374", + "userdom": ":all:" + } + } + } +] diff --git a/tests/checks/ospfv3_ipsec_esn_check/esp_not_enabled.json b/tests/checks/ospfv3_ipsec_esn_check/esp_not_enabled.json new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/tests/checks/ospfv3_ipsec_esn_check/esp_not_enabled.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py b/tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py new file mode 100644 index 00000000..35c19c7d --- /dev/null +++ b/tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py @@ -0,0 +1,93 @@ +import os +import pytest +import logging +import importlib +from helpers.utils import read_data + +log = logging.getLogger(__name__) +dir = os.path.dirname(os.path.abspath(__file__)) + +script = importlib.import_module("aci-preupgrade-validation-script") + +test_function = "ospfv3_ipsec_esn_check" + +esp_config_api = 'fvProtoAuthPol.json?query-target-filter=and(wcard(fvProtoAuthPol.proto,"esp"))' + +@pytest.mark.parametrize( + "icurl_outputs, tversion, expected_result", + [ + # PASS cases + # Targer version in affected range, IPSec ESP not enabled + ( + {esp_config_api: read_data(dir, "esp_not_enabled.json")}, + "6.1(3f)", + script.PASS, + ), + # Target version in lower affected version, IPSec ESP not enabled + ( + {esp_config_api: read_data(dir, "esp_not_enabled.json")}, + "6.1(1f)", + script.PASS, + ), + # Target version in upper affected version, IPSec ESP not enabled + ( + {esp_config_api: read_data(dir, "esp_not_enabled.json")}, + "6.1(4h)", + script.PASS, + ), + # Not Applicable cases + # Target version below affected range + ( + {esp_config_api: read_data(dir, "esp_enabled.json")}, + "6.0(9e)", + script.NA, + ), + # Target version above affected range + ( + {esp_config_api: read_data(dir, "esp_enabled.json")}, + "6.2(2f)", + script.NA, + ), + # Manual cases + # Target version not provided + ( + {esp_config_api: read_data(dir, "esp_enabled.json")}, + "", + script.MANUAL, + ), + # Fail cases + # Target version in affected range, IPSec ESP enabled + ( + {esp_config_api: read_data(dir, "esp_enabled.json")}, + "6.1(3f)", + script.FAIL_O, + ), + # Target version in lower affected version, IPSec ESP enabled + ( + {esp_config_api: read_data(dir, "esp_enabled.json")}, + "6.1(1f)", + script.FAIL_O, + ), + # Target version in upper affected version, IPSec ESP enabled + ( + {esp_config_api: read_data(dir, "esp_enabled.json")}, + "6.1(4h)", + script.FAIL_O, + ), + ], + ids = [ + "PASS - Target version in affected range, IPSec ESP not enabled", + "PASS - Target version in lower affected version, IPSec ESP not enabled", + "PASS - Target version in upper affected version, IPSec ESP not enabled", + "NA - Target version below affected range", + "NA - Target version above affected range", + "MANUAL - Target version not provided", + "FAIL - Target version in affected range, IPSec ESP enabled", + "FAIL - Target version in lower affected version, IPSec ESP enabled", + "FAIL - Target version in upper affected version, IPSec ESP enabled", + ] +) +def test_ospfv3_ipsec_esn_check(run_check, mock_icurl, tversion, expected_result): + """Test OSPFv3 IPsec ESN Check""" + result = run_check(tversion = script.AciVersion(tversion) if tversion else None) + assert result.result == expected_result \ No newline at end of file From 160a31d5a1b5f8632930064d0237f7000feeae62 Mon Sep 17 00:00:00 2001 From: psureshb Date: Wed, 24 Dec 2025 06:32:36 +0000 Subject: [PATCH 4/6] replaced cdets link with cloudapps link --- docs/docs/validations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/validations.md b/docs/docs/validations.md index fe416e63..485b492a 100644 --- a/docs/docs/validations.md +++ b/docs/docs/validations.md @@ -2689,4 +2689,4 @@ If found, the target version of your upgrade should be a version with a fix for [59]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwp95515 [60]: https://www.cisco.com/c/en/us/solutions/collateral/data-center-virtualization/application-centric-infrastructure/white-paper-c11-743951.html#Inter [61]: https://www.cisco.com/c/en/us/solutions/collateral/data-center-virtualization/application-centric-infrastructure/white-paper-c11-743951.html#EnablePolicyCompression -[62]: https://cdetsng.cisco.com/summary/#/defect/CSCwp66238 +[62]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwp66238 From 3bf89c4e0dc504aad05e9bcef7bb112c2d183324 Mon Sep 17 00:00:00 2001 From: psureshb Date: Wed, 24 Dec 2025 10:38:45 +0000 Subject: [PATCH 5/6] added log files, edited documentation, removed prints from test script. --- aci-preupgrade-validation-script.py | 13 +-- docs/docs/validations.md | 4 +- ...lidator_pozhi_2025-12-24T10-24-22+0000.tgz | Bin 0 -> 2274 bytes pytest_log.txt | 74 ++++++++++++++++++ 4 files changed, 79 insertions(+), 12 deletions(-) create mode 100644 preupgrade_validator_pozhi_2025-12-24T10-24-22+0000.tgz create mode 100644 pytest_log.txt diff --git a/aci-preupgrade-validation-script.py b/aci-preupgrade-validation-script.py index 3a6ac14f..6a513aaf 100644 --- a/aci-preupgrade-validation-script.py +++ b/aci-preupgrade-validation-script.py @@ -6013,29 +6013,24 @@ def ospfv3_ipsec_esn_check(tversion, **kwargs): result = PASS headers = ["dn","Policy Name"] data = [] - recommended_action = 'Upgrade to a version with the fix for CSCwp64212. Current target version is affected.' + recommended_action = 'Contact cisco TAC for Support.' doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#ospfv3-ipsec-esn-stuck-in-0' if not tversion: - prints("Target version is required for this check.") return Result(result=MANUAL, msg=TVER_MISSING) if (tversion.newer_than("6.1(1f)") or tversion.same_as("6.1(1f)")) and (tversion.older_than("6.1(4h)") or tversion.same_as("6.1(4h)")): - # ospfIPSec_api = 'ospfv3IPsec.json' - prints("Checking for OSPFv3 IPSec ESP ESN policies...") esp_config_api = 'fvProtoAuthPol.json?query-target-filter=and(wcard(fvProtoAuthPol.proto,"esp"))' esp_configs = icurl('class', esp_config_api) if esp_configs: - for item in esp_configs: - prints("ESP config found: {}".format(item['fvProtoAuthPol']['attributes']['dn'])) - policy_name = item['fvProtoAuthPol']['attributes']['name'] - dn = item['fvProtoAuthPol']['attributes']['dn'] + for esp in esp_configs: + policy_name = esp['fvProtoAuthPol']['attributes']['name'] + dn = esp['fvProtoAuthPol']['attributes']['dn'] data.append([dn, policy_name]) else: - prints("Non affected target version for this check.") return Result(result=NA, msg=VER_NOT_AFFECTED) if data: diff --git a/docs/docs/validations.md b/docs/docs/validations.md index 485b492a..34efba64 100644 --- a/docs/docs/validations.md +++ b/docs/docs/validations.md @@ -2622,9 +2622,7 @@ OSPFv3 (Open Shortest Path First for IPv6) can be protected with IPSec ESP, whic The bug [CSCwp66238][62] states that all ESP packets sent between ACI and NX-OS have seq=0, no matter how many packets are sent. The ESP implementation in both ACI and NX-OS is not incrementing the ESP sequence number per packet. The value stays at 0 after the Security Association (SA) is established. OSPFv3 adjacencies with ESP encryption may fail or become unstable when traversing devices that check for ESP sequence number increments, such as security appliances. -The ESP protocol field present in instances of `fvProtoAuthPol` of affected versions will produce this issue. The script validated if the targer version falls under the affected version range and check if the ESP is present. The affected version range is 6.1(1f) to 6.1(4h). - -If found, the target version of your upgrade should be a version with a fix for CSCwp66238. +The script identifies if the ESP protocol is configurd by checking the `fvProtoAuthPol` object. If present, then upgrade to the fixed version. [0]: https://github.com/datacenter/ACI-Pre-Upgrade-Validation-Script diff --git a/preupgrade_validator_pozhi_2025-12-24T10-24-22+0000.tgz b/preupgrade_validator_pozhi_2025-12-24T10-24-22+0000.tgz new file mode 100644 index 0000000000000000000000000000000000000000..4c8c922c102fba906480114e746f71d14810fb31 GIT binary patch literal 2274 zcmV<82p#tyiwFP!000001MOPta^lDp_HUk|qpjMtE0&O27eH066a$!L*T#g4XE!rb zlq|KO6Co*5%U-X?|MLWSz&uG#OEO>&0^?zAC!?=CgVg7=`u6Gc*R2jh5(ksea>)3~ za;al6KODRMBr5Oi3^Jgi>+q`@vSKX#&atQH3dR++qO01TtmxP<_K?22D&!-Mm=z+l zXE`(Kt?}Dr{~tw=JN_#zf&crIjvZSQBN~J#mP-9B$f1oL2 zL1dQ86UwIXg=G7)GLXiyiN{D-t~WYjFC^k9<&=1yatfX(W(8dOAv&=bi5Th=msk-& z{OP6A&_^-cSjYoshg@2*%g~8Gp&n}bGmCnMC@BM30kywto}Jb^-H#tfgI2#=KW&xT z7MqfgdK1+39fCR@6f{dpmL#cEYQ$j(*-^dMY1}sw42Goa>*Szx;$QO`4X!D(rz`BG zp%qR@mi;R0BN`zeu0!fL#6!$S+#658yWzVou^F$;d9RVxs2L?S>4p9zBvE9d&*BT< zGm^^+viaCW2u3S#2_w#OE&lWGe-(dE{QHcQRlNz|Z&&(;^hw02yMJj>mpI7x+?xZG zyhe%BAfC;v@aEnvG4$$#0m^}ikWxCXcTSLq&PKy}yM^A@``u2r4ew;;Am2NTdhLF_ z*+Tqw)NiF8iNk5VJF1_c#*eMW$}>!{OjH5Wz5rQX?KIM4scEph0U>v?rd9a{bV zSs!J!TIDc28$uPK_}4`di(!HTMJA`t4v7*~2Wp7tNfSd5b<6ird@+8U77~~| zXT)=eGq&ve{0-j&CCQLYBil#AdLvPbgE$EMkV#pQzC8+E?tQOB7xGieL@D(*3(@k` zJS8fBm-dL5^oR&OA|@>rsV8PFjR+_`%5HeUbfGORH){{{?SNSF^YKy2(uX$znfDf?O$jt2gp?1TvJ~Fx<@-3R6v&bBm)^_P zc}_6hmF`}fn+5)O|By-AqWW_ELJbx=s!3kpULc z+4HW)xtXkhj`;!$440N0rGb@K(~lXX8M2(F_{?(CS&j!<q)6Rw>^9m%xX`8;ca##F~k*q}OW6TZ=l~%a z>(y+%8?_(S>rqcZ+XIl5#6%ZA+@`^&;m00CB%vxC3UroAun)JwqDF#wD}X)==|#*) zl-xN3o&%!ZAzV9rw+?O<-mXgt;P;Mu9J6!?8W?Nm7mU=Xb!aH(xwxCCtWl)6sc zUN}3%wQh*>Be6nuK`fSJ;_2MZ{J@8?yeS91BPwMNDkv&4gm8iU#!kJ7^X?{nO4@*= zqFl#c@uH}c)RTKdw==Gb$*J!QdG+smR;di-s;O5@y((#{4n1q~`9pB+vuj=f*SER0 z7G|sSRZYzRrqt&7z>mPHKQ-D*H*pDQP%~v+s_C_@xRm764GH61E`4QSQg;=Y zRQde4{`SdayaJiDt;nQpCX?~ZL98NYjquq_~mY9v$f3OU-W3i8<=!!I-@;_J)n+^rFrRz z?5T3r;i~)vd-x$OanS0YxBB9#x;2A%cReEv*}lg@e(oz=Cei!9_0px=ul=2qXo)?a z?ml`yGfE%&*663hz@o z;Qx$Ccq6jpc%*nqT}Hwq%X9XxZ7X#4ALR)64aATr5DpH$--0VuNyh8AlH0^Jypf;8 z8(#8b-oyd_8n)OeuPONzIHq2Y6`lIvz6~n;A z_n((Q^8J?|GUXpXlP{t<2TH*%FWbL3Pday4d7gA`U2~Xp?$a&T=hyc~N9PI2QPFSl wQ*D6)1qu`>P@q780tE^bC{Un4fdT~z6ev)jK!E}U3arI{0Rf1MPykQ>0DDt`3;+NC literal 0 HcmV?d00001 diff --git a/pytest_log.txt b/pytest_log.txt new file mode 100644 index 00000000..71167c56 --- /dev/null +++ b/pytest_log.txt @@ -0,0 +1,74 @@ +===================================================================== test session starts ====================================================================== +platform linux -- Python 3.8.10, pytest-7.4.0, pluggy-1.2.0 -- /data/ssd/psureshb/repo/pytest_env/bin/python3 +cachedir: .pytest_cache +rootdir: /data/ssd/psureshb/repo/preCFD/ACI-Pre-Upgrade-Validation-Script +configfile: pytest.ini +collected 9 items + +tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py::test_ospfv3_ipsec_esn_check[PASS - Target version in affected range, IPSec ESP not enabled] +------------------------------------------------------------------------ live log setup ------------------------------------------------------------------------ +[10:34:03.145 INFO init_system:6066(MainThread)] Creating directories preupgrade_validator_logs/ and preupgrade_validator_logs/json_results/ +------------------------------------------------------------------------ live log call ------------------------------------------------------------------------- +[10:34:03.146 INFO init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json +[10:34:03.147 INFO _start_thread:1105(MainThread)] (ospfv3_ipsec_esn_check) Starting thread. +[10:34:03.148 INFO wrapper:1349(ospfv3_ipsec_esn_check)] Start ospfv3_ipsec_esn_check +[10:34:03.149 INFO update_result:1191(ospfv3_ipsec_esn_check)] Finalized result in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json +PASSED [ 11%] +tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py::test_ospfv3_ipsec_esn_check[PASS - Target version in lower affected version, IPSec ESP not enabled] +------------------------------------------------------------------------ live log call ------------------------------------------------------------------------- +[10:34:03.160 INFO init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json +[10:34:03.161 INFO _start_thread:1105(MainThread)] (ospfv3_ipsec_esn_check) Starting thread. +[10:34:03.162 INFO wrapper:1349(ospfv3_ipsec_esn_check)] Start ospfv3_ipsec_esn_check +[10:34:03.163 INFO update_result:1191(ospfv3_ipsec_esn_check)] Finalized result in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json +PASSED [ 22%] +tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py::test_ospfv3_ipsec_esn_check[PASS - Target version in upper affected version, IPSec ESP not enabled] +------------------------------------------------------------------------ live log call ------------------------------------------------------------------------- +[10:34:03.176 INFO init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json +[10:34:03.177 INFO _start_thread:1105(MainThread)] (ospfv3_ipsec_esn_check) Starting thread. +[10:34:03.178 INFO wrapper:1349(ospfv3_ipsec_esn_check)] Start ospfv3_ipsec_esn_check +[10:34:03.179 INFO update_result:1191(ospfv3_ipsec_esn_check)] Finalized result in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json +PASSED [ 33%] +tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py::test_ospfv3_ipsec_esn_check[NA - Target version below affected range] +------------------------------------------------------------------------ live log call ------------------------------------------------------------------------- +[10:34:03.191 INFO init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json +[10:34:03.192 INFO _start_thread:1105(MainThread)] (ospfv3_ipsec_esn_check) Starting thread. +[10:34:03.193 INFO wrapper:1349(ospfv3_ipsec_esn_check)] Start ospfv3_ipsec_esn_check +[10:34:03.194 INFO update_result:1191(ospfv3_ipsec_esn_check)] Finalized result in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json +PASSED [ 44%] +tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py::test_ospfv3_ipsec_esn_check[NA - Target version above affected range] +------------------------------------------------------------------------ live log call ------------------------------------------------------------------------- +[10:34:03.205 INFO init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json +[10:34:03.206 INFO _start_thread:1105(MainThread)] (ospfv3_ipsec_esn_check) Starting thread. +[10:34:03.207 INFO wrapper:1349(ospfv3_ipsec_esn_check)] Start ospfv3_ipsec_esn_check +[10:34:03.207 INFO update_result:1191(ospfv3_ipsec_esn_check)] Finalized result in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json +PASSED [ 55%] +tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py::test_ospfv3_ipsec_esn_check[MANUAL - Target version not provided] +------------------------------------------------------------------------ live log call ------------------------------------------------------------------------- +[10:34:03.220 INFO init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json +[10:34:03.221 INFO _start_thread:1105(MainThread)] (ospfv3_ipsec_esn_check) Starting thread. +[10:34:03.221 INFO wrapper:1349(ospfv3_ipsec_esn_check)] Start ospfv3_ipsec_esn_check----------------------| 0/1 checks completed +[10:34:03.222 INFO update_result:1191(ospfv3_ipsec_esn_check)] Finalized result in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json +PASSED [ 66%] +tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py::test_ospfv3_ipsec_esn_check[FAIL - Target version in affected range, IPSec ESP enabled] +------------------------------------------------------------------------ live log call ------------------------------------------------------------------------- +[10:34:03.235 INFO init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json +[10:34:03.236 INFO _start_thread:1105(MainThread)] (ospfv3_ipsec_esn_check) Starting thread. +[10:34:03.236 INFO wrapper:1349(ospfv3_ipsec_esn_check)] Start ospfv3_ipsec_esn_check +[10:34:03.238 INFO update_result:1191(ospfv3_ipsec_esn_check)] Finalized result in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json +PASSED [ 77%] +tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py::test_ospfv3_ipsec_esn_check[FAIL - Target version in lower affected version, IPSec ESP enabled] +------------------------------------------------------------------------ live log call ------------------------------------------------------------------------- +[10:34:03.251 INFO init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json +[10:34:03.251 INFO _start_thread:1105(MainThread)] (ospfv3_ipsec_esn_check) Starting thread. +[10:34:03.252 INFO wrapper:1349(ospfv3_ipsec_esn_check)] Start ospfv3_ipsec_esn_check----------------------| 0/1 checks completed +[10:34:03.253 INFO update_result:1191(ospfv3_ipsec_esn_check)] Finalized result in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json +PASSED [ 88%] +tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py::test_ospfv3_ipsec_esn_check[FAIL - Target version in upper affected version, IPSec ESP enabled] +------------------------------------------------------------------------ live log call ------------------------------------------------------------------------- +[10:34:03.266 INFO init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json +[10:34:03.267 INFO _start_thread:1105(MainThread)] (ospfv3_ipsec_esn_check) Starting thread. +[10:34:03.267 INFO wrapper:1349(ospfv3_ipsec_esn_check)] Start ospfv3_ipsec_esn_check +[10:34:03.268 INFO update_result:1191(ospfv3_ipsec_esn_check)] Finalized result in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json +PASSED [100%] + +====================================================================== 9 passed in 0.14s ======================================================================= From 03827219a9e123adbed1b5beafcf4e2f4a548ae9 Mon Sep 17 00:00:00 2001 From: psureshb Date: Wed, 24 Dec 2025 12:52:32 +0000 Subject: [PATCH 6/6] removed the unnecessary log files from directory --- ...lidator_pozhi_2025-12-24T10-24-22+0000.tgz | Bin 2274 -> 0 bytes pytest_log.txt | 74 ------------------ 2 files changed, 74 deletions(-) delete mode 100644 preupgrade_validator_pozhi_2025-12-24T10-24-22+0000.tgz delete mode 100644 pytest_log.txt diff --git a/preupgrade_validator_pozhi_2025-12-24T10-24-22+0000.tgz b/preupgrade_validator_pozhi_2025-12-24T10-24-22+0000.tgz deleted file mode 100644 index 4c8c922c102fba906480114e746f71d14810fb31..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2274 zcmV<82p#tyiwFP!000001MOPta^lDp_HUk|qpjMtE0&O27eH066a$!L*T#g4XE!rb zlq|KO6Co*5%U-X?|MLWSz&uG#OEO>&0^?zAC!?=CgVg7=`u6Gc*R2jh5(ksea>)3~ za;al6KODRMBr5Oi3^Jgi>+q`@vSKX#&atQH3dR++qO01TtmxP<_K?22D&!-Mm=z+l zXE`(Kt?}Dr{~tw=JN_#zf&crIjvZSQBN~J#mP-9B$f1oL2 zL1dQ86UwIXg=G7)GLXiyiN{D-t~WYjFC^k9<&=1yatfX(W(8dOAv&=bi5Th=msk-& z{OP6A&_^-cSjYoshg@2*%g~8Gp&n}bGmCnMC@BM30kywto}Jb^-H#tfgI2#=KW&xT z7MqfgdK1+39fCR@6f{dpmL#cEYQ$j(*-^dMY1}sw42Goa>*Szx;$QO`4X!D(rz`BG zp%qR@mi;R0BN`zeu0!fL#6!$S+#658yWzVou^F$;d9RVxs2L?S>4p9zBvE9d&*BT< zGm^^+viaCW2u3S#2_w#OE&lWGe-(dE{QHcQRlNz|Z&&(;^hw02yMJj>mpI7x+?xZG zyhe%BAfC;v@aEnvG4$$#0m^}ikWxCXcTSLq&PKy}yM^A@``u2r4ew;;Am2NTdhLF_ z*+Tqw)NiF8iNk5VJF1_c#*eMW$}>!{OjH5Wz5rQX?KIM4scEph0U>v?rd9a{bV zSs!J!TIDc28$uPK_}4`di(!HTMJA`t4v7*~2Wp7tNfSd5b<6ird@+8U77~~| zXT)=eGq&ve{0-j&CCQLYBil#AdLvPbgE$EMkV#pQzC8+E?tQOB7xGieL@D(*3(@k` zJS8fBm-dL5^oR&OA|@>rsV8PFjR+_`%5HeUbfGORH){{{?SNSF^YKy2(uX$znfDf?O$jt2gp?1TvJ~Fx<@-3R6v&bBm)^_P zc}_6hmF`}fn+5)O|By-AqWW_ELJbx=s!3kpULc z+4HW)xtXkhj`;!$440N0rGb@K(~lXX8M2(F_{?(CS&j!<q)6Rw>^9m%xX`8;ca##F~k*q}OW6TZ=l~%a z>(y+%8?_(S>rqcZ+XIl5#6%ZA+@`^&;m00CB%vxC3UroAun)JwqDF#wD}X)==|#*) zl-xN3o&%!ZAzV9rw+?O<-mXgt;P;Mu9J6!?8W?Nm7mU=Xb!aH(xwxCCtWl)6sc zUN}3%wQh*>Be6nuK`fSJ;_2MZ{J@8?yeS91BPwMNDkv&4gm8iU#!kJ7^X?{nO4@*= zqFl#c@uH}c)RTKdw==Gb$*J!QdG+smR;di-s;O5@y((#{4n1q~`9pB+vuj=f*SER0 z7G|sSRZYzRrqt&7z>mPHKQ-D*H*pDQP%~v+s_C_@xRm764GH61E`4QSQg;=Y zRQde4{`SdayaJiDt;nQpCX?~ZL98NYjquq_~mY9v$f3OU-W3i8<=!!I-@;_J)n+^rFrRz z?5T3r;i~)vd-x$OanS0YxBB9#x;2A%cReEv*}lg@e(oz=Cei!9_0px=ul=2qXo)?a z?ml`yGfE%&*663hz@o z;Qx$Ccq6jpc%*nqT}Hwq%X9XxZ7X#4ALR)64aATr5DpH$--0VuNyh8AlH0^Jypf;8 z8(#8b-oyd_8n)OeuPONzIHq2Y6`lIvz6~n;A z_n((Q^8J?|GUXpXlP{t<2TH*%FWbL3Pday4d7gA`U2~Xp?$a&T=hyc~N9PI2QPFSl wQ*D6)1qu`>P@q780tE^bC{Un4fdT~z6ev)jK!E}U3arI{0Rf1MPykQ>0DDt`3;+NC diff --git a/pytest_log.txt b/pytest_log.txt deleted file mode 100644 index 71167c56..00000000 --- a/pytest_log.txt +++ /dev/null @@ -1,74 +0,0 @@ -===================================================================== test session starts ====================================================================== -platform linux -- Python 3.8.10, pytest-7.4.0, pluggy-1.2.0 -- /data/ssd/psureshb/repo/pytest_env/bin/python3 -cachedir: .pytest_cache -rootdir: /data/ssd/psureshb/repo/preCFD/ACI-Pre-Upgrade-Validation-Script -configfile: pytest.ini -collected 9 items - -tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py::test_ospfv3_ipsec_esn_check[PASS - Target version in affected range, IPSec ESP not enabled] ------------------------------------------------------------------------- live log setup ------------------------------------------------------------------------ -[10:34:03.145 INFO init_system:6066(MainThread)] Creating directories preupgrade_validator_logs/ and preupgrade_validator_logs/json_results/ ------------------------------------------------------------------------- live log call ------------------------------------------------------------------------- -[10:34:03.146 INFO init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json -[10:34:03.147 INFO _start_thread:1105(MainThread)] (ospfv3_ipsec_esn_check) Starting thread. -[10:34:03.148 INFO wrapper:1349(ospfv3_ipsec_esn_check)] Start ospfv3_ipsec_esn_check -[10:34:03.149 INFO update_result:1191(ospfv3_ipsec_esn_check)] Finalized result in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json -PASSED [ 11%] -tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py::test_ospfv3_ipsec_esn_check[PASS - Target version in lower affected version, IPSec ESP not enabled] ------------------------------------------------------------------------- live log call ------------------------------------------------------------------------- -[10:34:03.160 INFO init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json -[10:34:03.161 INFO _start_thread:1105(MainThread)] (ospfv3_ipsec_esn_check) Starting thread. -[10:34:03.162 INFO wrapper:1349(ospfv3_ipsec_esn_check)] Start ospfv3_ipsec_esn_check -[10:34:03.163 INFO update_result:1191(ospfv3_ipsec_esn_check)] Finalized result in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json -PASSED [ 22%] -tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py::test_ospfv3_ipsec_esn_check[PASS - Target version in upper affected version, IPSec ESP not enabled] ------------------------------------------------------------------------- live log call ------------------------------------------------------------------------- -[10:34:03.176 INFO init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json -[10:34:03.177 INFO _start_thread:1105(MainThread)] (ospfv3_ipsec_esn_check) Starting thread. -[10:34:03.178 INFO wrapper:1349(ospfv3_ipsec_esn_check)] Start ospfv3_ipsec_esn_check -[10:34:03.179 INFO update_result:1191(ospfv3_ipsec_esn_check)] Finalized result in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json -PASSED [ 33%] -tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py::test_ospfv3_ipsec_esn_check[NA - Target version below affected range] ------------------------------------------------------------------------- live log call ------------------------------------------------------------------------- -[10:34:03.191 INFO init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json -[10:34:03.192 INFO _start_thread:1105(MainThread)] (ospfv3_ipsec_esn_check) Starting thread. -[10:34:03.193 INFO wrapper:1349(ospfv3_ipsec_esn_check)] Start ospfv3_ipsec_esn_check -[10:34:03.194 INFO update_result:1191(ospfv3_ipsec_esn_check)] Finalized result in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json -PASSED [ 44%] -tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py::test_ospfv3_ipsec_esn_check[NA - Target version above affected range] ------------------------------------------------------------------------- live log call ------------------------------------------------------------------------- -[10:34:03.205 INFO init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json -[10:34:03.206 INFO _start_thread:1105(MainThread)] (ospfv3_ipsec_esn_check) Starting thread. -[10:34:03.207 INFO wrapper:1349(ospfv3_ipsec_esn_check)] Start ospfv3_ipsec_esn_check -[10:34:03.207 INFO update_result:1191(ospfv3_ipsec_esn_check)] Finalized result in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json -PASSED [ 55%] -tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py::test_ospfv3_ipsec_esn_check[MANUAL - Target version not provided] ------------------------------------------------------------------------- live log call ------------------------------------------------------------------------- -[10:34:03.220 INFO init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json -[10:34:03.221 INFO _start_thread:1105(MainThread)] (ospfv3_ipsec_esn_check) Starting thread. -[10:34:03.221 INFO wrapper:1349(ospfv3_ipsec_esn_check)] Start ospfv3_ipsec_esn_check----------------------| 0/1 checks completed -[10:34:03.222 INFO update_result:1191(ospfv3_ipsec_esn_check)] Finalized result in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json -PASSED [ 66%] -tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py::test_ospfv3_ipsec_esn_check[FAIL - Target version in affected range, IPSec ESP enabled] ------------------------------------------------------------------------- live log call ------------------------------------------------------------------------- -[10:34:03.235 INFO init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json -[10:34:03.236 INFO _start_thread:1105(MainThread)] (ospfv3_ipsec_esn_check) Starting thread. -[10:34:03.236 INFO wrapper:1349(ospfv3_ipsec_esn_check)] Start ospfv3_ipsec_esn_check -[10:34:03.238 INFO update_result:1191(ospfv3_ipsec_esn_check)] Finalized result in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json -PASSED [ 77%] -tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py::test_ospfv3_ipsec_esn_check[FAIL - Target version in lower affected version, IPSec ESP enabled] ------------------------------------------------------------------------- live log call ------------------------------------------------------------------------- -[10:34:03.251 INFO init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json -[10:34:03.251 INFO _start_thread:1105(MainThread)] (ospfv3_ipsec_esn_check) Starting thread. -[10:34:03.252 INFO wrapper:1349(ospfv3_ipsec_esn_check)] Start ospfv3_ipsec_esn_check----------------------| 0/1 checks completed -[10:34:03.253 INFO update_result:1191(ospfv3_ipsec_esn_check)] Finalized result in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json -PASSED [ 88%] -tests/checks/ospfv3_ipsec_esn_check/test_ospfv3_ipsec_esn_check.py::test_ospfv3_ipsec_esn_check[FAIL - Target version in upper affected version, IPSec ESP enabled] ------------------------------------------------------------------------- live log call ------------------------------------------------------------------------- -[10:34:03.266 INFO init_result:1182(MainThread)] Initialized in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json -[10:34:03.267 INFO _start_thread:1105(MainThread)] (ospfv3_ipsec_esn_check) Starting thread. -[10:34:03.267 INFO wrapper:1349(ospfv3_ipsec_esn_check)] Start ospfv3_ipsec_esn_check -[10:34:03.268 INFO update_result:1191(ospfv3_ipsec_esn_check)] Finalized result in preupgrade_validator_logs/json_results/ospfv3_ipsec_esn_check.json -PASSED [100%] - -====================================================================== 9 passed in 0.14s =======================================================================