Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aos vlan #345

Merged
merged 6 commits into from
Jan 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions templates/alcatel_aos_show_vlan.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Value VLAN (\d+)
Value TYPE (std|vstk|gvrp|ipmv)
Value ADMIN_STATE (on|off)
Value OPERATIONAL_STATE (on|off)
Value SPANNING_TREE_1X1 (on|off)
Value SPANNING_TREE_FLAT (on|off)
Value AUTH (on|off)
Value IP (on|off)
Value MBLETAG (on|off)
Value SOURCE_LEARN (on|off)
Value NAME ((\S+\s*)+\S+)

Start
^\s*${VLAN}\s+${TYPE}\s+${ADMIN_STATE}\s+${OPERATIONAL_STATE}\s+${SPANNING_TREE_1X1}\s+${SPANNING_TREE_FLAT}\s+${AUTH}\s+${IP}\s+${MBLETAG}\s+${SOURCE_LEARN}\s+${NAME}\s*$$ -> Record
^\s*stree\s+mble\s+src\s*$$
^\s*vlan\s+type\s+admin\s+oper\s+1x1\s+flat\s+auth\s+ip\s+tag\s+lrn\s+name\s*$$
^-----\+-----\+------\+------\+------\+------\+----\+-----\+-----\+------\+----------
^.*$$ -> Error
2 changes: 2 additions & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#
Template, Hostname, Platform, Command

alcatel_aos_show_vlan.template, .*, alcatel_aos, show vlan

alcatel_sros_show_router_bgp_routes_vpn-ipv4.template, .*, alcatel_sros, sh[[ow]] router bgp rou[[tes]] vpn-ipv4
alcatel_sros_show_service_id_base.template, .*, alcatel_sros, sh[[ow]] serv[[ice]] id ba[[se]]
alcatel_sros_oam_mac-ping.template, .*, alcatel_sros, oam mac-pi[[ng]]
Expand Down
49 changes: 49 additions & 0 deletions tests/alcatel_aos/show_vlan/alcatel_aos_show_vlan.parsed
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
parsed_sample:
- admin_state: 'on'
auth: 'off'
ip: 'off'
mbletag: 'off'
name: 'VLAN 1'
operational_state: 'on'
source_learn: 'on'
spanning_tree_1x1: 'on'
spanning_tree_flat: 'on'
type: 'std'
vlan: '1'

- admin_state: 'on'
auth: 'off'
ip: 'off'
mbletag: 'off'
name: 'name with spaces'
operational_state: 'off'
source_learn: 'on'
spanning_tree_1x1: 'on'
spanning_tree_flat: 'on'
type: 'std'
vlan: '10'

- admin_state: 'on'
auth: 'off'
ip: 'on'
mbletag: 'off'
name: 'name-with-dashes'
operational_state: 'on'
source_learn: 'on'
spanning_tree_1x1: 'on'
spanning_tree_flat: 'on'
type: 'std'
vlan: '100'

- admin_state: 'on'
auth: 'off'
ip: 'on'
mbletag: 'off'
name: 'namewithoutnothing'
operational_state: 'on'
source_learn: 'on'
spanning_tree_1x1: 'on'
spanning_tree_flat: 'on'
type: 'gvrp'
vlan: '1000'
7 changes: 7 additions & 0 deletions tests/alcatel_aos/show_vlan/alcatel_aos_show_vlan.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
stree mble src
vlan type admin oper 1x1 flat auth ip tag lrn name
-----+-----+------+------+------+------+----+-----+-----+------+----------
1 std on on on on off off off on VLAN 1
10 std on off on on off off off on name with spaces
100 std on on on on off on off on name-with-dashes
1000 gvrp on on on on off on off on namewithoutnothing
2 changes: 1 addition & 1 deletion tests/test_index_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def check_order(current_os, prior_os,cmd_len, prior_len, os_choices, used_os, cm
def test_index_ordering():

os_choices = [
'a10', 'alcatel_sros', 'arista_eos', 'aruba_os', 'avaya_ers', 'avaya_vsp',
'a10', 'alcatel_aos', 'alcatel_sros', 'arista_eos', 'aruba_os', 'avaya_ers', 'avaya_vsp',
'brocade_fastiron', 'brocade_netiron', 'brocade_nos', 'brocade_vdx', 'brocade_vyos',
'checkpoint_gaia', 'cisco_asa', 'cisco_ios', 'cisco_nxos', 'cisco_s300', 'cisco_wlc',
'cisco_xe', 'cisco_xr', 'dell_force10', 'enterasys', 'extreme', 'f5_ltm', 'fortinet',
Expand Down