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

New Template Pull Request - cisco_xr_show_interfaces_summary #580

Merged
merged 6 commits into from
Jan 25, 2020
Merged

Conversation

hijm
Copy link
Contributor

@hijm hijm commented Jan 24, 2020

ISSUE TYPE
  • New Template Pull Request
COMPONENT
  • cisco_xr_show_interfaces_summary.textfsm
  • IOS-XR
  • show interfaces summary
SUMMARY
  • Including new template, parsing all the variables from the output
  • The generation of yml file was not 100% sucessful with the "python3 development_scripts.py -c tests/cisco_xr/show_interfaces_summary/cisco_xr_show_interfaces_summary.raw". The initial structure was created, but the values were not filled. I did some tests with a simple python script and it was sucessful.

Here the output for the new cisco_xr_show_interfaces_summary.textfsm

ALL_TYPES
TOTAL
UP
DOWN
ADMIN_DOWN
['ALL TYPES', '81', '51', '0', '30']
['IFT_ETHERBUNDLE', '11', '11', '0', '0']
['IFT_HUNDREDGE', '26', '2', '0', '24']
['IFT_LOOPBACK', '1', '1', '0', '0']
['IFT_ETHERNET', '2', '0', '0', '2']

Here the output using the same python script against existing "cisco_xr_show_interface_brief.textfsm"

INTERFACE
INTF_STATE
LINEP_STATE
ENCAP_TYPE
MTU
INT_BW
['Lo5', 'up', 'up', 'Loopback', '1500', '0']
['Lo10', 'up', 'up', 'Loopback', '1500', '0']
['Lo20', 'up', 'up', 'Loopback', '1500', '0']
['Lo21', 'up', 'up', 'Loopback', '1500', '0']
  • The validations related with the template using tox were sucessful, but some other errors were logged. Here the output.
    tox.log

hijm and others added 3 commits January 23, 2020 02:10
ios xr - show interfaces summary
- Index file chaged
- Change the template structure (more generic)
- Generation of yml file. (I did tests with my own code and the tempalte is working. But the generation with "python3 development_scripts.py -c tests/cisco_xr/show_interfaces_summary/cisco_xr_show_interfaces_summary.raw" was not generating entries inside of the yml.
- The tox command was returning some errors not related with the new template.
templates/index Outdated Show resolved Hide resolved
Copy link
Contributor

@FragmentedPacket FragmentedPacket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few suggestions, but we appreciate the new template!

@FragmentedPacket FragmentedPacket added changes_requested Waiting on user to address feedback New Template labels Jan 24, 2020
- Changed ALL_TYPES value for INTF_TYPE value
- Add some new validations
Copy link
Contributor Author

@hijm hijm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aproved some required changes on the template. I will keep the "hard coded" validation for the interface types because this is the expected output as I saw in other templates related with status of the interfaces.
I am using the templates here, just giving back 👍

@hijm hijm requested a review from FragmentedPacket January 24, 2020 22:43
Copy link
Contributor Author

@hijm hijm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the changes were accepted

templates/index Outdated Show resolved Hide resolved
Copy link
Contributor Author

@hijm hijm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Index corrected.

@jmcgill298
Copy link
Contributor

@hijm I believe you need to update tests/cisco_xr/show_interfaces_summary/cisco_xr_show_interfaces_summary.yml with the expected parsed data.

@hijm hijm requested a review from FragmentedPacket January 25, 2020 04:42
@FragmentedPacket FragmentedPacket merged commit 7f46977 into networktocode:master Jan 25, 2020
@hijm
Copy link
Contributor Author

hijm commented Jan 25, 2020

Thank you.

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 New Template
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants