diff --git a/ntc_templates/templates/huawei_vrp_display_ip_routing-table_verbose.textfsm b/ntc_templates/templates/huawei_vrp_display_ip_routing-table_verbose.textfsm new file mode 100644 index 0000000000..d89f069ae6 --- /dev/null +++ b/ntc_templates/templates/huawei_vrp_display_ip_routing-table_verbose.textfsm @@ -0,0 +1,51 @@ +Value DESTINATION (\S+) +Value PREFIX_LENGTH (\d+) +Value PROTOCOL (Direct|Static|EBGP|IBGP||ISIS|OSPF|RIP|UNR) +Value PROCESS_ID (\d+) +Value LABEL (\S+) +Value QOS_INFO (\S+) +Value NEIGHBOUR (\S+) +Value NEXT_HOP (\S+) +Value PREFERENCE (\d+) +Value STATE ((\s*(Active|Invalid|Inactive|NoAdv|Adv|Del|Relied|Stale))+) +Value COST (\d+) +Value AGE ([\d\w]+) +Value TAG (\d+) +Value PRIORITY (low|medium|high|critical) +Value INDIRECT_ID (\S+) +Value RELAY_NEXT_HOP (\S+) +Value INTERFACE (\S+) +Value TUNNEL_ID (\S+) +Value FLAGS ((D|R)*) +Value ENTRY_ID (\S+) +Value ENTRY_FLAGS (\S+) +Value REFERENCE_CNT (\d+) + +Start + ^\s*Route\sFlags:.*$$ + ^\s*-*\s*$$ + ^\s*Routing\sTable(s)?\s*:\sPublic\s*$$ + ^\s*Destinations\s*:\s+\d+\s+Routes\s*:\s+\d+\s*$$ + ^\s*Destination\s*:\s+.*$$ -> Continue.Record + ^\s*Destination\s*:\s+${DESTINATION}(\s+PrefixLength\s*:\s+${PREFIX_LENGTH})?\s*$$ + ^\s*Protocol\s*:\s+${PROTOCOL}\s+Process\sID\s*:\s+${PROCESS_ID}\s*$$ + ^\s*Preference\s*:\s+${PREFERENCE}\s+Cost\s*:\s+${COST}\s*$$ + ^\s*NextHop\s*:\s+${NEXT_HOP}\s+Neighbour\s*:\s+${NEIGHBOUR}\s*$$ + ^\s*State\s*:\s+${STATE}\s+Age\s*:\s+${AGE}\s*$$ + ^\s*Tag\s*:\s+${TAG}\s+Priority\s*:\s+${PRIORITY}\s*$$ + ^\s*Label\s*:\s+${LABEL}\s+QoSInfo\s*:\s+${QOS_INFO}\s*$$ + ^\s*IndirectID\s*:\s+${INDIRECT_ID}\s*$$ + ^\s*RelayNextHop\s*:\s+${RELAY_NEXT_HOP}\s+Interface\s*:\s+${INTERFACE}\s*$$ + ^\s*TunnelID\s*:\s+${TUNNEL_ID}\s+Flags\s*:\s+${FLAGS}\s*$$ + # IPv6 only regex + ^\s*NextHop\s*:\s+${NEXT_HOP}\s+Preference\s*:\s+${PREFERENCE}\s*$$ + ^\s*Neighbour\s*:\s+${NEIGHBOUR}\s+ProcessID\s*:\s+${PROCESS_ID}\s*$$ + ^\s*Label\s*:\s+${LABEL}\s+Protocol\s*:\s+${PROTOCOL}\s*$$ + ^\s*State\s*:\s+${STATE}\s+Cost\s*:\s+${COST}\s*$$ + ^\s*Entry\sID\s*:\s+${ENTRY_ID}\s+EntryFlags\s*:\s+${ENTRY_FLAGS}\s*$$ + ^\s*Reference\sCnt\s*:\s+${REFERENCE_CNT}\s+Tag\s*:\s+${TAG}\s*$$ + ^\s*Priority\s*:\s+${PRIORITY}\s+Age\s*:\s+${AGE}\s*$$ + ^\s*RelayNextHop\s*:\s+${RELAY_NEXT_HOP}\s+TunnelID\s*:\s+${TUNNEL_ID}\s*$$ + ^\s*Interface\s*:\s+${INTERFACE}\s+Flags\s*:\s+${FLAGS}\s*$$ + ^\s*$$ + ^. -> Error diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 32d48403a0..59d6c6db8b 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -477,6 +477,7 @@ hp_procurve_show_arp.textfsm, .*, hp_procurve, sh[[ow]] ar[[p]] huawei_vrp_display_traffic-filter_applied-record.textfsm, .*, huawei_vrp, dis[[play]] traffic-filter applied-record huawei_vrp_display_snmp-agent_community_read.textfsm, .*, huawei_vrp, dis[[play]] snm[[p-agent]] c[[ommunity]] (r[[ead]]|w[[rite]]) +huawei_vrp_display_ip_routing-table_verbose.textfsm, .*, huawei_vrp, dis[[play]] ip(v6)? routi[[ng-table]] ve[[rbose]] huawei_vrp_display_interface_description.textfsm, .*, huawei_vrp, dis[[play]] inter[[face]] des[[cription]] huawei_vrp_display_service-set_id_id.textfsm, .*, huawei_vrp, dis[[play]] service-set (id|name) \S+ huawei_vrp_display_interface_brief.textfsm, .*, huawei_vrp, dis[[play]] inter[[face]] br[[ief]] diff --git a/tests/huawei_vrp/display_ip_routing-table_verbose/huawei_vrp_display_ip_routing-table_verbose_ipv4.raw b/tests/huawei_vrp/display_ip_routing-table_verbose/huawei_vrp_display_ip_routing-table_verbose_ipv4.raw new file mode 100644 index 0000000000..162d80f090 --- /dev/null +++ b/tests/huawei_vrp/display_ip_routing-table_verbose/huawei_vrp_display_ip_routing-table_verbose_ipv4.raw @@ -0,0 +1,159 @@ +Route Flags: R - relay, D - download to fib, T - to vpn-instance +------------------------------------------------------------------------------ +Routing Tables: Public + Destinations : 13 Routes : 14 + + +Destination: 0.0.0.0/0 + Protocol: Static Process ID: 0 + Preference: 60 Cost: 0 + NextHop: 192.214.198.156 Neighbour: 0.0.0.0 + State: Active Adv Age: 1d01h58m07s + Tag: 0 Priority: medium + Label: NULL QoSInfo: 0x0 + IndirectID: 0x0 + RelayNextHop: 0.0.0.0 Interface: Dialer1 + TunnelID: 0x0 Flags: D + +Destination: 0.0.0.0/0 + Protocol: EBGP Process ID: 0 + Preference: 255 Cost: 0 + NextHop: 23.90.232.243 Neighbour: 23.90.232.243 + State: Inactive Adv Age: 1d01h57m50s + Tag: 0 Priority: low + Label: NULL QoSInfo: 0x0 + IndirectID: 0x1 + RelayNextHop: 0.0.0.0 Interface: Dialer1 + TunnelID: 0x0 Flags: + +Destination: 23.90.232.243/32 + Protocol: Direct Process ID: 0 + Preference: 0 Cost: 0 + NextHop: 23.90.232.243 Neighbour: 0.0.0.0 + State: Active Adv Age: 1d01h58m07s + Tag: 0 Priority: high + Label: NULL QoSInfo: 0x0 + IndirectID: 0x0 + RelayNextHop: 0.0.0.0 Interface: Dialer1 + TunnelID: 0x0 Flags: D + +Destination: 100.95.15.240/30 + Protocol: Direct Process ID: 0 + Preference: 0 Cost: 0 + NextHop: 100.95.15.241 Neighbour: 0.0.0.0 + State: Active Adv Age: 1d01h58m15s + Tag: 0 Priority: high + Label: NULL QoSInfo: 0x0 + IndirectID: 0x0 + RelayNextHop: 0.0.0.0 Interface: Vlanif100 + TunnelID: 0x0 Flags: D + +Destination: 100.95.15.241/32 + Protocol: Direct Process ID: 0 + Preference: 0 Cost: 0 + NextHop: 127.0.0.1 Neighbour: 0.0.0.0 + State: Active NoAdv Age: 1d01h58m15s + Tag: 0 Priority: high + Label: NULL QoSInfo: 0x0 + IndirectID: 0x0 + RelayNextHop: 0.0.0.0 Interface: Vlanif100 + TunnelID: 0x0 Flags: D + +Destination: 100.95.15.243/32 + Protocol: Direct Process ID: 0 + Preference: 0 Cost: 0 + NextHop: 127.0.0.1 Neighbour: 0.0.0.0 + State: Active NoAdv Age: 1d01h58m19s + Tag: 0 Priority: high + Label: NULL QoSInfo: 0x0 + IndirectID: 0x0 + RelayNextHop: 0.0.0.0 Interface: Vlanif100 + TunnelID: 0x0 Flags: D + +Destination: 127.0.0.0/8 + Protocol: Direct Process ID: 0 + Preference: 0 Cost: 0 + NextHop: 127.0.0.1 Neighbour: 0.0.0.0 + State: Active NoAdv Age: 1d01h59m26s + Tag: 0 Priority: high + Label: NULL QoSInfo: 0x0 + IndirectID: 0x0 + RelayNextHop: 0.0.0.0 Interface: InLoopBack0 + TunnelID: 0x0 Flags: D + +Destination: 127.0.0.1/32 + Protocol: Direct Process ID: 0 + Preference: 0 Cost: 0 + NextHop: 127.0.0.1 Neighbour: 0.0.0.0 + State: Active NoAdv Age: 1d01h59m26s + Tag: 0 Priority: high + Label: NULL QoSInfo: 0x0 + IndirectID: 0x0 + RelayNextHop: 0.0.0.0 Interface: InLoopBack0 + TunnelID: 0x0 Flags: D + +Destination: 127.255.255.255/32 + Protocol: Direct Process ID: 0 + Preference: 0 Cost: 0 + NextHop: 127.0.0.1 Neighbour: 0.0.0.0 + State: Active NoAdv Age: 1d01h59m26s + Tag: 0 Priority: high + Label: NULL QoSInfo: 0x0 + IndirectID: 0x0 + RelayNextHop: 0.0.0.0 Interface: InLoopBack0 + TunnelID: 0x0 Flags: D + +Destination: 192.168.1.0/24 + Protocol: Direct Process ID: 0 + Preference: 0 Cost: 0 + NextHop: 192.168.1.1 Neighbour: 0.0.0.0 + State: Active Adv Age: 1d01h58m54s + Tag: 0 Priority: high + Label: NULL QoSInfo: 0x0 + IndirectID: 0x0 + RelayNextHop: 0.0.0.0 Interface: Vlanif1 + TunnelID: 0x0 Flags: D + +Destination: 192.168.1.1/32 + Protocol: Direct Process ID: 0 + Preference: 0 Cost: 0 + NextHop: 127.0.0.1 Neighbour: 0.0.0.0 + State: Active NoAdv Age: 1d01h58m55s + Tag: 0 Priority: high + Label: NULL QoSInfo: 0x0 + IndirectID: 0x0 + RelayNextHop: 0.0.0.0 Interface: Vlanif1 + TunnelID: 0x0 Flags: D + +Destination: 192.168.1.255/32 + Protocol: Direct Process ID: 0 + Preference: 0 Cost: 0 + NextHop: 127.0.0.1 Neighbour: 0.0.0.0 + State: Active NoAdv Age: 1d01h58m55s + Tag: 0 Priority: high + Label: NULL QoSInfo: 0x0 + IndirectID: 0x0 + RelayNextHop: 0.0.0.0 Interface: Vlanif1 + TunnelID: 0x0 Flags: D + +Destination: 192.214.198.156/32 + Protocol: Direct Process ID: 0 + Preference: 0 Cost: 0 + NextHop: 127.0.0.1 Neighbour: 0.0.0.0 + State: Active Adv Age: 1d01h58m13s + Tag: 0 Priority: high + Label: NULL QoSInfo: 0x0 + IndirectID: 0x0 + RelayNextHop: 0.0.0.0 Interface: Dialer1 + TunnelID: 0x0 Flags: D + +Destination: 255.255.255.255/32 + Protocol: Direct Process ID: 0 + Preference: 0 Cost: 0 + NextHop: 127.0.0.1 Neighbour: 0.0.0.0 + State: Active NoAdv Age: 1d01h59m27s + Tag: 0 Priority: high + Label: NULL QoSInfo: 0x0 + IndirectID: 0x0 + RelayNextHop: 0.0.0.0 Interface: InLoopBack0 + TunnelID: 0x0 Flags: D diff --git a/tests/huawei_vrp/display_ip_routing-table_verbose/huawei_vrp_display_ip_routing-table_verbose_ipv4.yml b/tests/huawei_vrp/display_ip_routing-table_verbose/huawei_vrp_display_ip_routing-table_verbose_ipv4.yml new file mode 100644 index 0000000000..12ce31cadc --- /dev/null +++ b/tests/huawei_vrp/display_ip_routing-table_verbose/huawei_vrp_display_ip_routing-table_verbose_ipv4.yml @@ -0,0 +1,310 @@ +--- +parsed_sample: + - destination: "0.0.0.0/0" + prefix_length: "" + protocol: "Static" + process_id: "0" + label: "NULL" + qos_info: "0x0" + neighbour: "0.0.0.0" + next_hop: "192.214.198.156" + preference: "60" + state: "Active Adv" + cost: "0" + age: "1d01h58m07s" + tag: "0" + priority: "medium" + indirect_id: "0x0" + relay_next_hop: "0.0.0.0" + interface: "Dialer1" + tunnel_id: "0x0" + flags: "D" + entry_id: "" + entry_flags: "" + reference_cnt: "" + - destination: "0.0.0.0/0" + prefix_length: "" + protocol: "EBGP" + process_id: "0" + label: "NULL" + qos_info: "0x0" + neighbour: "23.90.232.243" + next_hop: "23.90.232.243" + preference: "255" + state: "Inactive Adv" + cost: "0" + age: "1d01h57m50s" + tag: "0" + priority: "low" + indirect_id: "0x1" + relay_next_hop: "0.0.0.0" + interface: "Dialer1" + tunnel_id: "0x0" + flags: "" + entry_id: "" + entry_flags: "" + reference_cnt: "" + - destination: "23.90.232.243/32" + prefix_length: "" + protocol: "Direct" + process_id: "0" + label: "NULL" + qos_info: "0x0" + neighbour: "0.0.0.0" + next_hop: "23.90.232.243" + preference: "0" + state: "Active Adv" + cost: "0" + age: "1d01h58m07s" + tag: "0" + priority: "high" + indirect_id: "0x0" + relay_next_hop: "0.0.0.0" + interface: "Dialer1" + tunnel_id: "0x0" + flags: "D" + entry_id: "" + entry_flags: "" + reference_cnt: "" + - destination: "100.95.15.240/30" + prefix_length: "" + protocol: "Direct" + process_id: "0" + label: "NULL" + qos_info: "0x0" + neighbour: "0.0.0.0" + next_hop: "100.95.15.241" + preference: "0" + state: "Active Adv" + cost: "0" + age: "1d01h58m15s" + tag: "0" + priority: "high" + indirect_id: "0x0" + relay_next_hop: "0.0.0.0" + interface: "Vlanif100" + tunnel_id: "0x0" + flags: "D" + entry_id: "" + entry_flags: "" + reference_cnt: "" + - destination: "100.95.15.241/32" + prefix_length: "" + protocol: "Direct" + process_id: "0" + label: "NULL" + qos_info: "0x0" + neighbour: "0.0.0.0" + next_hop: "127.0.0.1" + preference: "0" + state: "Active NoAdv" + cost: "0" + age: "1d01h58m15s" + tag: "0" + priority: "high" + indirect_id: "0x0" + relay_next_hop: "0.0.0.0" + interface: "Vlanif100" + tunnel_id: "0x0" + flags: "D" + entry_id: "" + entry_flags: "" + reference_cnt: "" + - destination: "100.95.15.243/32" + prefix_length: "" + protocol: "Direct" + process_id: "0" + label: "NULL" + qos_info: "0x0" + neighbour: "0.0.0.0" + next_hop: "127.0.0.1" + preference: "0" + state: "Active NoAdv" + cost: "0" + age: "1d01h58m19s" + tag: "0" + priority: "high" + indirect_id: "0x0" + relay_next_hop: "0.0.0.0" + interface: "Vlanif100" + tunnel_id: "0x0" + flags: "D" + entry_id: "" + entry_flags: "" + reference_cnt: "" + - destination: "127.0.0.0/8" + prefix_length: "" + protocol: "Direct" + process_id: "0" + label: "NULL" + qos_info: "0x0" + neighbour: "0.0.0.0" + next_hop: "127.0.0.1" + preference: "0" + state: "Active NoAdv" + cost: "0" + age: "1d01h59m26s" + tag: "0" + priority: "high" + indirect_id: "0x0" + relay_next_hop: "0.0.0.0" + interface: "InLoopBack0" + tunnel_id: "0x0" + flags: "D" + entry_id: "" + entry_flags: "" + reference_cnt: "" + - destination: "127.0.0.1/32" + prefix_length: "" + protocol: "Direct" + process_id: "0" + label: "NULL" + qos_info: "0x0" + neighbour: "0.0.0.0" + next_hop: "127.0.0.1" + preference: "0" + state: "Active NoAdv" + cost: "0" + age: "1d01h59m26s" + tag: "0" + priority: "high" + indirect_id: "0x0" + relay_next_hop: "0.0.0.0" + interface: "InLoopBack0" + tunnel_id: "0x0" + flags: "D" + entry_id: "" + entry_flags: "" + reference_cnt: "" + - destination: "127.255.255.255/32" + prefix_length: "" + protocol: "Direct" + process_id: "0" + label: "NULL" + qos_info: "0x0" + neighbour: "0.0.0.0" + next_hop: "127.0.0.1" + preference: "0" + state: "Active NoAdv" + cost: "0" + age: "1d01h59m26s" + tag: "0" + priority: "high" + indirect_id: "0x0" + relay_next_hop: "0.0.0.0" + interface: "InLoopBack0" + tunnel_id: "0x0" + flags: "D" + entry_id: "" + entry_flags: "" + reference_cnt: "" + - destination: "192.168.1.0/24" + prefix_length: "" + protocol: "Direct" + process_id: "0" + label: "NULL" + qos_info: "0x0" + neighbour: "0.0.0.0" + next_hop: "192.168.1.1" + preference: "0" + state: "Active Adv" + cost: "0" + age: "1d01h58m54s" + tag: "0" + priority: "high" + indirect_id: "0x0" + relay_next_hop: "0.0.0.0" + interface: "Vlanif1" + tunnel_id: "0x0" + flags: "D" + entry_id: "" + entry_flags: "" + reference_cnt: "" + - destination: "192.168.1.1/32" + prefix_length: "" + protocol: "Direct" + process_id: "0" + label: "NULL" + qos_info: "0x0" + neighbour: "0.0.0.0" + next_hop: "127.0.0.1" + preference: "0" + state: "Active NoAdv" + cost: "0" + age: "1d01h58m55s" + tag: "0" + priority: "high" + indirect_id: "0x0" + relay_next_hop: "0.0.0.0" + interface: "Vlanif1" + tunnel_id: "0x0" + flags: "D" + entry_id: "" + entry_flags: "" + reference_cnt: "" + - destination: "192.168.1.255/32" + prefix_length: "" + protocol: "Direct" + process_id: "0" + label: "NULL" + qos_info: "0x0" + neighbour: "0.0.0.0" + next_hop: "127.0.0.1" + preference: "0" + state: "Active NoAdv" + cost: "0" + age: "1d01h58m55s" + tag: "0" + priority: "high" + indirect_id: "0x0" + relay_next_hop: "0.0.0.0" + interface: "Vlanif1" + tunnel_id: "0x0" + flags: "D" + entry_id: "" + entry_flags: "" + reference_cnt: "" + - destination: "192.214.198.156/32" + prefix_length: "" + protocol: "Direct" + process_id: "0" + label: "NULL" + qos_info: "0x0" + neighbour: "0.0.0.0" + next_hop: "127.0.0.1" + preference: "0" + state: "Active Adv" + cost: "0" + age: "1d01h58m13s" + tag: "0" + priority: "high" + indirect_id: "0x0" + relay_next_hop: "0.0.0.0" + interface: "Dialer1" + tunnel_id: "0x0" + flags: "D" + entry_id: "" + entry_flags: "" + reference_cnt: "" + - destination: "255.255.255.255/32" + prefix_length: "" + protocol: "Direct" + process_id: "0" + label: "NULL" + qos_info: "0x0" + neighbour: "0.0.0.0" + next_hop: "127.0.0.1" + preference: "0" + state: "Active NoAdv" + cost: "0" + age: "1d01h59m27s" + tag: "0" + priority: "high" + indirect_id: "0x0" + relay_next_hop: "0.0.0.0" + interface: "InLoopBack0" + tunnel_id: "0x0" + flags: "D" + entry_id: "" + entry_flags: "" + reference_cnt: "" diff --git a/tests/huawei_vrp/display_ip_routing-table_verbose/huawei_vrp_display_ip_routing-table_verbose_ipv6.raw b/tests/huawei_vrp/display_ip_routing-table_verbose/huawei_vrp_display_ip_routing-table_verbose_ipv6.raw new file mode 100644 index 0000000000..d57f6e8275 --- /dev/null +++ b/tests/huawei_vrp/display_ip_routing-table_verbose/huawei_vrp_display_ip_routing-table_verbose_ipv6.raw @@ -0,0 +1,14 @@ +Routing Table : Public + Destinations : 1 Routes : 1 + + Destination : ::1 PrefixLength : 128 + NextHop : ::1 Preference : 0 + Neighbour : :: ProcessID : 0 + Label : NULL Protocol : Direct + State : Active NoAdv Cost : 0 + Entry ID : 2826122436 EntryFlags : 0x80010050 + Reference Cnt: 2 Tag : 0 + Priority : high Age : 93545sec + IndirectID : 0x0 + RelayNextHop : :: TunnelID : 0x0 + Interface : InLoopBack0 Flags : D diff --git a/tests/huawei_vrp/display_ip_routing-table_verbose/huawei_vrp_display_ip_routing-table_verbose_ipv6.yml b/tests/huawei_vrp/display_ip_routing-table_verbose/huawei_vrp_display_ip_routing-table_verbose_ipv6.yml new file mode 100644 index 0000000000..48da09d740 --- /dev/null +++ b/tests/huawei_vrp/display_ip_routing-table_verbose/huawei_vrp_display_ip_routing-table_verbose_ipv6.yml @@ -0,0 +1,24 @@ +--- +parsed_sample: + - destination: "::1" + prefix_length: "128" + protocol: "Direct" + process_id: "0" + label: "NULL" + qos_info: "" + neighbour: "::" + next_hop: "::1" + preference: "0" + state: "Active NoAdv" + cost: "0" + age: "93545sec" + tag: "0" + priority: "high" + indirect_id: "0x0" + relay_next_hop: "::" + interface: "InLoopBack0" + tunnel_id: "0x0" + flags: "D" + entry_id: "2826122436" + entry_flags: "0x80010050" + reference_cnt: "2"