diff --git a/templates/cisco_ios_show_snmp_user.template b/templates/cisco_ios_show_snmp_user.template new file mode 100644 index 0000000000..32c6e8e3bc --- /dev/null +++ b/templates/cisco_ios_show_snmp_user.template @@ -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 diff --git a/templates/index b/templates/index index a2b4bbc876..4af7c17452 100644 --- a/templates/index +++ b/templates/index @@ -173,6 +173,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]] diff --git a/tests/cisco_ios/show_snmp_user/cisco_ios_show_snmp_user.parsed b/tests/cisco_ios/show_snmp_user/cisco_ios_show_snmp_user.parsed new file mode 100644 index 0000000000..9aa4915131 --- /dev/null +++ b/tests/cisco_ios/show_snmp_user/cisco_ios_show_snmp_user.parsed @@ -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 diff --git a/tests/cisco_ios/show_snmp_user/cisco_ios_show_snmp_user.raw b/tests/cisco_ios/show_snmp_user/cisco_ios_show_snmp_user.raw new file mode 100644 index 0000000000..9d0fbff33b --- /dev/null +++ b/tests/cisco_ios/show_snmp_user/cisco_ios_show_snmp_user.raw @@ -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