diff --git a/CHANGELOG.md b/CHANGELOG.md index b239899..8253ef4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/README.md b/README.md index 4bf96cc..7ab5e9b 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/tests/ale_aos8_show_vlan_members/ale_aos8_show_vlan_members.txt b/tests/ale_aos8_show_vlan_members/ale_aos8_show_vlan_members.txt new file mode 100644 index 0000000..6a08553 --- /dev/null +++ b/tests/ale_aos8_show_vlan_members/ale_aos8_show_vlan_members.txt @@ -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 \ No newline at end of file diff --git a/tests/ale_aos8_show_vlan_members/ale_aos8_show_vlan_members.yml b/tests/ale_aos8_show_vlan_members/ale_aos8_show_vlan_members.yml new file mode 100644 index 0000000..350b4fc --- /dev/null +++ b/tests/ale_aos8_show_vlan_members/ale_aos8_show_vlan_members.yml @@ -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 \ No newline at end of file diff --git a/textfsm_aos/templates/ale_aos8_show_vlan_members.textfsm b/textfsm_aos/templates/ale_aos8_show_vlan_members.textfsm new file mode 100644 index 0000000..d543347 --- /dev/null +++ b/textfsm_aos/templates/ale_aos8_show_vlan_members.textfsm @@ -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 \ No newline at end of file diff --git a/textfsm_aos/templates/templates_index.yml b/textfsm_aos/templates/templates_index.yml index af2e79a..9022570 100644 --- a/textfsm_aos/templates/templates_index.yml +++ b/textfsm_aos/templates/templates_index.yml @@ -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 \ No newline at end of file