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

Updated MEDIA_TYPE regex to capture twinax and QSFP optics #859

Closed
wants to merge 1 commit into from

Conversation

cldeluna
Copy link

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT

./ntc-templates/templates/cisco_ios_show_interfaces.textfsm

SUMMARY

The current MEDIA_TYPE regex does not pick up Twinax and QSFP optics.

Output is a subset of a Pandas dataframe for ease of viewing. Hope thats OK.

With the current template only a subset of the optics are retured.

                   INTERFACE            LINK_STATUS  MEDIA_TYPE
0              FastEthernet1                   down            
1    TenGigabitEthernet1/1/1                     up            
2    TenGigabitEthernet1/1/2                     up            
3    TenGigabitEthernet1/1/3                     up            
4    TenGigabitEthernet1/1/4                     up   1000BaseT
5    TenGigabitEthernet1/1/5  administratively down   1000BaseT
6    TenGigabitEthernet1/1/6                     up   1000BaseT
7    TenGigabitEthernet1/1/7                     up   1000BaseT
8    TenGigabitEthernet1/1/8                     up   1000BaseT
9    TenGigabitEthernet1/1/9  administratively down            
10  TenGigabitEthernet1/1/10  administratively down            
11  TenGigabitEthernet1/1/11                     up            
12  TenGigabitEthernet1/1/12                   down  1000BaseSX
13  TenGigabitEthernet1/1/13                     up  10GBase-SR
14  TenGigabitEthernet1/1/14  administratively down            
15  TenGigabitEthernet1/1/15  administratively down            


With the update note the additional optics returned after parsing.

                   INTERFACE            LINK_STATUS   MEDIA_TYPE
0              FastEthernet1                   down             
1    TenGigabitEthernet1/1/1                     up  QSFP-10G 1M
2    TenGigabitEthernet1/1/2                     up  QSFP-10G 1M
3    TenGigabitEthernet1/1/3                     up  QSFP-10G 1M
4    TenGigabitEthernet1/1/4                     up    1000BaseT
5    TenGigabitEthernet1/1/5  administratively down    1000BaseT
6    TenGigabitEthernet1/1/6                     up    1000BaseT
7    TenGigabitEthernet1/1/7                     up    1000BaseT
8    TenGigabitEthernet1/1/8                     up    1000BaseT
9    TenGigabitEthernet1/1/9  administratively down      No XCVR
10  TenGigabitEthernet1/1/10  administratively down      No XCVR
11  TenGigabitEthernet1/1/11                     up  QSFP-10G 5M
12  TenGigabitEthernet1/1/12                   down   1000BaseSX
13  TenGigabitEthernet1/1/13                     up   10GBase-SR
14  TenGigabitEthernet1/1/14  administratively down      No XCVR
15  TenGigabitEthernet1/1/15  administratively down      No XCVR


example1_show_int_output.txt

@FragmentedPacket
Copy link
Contributor

@cldeluna We require updated tests and offer some helpers to generate the files. You should see some examples on the README.

With the change you made, it should have quite a few changes to existing test output, and then could you add a new .raw file with these new types to make sure they pass and we don't have any regression.

You can reach out on Slack if you need assistance.

@FragmentedPacket
Copy link
Contributor

Closing this for #879 to get merged in sooner than later. Your commit is within that PR so you'll get credit :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes_requested Waiting on user to address feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants