Parse secondary IP for interfaces
Closed this issue · 1 comments
Describe the problem
I looked into the code for show run | section interface
template and it does not seem to have anything which would provide the information for the secondary IP if it is configured on the interface.
Sample data
Provide sample data to reproduce the issue.
interface TenGigabitEthernet0/0/0
ip address 172.17.2.254 255.255.255.0 secondary
ip address 172.16.14.1 255.255.255.0
interface TenGigabitEthernet0/0/0.100
encapsulation dot1Q 100
ip address 172.18.2.254 255.255.255.0 secondary
ip address 172.16.15.1 255.255.255.0
Expected Output
Return a list of dictionaries of IP addresses with secondary
set to either true
or false
Sample Template
TTP Template content used to parse sample data.
https://dmulyalin.github.io/ttp_templates/ttp_templates/platform.cisco_ios_show_running_config_pipe_section_interface/
Version Report
Provide version information for:
- Operating System: Ubuntu 20.04 LTS
- Python Version: 3.8.10
- TTP Version: 0.8.4
- TTP Templates Version: master branch
This was done on purpose as there is a different set of templates exists to extract IP address information from devices configuration, in fact, "Return a list of dictionaries of IP addresses with secondary set to either true or false" - this is exactly what aforementioned templates do. So far there is a such a template exists for Cisco IOS, Cisco IOS XR and Huawei VRP. These templates also extract VRRP/HSRP VIPs and can handle multiple IPv6 addresses.
Let me know what you think.