diff --git a/ntc_templates/templates/hp_procurve_show_interfaces_status.textfsm b/ntc_templates/templates/hp_procurve_show_interfaces_status.textfsm new file mode 100644 index 0000000000..7c79b04906 --- /dev/null +++ b/ntc_templates/templates/hp_procurve_show_interfaces_status.textfsm @@ -0,0 +1,19 @@ +Value PORT ([a-zA-Z0-9\-/.]+) +Value NAME ([^\s].+?)(?=\s+(Up|Down)) +Value STATUS (\S+) +Value CONFIG_MODE (\S+) +Value SPEED (\S+) +Value TYPE (\S+) +Value VLAN_TAGGED (\S+) +Value VLAN_UNTAGGED (\S+) + +Start + ^\s*Port\s+Name\s+Status\s+Config-mode\s+Speed\s+Type\s+Tagged\s+Untagged\s*$$ + ^\s+${PORT}\s+${NAME}\s+${STATUS}\s+${CONFIG_MODE}\s+${SPEED}\s+${TYPE}\s+${VLAN_TAGGED}\s+${VLAN_UNTAGGED}\s*$$ -> Record + ^\s+${PORT}\s+${NAME}\s+${STATUS}\s+${VLAN_TAGGED}\s+${VLAN_UNTAGGED}\s*$$ -> Record + ^\s+${PORT}\s+${STATUS}\s+${CONFIG_MODE}\s+${SPEED}\s+${TYPE}\s+${VLAN_TAGGED}\s+${VLAN_UNTAGGED}\s*$$ -> Record + ^\s+${PORT}\s+${STATUS}\s+${CONFIG_MODE}\s+${VLAN_TAGGED}\s+${VLAN_UNTAGGED}\s*$$ -> Record + ^\s+${PORT}\s+${STATUS}\s+${VLAN_TAGGED}\s+${VLAN_UNTAGGED}\s*$$ -> Record + ^\s*---+ + ^\s*$$ + ^. -> Error diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 8d4ecac01b..c141b86250 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -691,6 +691,7 @@ hp_comware_display_arp.textfsm, .*, hp_comware, di[[splay]] a[[rp]] hp_procurve_show_lldp_info_remote-device_detail.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] ll[[dp]] i[[nfo]] r[[emote-device]] .+ hp_procurve_show_lldp_info_remote-device.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] ll[[dp]] i[[nfo]] r[[emote-device]] hp_procurve_show_cdp_neighbors_detail.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] cd[[p]] nei[[ghbors]] d[[etail]] +hp_procurve_show_interfaces_status.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] int[[erfaces]] st[[atus]] hp_procurve_show_interfaces_brief.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] int[[erfaces]] b[[rief]] hp_procurve_show_port-security.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] port-s[[ecurity]] hp_procurve_show_tech_buffers.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] tec[[h]] buf[[ffers]] diff --git a/tests/hp_procurve/show_interfaces_status/show_interfaces_status.raw b/tests/hp_procurve/show_interfaces_status/show_interfaces_status.raw new file mode 100644 index 0000000000..785d72a1ab --- /dev/null +++ b/tests/hp_procurve/show_interfaces_status/show_interfaces_status.raw @@ -0,0 +1,16 @@ + Port Name Status Config-mode Speed Type Tagged Untagged + -------- ---------- ------- ------------- -------- ---------- ------ -------- + A1 Down Auto 1000FDx 100/1000T No 140 + A6 Down Auto 1000FDx 100/1000T 704 No + A7 Up Auto 100FDx 100/1000T No 140 + A8 SW-01-0... Up Auto 1000FDx 100/1000T No 2 + A9 Srv-001... Up Auto 1000FDx 100/1000T multi 60 + A17 AIR-AP1200 Up Auto 100FDx 100/1000T multi 140 + A21 Down multi No + A22 Down No 5 + A24-Trk1 Srv-003... Up Auto 10GigFD 10GbE-GEN multi No + B1 Switch-001 Up Auto 1000FDx 100/1000T No 2 + B8 Srv-002... Up Auto 1000FDx 100/1000T multi No + B21 Down No 5 + B24-Trk1 Srv-004... Up Auto 10GigFD 10GbE-GEN multi No + F22 Down Auto 1000FDx 100/1000T No 11 diff --git a/tests/hp_procurve/show_interfaces_status/show_interfaces_status.yml b/tests/hp_procurve/show_interfaces_status/show_interfaces_status.yml new file mode 100644 index 0000000000..b5bfda6e52 --- /dev/null +++ b/tests/hp_procurve/show_interfaces_status/show_interfaces_status.yml @@ -0,0 +1,114 @@ +--- +parsed_sample: + - config_mode: "Auto" + name: "" + port: "A1" + speed: "1000FDx" + status: "Down" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "140" + - config_mode: "Auto" + name: "" + port: "A6" + speed: "1000FDx" + status: "Down" + type: "100/1000T" + vlan_tagged: "704" + vlan_untagged: "No" + - config_mode: "Auto" + name: "" + port: "A7" + speed: "100FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "140" + - config_mode: "Auto" + name: "SW-01-0..." + port: "A8" + speed: "1000FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "2" + - config_mode: "Auto" + name: "Srv-001..." + port: "A9" + speed: "1000FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "multi" + vlan_untagged: "60" + - config_mode: "Auto" + name: "AIR-AP1200" + port: "A17" + speed: "100FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "multi" + vlan_untagged: "140" + - config_mode: "" + name: "" + port: "A21" + speed: "" + status: "Down" + type: "" + vlan_tagged: "multi" + vlan_untagged: "No" + - config_mode: "" + name: "" + port: "A22" + speed: "" + status: "Down" + type: "" + vlan_tagged: "No" + vlan_untagged: "5" + - config_mode: "Auto" + name: "Srv-003..." + port: "A24-Trk1" + speed: "10GigFD" + status: "Up" + type: "10GbE-GEN" + vlan_tagged: "multi" + vlan_untagged: "No" + - config_mode: "Auto" + name: "Switch-001" + port: "B1" + speed: "1000FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "2" + - config_mode: "Auto" + name: "Srv-002..." + port: "B8" + speed: "1000FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "multi" + vlan_untagged: "No" + - config_mode: "" + name: "" + port: "B21" + speed: "" + status: "Down" + type: "" + vlan_tagged: "No" + vlan_untagged: "5" + - config_mode: "Auto" + name: "Srv-004..." + port: "B24-Trk1" + speed: "10GigFD" + status: "Up" + type: "10GbE-GEN" + vlan_tagged: "multi" + vlan_untagged: "No" + - config_mode: "Auto" + name: "" + port: "F22" + speed: "1000FDx" + status: "Down" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "11" diff --git a/tests/hp_procurve/show_interfaces_status/show_interfaces_status2.raw b/tests/hp_procurve/show_interfaces_status/show_interfaces_status2.raw new file mode 100644 index 0000000000..8aa097e67c --- /dev/null +++ b/tests/hp_procurve/show_interfaces_status/show_interfaces_status2.raw @@ -0,0 +1,10 @@ + Port Name Status Config-mode Speed Type Tagged Untagged + -------- ---------- ------- ------------- -------- ---------- ------ -------- + 1/1 Up Auto 1000FDx 100/1000T No 141 + 1/26 Up Auto 1000FDx 1000SX No No + 1/27 Down No 1 + 1/28-... Srv-001... Up Auto 10GigFD 10GbE-GEN multi No + 2/6 Up Auto 100FDx 100/1000T No 141 + 2/28 Down No 1 + 3/6 Down Auto 1000FDx 100/1000T No 141 + 3/28-... Srv-002... Up Auto 10GigFD 10GbE-GEN multi No diff --git a/tests/hp_procurve/show_interfaces_status/show_interfaces_status2.yml b/tests/hp_procurve/show_interfaces_status/show_interfaces_status2.yml new file mode 100644 index 0000000000..a2d350a007 --- /dev/null +++ b/tests/hp_procurve/show_interfaces_status/show_interfaces_status2.yml @@ -0,0 +1,66 @@ +--- +parsed_sample: + - config_mode: "Auto" + name: "" + port: "1/1" + speed: "1000FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "141" + - config_mode: "Auto" + name: "" + port: "1/26" + speed: "1000FDx" + status: "Up" + type: "1000SX" + vlan_tagged: "No" + vlan_untagged: "No" + - config_mode: "" + name: "" + port: "1/27" + speed: "" + status: "Down" + type: "" + vlan_tagged: "No" + vlan_untagged: "1" + - config_mode: "Auto" + name: "Srv-001..." + port: "1/28-..." + speed: "10GigFD" + status: "Up" + type: "10GbE-GEN" + vlan_tagged: "multi" + vlan_untagged: "No" + - config_mode: "Auto" + name: "" + port: "2/6" + speed: "100FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "141" + - config_mode: "" + name: "" + port: "2/28" + speed: "" + status: "Down" + type: "" + vlan_tagged: "No" + vlan_untagged: "1" + - config_mode: "Auto" + name: "" + port: "3/6" + speed: "1000FDx" + status: "Down" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "141" + - config_mode: "Auto" + name: "Srv-002..." + port: "3/28-..." + speed: "10GigFD" + status: "Up" + type: "10GbE-GEN" + vlan_tagged: "multi" + vlan_untagged: "No" diff --git a/tests/hp_procurve/show_interfaces_status/show_interfaces_status3.raw b/tests/hp_procurve/show_interfaces_status/show_interfaces_status3.raw new file mode 100644 index 0000000000..51d8e3b482 --- /dev/null +++ b/tests/hp_procurve/show_interfaces_status/show_interfaces_status3.raw @@ -0,0 +1,19 @@ + Port Name Status Config-mode Speed Type Tagged Untagged + -------- ---------- ------- ------------- -------- ---------- ------ -------- + 1/1 SW-05-0... Up Auto 1000FDx 100/1000T multi 60 + 1/2 SW-05-0... Up Auto 1000FDx 100/1000T multi 60 + 1/10 AP-01-0... Up Auto 1000FDx 100/1000T No 2 + 1/16 aa:bb:c... Up Auto 1000FDx 100/1000T No 2 + 1/20 Down Auto 1000FDx 100/1000T No 2 + 1/25 AP-02-0... Up Auto 100FDx 100/1000T No 2 + 1/27 Up Auto 1000FDx 100/1000T No 2 + 1/49 Up Auto 10GigFD 10GbE-GEN No No + 1/50 Up Auto 10GigFD 10GbE-GEN No No + 1/51-... SW-07-0... Up Auto 10GigFD 10GbE-GEN multi 1 + 1/52 Link to... Down No 1 + 2/4 SW-05-0... Up 100FDx 100FDx 100/1000T multi 60 + 2/14 Link to... Up Auto 10HDx 100/1000T No 10 + 2/15 Down Auto 1000FDx 100/1000T No 2 + 2/27 Up Auto 1000FDx 100/1000T No 10 + 2/49 Up Auto 10GigFD 10GbE-GEN No No + 2/52 Down No 1 diff --git a/tests/hp_procurve/show_interfaces_status/show_interfaces_status3.yml b/tests/hp_procurve/show_interfaces_status/show_interfaces_status3.yml new file mode 100644 index 0000000000..6abb9ff937 --- /dev/null +++ b/tests/hp_procurve/show_interfaces_status/show_interfaces_status3.yml @@ -0,0 +1,138 @@ +--- +parsed_sample: + - config_mode: "Auto" + name: "SW-05-0..." + port: "1/1" + speed: "1000FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "multi" + vlan_untagged: "60" + - config_mode: "Auto" + name: "SW-05-0..." + port: "1/2" + speed: "1000FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "multi" + vlan_untagged: "60" + - config_mode: "Auto" + name: "AP-01-0..." + port: "1/10" + speed: "1000FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "2" + - config_mode: "Auto" + name: "aa:bb:c..." + port: "1/16" + speed: "1000FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "2" + - config_mode: "Auto" + name: "" + port: "1/20" + speed: "1000FDx" + status: "Down" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "2" + - config_mode: "Auto" + name: "AP-02-0..." + port: "1/25" + speed: "100FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "2" + - config_mode: "Auto" + name: "" + port: "1/27" + speed: "1000FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "2" + - config_mode: "Auto" + name: "" + port: "1/49" + speed: "10GigFD" + status: "Up" + type: "10GbE-GEN" + vlan_tagged: "No" + vlan_untagged: "No" + - config_mode: "Auto" + name: "" + port: "1/50" + speed: "10GigFD" + status: "Up" + type: "10GbE-GEN" + vlan_tagged: "No" + vlan_untagged: "No" + - config_mode: "Auto" + name: "SW-07-0..." + port: "1/51-..." + speed: "10GigFD" + status: "Up" + type: "10GbE-GEN" + vlan_tagged: "multi" + vlan_untagged: "1" + - config_mode: "" + name: "Link to..." + port: "1/52" + speed: "" + status: "Down" + type: "" + vlan_tagged: "No" + vlan_untagged: "1" + - config_mode: "100FDx" + name: "SW-05-0..." + port: "2/4" + speed: "100FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "multi" + vlan_untagged: "60" + - config_mode: "Auto" + name: "Link to..." + port: "2/14" + speed: "10HDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "10" + - config_mode: "Auto" + name: "" + port: "2/15" + speed: "1000FDx" + status: "Down" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "2" + - config_mode: "Auto" + name: "" + port: "2/27" + speed: "1000FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "10" + - config_mode: "Auto" + name: "" + port: "2/49" + speed: "10GigFD" + status: "Up" + type: "10GbE-GEN" + vlan_tagged: "No" + vlan_untagged: "No" + - config_mode: "" + name: "" + port: "2/52" + speed: "" + status: "Down" + type: "" + vlan_tagged: "No" + vlan_untagged: "1" diff --git a/tests/hp_procurve/show_interfaces_status/show_interfaces_status4.raw b/tests/hp_procurve/show_interfaces_status/show_interfaces_status4.raw new file mode 100644 index 0000000000..b179174a6d --- /dev/null +++ b/tests/hp_procurve/show_interfaces_status/show_interfaces_status4.raw @@ -0,0 +1,17 @@ + Port Name Status Config-mode Speed Type Tagged Untagged + -------- ---------- ------- ------------- -------- ---------- ------ -------- + A1 Up Auto 1000FDx 100/1000T No 10 + A3 Down Auto 1000FDx 100/1000T No 4010 + A5 Up Auto 10FDx 100/1000T No 10 + A9 AP-001 Up Auto 1000FDx 100/1000T No 2 + A10 AP-002-... Up Auto 1000FDx 100/1000T No 2 + A17 Down Auto 1000FDx 100/1000T No 4010 + A21 Down No 1 + A24-Trk1 SW-09-0... Up Auto 10GigFD 10GbE-GEN multi No + C1 AP-003 Up 100FDx 100FDx 100/1000T No 2 + C20 AP-004-... Down Auto 1000FDx 100/1000T No 4010 + D1 Down Auto No 10 + D2 Down Auto No 10 + D5 Down Auto No 10 + D17 Down Auto No 10 + D24 Down Auto No 10 diff --git a/tests/hp_procurve/show_interfaces_status/show_interfaces_status4.yml b/tests/hp_procurve/show_interfaces_status/show_interfaces_status4.yml new file mode 100644 index 0000000000..8dea9074fa --- /dev/null +++ b/tests/hp_procurve/show_interfaces_status/show_interfaces_status4.yml @@ -0,0 +1,122 @@ +--- +parsed_sample: + - config_mode: "Auto" + name: "" + port: "A1" + speed: "1000FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "10" + - config_mode: "Auto" + name: "" + port: "A3" + speed: "1000FDx" + status: "Down" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "4010" + - config_mode: "Auto" + name: "" + port: "A5" + speed: "10FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "10" + - config_mode: "Auto" + name: "AP-001" + port: "A9" + speed: "1000FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "2" + - config_mode: "Auto" + name: "AP-002-..." + port: "A10" + speed: "1000FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "2" + - config_mode: "Auto" + name: "" + port: "A17" + speed: "1000FDx" + status: "Down" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "4010" + - config_mode: "" + name: "" + port: "A21" + speed: "" + status: "Down" + type: "" + vlan_tagged: "No" + vlan_untagged: "1" + - config_mode: "Auto" + name: "SW-09-0..." + port: "A24-Trk1" + speed: "10GigFD" + status: "Up" + type: "10GbE-GEN" + vlan_tagged: "multi" + vlan_untagged: "No" + - config_mode: "100FDx" + name: "AP-003" + port: "C1" + speed: "100FDx" + status: "Up" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "2" + - config_mode: "Auto" + name: "AP-004-..." + port: "C20" + speed: "1000FDx" + status: "Down" + type: "100/1000T" + vlan_tagged: "No" + vlan_untagged: "4010" + - config_mode: "Auto" + name: "" + port: "D1" + speed: "" + status: "Down" + type: "" + vlan_tagged: "No" + vlan_untagged: "10" + - config_mode: "Auto" + name: "" + port: "D2" + speed: "" + status: "Down" + type: "" + vlan_tagged: "No" + vlan_untagged: "10" + - config_mode: "Auto" + name: "" + port: "D5" + speed: "" + status: "Down" + type: "" + vlan_tagged: "No" + vlan_untagged: "10" + - config_mode: "Auto" + name: "" + port: "D17" + speed: "" + status: "Down" + type: "" + vlan_tagged: "No" + vlan_untagged: "10" + - config_mode: "Auto" + name: "" + port: "D24" + speed: "" + status: "Down" + type: "" + vlan_tagged: "No" + vlan_untagged: "10"