Skip to content

Commit

Permalink
Adding support for avaya_ers_show_mlt command (#268)
Browse files Browse the repository at this point in the history
* Adding support for avaya_ers_show_mlt command

* Updated index

* Update Avaya ERS show_mlt template

* Update template variable names to be more generic and use '_'
  • Loading branch information
jmcgill298 authored Oct 14, 2018
1 parent 9621dc7 commit 6b89d93
Show file tree
Hide file tree
Showing 14 changed files with 3,095 additions and 0 deletions.
28 changes: 28 additions & 0 deletions templates/avaya_ers_show_mlt.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Value Required ID (\d+)
Value NAME (.*?)
Value ACTIVE_MEMBERS (\S+?)
Value INACTIVE_MEMBERS (\S+?)
Value BPDU (\S+?)
Value MODE (\S+?)
Value STATUS (Enabled|Disabled)
Value TYPE (Access|Trunk|)
Value LACP_KEY (\S+|)

Start
^${ID}\s+${NAME}\s+${ACTIVE_MEMBERS}\s+${BPDU}\s+${MODE}\s+${STATUS}\s*${TYPE}\s*${LACP_KEY}\s*$$ -> Record
^Id:\s+\d+\s*$$ -> Continue.Record
^Id:\s*${ID}\s*$$
^\s+Name:${NAME}\s*$$
^\s+Active Members:\s${ACTIVE_MEMBERS}\s*$$
^\s+Inactive Members:\s${INACTIVE_MEMBERS}\s*$$
^\s+Bpdu:\s${BPDU}\s*$$
^\s+Mode:\s${MODE}\s*$$
^\s+Status:\s${STATUS}\s*$$
^\s+Type:\s${TYPE}\s*$$
^\s+LACP key:\s${LACP_KEY}\s*$$
^\s+LACP$$
^Id\s+Name\s+Members\s+Bpdu\s+Mode\s+Status\s+Type(\s+Key|)\s*$$
^-+\s+-+\s+-+\s+-+\s+-+\s+-+\s+-+(\s+-+|)\s*$$
^MODE\s+Legend:\s*$$
^B=Basic,\s+A=Advance,\s+Man=ManLag,\s+Dyn=DynLag\s*$$
^.*$$ -> Error
1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ avaya_ers_show_mac-address-table.template, .*, avaya_ers, sh[[ow]] mac-a[[ddress
avaya_ers_show_interface_name.template, .*, avaya_ers, sh[[ow]] in[[terfaces]] n[[ames]]
avaya_ers_show_sys-info.template, .*, avaya_ers, sh[[ow]] sys-[[info]]
avaya_ers_show_vlan.template, .*, avaya_ers, sh[[ow]] vlan
avaya_ers_show_mlt.template, .*, avaya_ers, sh[[ow]] ml[[t]]

avaya_vsp_show_software.template, .*, avaya_vsp, sho[[w]] so[[ftware]]

Expand Down
290 changes: 290 additions & 0 deletions tests/avaya_ers/show_mlt/avaya_ers_show_mlt1.parsed
Original file line number Diff line number Diff line change
@@ -0,0 +1,290 @@
---
parsed_sample:
- id: "1"
name: "UPLINK"
active_members: "49-50"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "2"
name: "Trunk #2"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "3"
name: "Trunk #3"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "4"
name: "Trunk #4"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "5"
name: "Trunk #5"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "6"
name: "Trunk #6"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "7"
name: "Trunk #7"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "8"
name: "Trunk #8"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "9"
name: "Trunk #9"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "10"
name: "Trunk #10"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "11"
name: "Trunk #11"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "12"
name: "Trunk #12"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "13"
name: "Trunk #13"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "14"
name: "Trunk #14"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "15"
name: "Trunk #15"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "16"
name: "Trunk #16"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "17"
name: "Trunk #17"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "18"
name: "Trunk #18"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "19"
name: "Trunk #19"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "20"
name: "Trunk #20"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "21"
name: "Trunk #21"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "22"
name: "Trunk #22"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "23"
name: "Trunk #23"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "24"
name: "Trunk #24"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "25"
name: "Trunk #25"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "26"
name: "Trunk #26"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "27"
name: "Trunk #27"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "28"
name: "Trunk #28"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "29"
name: "Trunk #29"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "30"
name: "Trunk #30"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "31"
name: "Trunk #31"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
- id: "32"
name: "Trunk #32"
active_members: "NONE"
inactive_members: ""
bpdu: "All"
mode: "B"
status: "Disabled"
type: ""
lacp_key: "NONE"
37 changes: 37 additions & 0 deletions tests/avaya_ers/show_mlt/avaya_ers_show_mlt1.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
LACP
Id Name Members Bpdu Mode Status Type Key
-- ---------------- ---------------------- ------ ----- -------- ------ ----
1 UPLINK 49-50 All B Disabled NONE
2 Trunk #2 NONE All B Disabled NONE
3 Trunk #3 NONE All B Disabled NONE
4 Trunk #4 NONE All B Disabled NONE
5 Trunk #5 NONE All B Disabled NONE
6 Trunk #6 NONE All B Disabled NONE
7 Trunk #7 NONE All B Disabled NONE
8 Trunk #8 NONE All B Disabled NONE
9 Trunk #9 NONE All B Disabled NONE
10 Trunk #10 NONE All B Disabled NONE
11 Trunk #11 NONE All B Disabled NONE
12 Trunk #12 NONE All B Disabled NONE
13 Trunk #13 NONE All B Disabled NONE
14 Trunk #14 NONE All B Disabled NONE
15 Trunk #15 NONE All B Disabled NONE
16 Trunk #16 NONE All B Disabled NONE
17 Trunk #17 NONE All B Disabled NONE
18 Trunk #18 NONE All B Disabled NONE
19 Trunk #19 NONE All B Disabled NONE
20 Trunk #20 NONE All B Disabled NONE
21 Trunk #21 NONE All B Disabled NONE
22 Trunk #22 NONE All B Disabled NONE
23 Trunk #23 NONE All B Disabled NONE
24 Trunk #24 NONE All B Disabled NONE
25 Trunk #25 NONE All B Disabled NONE
26 Trunk #26 NONE All B Disabled NONE
27 Trunk #27 NONE All B Disabled NONE
28 Trunk #28 NONE All B Disabled NONE
29 Trunk #29 NONE All B Disabled NONE
30 Trunk #30 NONE All B Disabled NONE
31 Trunk #31 NONE All B Disabled NONE
32 Trunk #32 NONE All B Disabled NONE
MODE Legend:
B=Basic, A=Advance, Man=ManLag, Dyn=DynLag
Loading

0 comments on commit 6b89d93

Please sign in to comment.