diff --git a/templates/vyatta_vyos_show_interfaces.textfsm b/templates/vyatta_vyos_show_interfaces.textfsm index 2472796232..a752af166b 100644 --- a/templates/vyatta_vyos_show_interfaces.textfsm +++ b/templates/vyatta_vyos_show_interfaces.textfsm @@ -1,11 +1,12 @@ Value INTERFACE (\S+) -Value List IP_ADDRESS ((?:[A-Fa-f0-9:\.]+\/\d+)|-) +Value List IP_ADDRESS (\S+) Value STATUS (\S+) Value DESCRIPTION (.+?) Start ^Codes: - ^Interface\s+IP\s+Address\s+S/L\s+Description\s*$$ -> Interface + ^Interface\s+IP\s+Address\s+S/L\s+Description + ^-+\s+-+\s+-+\s+-+$$ -> Interface ^\s*$$ ^. -> Error @@ -13,6 +14,5 @@ Interface ^\S+\s+ -> Continue.Record ^${INTERFACE}\s+${IP_ADDRESS}\s+${STATUS}\s+(${DESCRIPTION}|)\s*$$ ^\s+${IP_ADDRESS}\s*$$ - ^-+\s+-+\s+-+\s+-+$$ ^\s*$$ ^. -> Error diff --git a/tests/vyatta_vyos/show_interfaces/vyatta_vyos_show_interfaces.raw b/tests/vyatta_vyos/show_interfaces/vyatta_vyos_show_interfaces.raw index 4aa3e026cf..092b9b0ebb 100644 --- a/tests/vyatta_vyos/show_interfaces/vyatta_vyos_show_interfaces.raw +++ b/tests/vyatta_vyos/show_interfaces/vyatta_vyos_show_interfaces.raw @@ -2,15 +2,18 @@ Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down Interface IP Address S/L Description --------- ---------- --- ----------- eth0 - u/u -eth0.42 172.11.100.1/31 u/u Utside +eth0.40 123.123.120.123/27 u/u OUTSIDE eth1 - u/u -eth1.1727 172.11.100.11/31 u/u SERVICES-LINK -eth1.1800 172.11.100.3/31 u/u DS-LAN -eth1.1801 172.11.100.5/31 u/u Link -eth1.1804 172.11.100.7/31 u/u TEST-NET +eth1.204 123.123.123.81/28 u/u CUST-DS-LAN +eth1.269 172.18.32.14/28 u/u CUST-COM + 123.123.123.123/32 +eth1.437 123.123.116.169/29 u/u CUST-VIDEO +eth1.1753 172.18.161.196/29 u/u SERVICE-LINK eth2 - u/u -eth2.1802 172.18.254.3/31 u/u SYNC - fe80:3023:1234:d::3/127 lo 127.0.0.1/8 u/u - 172.18.255.3/32 + 172.18.255.110/32 ::1/128 +vtun0 192.168.80.2 u/u +vtun1 192.168.80.4 u/u OpenVPN-TUNNEL1 +vtun2 192.168.80.6 u/u + diff --git a/tests/vyatta_vyos/show_interfaces/vyatta_vyos_show_interfaces.yml b/tests/vyatta_vyos/show_interfaces/vyatta_vyos_show_interfaces.yml index 35bf636ddb..c8d8c789c0 100644 --- a/tests/vyatta_vyos/show_interfaces/vyatta_vyos_show_interfaces.yml +++ b/tests/vyatta_vyos/show_interfaces/vyatta_vyos_show_interfaces.yml @@ -5,51 +5,61 @@ parsed_sample: ip_address: - "-" status: "u/u" - - description: "Utside" - interface: "eth0.42" + - description: "OUTSIDE" + interface: "eth0.40" ip_address: - - "172.11.100.1/31" + - "123.123.120.123/27" status: "u/u" - description: "" interface: "eth1" ip_address: - "-" status: "u/u" - - description: "SERVICES-LINK" - interface: "eth1.1727" + - description: "CUST-DS-LAN" + interface: "eth1.204" ip_address: - - "172.11.100.11/31" + - "123.123.123.81/28" status: "u/u" - - description: "DS-LAN" - interface: "eth1.1800" + - description: "CUST-COM" + interface: "eth1.269" ip_address: - - "172.11.100.3/31" + - "172.18.32.14/28" + - "123.123.123.123/32" status: "u/u" - - description: "Link" - interface: "eth1.1801" + - description: "CUST-VIDEO" + interface: "eth1.437" ip_address: - - "172.11.100.5/31" + - "123.123.116.169/29" status: "u/u" - - description: "TEST-NET" - interface: "eth1.1804" + - description: "SERVICE-LINK" + interface: "eth1.1753" ip_address: - - "172.11.100.7/31" + - "172.18.161.196/29" status: "u/u" - description: "" interface: "eth2" ip_address: - "-" status: "u/u" - - description: "SYNC" - interface: "eth2.1802" - ip_address: - - "172.18.254.3/31" - - "fe80:3023:1234:d::3/127" - status: "u/u" - description: "" interface: "lo" ip_address: - "127.0.0.1/8" - - "172.18.255.3/32" + - "172.18.255.110/32" - "::1/128" status: "u/u" + - description: "" + interface: "vtun0" + ip_address: + - "192.168.80.2" + status: "u/u" + - description: "OpenVPN-TUNNEL1" + interface: "vtun1" + ip_address: + - "192.168.80.4" + status: "u/u" + - description: "" + interface: "vtun2" + ip_address: + - "192.168.80.6" + status: "u/u"