Skip to content
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

NewValidation: Check for CSCvg26013 / FN64251 #188

Open
solu24 opened this issue Jan 7, 2025 · 0 comments
Open

NewValidation: Check for CSCvg26013 / FN64251 #188

solu24 opened this issue Jan 7, 2025 · 0 comments
Assignees

Comments

@solu24
Copy link
Collaborator

solu24 commented Jan 7, 2025

(use upvote 👍 for attentions)

Validation Type

[ CSCvg26013 / FN64251] - Bug

What needs to be validated

The affected modules as per CSCvg26013 / FN64251 fail to come up after reload.

Why it needs to be validated

Upgrade causes switch reload and hence it is important to verify if the SN is affected by the above FN prior to upgrade. If it is affected, the FC/LC has to replaced prior to upgrade.

Code to be added.

def match_check_FN64251(index, total_checks, **kwargs):
    title = 'Check for CSCvg26013 / FN64251'
    result = MANUAL
    msg = ''
    unformatted_headers = ['DN', 'Description' , 'Model' , 'Serial Number']
    unformatted_data = []
    affected_models = ["N9K-C9504-FM-E", "N9K-C9508-FM-E", "N9K-X9732C-EX"]
    data = []
    formatted_data = []
    recommended_action = (
        'If affected by this FN, the devices/modules might not come up after Reload.\n'
        '  Check if the above SNs are affected by the FN using the URL https://snvui.cisco.com/snv/FN64251.'
        'If affected, replace the part prior to upgrade.'
    )
    doc_url = 'https://www.cisco.com/c/en/us/support/docs/field-notices/642/fn64251.html'

    print_title(title, index, total_checks)

    eqptFC = icurl('class', 'eqptFC.json')
    eqptLC = icurl('class', 'eqptLC.json')

    def check_affected_models(card_data, affected_models):
        matching_rows = []
        for card in card_data:
            for card_key in ['eqptLC', 'eqptFC']:
                attributes = card.get(card_key, {}).get('attributes', {})
                descr = attributes.get('descr', '')
                dn = attributes.get('dn', '')
                model = attributes.get('model', '')
                ser = attributes.get('ser', '')

                for affected_model in affected_models:
                    if affected_model in model:
                        matching_rows.append({'dn': dn, 'descr': descr, 'model': model, 'ser': ser})
        return matching_rows

    existing_in_lc = check_affected_models(eqptLC, affected_models)
    existing_in_fc = check_affected_models(eqptFC, affected_models)
    data = existing_in_lc + existing_in_fc

    if data:
        unformatted_data = [[row['dn'], row['descr'], row['model'], row['ser']] for row in data]

    else:
        result = 'PASS'

    print_result(title, result, msg, unformatted_headers, data, unformatted_headers, unformatted_data,
                 recommended_action=recommended_action, doc_url=doc_url)

    return result

Positive Validation

[Check 67/67] Check for CSCvg26013 / FN64251...                                                                      MANUAL CHECK REQUIRED

  DN                                          Description    Model           Serial Number
  --                                          -----------    -----           -------------
  topology/pod-1/node-201/sys/ch/fcslot-2/fc  Fabric Module  N9K-C9504-FM-E  FOC23506V3J
  topology/pod-1/node-201/sys/ch/fcslot-3/fc  Fabric Module  N9K-C9504-FM-E  FOC235053MR
  topology/pod-1/node-201/sys/ch/fcslot-4/fc  Fabric Module  N9K-C9504-FM-E  FOC23506V60
  topology/pod-1/node-201/sys/ch/fcslot-5/fc  Fabric Module  N9K-C9504-FM-E  FOC235053QS
  topology/pod-1/node-201/sys/ch/fcslot-6/fc  Fabric Module  N9K-C9504-FM-E  FOC235053QU

  Recommended Action: If affected by this FN, the devices/modules might not come up after Reload.
  Check if the above SNs are affected by the FN using the URL https://snvui.cisco.com/snv/FN64251.If affected, replace the part prior to upgrade.
  Reference Document: https://www.cisco.com/c/en/us/support/docs/field-notices/642/fn64251.html

Negative Validation

[Check 67/67] Check for CSCvg26013 / FN64251... PASS

@solu24 solu24 self-assigned this Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant