diff --git a/templates/cisco_ios_show_ip_vrf_interfaces.textfsm b/templates/cisco_ios_show_ip_vrf_interfaces.textfsm new file mode 100644 index 0000000000..7622392bf9 --- /dev/null +++ b/templates/cisco_ios_show_ip_vrf_interfaces.textfsm @@ -0,0 +1,18 @@ +Value Required INTERFACE (\S+) +Value Required IPADDRESS (\S+) +Value Required VRF (\S+) +Value Required PROTO_STATE (\S+) + +# This command returns a list of interfaces which are assigned to +# non-default VRF, including IP address (if available), VRF name, +# interface name and protocol status + +Start + ^Interface\s+IP-Address\s+VRF\s+Protocol -> Entries + ^\s*$$ + ^. -> Error + +Entries + ^${INTERFACE}\s+${IPADDRESS}\s+${VRF}\s+${PROTO_STATE} -> Record + ^\s*$$ + ^. -> Error \ No newline at end of file diff --git a/templates/index b/templates/index index 5b63edc4c3..53c170f956 100644 --- a/templates/index +++ b/templates/index @@ -170,6 +170,7 @@ cisco_ios_show_ip_interface_brief.textfsm, .*, cisco_ios, sh[[ow]] ip int[[erfac cisco_ios_show_interfaces_status.textfsm, .*, cisco_ios, sh[[ow]] int[[erfaces]] st[[atus]] cisco_ios_show_ip_eigrp_topology.textfsm, .*, cisco_ios, sh[[ow]] ip eigrp top[[ology]] cisco_ios_show_ip_source_binding.textfsm, .*, cisco_ios, sh[[ow]] ip sou[[rce]] b[[inding]] +cisco_ios_show_ip_vrf_interfaces.textfsm, .*, cisco_ios, sh[[ow]] ip vr[[f]] in[[terfaces]] cisco_ios_show_mac-address-table.textfsm, .*, cisco_ios, sh[[ow]] mac[[-address-table]] cisco_ios_show_adjacency_detail.textfsm, .*, cisco_ios, sh[[ow]] ad[[jacency]](?:\s+\S+)* det[[ail]] cisco_ios_show_ip_bgp_neighbors.textfsm, .*, cisco_ios, sh[[ow]] ip bgp nei[[ghbors]] diff --git a/tests/cisco_ios/show_ip_vrf_interfaces/cisco_ios_show_ip_vrf_interfaces_empty.raw b/tests/cisco_ios/show_ip_vrf_interfaces/cisco_ios_show_ip_vrf_interfaces_empty.raw new file mode 100644 index 0000000000..7fc1ee97cb --- /dev/null +++ b/tests/cisco_ios/show_ip_vrf_interfaces/cisco_ios_show_ip_vrf_interfaces_empty.raw @@ -0,0 +1 @@ +Interface IP-Address VRF Protocol \ No newline at end of file diff --git a/tests/cisco_ios/show_ip_vrf_interfaces/cisco_ios_show_ip_vrf_interfaces_empty.yml b/tests/cisco_ios/show_ip_vrf_interfaces/cisco_ios_show_ip_vrf_interfaces_empty.yml new file mode 100644 index 0000000000..e77add67ed --- /dev/null +++ b/tests/cisco_ios/show_ip_vrf_interfaces/cisco_ios_show_ip_vrf_interfaces_empty.yml @@ -0,0 +1,2 @@ +--- +parsed_sample: [] diff --git a/tests/cisco_ios/show_ip_vrf_interfaces/cisco_ios_show_ip_vrf_interfaces_iosxe.raw b/tests/cisco_ios/show_ip_vrf_interfaces/cisco_ios_show_ip_vrf_interfaces_iosxe.raw new file mode 100644 index 0000000000..84d125450c --- /dev/null +++ b/tests/cisco_ios/show_ip_vrf_interfaces/cisco_ios_show_ip_vrf_interfaces_iosxe.raw @@ -0,0 +1,7 @@ +Interface IP-Address VRF Protocol +Vl1100 192.168.100.1 BYOD-Guest up +Vl1200 192.168.200.1 BYOD-Guest up +Vl1832 10.255.0.10 BYOD-Guest up +Gi0/0 unassigned Mgmt-vrf down +Vl520 172.31.2.253 SP-INET up +Vl1836 10.255.0.18 SP-INET up \ No newline at end of file diff --git a/tests/cisco_ios/show_ip_vrf_interfaces/cisco_ios_show_ip_vrf_interfaces_iosxe.yml b/tests/cisco_ios/show_ip_vrf_interfaces/cisco_ios_show_ip_vrf_interfaces_iosxe.yml new file mode 100644 index 0000000000..48693596cd --- /dev/null +++ b/tests/cisco_ios/show_ip_vrf_interfaces/cisco_ios_show_ip_vrf_interfaces_iosxe.yml @@ -0,0 +1,26 @@ +--- +parsed_sample: + - interface: "Vl1100" + ipaddress: "192.168.100.1" + vrf: "BYOD-Guest" + proto_state: "up" + - interface: "Vl1200" + ipaddress: "192.168.200.1" + vrf: "BYOD-Guest" + proto_state: "up" + - interface: "Vl1832" + ipaddress: "10.255.0.10" + vrf: "BYOD-Guest" + proto_state: "up" + - interface: "Gi0/0" + ipaddress: "unassigned" + vrf: "Mgmt-vrf" + proto_state: "down" + - interface: "Vl520" + ipaddress: "172.31.2.253" + vrf: "SP-INET" + proto_state: "up" + - interface: "Vl1836" + ipaddress: "10.255.0.18" + vrf: "SP-INET" + proto_state: "up"