Skip to content

Commit

Permalink
Merge pull request #47 from jefvantongerloo/aos8_show_vlan_members
Browse files Browse the repository at this point in the history
Aos8 show vlan members
  • Loading branch information
jefvantongerloo authored May 10, 2022
2 parents 88e37e5 + 1989ac3 commit d14dff7
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [0.4.0] - Unreleased

### Added CLI commands

- aos8 - `show vlan members` [#47](https://github.com/jefvantongerloo/textfsm-aos/pull/47)

### Changed

- parser - remove scrapli dependency by using native TextFSM module [#45](https://github.com/jefvantongerloo/textfsm-aos/pull/45)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ parsed result
| show system | :heavy_check_mark: | :heavy_check_mark: |
| show transceivers | :x: | :heavy_check_mark: |
| show vlan | :heavy_check_mark: | :heavy_check_mark: |
| show vlan members | :x: | :heavy_check_mark: |
| show vlan port mobile | :heavy_check_mark: | :x: |

## Direct TextFSM example usage
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
vlan port type status
--------+------------+------------+--------------
1 1/1/1 default inactive
1 1/1/13 default forwarding
1 0/1 default forwarding
3200 1/1/25 unpUntag forwarding
3200 0/1 qtagged forwarding
3201 2/1/1 default inactive
25 changes: 25 additions & 0 deletions tests/ale_aos8_show_vlan_members/ale_aos8_show_vlan_members.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
- vlan: '1'
port: 1/1/1
type: default
status: inactive
- vlan: '1'
port: 1/1/13
type: default
status: forwarding
- vlan: '1'
port: 0/1
type: default
status: forwarding
- vlan: '3200'
port: 1/1/25
type: unpUntag
status: forwarding
- vlan: '3200'
port: 0/1
type: qtagged
status: forwarding
- vlan: '3201'
port: 2/1/1
type: default
status: inactive
12 changes: 12 additions & 0 deletions textfsm_aos/templates/ale_aos8_show_vlan_members.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Value vlan (\d+)
Value port ((\d{1,2}\/)+\d*)
Value type (default|qtagged|dynamic|mirror|mirrored|spb|unpUntag|unpQntag)
Value status (inactive|forwarding|blocking)

Start
^\s*vlan\s+port\s+type\s+status\s*$$
^[-+\+]+\s*$$ -> MEMBERS

MEMBERS
^\s+${vlan}\s+${port}\s+${type}\s+${status}$$ -> Record
^. -> Error
2 changes: 2 additions & 0 deletions textfsm_aos/templates/templates_index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,7 @@
platform: ale_aos6
- command: show vlan
platform: ale_aos8
- command: show vlan members
platform: ale_aos8
- command: show vlan port mobile
platform: ale_aos6

0 comments on commit d14dff7

Please sign in to comment.