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

Fix hp_comware_display_vlan_all with production outputs #1339

Merged
merged 1 commit into from
Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions ntc_templates/templates/hp_comware_display_vlan_all.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ Value IPV4_SUBNET (\S+)
Start
^\s*VLAN\s+ID\s*: -> Continue.Record
^\s*VLAN\s+ID\s*:\s*${VLAN_ID}
^\s*VLAN\s+type\s*:\s*${TYPE}
^\s*Route\s+interface\s*:\s*${ROUTE_INTERFACE}
^\s*IPv4\s+address\s*:\s*${IPV4_ADDRESS}
^\s*IPv4\s+subnet\s+mask\s*:\s*${IPV4_SUBNET}
^\s*VLAN\s+[Tt]ype\s*:\s*${TYPE}
^\s*Route\s+[Ii]nterface\s*:\s*${ROUTE_INTERFACE}
^\s*IPv4\s+[Aa]ddress\s*:\s*${IPV4_ADDRESS}
^\s*IPv4\s+[Ss]ubnet\s+mask\s*:\s*${IPV4_SUBNET}
^\s*Description\s*:\s*${DESCRIPTION}
^\s*Name\s*:\s*${NAME}
^\s*Tagged\sports
^\s*Untagged\sports
^\s*Tagged\s+[Pp]orts
^\s*Untagged\s+[Pp]orts
^\s{3,}\S+\s*$$
^\s{3,}\S+\s+\S+\s*$$
^\s{3,}\S+\s+\S+\s+\S+\s*$$
^. -> Error
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
VLAN ID: 1
VLAN Type: static
Route Interface: not configured
Description: VLAN 0001
Name: VLAN 0001
Tagged Ports: none
Untagged Ports:
Bridge-Aggregation1
GigabitEthernet1/0/25 GigabitEthernet1/0/26 GigabitEthernet1/0/27
GigabitEthernet1/0/28

VLAN ID: 1002
VLAN Type: static
Route Interface: not configured
Description: VLAN 1002
Name: VLAN 1002
Tagged Ports:
Bridge-Aggregation1
Ten-GigabitEthernet1/0/29
Ten-GigabitEthernet1/0/30
Untagged Ports:
GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/3
GigabitEthernet1/0/4 GigabitEthernet1/0/5 GigabitEthernet1/0/6
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
parsed_sample:
- vlan_id: "1"
name: "VLAN 0001"
description: "VLAN 0001"
type: "static"
route_interface: "not configured"
ipv4_address: ""
ipv4_subnet: ""
- vlan_id: "1002"
name: "VLAN 1002"
description: "VLAN 1002"
type: "static"
route_interface: "not configured"
ipv4_address: ""
ipv4_subnet: ""