Skip to content

Commit

Permalink
New template cisco_ios_show_snmp_user.template (#429)
Browse files Browse the repository at this point in the history
New template: cisco_ios_show_snmp_user
  • Loading branch information
jifox authored and FragmentedPacket committed Jul 26, 2019
1 parent 10012e0 commit e43a537
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 0 deletions.
18 changes: 18 additions & 0 deletions templates/cisco_ios_show_snmp_user.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Value Required USER_NAME (\w+)
Value ENGINE_ID (\w+)
Value STORAGE_TYPE (\w+)
Value ACCESS_LIST (.*)
Value AUTHENTICATION_PROTOCOL (\w+)
Value PRIVACY_PROTOCOL (\w+)
Value GROUP_NAME (\w+)

Start
^User\s+name:\s+${USER_NAME}$$
^Engine\s+ID:\s+${ENGINE_ID}$$
^storage-type:\s${STORAGE_TYPE}\s+active\s+access-list:\s+${ACCESS_LIST}$$
^storage-type:\s${STORAGE_TYPE}\s+active$$
^Authentication\s+Protocol:\s+${AUTHENTICATION_PROTOCOL}$$
^Privacy\s+Protocol:\s+${PRIVACY_PROTOCOL}$$
^Group-name:\s+${GROUP_NAME}$$ -> Record
^\s*$$
^. -> Error
1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ cisco_ios_show_dot1x_all.template, .*, cisco_ios, sh[[ow]] dot1x a[[ll]]
cisco_ios_show_inventory.template, .*, cisco_ios, sh[[ow]] inven[[tory]]
cisco_ios_show_ip_mroute.template, .*, cisco_ios, sh[[ow]] ip mr[[oute]]
cisco_ios_show_route-map.template, .*, cisco_ios, sh[[ow]] route-m[[ap]]
cisco_ios_show_snmp_user.template, .*, cisco_ios, sh[[ow]] sn[[mp]] u[[ser]]
cisco_ios_show_ip_route.template, .*, cisco_ios, sh[[ow]] ip r[[oute]]
cisco_ios_show_aliases.template, .*, cisco_ios, sh[[ow]] alia[[ses]]
cisco_ios_show_archive.template, .*, cisco_ios, sh[[ow]] arc[[hive]]
Expand Down
16 changes: 16 additions & 0 deletions tests/cisco_ios/show_snmp_user/cisco_ios_show_snmp_user.parsed
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
parsed_sample:
- access_list: ''
authentication_protocol: SHA
engine_id: 80000009030000451DEC1085
group_name: managerpriv
privacy_protocol: AES128
storage_type: nonvolatile
user_name: user_snmp1
- access_list: '10'
authentication_protocol: SHA
engine_id: 80000009030000451DEC1085
group_name: managerpriv
privacy_protocol: AES128
storage_type: nonvolatile
user_name: user_snmp2
14 changes: 14 additions & 0 deletions tests/cisco_ios/show_snmp_user/cisco_ios_show_snmp_user.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

User name: user_snmp1
Engine ID: 80000009030000451DEC1085
storage-type: nonvolatile active
Authentication Protocol: SHA
Privacy Protocol: AES128
Group-name: managerpriv

User name: user_snmp2
Engine ID: 80000009030000451DEC1085
storage-type: nonvolatile active access-list: 10
Authentication Protocol: SHA
Privacy Protocol: AES128
Group-name: managerpriv

0 comments on commit e43a537

Please sign in to comment.