diff --git a/napalm_eos/utils/textfsm_templates/snmp_config.tpl b/napalm_eos/utils/textfsm_templates/snmp_config.tpl index 2340e09..491beb0 100644 --- a/napalm_eos/utils/textfsm_templates/snmp_config.tpl +++ b/napalm_eos/utils/textfsm_templates/snmp_config.tpl @@ -10,5 +10,6 @@ Start ^snmp-server\scontact\s${Contact} ^snmp-server\schassis-id\s${Chassis_ID} ^snmp-server\scommunity\s${Community}\s((${Mode} ${ACL})|(group\s(.*))) -> Next.Record + ^snmp-server\scommunity\s${Community}\s${Mode} -> Next.Record EOF diff --git a/test/unit/mocked_data/test_get_snmp_information/no_acl/expected_result.json b/test/unit/mocked_data/test_get_snmp_information/no_acl/expected_result.json new file mode 100644 index 0000000..5984bcc --- /dev/null +++ b/test/unit/mocked_data/test_get_snmp_information/no_acl/expected_result.json @@ -0,0 +1,11 @@ +{ + "community": { + "public": { + "mode": "ro", + "acl": "" + } + }, + "contact": "noc@cloudflare.com", + "location": "Marseille, France", + "chassis_id": "edge02.mrs01" +} diff --git a/test/unit/mocked_data/test_get_snmp_information/no_acl/show_running_config___section_snmp_server.text b/test/unit/mocked_data/test_get_snmp_information/no_acl/show_running_config___section_snmp_server.text new file mode 100644 index 0000000..5abad6f --- /dev/null +++ b/test/unit/mocked_data/test_get_snmp_information/no_acl/show_running_config___section_snmp_server.text @@ -0,0 +1,4 @@ +snmp-server contact noc@cloudflare.com +snmp-server location Marseille, France +snmp-server chassis-id edge02.mrs01 +snmp-server community public ro