-
Notifications
You must be signed in to change notification settings - Fork 44
added validation for CFD CSCwp64296 #307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
3fc5ebf
9234893
4a06b4f
12ba803
42f466b
37d6c89
35de39e
40d9ea6
b52bc5f
34194e9
e921c6b
51ab0b7
a03259b
d94df42
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6012,6 +6012,48 @@ def apic_vmm_inventory_sync_faults_check(**kwargs): | |
| doc_url=doc_url) | ||
|
|
||
|
|
||
| @check_wrapper(check_title='Rogue/COOP Exception List missing on switches') | ||
| def rogue_ep_coop_exception_mac_check(cversion, tversion, **kwargs): | ||
| result = PASS | ||
| headers = ["Rogue Exception MACs Count", "presListener Count"] | ||
| data = [] | ||
| recommended_action = 'Remove the affected EP exception configurations and re-add them' | ||
| doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#roguecoop-exception-list-missing-on-switches' | ||
|
|
||
| # Target version check | ||
| if not tversion: | ||
| prints("Target version not provided, skipping check.") | ||
| return Result(result=MANUAL, msg=TVER_MISSING) | ||
|
|
||
| # Affected source version is in range [5.2(3):6.0(3)] . Fixed on 6.0(9e)+ and 6.1(4)+. | ||
| # if cversion.newer_than("3.1(2v)") and tversion.older_than("6.1(3g)"): | ||
| if ( | ||
| (cversion.same_as("5.2(3e)") or cversion.newer_than("5.2(3e)")) and | ||
| (cversion.same_as("6.0(3g)") or cversion.older_than("6.0(3g)")) and | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why 6.0(3g)? The enhancement that caused CSCwp64296 was introduced in the first release of 6.0(3) which is 6.0(3d). |
||
| ( | ||
| tversion.older_than("6.0(9e)") or | ||
| ((tversion.same_as("6.1(1f)") or tversion.newer_than("6.1(1f)")) and tversion.older_than("6.1(4h)")) | ||
| ) | ||
| ): | ||
| # 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}"))' | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are you matching MAC address in regex here? Unless I'm missing something, this is just causing unnecessary query work on the APICs. |
||
|
|
||
| # endpoint to fetch the presListener entries | ||
| presListener_api = 'presListener.json?query-target-filter=and(wcard(presListener.dn,"exceptcont"))' | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of regex( And use |
||
|
|
||
| exception_macs = icurl('class', exception_mac_api) | ||
|
|
||
| if exception_macs: | ||
| prints("Found {} exception MACs, checking presListener entries...".format(len(exception_macs))) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not use In the new framework with the progress bar, it will end up like this, breaking the progress bar view. Please use logging instead, if needed. Otherwise, those info should be stored in the |
||
| presListener_response = icurl('class', presListener_api) | ||
| if len(presListener_response) >= 0 and 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)]) | ||
|
|
||
| return Result(result=result, headers=headers, data=data, recommended_action=recommended_action, doc_url=doc_url) | ||
|
|
||
|
|
||
| @check_wrapper(check_title='APIC downgrade compatibility when crossing 6.2 release') | ||
| def apic_downgrade_compat_warning_check(cversion, tversion, **kwargs): | ||
| result = NA | ||
|
|
@@ -6216,6 +6258,7 @@ class CheckManager: | |
| isis_database_byte_check, | ||
| configpush_shard_check, | ||
| auto_firmware_update_on_switch_check, | ||
| rogue_ep_coop_exception_mac_check, | ||
|
|
||
| ] | ||
| ssh_checks = [ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.