diff --git a/changelogs/fragments/159-snmp_community.yml b/changelogs/fragments/159-snmp_community.yml new file mode 100644 index 00000000..b8d678ee --- /dev/null +++ b/changelogs/fragments/159-snmp_community.yml @@ -0,0 +1,3 @@ +minor_changes: + - api_modify - add support for ``trap-interfaces`` in API path ``snmp`` (https://github.com/ansible-collections/community.routeros/pull/159). + - api_modify - add support for API path ``snmp community`` (https://github.com/ansible-collections/community.routeros/pull/159). diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index 75a3610d..8d785886 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -748,20 +748,20 @@ def join_path(path): }, ), ('snmp', 'community'): APIData( - unknown_mechanism=True, - # primary_keys=('default', ), + fully_understood=True, + primary_keys=('name', ), fields={ - 'default': KeyInfo(), - 'addresses': KeyInfo(), - 'authentication-password': KeyInfo(), - 'authentication-protocol': KeyInfo(), - 'disabled': KeyInfo(), - 'encryption-password': KeyInfo(), - 'encryption-protocol': KeyInfo(), - 'name': KeyInfo(), - 'read-access': KeyInfo(), - 'security': KeyInfo(), - 'write-access': KeyInfo(), + 'addresses': KeyInfo(default='::/0'), + 'authentication-password': KeyInfo(default=''), + 'authentication-protocol': KeyInfo(default='MD5'), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'encryption-password': KeyInfo(default=''), + 'encryption-protocol': KeyInfo(default='DES'), + 'name': KeyInfo(required=True), + 'read-access': KeyInfo(default=True), + 'security': KeyInfo(default='none'), + 'write-access': KeyInfo(default=False), }, ), ('caps-man', 'aaa'): APIData( @@ -2286,6 +2286,7 @@ def join_path(path): 'trap-generators': KeyInfo(default='temp-exception'), 'trap-target': KeyInfo(default=''), 'trap-version': KeyInfo(default=1), + 'trap-interfaces': KeyInfo(default=''), }, ), ('system', 'clock'): APIData( diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index b5c684c5..3220a520 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -154,6 +154,7 @@ - routing rip - routing ripng - snmp + - snmp community - system clock - system clock manual - system identity diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index 40d90698..029fcd03 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -159,6 +159,7 @@ - routing rip - routing ripng - snmp + - snmp community - system clock - system clock manual - system identity