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

Adding cisco_ios_show_ip_interface #322

Merged

Conversation

vladola
Copy link
Contributor

@vladola vladola commented Dec 20, 2018

ISSUE TYPE
  • New Template Pull Request
COMPONENT

cisco_ios_show_ip_interface.template, cisco_ios, show ip interface

SUMMARY

I needed a way to get Interface name, ip address and VRF (if empty, it's in GRT). Clearly the command has a lot more info than this, and can be expanded in the future if needed.

@vladola vladola changed the title Adding cisco_ios_show_ip_interface . Adding cisco_ios_show_ip_interface Dec 21, 2018
CHANGES:
  * Separate IP address and netmask into separate capture groups (`IPADDR` and `MASK`)
  * Add catchall error line to ensure we are aware of all data
  * Add necessary regex matches for known data
  * Update test parsed file to reflect updates

ENHANCEMENTS:
  * Removed unnecessary `->` from lines that do not have a state change
  * Move `Record` to the line that begins interface data, removing dependancy on a line that could potentially not exist.
  * Add capturing VRF for tunnel interfaces, which use a different syntax than other interface types.
  * Add capture groups for interface status (`LINK_STATUS` and `PROTOCOL_STATUS`)
@jmcgill298
Copy link
Contributor

@vladola I submitted some updates in vladola#1. The important update is that new templates should raise an Error when an unknown line is encountered. Please let me know what you think of my updates. If you decide to merge that PR, then I will go ahead merge this one.

@FragmentedPacket
Copy link
Contributor

@vladola I have #229 opened that I think covers some of this. I can add VRF support into it. Is that cool if I add the VRF support into that since more fields are supported at this point?

@vladola
Copy link
Contributor Author

vladola commented Jan 7, 2019

@jmcgill298 Looks good. Sorry, I knew about the new requirements, I just had no time in the moment to spend on doing it, so I just posted anyway in case someone needed something similar. Also, unsure why I was not notified of your comment, sorry for the long time to reply.

@jmcgill298 jmcgill298 merged commit ea7aab1 into networktocode:master Jan 7, 2019
jmcgill298 added a commit that referenced this pull request Jan 8, 2019
* Update index/test_index_order.py to match master (resolve conflicts)

* Another attempt to fix conflicts

* Removed duplicate entry for this template

* NEW TEMPLATE UPDATES:

BREAKING CHANGES:
  * Change IP Address and Mask to use lists for interfaces with multiple addresses
    - `IP_ADDRESS`
    - `MASK`

FIXES:
  * Correct template order in index file
  * Add catch-all to raise an Error on unmatched lines
  * Add regex matches for all known lines in test file
  * Remove ending `}` from MTU regex to accurately capture MTU size

NEW CAPTURE GROUPS:
  * `VRF`: Captures VRF interface is assigned to

GENERAL ENHANCEMENTS:
  * Make all spaces uses `\s+`
  * Update `IP_ADDRESS` to account for IPv4 and IPv6 Addresses
  * Allow for `IP_ADDRESS` to be present without `MASK`
  * Simplify regex for `LINK_STATUS`
  * Allow for spaces in ACL matches:
    - `OUTGOING_ACL`
    - `INBOUND_ACL`

TEST FILES:
  * Add parsed data for additional `VRF` capture group
  * Update parsed file to reflect changes

* Temporarily rename test files'

Added cisco_ios_show_ip_interface to index

* Rebase with master to fix conflicts:

* Rename test files to avoid conflicting names
* Add additional capture groups to template and existing parsed file
jvanderaa pushed a commit that referenced this pull request Nov 10, 2021
* Adding cisco_ios_show_ip_interface .

* Adding cisco_ios_show_ip_interface

* fix: from int to intf in cisco_ios_show_ip_interface.parsed

* New Template Updates:

CHANGES:
  * Separate IP address and netmask into separate capture groups (`IPADDR` and `MASK`)
  * Add catchall error line to ensure we are aware of all data
  * Add necessary regex matches for known data
  * Update test parsed file to reflect updates

ENHANCEMENTS:
  * Removed unnecessary `->` from lines that do not have a state change
  * Move `Record` to the line that begins interface data, removing dependancy on a line that could potentially not exist.
  * Add capturing VRF for tunnel interfaces, which use a different syntax than other interface types.
  * Add capture groups for interface status (`LINK_STATUS` and `PROTOCOL_STATUS`)
jvanderaa pushed a commit that referenced this pull request Nov 10, 2021
* Update index/test_index_order.py to match master (resolve conflicts)

* Another attempt to fix conflicts

* Removed duplicate entry for this template

* NEW TEMPLATE UPDATES:

BREAKING CHANGES:
  * Change IP Address and Mask to use lists for interfaces with multiple addresses
    - `IP_ADDRESS`
    - `MASK`

FIXES:
  * Correct template order in index file
  * Add catch-all to raise an Error on unmatched lines
  * Add regex matches for all known lines in test file
  * Remove ending `}` from MTU regex to accurately capture MTU size

NEW CAPTURE GROUPS:
  * `VRF`: Captures VRF interface is assigned to

GENERAL ENHANCEMENTS:
  * Make all spaces uses `\s+`
  * Update `IP_ADDRESS` to account for IPv4 and IPv6 Addresses
  * Allow for `IP_ADDRESS` to be present without `MASK`
  * Simplify regex for `LINK_STATUS`
  * Allow for spaces in ACL matches:
    - `OUTGOING_ACL`
    - `INBOUND_ACL`

TEST FILES:
  * Add parsed data for additional `VRF` capture group
  * Update parsed file to reflect changes

* Temporarily rename test files'

Added cisco_ios_show_ip_interface to index

* Rebase with master to fix conflicts:

* Rename test files to avoid conflicting names
* Add additional capture groups to template and existing parsed file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants