Skip to content

Commit

Permalink
Added Juniper Junos show vlans (#1125)
Browse files Browse the repository at this point in the history
* Added index and textfsm files for Juniper 'show vlans'
  • Loading branch information
showipintbri authored Apr 26, 2022
1 parent 1b9d1a8 commit b96d5e2
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 0 deletions.
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ juniper_junos_show_ospf_neighbor.textfsm, .*, juniper_junos, sh[[ow]] ospf n[[ei
juniper_junos_show_system_uptime.textfsm, .*, juniper_junos, sh[[ow]] sys[[tem]] up[[time]]
juniper_junos_show_interfaces.textfsm, .*, juniper_junos, sh[[ow]] inte[[rfaces]]
juniper_junos_show_version.textfsm, .*, juniper_junos, sh[[ow]] ver[[sion]]
juniper_junos_show_vlans.textfsm, .*, juniper_junos, sh[[ow]] vl[[ans]]

juniper_screenos_get_route.textfsm, .*, juniper_screenos, get route

Expand Down
15 changes: 15 additions & 0 deletions ntc_templates/templates/juniper_junos_show_vlans.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Value ROUTING_INSTANCE (\S+)
Value VLAN_NAME (\S+)
Value TAG (\d+)
Value List INTERFACES (\S+)

Start
^Routing\sinstance\s+VLAN\sname\s+Tag\s+Interfaces$$ -> VLAN

VLAN
^\S -> Continue.Record
^${ROUTING_INSTANCE}\s+${VLAN_NAME}\s+${TAG}\s*$$
^\s+${INTERFACES}$$
^\s*$$
^{master:\d+}
^. -> Error
28 changes: 28 additions & 0 deletions tests/juniper_junos/show_vlans/juniper_junos_show_vlans.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Routing instance VLAN name Tag Interfaces
default-switch v100-Control 100
ae0.0*
et-0/0/24.0*
ge-0/0/3.0
xe-0/0/13.0*
xe-0/0/15.0*
xe-0/0/17.0*
xe-0/0/9.0*
default-switch v1005-HelpDesk 1005
ae0.0*
et-0/0/24.0*
ge-0/0/7.0
xe-0/0/13.0*
xe-0/0/15.0*
xe-0/0/17.0*
xe-0/0/9.0*
default-switch v109-TEMP-Project-Data 109
ae0.0*
et-0/0/24.0*
ge-0/0/7.0
xe-0/0/13.0*
xe-0/0/15.0*
xe-0/0/17.0*
xe-0/0/22.0
xe-0/0/9.0*

{master:0}
36 changes: 36 additions & 0 deletions tests/juniper_junos/show_vlans/juniper_junos_show_vlans.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
parsed_sample:
- routing_instance: "default-switch"
vlan_name: "v100-Control"
tag: "100"
interfaces:
- "ae0.0*"
- "et-0/0/24.0*"
- "ge-0/0/3.0"
- "xe-0/0/13.0*"
- "xe-0/0/15.0*"
- "xe-0/0/17.0*"
- "xe-0/0/9.0*"
- routing_instance: "default-switch"
vlan_name: "v1005-HelpDesk"
tag: "1005"
interfaces:
- "ae0.0*"
- "et-0/0/24.0*"
- "ge-0/0/7.0"
- "xe-0/0/13.0*"
- "xe-0/0/15.0*"
- "xe-0/0/17.0*"
- "xe-0/0/9.0*"
- routing_instance: "default-switch"
vlan_name: "v109-TEMP-Project-Data"
tag: "109"
interfaces:
- "ae0.0*"
- "et-0/0/24.0*"
- "ge-0/0/7.0"
- "xe-0/0/13.0*"
- "xe-0/0/15.0*"
- "xe-0/0/17.0*"
- "xe-0/0/22.0"
- "xe-0/0/9.0*"

0 comments on commit b96d5e2

Please sign in to comment.