From 8c58ea4f491e5c2071365f2bde2a358a2fae49d6 Mon Sep 17 00:00:00 2001 From: jefvantongerloo Date: Tue, 28 Jun 2022 15:34:39 +0200 Subject: [PATCH 1/3] v1.1.0 release --- CHANGELOG.md | 3 ++- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1579748..7c6753e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Textfsm-aos release notes -## [1.0.1] - Unreleased +## [1.1.0] - 28-06-2022 ### Added CLI commands @@ -10,6 +10,7 @@ - aos8 - `show linkagg port` [#56](https://github.com/jefvantongerloo/textfsm-aos/pull/56) - aos8 - `show port-security brief` [#51](https://github.com/jefvantongerloo/textfsm-aos/pull/51) - aos8 - `show qos port` [#52](https://github.com/jefvantongerloo/textfsm-aos/pull/52) +- aos8 - `show spantree ports` [#58](https://github.com/jefvantongerloo/textfsm-aos/pull/58) ### Fixed diff --git a/pyproject.toml b/pyproject.toml index f78ff3a..afdd9c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "textfsm_aos" -version = "1.0.0" +version = "1.1.0" description = "Alcatel-Lucent Enterprise AOS CLI parsing (TextFSM)" authors = ["Jef Vantongerloo "] license = "Apache-2.0" From aeb509a4f1d2847197d5cea4a3df7a028189b82e Mon Sep 17 00:00:00 2001 From: jefvantongerloo Date: Tue, 28 Jun 2022 15:38:30 +0200 Subject: [PATCH 2/3] add ale_aos8_show_spantree_ports --- README.md | 1 + .../ale_aos8_show_spantree_ports.txt | 7 ++++ .../ale_aos8_show_spantree_ports.yml | 36 +++++++++++++++++++ .../ale_aos8_show_spantree_ports.textfsm | 15 ++++++++ textfsm_aos/templates/templates_index.yml | 2 ++ 5 files changed, 61 insertions(+) create mode 100644 tests/ale_aos8_show_spantree_ports/ale_aos8_show_spantree_ports.txt create mode 100644 tests/ale_aos8_show_spantree_ports/ale_aos8_show_spantree_ports.yml create mode 100644 textfsm_aos/templates/ale_aos8_show_spantree_ports.textfsm diff --git a/README.md b/README.md index 3dd6b41..94d235d 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,7 @@ parsed result | show snmp station | :heavy_check_mark: | :heavy_check_mark: | | show snmp community map | :heavy_check_mark: | `alias: show snmp community-map` | | show snmp community-map | `alias: show snmp community map` | :heavy_check_mark: | +| show spantree ports | :x: | :heavy_check_mark: | | show system | :heavy_check_mark: | :heavy_check_mark: | | show transceivers | :x: | :heavy_check_mark: | | show vlan | :heavy_check_mark: | :heavy_check_mark: | diff --git a/tests/ale_aos8_show_spantree_ports/ale_aos8_show_spantree_ports.txt b/tests/ale_aos8_show_spantree_ports/ale_aos8_show_spantree_ports.txt new file mode 100644 index 0000000..b2a473d --- /dev/null +++ b/tests/ale_aos8_show_spantree_ports/ale_aos8_show_spantree_ports.txt @@ -0,0 +1,7 @@ + Vlan Port Oper Status Path Cost Role Loop Guard Note +-----+-------+------------+---------+-------+----------+------ + 1 1/1/7 DIS 0 DIS DIS + 3200 0/1 FORW 1 DESG DIS + 3200 0/32 FORW 3 DESG DIS + 3201 1/1/15 FORW 4 DESG DIS + 3201 1/1/16 FORW 4 DESG DIS diff --git a/tests/ale_aos8_show_spantree_ports/ale_aos8_show_spantree_ports.yml b/tests/ale_aos8_show_spantree_ports/ale_aos8_show_spantree_ports.yml new file mode 100644 index 0000000..d1de7de --- /dev/null +++ b/tests/ale_aos8_show_spantree_ports/ale_aos8_show_spantree_ports.yml @@ -0,0 +1,36 @@ +--- +- cist_param: '1' + port: '1/1/7' + oper_status: 'DIS' + path_cost: '0' + role: 'DIS' + loop_guard: 'DIS' + note: '' +- cist_param: '3200' + port: '0/1' + oper_status: 'FORW' + path_cost: '1' + role: 'DESG' + loop_guard: 'DIS' + note: '' +- cist_param: '3200' + port: '0/32' + oper_status: 'FORW' + path_cost: '3' + role: 'DESG' + loop_guard: 'DIS' + note: '' +- cist_param: '3201' + port: '1/1/15' + oper_status: 'FORW' + path_cost: '4' + role: 'DESG' + loop_guard: 'DIS' + note: '' +- cist_param: '3201' + port: '1/1/16' + oper_status: 'FORW' + path_cost: '4' + role: 'DESG' + loop_guard: 'DIS' + note: '' \ No newline at end of file diff --git a/textfsm_aos/templates/ale_aos8_show_spantree_ports.textfsm b/textfsm_aos/templates/ale_aos8_show_spantree_ports.textfsm new file mode 100644 index 0000000..16698b3 --- /dev/null +++ b/textfsm_aos/templates/ale_aos8_show_spantree_ports.textfsm @@ -0,0 +1,15 @@ +Value cist_param (\d{1,4}) +Value port ((\d{1,2}\/)+\d*) +Value oper_status (\w+) +Value path_cost (\d+) +Value role (\w+) +Value loop_guard (ENA|DIS) +Value note (.*) + +Start + ^\s+(Bridge|Msti|Vlan)\s+Port\s+Oper Status\s+Path Cost\s+Role\s+Loop Guard\s+Note$$ + ^[-+\+]+\s*$$ -> Spantree_ports + +Spantree_ports + ^\s+${cist_param}\s+${port}\s+${oper_status}\s+${path_cost}\s+${role}\s+${loop_guard}\s+${note}\s*$$ -> Record + ^. -> Error diff --git a/textfsm_aos/templates/templates_index.yml b/textfsm_aos/templates/templates_index.yml index a5bba6a..54b08f9 100644 --- a/textfsm_aos/templates/templates_index.yml +++ b/textfsm_aos/templates/templates_index.yml @@ -83,6 +83,8 @@ platform: ale_aos6 - command: show snmp community-map platform: ale_aos8 +- command: show spantree ports + platform: ale_aos8 - command: show system platform: ale_aos6 - command: show system From 6482fec73a9044b8617b4f2ba683e710f04e7b5a Mon Sep 17 00:00:00 2001 From: jefvantongerloo Date: Tue, 28 Jun 2022 15:49:56 +0200 Subject: [PATCH 3/3] add travis-ci build status badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 94d235d..4f03aea 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://app.travis-ci.com/jefvantongerloo/textfsm-aos.svg?branch=main)](https://app.travis-ci.com/jefvantongerloo/textfsm-aos) + # TEXTFSM-AOS > Alcatel-Lucent Enterprise AOS CLI parsing